1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-26 23:18:57 +03:00

157 Commits

Author SHA1 Message Date
Jeremy Allison
c8a55e92dd r1097: Fix errno being incorrectly set. Noticed by Richard.
Jeremy.
2007-10-10 10:51:54 -05:00
Jeremy Allison
7e2a5c3661 r1089: Removed spurious oplock message in deferred open processing.
Fix smb signing sequence counts.
Jeremy.
2007-10-10 10:51:54 -05:00
Jeremy Allison
894cc6d162 r1085: Now it's had some proper user testing, merge in the deferred open fix. I'm
still doing more testing, but it fixes a behaviour that we've been wrong
on ever since the start of Samba.
Jeremy.
2007-10-10 10:51:54 -05:00
Jeremy Allison
5ec4f4e4e6 r974: Fix open code to pass more torture tests. We now pass the Samba4
oplock test. We do this be changing the algorithm when breaking
oplocks slightly. Previously we broke an oplock, then re-loaded
the share modes and re-iterated. Now we break all oplocks, then
re-load the share modes and check the share details - then iterate.
This seems to match the way Win2k3 does it.
Jeremy.
2007-10-10 10:51:51 -05:00
Jeremy Allison
d8177a42d4 r945: "Correct" (as in, more correct) way to handle stat opens. Doesn't regress
the torture tester. Passes OPEN tests in Samba3 and Samba4 and oplock tests
in Samba4. Last thing to check, can an "attribute only" open actually create
a file. I think it can....
Jeremy.
2007-10-10 10:51:50 -05:00
Jeremy Allison
1f8e7946ed r779: Fix specific case of open that doesn't cause oplock break, or share mode check.
Test case provided by Volker will be added later. There may be other tests
needed.
Jeremy.
2007-10-10 10:51:37 -05:00
Jeremy Allison
1099d60113 r742: Volker discovered that we can truncate a locked file. Well I never ! :-).
Jeremy
2007-10-10 10:51:36 -05:00
Richard Sharpe
5082eb30d0 r740: Fix Bug #1301. Return NT_STATUS_SHARING_VIOLATION when share mode locking
requests fail.
2007-10-10 10:51:36 -05:00
Jeremy Allison
ed653cd468 Added per-share parameter "store dos attributes". When set, will store
dos attributes in an EA. Based on an original patch from tridge, but
modified somewhat to cover all cases.
Jeremy.
-
Jeremy Allison
a6045c904f Fix for #1064 - ensure truncate attribute checking is done correctly on "hidden" dot files.
Jeremy.
-
Jeremy Allison
f4a7ea6dc2 Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
-
Jeremy Allison
00f71fc836 More gentest error fixups.
Jeremy.
-
Jeremy Allison
87eb336d65 Remove unneeded second open for filename ending in '.' now we know it's
a mangled name. Added const. Fix inspired by Andrew Bartlett ideas.
Jeremy.
-
Jeremy Allison
63f3315643 Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>
Jeremy.
-
Jeremy Allison
27af1f9fea Implement SMBexit properly. Found by Samba4 tester. You must do a make
clean proto all; after this commit.
Jeremy.
-
Jeremy Allison
10d90171ed Fix SMBseek and get/set position information SMBs. Works against
Samba4 tester. You will need a make clean; make all after this !
Jeremy.
-
Jeremy Allison
b43ce1ff61 An oplock break reply from the client causes the sequence number to be
updated by 2 if there is no open reply outstanding, else by one....
Yes - this makes no sense....
Jeremy.
-
Jeremy Allison
7f111e545d Finish tridge's patch as referenced here :
make sure we don't allow the creation of directories containing
wildcard characters. I've only put this in mkdir at the moment, but I
suspect this will apply to all places that can create new filenames.

We need to allow the opening of existing filenames that contain
wildcards, but not allow the creation of new ones.

Jeremy.
-
Jeremy Allison
b826e8c898 Fix from matt.zinkevicius@hp.com to stop files being created on read-only
shares in some circumstances.
Jeremy.
-
Tim Potter
f93528ba00 Fixup a bunch of printf-style functions and debugs to use unsigned long when
displaying pid_t, uid_t and gid_t values.  This removes a whole lot of warnings
on some of the 64-bit build farm machines as well as help us out when 64-bit
uid/gid/pid values come along.
-
Jeremy Allison
cbde1c8dfc Fix spotted by Nadav Danieli <nadavd@exanet.com> - ensure dev and inode
to fix open mode race condition.
Jeremy.
-
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
-
Jeremy Allison
84a7714eba More fixes for debug log to catch logic error.
Jeremy.
-
Jeremy Allison
6d3b72b499 Add more info to debug info...
Jeremy.
-
Alexander Bokovoy
c2689ed118 Prefix VFS API macros with SMB_ for consistency and to avoid problems with VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out -
Alexander Bokovoy
af0a17349e Eliminate NULL pointers from VFS interface. All hooks now really callable, producing either correct result or returning error if the feature isn't supported in the configuration -
Alexander Bokovoy
91984ef5ca Fix VFS layer:
1. Finally work with cascaded modules with private data storage per module
2. Convert VFS API to macro calls to simplify cascading
3. Add quota support to VFS layer (prepare to NT quota support)

Patch by Stefan (metze) Metzemacher, with review of Jelmer and me
Tested in past few weeks. Documentation to new VFS API for third-party developers to follow
-
Jeremy Allison
a2af45154d Fix for bugid 51 from Dragan Krnic.
Jeremy.
-
Andrew Bartlett
0e04761abe This is really trying to be a StrnCpy (most names will overflow the 10 char
limit)
-
Andrew Bartlett
32fb801ddc Merge the 'safe' parts of my StrnCpy patch - many of the users really wanted
a pstrcpy/fstrcpy or at most a safe_strcpy().

These have the advantage of being compiler-verifiable.

Get these out of the way, along with a rewrite of 'get_short_archi' in the
spoolss client and server.  (This pushes around const string pointers, rather
than copied strings).

Andrew Bartlett
-
Jeremy Allison
546d1a941b Add runtime tests for "impossible" case with -DDEVELOPER. Trying to catch logic
error on Linux.
Jeremy.
-
Jeremy Allison
7844a53df7 Correctly return access denied on share mode deny when we can't open the
file. This is a regression that was damaged by other code.
Jeremy.
-
Jeremy Allison
d8a42753cc Ensure we only ever set fsp->conn in one place.
Jeremy.
-
Jeremy Allison
b3df40bc80 Ensure Samba passes the open attribute truncate tests in smbtorture.
Jeremy.
-
Jeremy Allison
33e3e863eb Fix for interesting resource constraint condition. When all opens are
level 2 and a request for open with no oplock is received then the
smbd should send *synchronous* break messages, not asynchronous,
otherwise it spins very rapidly, releasing the lock, sending the
'break to none' messages and then re-acquiring the lock before
any other process has a chance to get the lock and remove it's own
oplock (at least on linux).
Jeremy
-
Jeremy Allison
1cff725e37 Fix open problem with changing attributes on an existing file - based
on work by  <steve@griffin.sio2.nl>.
Jeremy.
-
Jeremy Allison
62038a0abf Fix problem with "hide unreadable". stat file opens are baaack :-).
Jeremy.
-
Jeremy Allison
3bf21ca936 Very curious. It turns out attribute matching on truncate only matters
when opening truncate with current SYSTEM|HIDDEN -> NONE. It's fine to
truncate on open with current NONE -> SYSTEM | HIDDEN.
Jeremy.
-
Jeremy Allison
4ec381d642 Fix to correctly return NT_STATUS_DELETE_PENDING.
Jeremy.
-
Jeremy Allison
40eafb9dde First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.
This is not 100% the same as what SuSE shipped in their Samba, there is
a crash bug fix, a race condition fix, and a few logic changes I'd like to
discuss with Andreas. Added Andreas to (C) notices for posix_acls.c
Jeremy.
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Jeremy Allison
6819e81da4 Matched W2K *insane* open semantics....
Jeremy.
-
Jeremy Allison
3b1b8ac435 Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record.
Jeremy.
-
Jeremy Allison
d0b58f66ed Fix stupid typo !
Jeremy.
-
Jeremy Allison
504e5ef049 Remove the "stat open" code - make it inline. This should fix the
bugs with opening and renaming mp3 files, also the word rename
problems that people have had for a while.
Needs a make clean :-) make.
Also added JohnR's printing fix.
Jeremy.
-
Jeremy Allison
7d59445b69 Added POSIX ACL layer into the vfs.
Jeremy.
-
Jeremy Allison
d85133e269 Implemented default ACL patch (set inherit acls = true on a per share basis).
Based on code donated by Olaf Frczyk <olaf@cbk.poznan.pl>. Further commit
will change to sending via vfs interface.
Jeremy.
-
Jeremy Allison
25dd73be29 Fixed delete on close semantics - preparing for share mode rewrite.
Jeremy.
-
Andrew Tridgell
d09ae0c667 This is a nasty hack to fix "xcopy /o" from win2000 on a Samba share
The hack passes the true ntcreate desired_access down to open_file_shared1()
from the ntcreatex function. This is used to determine if share modes
should be used in denying this open.

This hack will become unnecessary when we redo open.c to use the proper
NTCreateX semantics rather than trying to jam the ntcreate semantics into
openX semantics.
-