summaryrefslogtreecommitdiffstats
path: root/source3/smbd/open.c
Commit message (Collapse)AuthorAgeFilesLines
* r1304: Turns out non-io opens that cause oplock breaks are a *different* setJeremy Allison2007-10-101-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)
* r1263: Make "defer sharing violations" a global parameter.Jeremy Allison2007-10-101-2/+2
| | | | | Jeremy. (This used to be commit 42cdeccc36dc5f4bd133b84d4eaeb76f42f8043b)
* r1260: Added new parameter in the protocol section. "defer sharing violations",Jeremy Allison2007-10-101-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)
* r1097: Fix errno being incorrectly set. Noticed by Richard.Jeremy Allison2007-10-101-0/+1
| | | | | Jeremy. (This used to be commit c8a55e92dd9622fa2a408b5a16f1adcf22253fc5)
* r1089: Removed spurious oplock message in deferred open processing.Jeremy Allison2007-10-101-0/+10
| | | | | | Fix smb signing sequence counts. Jeremy. (This used to be commit 7e2a5c36614282b6bd50b60360f443549426dd4b)
* r1085: Now it's had some proper user testing, merge in the deferred open ↵Jeremy Allison2007-10-101-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)
* r974: Fix open code to pass more torture tests. We now pass the Samba4Jeremy Allison2007-10-101-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)
* r945: "Correct" (as in, more correct) way to handle stat opens. Doesn't regressJeremy Allison2007-10-101-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)
* r779: Fix specific case of open that doesn't cause oplock break, or share ↵Jeremy Allison2007-10-101-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)
* r742: Volker discovered that we can truncate a locked file. Well I never ! :-).Jeremy Allison2007-10-101-22/+2
| | | | | Jeremy (This used to be commit 1099d60113c2d7b2e5a27a10666cdf885c668778)
* r740: Fix Bug #1301. Return NT_STATUS_SHARING_VIOLATION when share mode lockingRichard Sharpe2007-10-101-0/+14
| | | | | requests fail. (This used to be commit 5082eb30d0d7c3a4c79b7578457682523a4e80a3)
* Added per-share parameter "store dos attributes". When set, will storeJeremy Allison2004-04-021-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)
* Fix for #1064 - ensure truncate attribute checking is done correctly on ↵Jeremy Allison2004-03-191-1/+2
| | | | | | | "hidden" dot files. Jeremy. (This used to be commit a6045c904fbe7df111c520134581bfd4f1ca67a8)
* Can't set allocation size on directories, return correct error code onJeremy Allison2004-02-281-1/+5
| | | | | | fail if file exists and target is a directory. gentest. Jeremy. (This used to be commit f4a7ea6dc2b9f379a9c735670a49ac63818754c7)
* More gentest error fixups.Jeremy Allison2004-02-241-0/+9
| | | | | Jeremy. (This used to be commit 00f71fc8361919b87b62389ada8bd9a73f9f98b5)
* Remove unneeded second open for filename ending in '.' now we know it'sJeremy Allison2003-11-181-13/+3
| | | | | | a mangled name. Added const. Fix inspired by Andrew Bartlett ideas. Jeremy. (This used to be commit 87eb336d659dfa5e92b495dd76a0f2e534931293)
* Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>Jeremy Allison2003-10-211-1/+1
| | | | | Jeremy. (This used to be commit 63f331564396e7a4f16dce95bb98d3b6c4b75351)
* Implement SMBexit properly. Found by Samba4 tester. You must do a makeJeremy Allison2003-08-191-0/+4
| | | | | | clean proto all; after this commit. Jeremy. (This used to be commit 27af1f9feab12542dc538bfceac4593e644ba3b4)
* Fix SMBseek and get/set position information SMBs. Works againstJeremy Allison2003-08-141-3/+0
| | | | | | Samba4 tester. You will need a make clean; make all after this ! Jeremy. (This used to be commit 10d90171ed58bee3e5ab6476341059b585034134)
* An oplock break reply from the client causes the sequence number to beJeremy Allison2003-08-071-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)
* Finish tridge's patch as referenced here :Jeremy Allison2003-07-291-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)
* Fix from matt.zinkevicius@hp.com to stop files being created on read-onlyJeremy Allison2003-07-241-0/+1
| | | | | | shares in some circumstances. Jeremy. (This used to be commit b826e8c8980d26e932da55384f109f0fe6a124c7)
* Fixup a bunch of printf-style functions and debugs to use unsigned long whenTim Potter2003-07-221-3/+3
| | | | | | | 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. (This used to be commit f93528ba007c8800a850678f35f499fb7360fb9a)
* Fix spotted by Nadav Danieli <nadavd@exanet.com> - ensure dev and inodeJeremy Allison2003-07-071-0/+10
| | | | | | to fix open mode race condition. Jeremy. (This used to be commit cbde1c8dfcd9d3bef956fe073e7108a54b48844b)
* Removed strupper/strlower macros that automatically map to ↵Jeremy Allison2003-07-031-1/+1
| | | | | | | | strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy. (This used to be commit ff222716a08af65d26ad842ce4c2841cc6540959)
* More fixes for debug log to catch logic error.Jeremy Allison2003-05-221-7/+5
| | | | | Jeremy. (This used to be commit 84a7714eba801fefa7ad56493f20813de3943bc5)
* Add more info to debug info...Jeremy Allison2003-05-221-1/+5
| | | | | Jeremy. (This used to be commit 6d3b72b4994a5115a1e7f0ca3912692a33fc690e)
* Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy2003-05-141-10/+10
| | | | | | 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 (This used to be commit c2689ed118b490e49497a76ed6a2251262018769)
* Eliminate NULL pointers from VFS interface. All hooks now really callable, ↵Alexander Bokovoy2003-05-121-2/+2
| | | | | | producing either correct result or returning error if the feature isn't supported in the configuration (This used to be commit af0a17349e6986eef2e2fd07b4b9f0bcd33bbe1f)
* Fix VFS layer:Alexander Bokovoy2003-05-111-13/+13
| | | | | | | | | | 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 (This used to be commit 91984ef5caa2d13c5d52e1f535bd3bbbae1ec978)
* Fix for bugid 51 from Dragan Krnic.Jeremy Allison2003-05-011-5/+5
| | | | | Jeremy. (This used to be commit a2af45154d0e1bb76e78fbde1572d4fcd1ba0da2)
* This is really trying to be a StrnCpy (most names will overflow the 10 charAndrew Bartlett2003-04-241-1/+1
| | | | | limit) (This used to be commit 0e04761abe375bfea48fa2c9ba9e1dc0d56d39f7)
* Merge the 'safe' parts of my StrnCpy patch - many of the users really wantedAndrew Bartlett2003-04-231-1/+1
| | | | | | | | | | | | | 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 (This used to be commit 32fb801ddc035e8971e9911ed4b6e51892e9d1cc)
* Add runtime tests for "impossible" case with -DDEVELOPER. Trying to catch logicJeremy Allison2003-04-221-0/+27
| | | | | | error on Linux. Jeremy. (This used to be commit 546d1a941b63a538702f2fb668019d2b89f63bdc)
* Correctly return access denied on share mode deny when we can't open theJeremy Allison2003-02-121-3/+19
| | | | | | file. This is a regression that was damaged by other code. Jeremy. (This used to be commit 7844a53df72af8fd2f70d51b784352aeb1298ed2)
* Ensure we only ever set fsp->conn in one place.Jeremy Allison2003-02-041-7/+0
| | | | | Jeremy. (This used to be commit d8a42753cc1e1a94aa6b816222343e1569521f14)
* Ensure Samba passes the open attribute truncate tests in smbtorture.Jeremy Allison2003-02-041-9/+12
| | | | | Jeremy. (This used to be commit b3df40bc803e7dc3b66a95eccb335e2b1775560e)
* Fix for interesting resource constraint condition. When all opens areJeremy Allison2003-01-301-1/+1
| | | | | | | | | | | 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 (This used to be commit 33e3e863eb7f35b852384e689f3272784261fc39)
* Fix open problem with changing attributes on an existing file - basedJeremy Allison2003-01-081-8/+45
| | | | | | on work by <steve@griffin.sio2.nl>. Jeremy. (This used to be commit 1cff725e37d04e25d2cd5523683b35c82d5040fa)
* Fix problem with "hide unreadable". stat file opens are baaack :-).Jeremy Allison2003-01-031-99/+45
| | | | | Jeremy. (This used to be commit 62038a0abf193d4dc4f37c31ac77216a10f6f326)
* Very curious. It turns out attribute matching on truncate only mattersJeremy Allison2002-11-191-2/+2
| | | | | | | when opening truncate with current SYSTEM|HIDDEN -> NONE. It's fine to truncate on open with current NONE -> SYSTEM | HIDDEN. Jeremy. (This used to be commit 3bf21ca936973efcd74b826bc750131c6ab2c701)
* Fix to correctly return NT_STATUS_DELETE_PENDING.Jeremy Allison2002-11-051-0/+1
| | | | | Jeremy. (This used to be commit 4ec381d64249203e0924b86600fe8e67ada1cb5b)
* First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.Jeremy Allison2002-10-231-1/+5
| | | | | | | | 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. (This used to be commit 40eafb9dde113af9f7f1808fda22908953f7e8c3)
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-8/+57
| | | | (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-6/+12
| | | | (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
* Matched W2K *insane* open semantics....Jeremy Allison2002-03-261-0/+18
| | | | | Jeremy. (This used to be commit 6819e81da490914d2db91c4d2419d408b8d4c818)
* Fix the mp3 rename bug - also tidy up our open code and remove the specialJeremy Allison2002-03-231-167/+164
| | | | | | cases for rename and unlink. Had to add desired_access into the share mode record. Jeremy. (This used to be commit 3b1b8ac43535fb0839c5474fa55bf7150f6cde31)
* Fix stupid typo !Jeremy Allison2002-03-211-2/+2
| | | | | Jeremy. (This used to be commit d0b58f66edeac516bde2dff79ab5cf529c37954b)
* Remove the "stat open" code - make it inline. This should fix theJeremy Allison2002-03-201-74/+27
| | | | | | | | | 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. (This used to be commit 504e5ef0494c54efbd0357e334cb2aa5a9eb9c14)
* Added POSIX ACL layer into the vfs.Jeremy Allison2002-03-121-1/+1
| | | | | Jeremy. (This used to be commit 7d59445b6962547a8938928a9371651a09e26516)