1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

2875 Commits

Author SHA1 Message Date
Jeremy Allison
a0d368197d r16241: Fix Klocwork #106 and others like it.
Make 2 important changes. pdb_get_methods()
returning NULL is a *fatal* error. Don't try
and cope with it just call smb_panic. This
removes a *lot* of pointless "if (!pdb)" handling
code. Secondly, ensure that if samu_init()
fails we *always* back out of a function. That
way we are never in a situation where the pdb_XXX()
functions need to start with a "if (sampass)"
test - this was just bad design, not defensive
programming.
Jeremy.
2007-10-10 11:17:27 -05:00
Jeremy Allison
6c61dc8ed6 r16230: Fix Klocwork #861 and others. localtime and asctime
can return NULL. Ensure we check all returns correctly.
Jeremy.
2007-10-10 11:17:26 -05:00
Gerald Carter
6c1f1c091f r16219: BUG 3836, 3837, 3004: compile warning fixes from Jason Mader. 2007-10-10 11:17:26 -05:00
Volker Lendecke
4cb8cf221f r16203: Fix potentially writing one result of strtok beyond the end of alt_path.
Found by Klocwork, ID 653.

Volker
2007-10-10 11:17:25 -05:00
Volker Lendecke
3a7d01afbe r16198: Fix Klocwork 1023 2007-10-10 11:17:24 -05:00
Jeremy Allison
6cd1cb5c9d r16112: Added Volker's fix for extra odd byte at the end
of UNIX_BASIC infolevel. Checked client implementations
(cifsfs and libsmb) and they ignore it. Thanks Volker.
Jeremy.
2007-10-10 11:17:20 -05:00
James Peach
aafd4db457 r16057: Coalesce the DMAPI configure tests into a single macro. Add
a more specific probe to try and eliminate old, incompatible
DMAPI implementations provided by IRIX 6.4 and AIX 4.3.
2007-10-10 11:17:18 -05:00
Jeremy Allison
146a264815 r15960: Don't double-free (ensure we always free file_fsp in
the same place on error - I missed the extra free in
delay_for_oplocks).
Jeremy.
2007-10-10 11:17:15 -05:00
Jeremy Allison
1117a327bd r15959: Ooops. Use the right file_free call...
Jeremy.
2007-10-10 11:17:15 -05:00
Jeremy Allison
c7c9adcce7 r15958: Make us pass RAW-OPLOCK with kernel oplocks off.
This allows a requestor to set FORCE_OPLOCK_BREAK_TO_NONE
to ensure we don't break to level 2. Fixed a couple
of resource leaks in error paths in open_file_ntcreatex.
Jeremy.
2007-10-10 11:17:14 -05:00
Jeremy Allison
ad3bc112a2 r15951: oplock_request must be an int, not a BOOL. We
were getting away with mixing types. Not cool.
Jeremy.
2007-10-10 11:17:14 -05:00
Jeremy Allison
ad9895c654 r15949: Patch for bug #3308 to stop us returning duplicate
mid replies on path based set-eof trans2 calls.
Needs modification for HEAD (as in head open_file_ntcreateX
properly returns NTSTATUS - I'll fix this tomorrow my
time). Secondly it still fails the Samba4 RAW-OPLOCK
smbtorture because of an interesting case. Our oplock
code always returns "break to level 2" if it can.
In this case (path-based set-eof or set-allocation size
on an exclusive oplocked file) W2K3 always sends a
break-to-none. We send the break to none (from level2)
after we've done the write for eof or allocation size.
I need to work out some way of telling our break code
to always break to none (might need to extend the message
field).
Jeremy.
2007-10-10 11:17:14 -05:00
James Peach
784126edff r15943: Update misleading DEBUG statements and comments that refer to
open_file_shared.
2007-10-10 11:17:14 -05:00
Jeremy Allison
e39c11c911 r15936: Fix memory leak on error exit path. Trying to
track down #3308.
Jeremy.
2007-10-10 11:17:14 -05:00
Volker Lendecke
c24bfdce62 r15911: Make us survive rpc-authcontext committed next 2007-10-10 11:17:13 -05:00
Jeremy Allison
c66620770d r15887: Ensure we use sys_write so we're not interrupted.
Jeremy.
2007-10-10 11:17:12 -05:00
James Peach
bf3b71c845 r15848: Introduce commandline options to set the remainder of the parameters in
dynconfig.c. This is mainly useful for test harness scripts, hence the
lack of short options.
2007-10-10 11:17:11 -05:00
Volker Lendecke
72f103708d r15817: Remove some unused code 2007-10-10 11:17:10 -05:00
Gerald Carter
466478f07e r15712: BUG 3435: patch from volker to fix 'msdfs root = yes' in [homes] 2007-10-10 11:17:09 -05:00
Jeremy Allison
fd6fa1d4ea r15668: DOS or FCB opens share one share mode entry from different
fsp pointers. Ensure we cope with this to pass Samba4
DENY tests (we used to pass these, there must have been
a regression with newer code). We now pass them.
Jeremy
2007-10-10 11:17:06 -05:00
Volker Lendecke
f66b9701b5 r15660: Without this when using smbcquotas I get
close fd=-1 fnum=4321 (numopen=1)
close_file: Could not get share mode lock for file $Extend/$Quota:$Q:$INDEX_ALLOCATION
unix_error_packet: error string = Das Argument ist ungültig
error packet at smbd/reply.c(3325) cmd=4 (SMBclose) NT_STATUS_INVALID_HANDLE

so a fake file needs special close handling I think. Jeremy, can you check
this?

Thanks,

Volker
2007-10-10 11:17:06 -05:00
Volker Lendecke
ea7cced6bc r15601: Fix segfaults with 'security=share' and 'guest only = yes'
Volker
2007-10-10 11:17:03 -05:00
Volker Lendecke
8059d0ae39 r15589: While trying to understand the vuid code I found that security=share is broken
right now. r14112 broke it, in 3.0.22 register_vuid for security=share returns
UID_FIELD_INVALID which in current 3_0 is turned into an error condition. This
makes sure that we only call register_vuid if sec!=share and meanwhile also
fixes a little memleak.

Then I also found a crash in smbclient with sec=share and hostmsdfs=yes.

There's another crash with sec=share when coming from w2k3, but I need sleep
now.

Someone (jerry,jra?) please review the sesssetup.c change.

Thanks,

Volker
2007-10-10 11:17:02 -05:00
Volker Lendecke
7945c935bf r15583: Add a comment while trying to understand this code 2007-10-10 11:17:02 -05:00
Jeremy Allison
5a17bffbcd r15555: Make "change notify timeout" a per-share parameter - used
when there's no kernel or FAM change notify. If set to zero
this will turn off change notify for the share except when
we ourselves change something (renames / deletes etc. ).
Designed to help on large directory shares where a new
changenotify is issued between each delete. This will
be fixed correctly when we move to internal change notify
(eg. back-port Samba4 changenotify).
Jeremy.
2007-10-10 11:16:59 -05:00
Günther Deschner
a75dd80c62 r15523: Honour the time_offset also when verifying kerberos tickets. This
prevents a nasty failure condition in winbindd's pam_auth where a tgt
and a service ticket could have been succefully retrieved, but just not
validated.

Guenther
2007-10-10 11:16:55 -05:00
Volker Lendecke
8cedbbfbcf r15495: current_user_info is not referenced in process.c 2007-10-10 11:16:54 -05:00
Volker Lendecke
2765c4ff8d r15475: Ugly and disgusting patch to fix the username map problem I created by
changing the token generation. I *hate* this code!

Jerry, you have been looking at this as well, can you double-check that I did
not screw it up?

Thanks,

Volker
2007-10-10 11:16:52 -05:00
Volker Lendecke
d2f39ae7fe r15472: Remove an unused function parameter 2007-10-10 11:16:52 -05:00
Jeremy Allison
e9b016ced6 r15467: Ensure every exit error path calls nt_status_squash.
Jeremy.
2007-10-10 11:16:51 -05:00
James Peach
ee75049881 r15450: Change profiling data macros to use stack variables rather than
globals. This catches mismatched start/end calls and removes
the need for special nested profiling calls.
2007-10-10 11:16:47 -05:00
James Peach
e817cfd7d3 r15446: Tidy up the formatting of locking debug messages and make it more
consistent. Bring oplocks withing the purview of the locking debug
channel.
2007-10-10 11:16:45 -05:00
Jeremy Allison
e468e1e5c2 r15404: Check for WRITE_THOUGH before calling lp_ fn. I hate
extra fn calls.
Jeremy.
2007-10-10 11:16:41 -05:00
Volker Lendecke
46d3c7668b r15359: Fix typo 2007-10-10 11:16:37 -05:00
Jeremy Allison
dbc03125f2 r15293: Don't ever set O_SYNC on open unless "strict sync = yes".
This could be the cause of the perf. problem reported
between 3.0.14a and 3.0.2x. Lufthansa has *wireless*
on their flights to the USA now...  (I'm in heaven ! :-).
Jeremy.
2007-10-10 11:16:32 -05:00
Paul Green
17774387ad r15283: Oh yeah. The build farm doesn't do much with head. OK, here is the patch to SAMBA_3_0 to declare prototypes for the initialization functions. These are the same changes I just made to head. --paulg 2007-10-10 11:16:31 -05:00
Volker Lendecke
3e616c3272 r15266: Fix bug 3720. I wonder why -O1 compiles did not catch this...
Thanks to Jason Mader for reporting this.

Volker
2007-10-10 11:16:30 -05:00
Paul Green
eb53f01863 r15196: Update a comment that I found confusing (I confuse easily). 2007-10-10 11:16:28 -05:00
Jeremy Allison
3c260bcce2 r15138: Teach Samba the difference between exclusive and batch oplocks.
Pass Samba4 oplock test (with kernel oplocks off).
Jeremy.
2007-10-10 11:16:26 -05:00
Volker Lendecke
c981bc7f31 r15133: in_server is not used anywhere 2007-10-10 11:16:25 -05:00
Volker Lendecke
6c65cccc83 r15119: Initialize our global sam sid first, quite a lot of the other initialization
routines further down depend on it.

Fix bug 3696.

Volker
2007-10-10 11:16:24 -05:00
Jeremy Allison
71d0191c31 r15115: Fix error return on sessionsetup. Ensure no
data blob is added if the logon call failed.
Jeremy.
2007-10-10 11:16:24 -05:00
Jeremy Allison
9db6617756 r15112: Move strict locking default to auto. Fix up the error
return for one of the Samba4 torture tests.
Jeremy.
2007-10-10 11:16:24 -05:00
Volker Lendecke
0a2f1ed5e9 r15103: Okay, looking closer: Samba4 tdb not exporting u32 is a bug in samba4's
tdb. tdb_open_ex needs it. Can someone from samba4 tell me how this should be
handled?

Thanks,

Volker
2007-10-10 11:16:23 -05:00
Volker Lendecke
0a1665a1b7 r15102: u32 is a tdb-only thing that's not exported by samba4 tdb. Replace by uint32.
Volker
2007-10-10 11:16:23 -05:00
Jeremy Allison
8272a5ab06 r15088: Remove all time() and gettimeofday() calls out of the mainline
packet processing code. Only do these when needed (ie. in the
idle timeout code). We drop an unneccessary global here too.
Jeremy.
2007-10-10 11:16:22 -05:00
Jeremy Allison
23dcff4d50 r15084: Try and squeeze more out of the non-read/write code path.
Jeremy.
2007-10-10 11:16:22 -05:00
Jeremy Allison
1c99aed563 r15083: Using talloc with destructors is nice and all, but in this
case it's in a performace critical path and it *hurts* us.
Go back to plain malloc/free with an explicit destructor
call.
Jeremy.
2007-10-10 11:16:22 -05:00
Volker Lendecke
efc833dcba r15035: It seems that many preprocessors do not like comments in macro args.. 2007-10-10 11:15:58 -05:00
Jeremy Allison
1217ed392b r15030: On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.
2007-10-10 11:15:58 -05:00