summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
AgeCommit message (Collapse)AuthorFilesLines
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)
2003-07-24Fix from matt.zinkevicius@hp.com to stop files being created on read-onlyJeremy Allison1-0/+1
shares in some circumstances. Jeremy. (This used to be commit b826e8c8980d26e932da55384f109f0fe6a124c7)
2003-07-22Fixup a bunch of printf-style functions and debugs to use unsigned long whenTim Potter1-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)
2003-07-07Fix spotted by Nadav Danieli <nadavd@exanet.com> - ensure dev and inodeJeremy Allison1-0/+10
to fix open mode race condition. Jeremy. (This used to be commit cbde1c8dfcd9d3bef956fe073e7108a54b48844b)
2003-07-03Removed strupper/strlower macros that automatically map to ↵Jeremy Allison1-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)
2003-05-22More fixes for debug log to catch logic error.Jeremy Allison1-7/+5
Jeremy. (This used to be commit 84a7714eba801fefa7ad56493f20813de3943bc5)
2003-05-22Add more info to debug info...Jeremy Allison1-1/+5
Jeremy. (This used to be commit 6d3b72b4994a5115a1e7f0ca3912692a33fc690e)
2003-05-14Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy1-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)
2003-05-12Eliminate NULL pointers from VFS interface. All hooks now really callable, ↵Alexander Bokovoy1-2/+2
producing either correct result or returning error if the feature isn't supported in the configuration (This used to be commit af0a17349e6986eef2e2fd07b4b9f0bcd33bbe1f)
2003-05-11Fix VFS layer:Alexander Bokovoy1-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)
2003-05-01Fix for bugid 51 from Dragan Krnic.Jeremy Allison1-5/+5
Jeremy. (This used to be commit a2af45154d0e1bb76e78fbde1572d4fcd1ba0da2)
2003-04-24This is really trying to be a StrnCpy (most names will overflow the 10 charAndrew Bartlett1-1/+1
limit) (This used to be commit 0e04761abe375bfea48fa2c9ba9e1dc0d56d39f7)
2003-04-23Merge the 'safe' parts of my StrnCpy patch - many of the users really wantedAndrew Bartlett1-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)
2003-04-22Add runtime tests for "impossible" case with -DDEVELOPER. Trying to catch logicJeremy Allison1-0/+27
error on Linux. Jeremy. (This used to be commit 546d1a941b63a538702f2fb668019d2b89f63bdc)
2003-02-12Correctly return access denied on share mode deny when we can't open theJeremy Allison1-3/+19
file. This is a regression that was damaged by other code. Jeremy. (This used to be commit 7844a53df72af8fd2f70d51b784352aeb1298ed2)
2003-02-04Ensure we only ever set fsp->conn in one place.Jeremy Allison1-7/+0
Jeremy. (This used to be commit d8a42753cc1e1a94aa6b816222343e1569521f14)
2003-02-04Ensure Samba passes the open attribute truncate tests in smbtorture.Jeremy Allison1-9/+12
Jeremy. (This used to be commit b3df40bc803e7dc3b66a95eccb335e2b1775560e)
2003-01-30Fix for interesting resource constraint condition. When all opens areJeremy Allison1-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)
2003-01-08Fix open problem with changing attributes on an existing file - basedJeremy Allison1-8/+45
on work by <steve@griffin.sio2.nl>. Jeremy. (This used to be commit 1cff725e37d04e25d2cd5523683b35c82d5040fa)
2003-01-03Fix problem with "hide unreadable". stat file opens are baaack :-).Jeremy Allison1-99/+45
Jeremy. (This used to be commit 62038a0abf193d4dc4f37c31ac77216a10f6f326)
2002-11-19Very curious. It turns out attribute matching on truncate only mattersJeremy Allison1-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)
2002-11-05Fix to correctly return NT_STATUS_DELETE_PENDING.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 4ec381d64249203e0924b86600fe8e67ada1cb5b)
2002-10-23First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.Jeremy Allison1-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)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-8/+57
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)