1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

2887 Commits

Author SHA1 Message Date
Jeremy Allison
cd048cb775 r16537: Fix for bug #3858, all files in a directory not
being deleted when hide unreadable set to true.

Here's the scoop.

This one is really interesting. The pattern of deleting a directory is to do a
findfirst to get the first part of the list, then for each name returned it
does a open/set delete on close/close -> thus deleting the file. Then it does a
findnext with the last file name THAT IT JUST DELETED ! Now we can handle this
in the findnext in the case where hide unreadable is set to false as we look
back in our cache of names and just seek to the right point. The bug is
actually fixed in the first hunk of this patch - the one that removes the
is_visible_file() check after SearchDir returns false. We don't actually need
it and in this case it's causing the delete to be aborted because it can't find
the name (doh ! it was just deleted). We don't need it as SearchDir is only
ever called from findnext, and findnext should only ever be returning names we
gave it.

The rest of the patch are the debugs I used to find
the problem but they're generically useful.

Phew - that one took a while to track down.....

Jerry, please merge for 3.0.23 final.

Jeremy.
2007-10-10 11:18:57 -05:00
Jeremy Allison
d929323d6f r16435: Add in the uid info that Jerry needs into the
share_mode struct. Allows us to know the unix
uid of the opener of the file/directory. Needed
for info level queries on open files.
Jeremy.
2007-10-10 11:18:54 -05:00
Jeremy Allison
d357f8b335 r16397: Fix Klocwork #11767 and drasticly simplify the
logic in smbd/process.c. All interested (Volker,
Jerry, James etc). PLEASE REVIEW THIS CHANGE.
The logic should be identical but *much* easier
to follow and change (and shouldn't confuse Klockwork :-).
Jeremy.
2007-10-10 11:18:52 -05:00
Jeremy Allison
aa0d739834 r16317: Klocwork #300. Check for error return on malloc.
Jeremy.
2007-10-10 11:17:33 -05:00
Jeremy Allison
c430730f5a r16311: Check for NULL return. Klocwork #998.
Jeremy.
2007-10-10 11:17:33 -05:00
Jeremy Allison
34b6b6723b r16309: Fix Klocwork #1596. Check for NULL on talloc.
Jeremy.
2007-10-10 11:17:32 -05:00
Jeremy Allison
7ac5aee88c r16295: Fix gcc4 "warning: dereferencing type-punned pointer will break
strict-aliasing rules" warning.
Jeremy.
2007-10-10 11:17:32 -05:00
Jeremy Allison
face01ef01 r16284: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned
int
in a format string.
Jeremy.
2007-10-10 11:17:31 -05:00
Jeremy Allison
45d5cad8c2 r16280: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned
int
in a format string.
Jeremy.
2007-10-10 11:17:30 -05:00
Jeremy Allison
3a15fff219 r16277: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned int
in a format string.
Jeremy.
2007-10-10 11:17:30 -05:00
Jeremy Allison
952547471f r16275: Start fixing up gcc4 -O6 warnings on an x86_64 box. size_t != unsigned int
in a format string.
Jeremy.
2007-10-10 11:17:30 -05:00
Volker Lendecke
e56e3c19e1 r16248: Fix Coverity ID 297 2007-10-10 11:17:27 -05:00
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