summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r13694: Committing patch from Aleksey Fedoseev <aleksey at fedoseev dot net> ↵Volker Lendecke1-1/+1
to NULL out a pointer after talloc_destroy(). Volker (This used to be commit 788e52eb5d17a8f5b41b6ad5244ccf448fc81a36)
2007-10-10r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()Gerald Carter1-12/+12
macro which sets the freed pointer to NULL. (This used to be commit b65be8874a2efe5a4b167448960a4fcf6bd995e2)
2007-10-10r13559: Fix bug #3522 reported by Sandeep Tamhankar ↵Jeremy Allison1-6/+0
<sandman@electric-cloud.com>. mkdir foo returns the wrong error message when file foo exists. Jeremy. (This used to be commit c8185e7f94cbcf2125bf0e84db02fb8d19111f60)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-9/+1
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r13314: This code has been causing problems since 1.9.x I think.Jeremy Allison1-19/+0
Remove check_for_pipe() - Volker was completely correct. If it gets re-added it will be in a old open call path, not in the generic code path. Jeremy. (This used to be commit 50c894a6e949d4d3579926650674f381a821a671)
2007-10-10r13299: From testing W2K3 and W2K the delete on close bit seems to be alwaysJeremy Allison1-3/+3
honored (ie. the file gets deleted) for derectories when set at open time - even though it doesn't show in the qfileinfo call. This is not true of files.... (if anyone from the EU is listening, it's stuff like this that makes CIFS non-documentable :-). Jeremy. (This used to be commit e2fc8a196a06f76aa47fabc30872c701a2f7ccec)
2007-10-10r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison1-0/+2
by saving the UNIX token used to set a delete on close flag, and using it when doing the delete. libsmbsharemodes.so still needs updating to cope with this change. Samba4 torture tests to follow. Jeremy. (This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
2007-10-10r13274: Fix for bug #3467. Not a show stopper.Jeremy Allison1-24/+22
jason qian <jason@infrant.com> was a *fantastic* help in tracking this down. Jeremy. (This used to be commit 9f4a9c70fa232047868e5d8a3f132a2dd6bfee82)
2007-10-10r12877: Stop passing structs around in smb messages, insteadJeremy Allison1-6/+16
always linearize into little-endian. Should fix all Solaris issues with this, plus provide a cleaner base moving forward for cluster-aware Samba where smbd's can communicate across different compilers/architectures (eventually these message will have to go cross-machine). Jeremy. (This used to be commit d01824b78576a034428e1cef73868d1169057991)
2007-10-10r12735: After talking to Tridge and Jeremy... This needs to be made more genericVolker Lendecke1-14/+0
before it goes in. Volker (This used to be commit 2c3d5c029a31111e1fe84ddc13c1bfc183d8bfde)
2007-10-10r12721: GPFS 2.4 on Linux will contain some windows semantics, ie share ↵Volker Lendecke1-0/+14
modes and oplocks across the cluster. Adapt Samba to it. The gpfs API is called via libgpfs.so. This code is written with dlopen(), so that you can compile on a system with gpfs installed and later on run on systems without gpfs available. So to actually make Samba call gpfs share mode calls you need to compile with gpfs.h and libgpfs.so around and set 'gpfs share = yes' on the shares you export from GPFS. Volker (This used to be commit 2253b17a1a88555291b59d52c826c81c2b8f7e7f)
2007-10-10r12460: Fixes for bug 3349Volker Lendecke1-2/+6
(This used to be commit 040eda6bf0517204d5650702eea7e1d1c5eeb3d5)
2007-10-10r12213: Final fix for #3303 - send rename messages to smbd'sJeremy Allison1-0/+47
that have open file handles to allow them to correctly implement delete on close. There is a further correctness fix I'm intending to add to this to cope with different share paths, but not right now... Jeremy. (This used to be commit 932e337db8788e75344e1c7cf1ef009d090cb039)
2007-10-10r12203: Add the share path into the sharemode db. This involvesJeremy Allison1-5/+10
revving the minor version number for libsmbsharemodes (we now have a new _ex interface that takes the share path as well as the filename). Needed for #3303. Some code written by SATOH Fumiyasu <fumiya@samba.gr.jp> included in the changes to locking/locking.c. The smbstatus output is a bit of a mess and needs overhauling... Jeremy. (This used to be commit 9d93af713f8520ca506730dd32aa2b994937eaba)
2007-10-10r11341: Put directory opens into the share mode db so weJeremy Allison1-3/+34
can treat them similarly to file opens (delete on close, share mode violations etc.). This fixes bug #3216 I will up the default hash size on the locking db in a later commit as this means more entries. Jeremy. (This used to be commit 1134abbbb3fd8e8b88e1a5817aae106476a4c126)
2007-10-10r10943: Unused variable. Bug #3160 from jason@ncac.gwu.eduJeremy Allison1-3/+1
Jeremy. (This used to be commit 5647a5d4b0b7e9083963bfe899e9e0f348ec8bf2)
2007-10-10r10930: Fix erroneous debug spotted by Herb.Jeremy Allison1-1/+1
Jeremy. (This used to be commit b2e22e7d128dc22d62f56fda294dc7abc076dc64)
2007-10-10r10744: Fix for the second incarnation of bug #3088, pushed by Alex MasterovJeremy Allison1-16/+0
<alex@infobit.ru>. A fcbopen specific part of the code was erroneously being called as part of the mainline open. Note, that this patch superceeds and replaces the fix that Volker added for this bug (which he added a Samba4 torture test for ) : "Fix a race condition in Samba 3. If two files are opened simultaneously with NTCREATEX_DISP_CREATE (create if not exists, else fail) they might end up with two or more times NT_STATUS_OK as EEXIST is not correctly handled." Jeremy. (This used to be commit 5d7ab9a17e793c05409a16675ac2aa2861c4f89e)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-499/+380
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r10133: Fix bug #3044. open-exec is read-only.Jeremy Allison1-1/+1
Jeremy. (This used to be commit ed644d4014c3dc6c0508e94470c277599b1db933)
2007-10-10r9584: Fix a race condition in Samba 3. If two files are opened ↵Volker Lendecke1-0/+9
simultaneously with NTCREATEX_DISP_CREATE (create if not exists, else fail) they might end up with two or more times NT_STATUS_OK as EEXIST is not correctly handled. Jeremy, please look closely at this. You can easily verify this by adding a smb_msleep(100) to the top of open_file_ntcreate and run the new samba4 torture test. It does also happen without the msleep, but not as reliably. Thanks, Volker (This used to be commit 58b9e48df03098160f39607d869a3c8e10860ba4)
2007-10-10r8492: open_mode_check does not use the parameter p_flags, so remove it.Volker Lendecke1-3/+2
Volker (This used to be commit ed9cb0061dbbc7677d5968581fde46c89febb6c0)
2007-10-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison1-779/+1127
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. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10r7963: Add aio support to 3.0.Jeremy Allison1-0/+4
Jeremy. (This used to be commit 1de27da47051af08790317f5b48b02719d6b9934)
2007-10-10r6673: Fix the write cache based on some VERY good detective workJeremy Allison1-3/+0
from Ingo Kilian <ikilian@web.de>. You must do a make clean after updating this. Jeremy. (This used to be commit 3b2cd19fcb8ce38578b122fd6ae722b73081dcda)
2007-10-10r6344: Fix bug #2601 - it seems that DOS_OPEN_EXEC does mean readonly. NeededJeremy Allison1-1/+1
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. (This used to be commit 77c0ade9fa1e6a31739823be0faa50799bac2775)
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis1-3/+1
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r6200: Returned access should contain share mode as well as open mode.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 3aa784c07723430b429adc9abab9cc7c1325cb35)
2007-10-10r6174: Fixup T2 open call - we were returning 2 bytes short.Jeremy Allison1-17/+0
Jeremy. (This used to be commit 0c7de7615bf0edbb36a3afee445db13a71e26d2e)
2007-10-10r6172: Tidy up error processing significantly. Remove unix_ERR_XXX global ↵Jeremy Allison1-69/+32
nastyness. Jeremy. (This used to be commit d3379fe61bb934082b51a37adac232a96bafcf46)
2007-10-10r6152: Correctly check OpenX open modes.Jeremy Allison1-13/+35
Jeremy. (This used to be commit 326124a7b366feaca6162f7defae89618b005adc)
2007-10-10r5854: Fix coredump when OS/2 checks for long file name support (with .+,;=[].).Jim McDonough1-7/+5
Bugzilla 2338. Thanks to Guenter Kukkukk <guenter.kukkukk@kukkukk.com> (This used to be commit c13736287104d96fcc87ada0784eb43c6e373171)
2007-10-10r5848: Fix inherit owner to chown directories in a porable and secure way (fromJeremy Allison1-37/+25
just secure on Linux). Idea from tridge. Jeremy. (This used to be commit c0924a497b51c126a1db55f48cbf461855dd6c6a)
2007-10-10r5792: Added new parameter "inherit owner". If set on a share, the created ↵Jeremy Allison1-27/+125
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. (This used to be commit 2e1f727184b9d025d2e3413bdd3d01d5ca803a41)
2007-10-10r5630: This may be a mistake ... needs more cthon investigation.Jeremy Allison1-0/+3
Jeremy. (This used to be commit 0322c5884666bf62a37de069a1cd0ae888ac4285)
2007-10-10r5623: Horrible band-aid patch to fix Blue-Arc torture tester.Jeremy Allison1-1/+7
I know this isn't right but will work until I can refactor the deny mode code with the Samba4 algorithm. Jeremy. (This used to be commit f38f464c722a441402e2d6e2622bcce9227c33b5)
2007-10-10r5014: Split out the request to send an async level II oplock break into aJeremy Allison1-1/+1
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. (This used to be commit 05697fb50236dfc28e81f8b3900eac17cace57c1)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-1/+1
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,Jeremy Allison1-3/+3
not an existing one. Jeremy. (This used to be commit fbbdb72cf1adfe567112556626f26b031747f440)
2007-10-10r3853: Fix an uninitialized variable warning. Jeremy, there are some of these inVolker Lendecke1-0/+2
charcnv.c. Volker (This used to be commit 650d52648dbf67f71d7619ffb8bf32d93a15ae9c)
2007-10-10r3002: Fix for bug #1886 - prevent delete on close being setJeremy Allison1-2/+14
for readonly files (and return the correct error code). We now pass the Samba4 test suite on this. Jeremy. (This used to be commit 6ae417f12cc6f8d2ad00bea27ce0a20242f76325)
2007-10-10r2083: Fix memleak on return code path.Jeremy Allison1-5/+6
Jeremy. (This used to be commit b0af241fd1fc58c1cbaadcbf6832b608923382ff)
2007-10-10r2027: Fix for but #1657, used initialized variable, fromJeremy Allison1-1/+1
Helmut Heinreichsberger <helmut.heinreichsberger@chello.at>. Jeremy. (This used to be commit 07f7aa6afb0945bb0e108981c4984a6c04c42a53)
2007-10-10r1304: Turns out non-io opens that cause oplock breaks are a *different* setJeremy Allison1-2/+2
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. (This used to be commit 38002bfc1c0981a2dba3f2319624c1ef055a3648)
2007-10-10r1263: Make "defer sharing violations" a global parameter.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 42cdeccc36dc5f4bd133b84d4eaeb76f42f8043b)
2007-10-10r1260: Added new parameter in the protocol section. "defer sharing violations",Jeremy Allison1-0/+8
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. (This used to be commit bee0619cc476335e19a5f76179832802587563d1)
2007-10-10r1097: Fix errno being incorrectly set. Noticed by Richard.Jeremy Allison1-0/+1
Jeremy. (This used to be commit c8a55e92dd9622fa2a408b5a16f1adcf22253fc5)
2007-10-10r1089: Removed spurious oplock message in deferred open processing.Jeremy Allison1-0/+10
Fix smb signing sequence counts. Jeremy. (This used to be commit 7e2a5c36614282b6bd50b60360f443549426dd4b)
2007-10-10r1085: Now it's had some proper user testing, merge in the deferred open ↵Jeremy Allison1-19/+181
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. (This used to be commit 894cc6d16296b934c112786eec896846156aee5d)
2007-10-10r974: Fix open code to pass more torture tests. We now pass the Samba4Jeremy Allison1-28/+87
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. (This used to be commit 5ec4f4e4e6596ea0f52aca5c9e1a75bf35612e37)