1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

50158 Commits

Author SHA1 Message Date
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Jelmer Vernooij
2dc045007e make: Search for c tags in ../ as well. 2009-01-01 03:30:54 +01:00
Jeremy Allison
07e0094365 Fix all warnings in source3 with gcc4.3.
Jeremy.
2008-12-31 18:06:57 -08:00
Jeremy Allison
bb23f5725f Fix more asprintf and "ignoring return code" warnings from gcc 4.3.
Jeremy.
2008-12-31 16:30:11 -08:00
Volker Lendecke
d99aeed50f Replace a static variable and alarm() calls by using sys_select()
Günther, please check!
2008-12-31 19:33:26 +01:00
Volker Lendecke
608910d40b Fix some nonempty blank lines 2008-12-31 19:33:26 +01:00
Volker Lendecke
8ae4155f82 Make a CONST_DISCARD unnecessary by applying some const
Derrell, please check!
2008-12-31 19:33:25 +01:00
Volker Lendecke
1ce9525be2 Replace "goto again" by "return NT_STATUS_RETRY" in receive_message_or_smb
This gives lower-level routines the chance to indicate a retry condition
2008-12-31 19:33:25 +01:00
Volker Lendecke
98f830cdfc Disable the use of splice(2)
On a debian lenny installation with a kernel that calls itself 2.6.28, I could
repeatably block smbd using splice. According to the output of netstat, the
recvq of the TCP connection was full and at the same time according to strace
smbd was stuck in a splice syscall trying to read from that TCP connection. We
can not protect ourselves from this condition, as nobody will ever notify us
that something is broken. So sadly we can't use splice yet at all. Maybe in
2.6.29...
2008-12-31 19:33:25 +01:00
Volker Lendecke
e0fd61f0cb Try to fix recvfile using splice on Linux
According to the splice(2) manpage, one of the file descriptors *must* be a
pipe. With this patch I could successfully run splice(2) on a debian lenny
installation.

Jeremy, please check!
2008-12-31 19:33:25 +01:00
Volker Lendecke
9e1cabdd43 Fix a "nested extern" warning 2008-12-31 19:33:25 +01:00
Volker Lendecke
972295f80a Rename parent_dirname_talloc() to parent_dirname() 2008-12-31 19:33:25 +01:00
Volker Lendecke
9b79181f15 Remove unused function parent_dirname 2008-12-31 19:33:25 +01:00
Volker Lendecke
70002c1667 Use parent_dirname_talloc instead of parent_dirname in smb_unix_mknod 2008-12-31 19:33:25 +01:00
Volker Lendecke
4a9a569600 Use parent_dirname_talloc instead of parent_dirname in copy_internals 2008-12-31 19:33:25 +01:00
Volker Lendecke
5f0b633c72 Use parent_dirname_talloc instead of parent_dirname in vfswrap_mkdir 2008-12-31 19:33:24 +01:00
Volker Lendecke
8a507b1e7f Make use of TALLOC_MEMDUP in parent_dirname_talloc() 2008-12-31 19:33:24 +01:00
Volker Lendecke
add3d572d0 Remove unused function get_numlist() 2008-12-31 19:33:24 +01:00
Volker Lendecke
641772b605 recvfile can't be used for printing so far 2008-12-31 18:43:11 +01:00
Stefan Metzmacher
429276556a s3:winbindd: we don't need to call messaging_reinit() twice
reinit_after_fork() already calls messaging_reinit()

metze
2008-12-31 11:01:46 +01:00
Volker Lendecke
99ab198752 Enable individual smbtorture_s3 subtests in make test 2008-12-31 10:54:09 +01:00
Volker Lendecke
ce2ff557bd Fix an ancient uninitialized variable read
The callers of open_file_ntcreate expect *psbuf to be filled correctly
2008-12-31 10:51:44 +01:00
Tim Prouty
cb5db966e3 s3 build: Revert previous patch to fix the build
888524623d broke the build.  I'm
reverting it for the short term, while I work on a better fix.
2008-12-30 18:51:16 -08:00
Jeremy Allison
9eab2bfaf1 Fix more "ignore return value" warnings from gcc 4.3.
Jeremy
2008-12-30 18:24:39 -08:00
Tim Prouty
a66c034c8e librpc: Re-run make idl-full from source3 2008-12-30 16:19:43 -08:00
Tim Prouty
2337f402f0 pidl: Fix a const build warning in the samba3 merged build
The warning:
../librpc/gen_ndr/ndr_spoolss.c: In function ‘ndr_pull_spoolss_EnumPrinterData’:
../librpc/gen_ndr/ndr_spoolss.c:14792: warning: passing argument 1 of ‘memset’ discards qualifiers from pointer target type

In some case the pidl generated code needs to memset a const struct
field.  This causes the above warning.  This patch discardeds the const
in this case.  I'm open to a more elegant fix, but this eliminates the
warning and should be relatively safe.
2008-12-30 16:19:43 -08:00
Tim Prouty
0cb430c22e s3/s4: Move CONST_DISCARD into lib/util so it's available from s3 and s4 2008-12-30 16:19:42 -08:00
Tim Prouty
888524623d s3 build: Remove redundant #defines that are in idl generated headers
This fixes a series of samba3 build warnings in the merged build:
'error: "X" redefined', where X is one of the redundant #defines
2008-12-30 16:19:29 -08:00
Tim Prouty
d217bd00a1 s4: simplify some overly-complicated logic 2008-12-30 15:21:34 -08:00
Tim Prouty
99c68fa23e s3 build: Fix warning 2008-12-30 12:53:34 -08:00
Stefan Metzmacher
465176b7e2 s3:cluster: register the client connection via CTDB_CONTROL_TCP_ADD
This means we correctly pass IPv6 addresses too.
(CTDB_CONTROL_TCP_CLIENT was IPv4 only)

metze
2008-12-30 16:18:08 +01:00
Volker Lendecke
fee2664dad Fix a memory leak in cups_pull_comment_location
We allocated "request" with ippNew, so we also should ippDelete it.
2008-12-30 15:59:25 +01:00
Volker Lendecke
b3abd484db Fix a spinning smbd when printing
Without this, we end up adding more than one timed event. In the event handler
print_notify_event_send_messages() only one event will be deleted, all others
will fire indefinitely.
2008-12-30 14:14:06 +01:00
Volker Lendecke
ff50a88331 Print the vuid in BENCH-SESSSETUP 2008-12-30 11:26:10 +01:00
Volker Lendecke
f4559530d1 Second part of the bugfix for #5933
Incrementing the next vuid did not correctly overflow

Now we survive BENCH-SESSSETUP with -o 100000. Takes a while though :-)

Thanks a lot to Ofer Tal <otsmb@shmoop.org> for reporting #5933
2008-12-30 11:26:10 +01:00
Volker Lendecke
12f4d01f4a First part of bugfix for #5933
Ofer Tal <otsmb@shmoop.org> fully correctly noted that we're incrementing
num_validated_vuids twice per session setup, but decrement it only once.
Looking at sesssetup.c we always call register_initial_vuid() before
register_existing_vuid(), so there's no point in incrementing it in
register_existing_vuid().

Jeremy, please check!
2008-12-30 11:26:10 +01:00
Volker Lendecke
cf79461f4e Move a comment to its place 2008-12-30 11:26:10 +01:00
Volker Lendecke
fb54e711fb Simplify invalidate_vuid slightly
get_valid_user_struct_internal() checks for UID_FIELD_INVALID itself
2008-12-30 11:26:10 +01:00
Volker Lendecke
9957d5f3a0 Simplify is_partial_auth_vuid slightly 2008-12-30 11:26:10 +01:00
Volker Lendecke
12c9d7fa6f Simplify invalidate_all_vuids() slightly
invalidate_vuid takes care of removing the user_struct from validated_users
2008-12-30 11:26:10 +01:00
Stefan Metzmacher
332e8ac6c4 Fix the merged build
metze
2008-12-30 10:09:59 +01:00
Stefan Metzmacher
c2dc2e0b46 lib/tevent: fix standalone make distclean realdistclean
Bug report by Brad Hards <bradh@frogmouth.net>.

metze
2008-12-30 08:58:52 +01:00
Stefan Metzmacher
791459f61b pidl: don't generate invalid C code
When we don't know how to handle a type for the python bindings,
we should not generate invalid C code.

Jelmer: please fix do the full fix for this.

metze
2008-12-29 23:23:27 +01:00
Stefan Metzmacher
7516ba860c s3:pdb_tdb: store the next rid counter in passdb.tdb instead of winbind_idmap.tdb
This upgrades the TDBSAM_VERSION to 4 and SAMU_BUFFER_V4.

metze
2008-12-29 21:10:49 +01:00
Stefan Metzmacher
671469ae7e s3:passdb: add SAMU_BUFFER_V4 with no changes
The upgrade is required because of the followin TDBSAM_VERSION
upgrade.

metze
2008-12-29 21:10:49 +01:00
Stefan Metzmacher
0544734309 s3:passdb: make marshalling struct samu from and to a buffer more generic
This marshalling isn't specific to tdbsam and it's
ugly to have the related functions in two different files.

metze
2008-12-29 21:10:49 +01:00
Stefan Metzmacher
60b366369e s4:cluster: fix dependency to TDB_WRAP
metze
2008-12-29 20:55:02 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Stefan Metzmacher
af29b82536 s4:pvfs_aio: use tevent
metze
2008-12-29 19:57:07 +01:00
Stefan Metzmacher
635a973be5 s4:sys_lease_linux: use tevent
metze
2008-12-29 19:57:00 +01:00