1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-25 00:59:11 +03:00
Commit Graph

174 Commits

Author SHA1 Message Date
d3379fe61b r6172: Tidy up error processing significantly. Remove unix_ERR_XXX global nastyness.
Jeremy.
2007-10-10 10:56:27 -05:00
326124a7b3 r6152: Correctly check OpenX open modes.
Jeremy.
2007-10-10 10:56:25 -05:00
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
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
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
0322c58846 r5630: This may be a mistake ... needs more cthon investigation.
Jeremy.
2007-10-10 10:55:51 -05:00
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
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
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
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
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
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
b0af241fd1 r2083: Fix memleak on return code path.
Jeremy.
2007-10-10 10:52:31 -05:00
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
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
42cdeccc36 r1263: Make "defer sharing violations" a global parameter.
Jeremy.
2007-10-10 10:52:04 -05:00
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
c8a55e92dd r1097: Fix errno being incorrectly set. Noticed by Richard.
Jeremy.
2007-10-10 10:51:54 -05:00
7e2a5c3661 r1089: Removed spurious oplock message in deferred open processing.
Fix smb signing sequence counts.
Jeremy.
2007-10-10 10:51:54 -05:00
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
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
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
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
1099d60113 r742: Volker discovered that we can truncate a locked file. Well I never ! :-).
Jeremy
2007-10-10 10:51:36 -05:00
5082eb30d0 r740: Fix Bug #1301. Return NT_STATUS_SHARING_VIOLATION when share mode locking
requests fail.
2007-10-10 10:51:36 -05:00
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.
-
a6045c904f Fix for #1064 - ensure truncate attribute checking is done correctly on "hidden" dot files.
Jeremy.
-
f4a7ea6dc2 Can't set allocation size on directories, return correct error code on
fail if file exists and target is a directory. gentest.
Jeremy.
-
00f71fc836 More gentest error fixups.
Jeremy.
-
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.
-
63f3315643 Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>
Jeremy.
-
27af1f9fea Implement SMBexit properly. Found by Samba4 tester. You must do a make
clean proto all; after this commit.
Jeremy.
-
10d90171ed Fix SMBseek and get/set position information SMBs. Works against
Samba4 tester. You will need a make clean; make all after this !
Jeremy.
-
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.
-
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.
-
b826e8c898 Fix from matt.zinkevicius@hp.com to stop files being created on read-only
shares in some circumstances.
Jeremy.
-
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.
-
cbde1c8dfc Fix spotted by Nadav Danieli <nadavd@exanet.com> - ensure dev and inode
to fix open mode race condition.
Jeremy.
-
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.
-
84a7714eba More fixes for debug log to catch logic error.
Jeremy.
-
6d3b72b499 Add more info to debug info...
Jeremy.
-
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 -
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 -
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
-
a2af45154d Fix for bugid 51 from Dragan Krnic.
Jeremy.
-
0e04761abe This is really trying to be a StrnCpy (most names will overflow the 10 char
limit)
-
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
-
546d1a941b Add runtime tests for "impossible" case with -DDEVELOPER. Trying to catch logic
error on Linux.
Jeremy.
-
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.
-
d8a42753cc Ensure we only ever set fsp->conn in one place.
Jeremy.
-