1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-10 04:23:50 +03:00
Commit Graph

182 Commits

Author SHA1 Message Date
Volker Lendecke
ed9cb0061d r8492: open_mode_check does not use the parameter p_flags, so remove it.
Volker
2007-10-10 11:00:06 -05:00
Jeremy Allison
c7fe18761e r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
2007-10-10 10:58:18 -05:00
Jeremy Allison
1de27da470 r7963: Add aio support to 3.0.
Jeremy.
2007-10-10 10:58:05 -05:00
Jeremy Allison
3b2cd19fcb r6673: Fix the write cache based on some VERY good detective work
from Ingo Kilian <ikilian@web.de>.
You must do a make clean after updating this.
Jeremy.
2007-10-10 10:56:50 -05:00
Jeremy Allison
77c0ade9fa r6344: Fix bug #2601 - it seems that DOS_OPEN_EXEC does mean readonly. Needed
for Win9x and OS/2 clients. More Samba4 tests against W2k3 will be needed
to confirm this but in the meantime get it up and running.
Jeremy.
2007-10-10 10:56:37 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Jeremy Allison
3aa784c077 r6200: Returned access should contain share mode as well as open mode.
Jeremy.
2007-10-10 10:56:28 -05:00
Jeremy Allison
0c7de7615b r6174: Fixup T2 open call - we were returning 2 bytes short.
Jeremy.
2007-10-10 10:56:27 -05:00
Jeremy Allison
d3379fe61b r6172: Tidy up error processing significantly. Remove unix_ERR_XXX global nastyness.
Jeremy.
2007-10-10 10:56:27 -05:00
Jeremy Allison
326124a7b3 r6152: Correctly check OpenX open modes.
Jeremy.
2007-10-10 10:56:25 -05:00
Jim McDonough
c137362871 r5854: Fix coredump when OS/2 checks for long file name support (with .+,;=[].).
Bugzilla 2338.

Thanks to Guenter Kukkukk <guenter.kukkukk@kukkukk.com>
2007-10-10 10:56:05 -05:00
Jeremy Allison
c0924a497b r5848: Fix inherit owner to chown directories in a porable and secure way (from
just secure on Linux). Idea from tridge.
Jeremy.
2007-10-10 10:56:05 -05:00
Jeremy Allison
2e1f727184 r5792: Added new parameter "inherit owner". If set on a share, the created file/directory
will be owned by the same uid as the containing directory. Doing this for directories
in a race-free mannor has only been tested on Linux (it depends on being able to open
a directory and then do a fchown on that file descriptor). If this functionality is
not available then the code silently downgrades to not changing the ownership of a
new directory. This new parameter (docs to follow) finally makes it possible to create
"drop boxes" on Samba, which requires all files within a directory to be commonly owned.
A HOWTO on how to use this will follow.
Jeremy.
2007-10-10 10:56:01 -05:00
Jeremy Allison
0322c58846 r5630: This may be a mistake ... needs more cthon investigation.
Jeremy.
2007-10-10 10:55:51 -05:00
Jeremy Allison
f38f464c72 r5623: Horrible band-aid patch to fix Blue-Arc torture tester.
I know this isn't right but will work until I can refactor
the deny mode code with the Samba4 algorithm.
Jeremy.
2007-10-10 10:55:51 -05:00
Jeremy Allison
05697fb502 r5014: Split out the request to send an async level II oplock break into a
new function to make it clear when it's called. Remove async parameter
that had been overloaded into request_oplock_break.
Inspired by work from Nadav Danieli <nadavd@exanet.com>.
Jeremy.
2007-10-10 10:55:11 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Jeremy Allison
fbbdb72cf1 r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,
not an existing one.
Jeremy.
2007-10-10 10:53:27 -05:00
Volker Lendecke
650d52648d r3853: Fix an uninitialized variable warning. Jeremy, there are some of these in
charcnv.c.

Volker
2007-10-10 10:53:21 -05:00
Jeremy Allison
6ae417f12c r3002: Fix for bug #1886 - prevent delete on close being set
for readonly files (and return the correct error code).
We now pass the Samba4 test suite on this.
Jeremy.
2007-10-10 10:52:59 -05:00
Jeremy Allison
b0af241fd1 r2083: Fix memleak on return code path.
Jeremy.
2007-10-10 10:52:31 -05:00
Jeremy Allison
07f7aa6afb r2027: Fix for but #1657, used initialized variable, from
Helmut Heinreichsberger <helmut.heinreichsberger@chello.at>.
Jeremy.
2007-10-10 10:52:29 -05:00
Jeremy Allison
38002bfc1c r1304: Turns out non-io opens that cause oplock breaks are a *different* set
of desired access flags from those that cause sharing violations.
Oplock breaks are caused by : ~(SYNCHRONIZE_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES)
Sharing violations are caused by : ~(SYNCHRONIZE_ACCESS|READ_CONTROL_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES)
We now pass the torture rename test again.
I still need to work out if subsequent opens will cause sharing violations with an existing open
mode of SYNCHRONIZE_ACCESS|READ_CONTROL_ACCESS|FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES;
Jeremy.
2007-10-10 10:52:05 -05:00
Jeremy Allison
42cdeccc36 r1263: Make "defer sharing violations" a global parameter.
Jeremy.
2007-10-10 10:52:04 -05:00
Jeremy Allison
bee0619cc4 r1260: Added new parameter in the protocol section. "defer sharing violations",
by default set to "yes" (to correctly emulate Windows). I've added this to
ensure if we find a critical problem with this new code when 3.0.5 ships
it can be turned off to test for bugs.
Jeremy.
2007-10-10 10:52:03 -05:00
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 -