summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
AgeCommit message (Collapse)AuthorFilesLines
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)
2007-10-10r945: "Correct" (as in, more correct) way to handle stat opens. Doesn't regressJeremy Allison1-22/+25
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. (This used to be commit d8177a42d4a2a2b6df5d0593f2f92bddc29ffe94)
2007-10-10r779: Fix specific case of open that doesn't cause oplock break, or share ↵Jeremy Allison1-6/+21
mode check. Test case provided by Volker will be added later. There may be other tests needed. Jeremy. (This used to be commit 1f8e7946edbb2930ba5f9738688dc843bc368fbf)
2007-10-10r742: Volker discovered that we can truncate a locked file. Well I never ! :-).Jeremy Allison1-22/+2
Jeremy (This used to be commit 1099d60113c2d7b2e5a27a10666cdf885c668778)
2007-10-10r740: Fix Bug #1301. Return NT_STATUS_SHARING_VIOLATION when share mode lockingRichard Sharpe1-0/+14
requests fail. (This used to be commit 5082eb30d0d7c3a4c79b7578457682523a4e80a3)
2004-04-02Added per-share parameter "store dos attributes". When set, will storeJeremy Allison1-35/+46
dos attributes in an EA. Based on an original patch from tridge, but modified somewhat to cover all cases. Jeremy. (This used to be commit ed653cd468213e0be901bc654aa3748ce5837947)
2004-03-19Fix for #1064 - ensure truncate attribute checking is done correctly on ↵Jeremy Allison1-1/+2
"hidden" dot files. Jeremy. (This used to be commit a6045c904fbe7df111c520134581bfd4f1ca67a8)
2004-02-28Can't set allocation size on directories, return correct error code onJeremy Allison1-1/+5
fail if file exists and target is a directory. gentest. Jeremy. (This used to be commit f4a7ea6dc2b9f379a9c735670a49ac63818754c7)
2004-02-24More gentest error fixups.Jeremy Allison1-0/+9
Jeremy. (This used to be commit 00f71fc8361919b87b62389ada8bd9a73f9f98b5)
2003-11-18Remove unneeded second open for filename ending in '.' now we know it'sJeremy Allison1-13/+3
a mangled name. Added const. Fix inspired by Andrew Bartlett ideas. Jeremy. (This used to be commit 87eb336d659dfa5e92b495dd76a0f2e534931293)
2003-10-21Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>Jeremy Allison1-1/+1
Jeremy. (This used to be commit 63f331564396e7a4f16dce95bb98d3b6c4b75351)
2003-08-19Implement SMBexit properly. Found by Samba4 tester. You must do a makeJeremy Allison1-0/+4
clean proto all; after this commit. Jeremy. (This used to be commit 27af1f9feab12542dc538bfceac4593e644ba3b4)
2003-08-14Fix SMBseek and get/set position information SMBs. Works againstJeremy Allison1-3/+0
Samba4 tester. You will need a make clean; make all after this ! Jeremy. (This used to be commit 10d90171ed58bee3e5ab6476341059b585034134)
2003-08-07An oplock break reply from the client causes the sequence number to beJeremy Allison1-0/+6
updated by 2 if there is no open reply outstanding, else by one.... Yes - this makes no sense.... Jeremy. (This used to be commit b43ce1ff6109f6422a621329ceb713b42df40040)
2003-07-29Finish tridge's patch as referenced here :Jeremy Allison1-0/+17
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. (This used to be commit 7f111e545d198faa5fa89f6d360db0d5c32a8bd7)