summaryrefslogtreecommitdiffstats
path: root/source/smbd/open.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix const warningAndrew Bartlett2002-07-081-1/+1
|
* Raise some debug levels.Andrew Bartlett2002-06-221-1/+1
| | | | Andrew Bartlett
* When doing a non-io open the stat failing is no cause for a debug zeroJeremy Allison2002-04-231-2/+6
| | | | | to be printed, it just means file not found. Jeremy.
* try to cope better with the take ownership operation for foreign SIDsAndrew Tridgell2002-04-201-2/+4
| | | | | what we do is map to the authenticated user when the sid is unmappable and dos filemodes are enabled
* Matched W2K *insane* open semantics....Jeremy Allison2002-03-261-0/+18
| | | | Jeremy.
* 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.
* Fix stupid typo !Jeremy Allison2002-03-211-2/+2
| | | | Jeremy.
* 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.
* Added POSIX ACL layer into the vfs.Jeremy Allison2002-03-121-1/+1
| | | | Jeremy.
* Implemented default ACL patch (set inherit acls = true on a per share basis).Jeremy Allison2002-03-111-2/+12
| | | | | | Based on code donated by Olaf Fr±czyk <olaf@cbk.poznan.pl>. Further commit will change to sending via vfs interface. Jeremy.
* Fixed delete on close semantics - preparing for share mode rewrite.Jeremy Allison2002-03-071-0/+2
| | | | Jeremy.
* This is a nasty hack to fix "xcopy /o" from win2000 on a Samba shareAndrew Tridgell2002-02-261-13/+46
| | | | | | | | | | The hack passes the true ntcreate desired_access down to open_file_shared1() from the ntcreatex function. This is used to determine if share modes should be used in denying this open. This hack will become unnecessary when we redo open.c to use the proper NTCreateX semantics rather than trying to jam the ntcreate semantics into openX semantics.
* Merge of smbclient print crash bug fix from app head.Tim Potter2002-02-151-2/+4
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Fixed display of "remote downlevel document" in old print job submissionJeremy Allison2002-01-251-1/+1
| | | | | case. Jeremy.
* don't use O_NONBLOCK in open(). This was added erroneously for kernelAndrew Tridgell2002-01-171-4/+0
| | | | oplocks and really shouldn't be used
* Added the O_NOFOLLOW flag if follow symlinks is set off.Jeremy Allison2002-01-121-0/+6
| | | | Jeremy.
* Moved fchown_acl change to the point where we *really* know if weJeremy Allison2001-12-161-10/+10
| | | | | created the file or not. Jeremy.
* Spelling pedents strike again :-).Jeremy Allison2001-11-281-1/+1
| | | | Jeremy.
* Ensure the CAN_WRITE is checked and prevents O_CREAT and O_TRUNC fromJeremy Allison2001-11-281-2/+2
| | | | | | being set. Also prevent an open on a file on a readonly share from setting delete on close. Jeremy.
* Re-added "Share modes" meaning don't allow deny mode conflict. Due toJeremy Allison2001-11-281-2/+10
| | | | | user demand (don't talk to me about removing parameters.... :-). Jeremy.
* Fix for the logic bug wrt. existant oplocks. See long messageJeremy Allison2001-11-271-5/+2
| | | | | in samba-technical for explaination. Jeremy.
* nsswitch/winbindd_group.c nsswitch/winbindd_user.c: formatting fixups.Jeremy Allison2001-11-271-1/+1
| | | | | smbd/open.c: Fix "delete on close" for directories. Jeremy.
* Fixed delete on close bug. Added core dump code to winbindd.Jeremy Allison2001-11-231-1/+22
| | | | Jeremy.
* Move from timestamp to gen count file id's for finding oplocked filesJeremy Allison2001-10-201-7/+2
| | | | | in a tdb. Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* Change log message to 2 from zero when failing to create directory.Jeremy Allison2001-09-241-1/+1
| | | | | Stops spurious profile creation messages. Jeremy.
* move to SAFE_FREE()Simo Sorce2001-09-171-9/+8
|
* use variables _before_ freeing them!Simo Sorce2001-09-151-3/+2
| | | | thanks to Andreas Moroder for spotting these two.
* fixed formatting to make the code vaguely readable. It's still a dogsAndrew Tridgell2001-09-051-142/+143
| | | | breakfast, but at least you can follow the indents
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-4/+1
| | | | | | | | | | | | | | | | major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night
* Missed '\' at eol...Jeremy Allison2001-08-221-1/+1
| | | | Jeremy.
* Tidyup fixes for fcntl spin problem.Jeremy Allison2001-08-221-3/+13
| | | | Jeremy.
* Fixed the (incorrect) paranioa fix I put in for the fcntl lock spin.Jeremy Allison2001-08-221-9/+35
| | | | | | Don't delete a share mode that failed to remove the oplock (doh!), just set the oplock entry to zero.... Jeremy.
* This is Jeremy pretending to be Volker, 'cos theVolker Lendecke2001-08-211-0/+10
| | | | | | | | | | | | | | | | | link from Seattle is having problems. I've added 3 things here to work on the fcntl spin problem. 1). Check *all* tdb return codes... :-). 2). If we're asking ourselves to break an oplock, and we can't find a fsp pointer that matches the entry, this is a *logic bug* and we should abort and panic so someone with gdb can pick up the pieces. 3). After we've broken an oplock, ensure that the entry itself has been removed, and if not remove it ourselves. This should not be neccessary in a correctly working environmen,t, but will provide an added layer of robustness in error situations. 4). I hate german keyboards :-) :-). Jeremy.
* We were making an assumption in the oplockJeremy Allison2001-07-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | break code path that was invalid (ie. we were assuming we could infer a non-levelII oplock when such an oplock was detected - this may no longer be valid once we've processed the break process dealing with the break will change the state of it anyway. This prevents the state where we get the following packet trace : client server NTcreate -> <- NTcreate resp NTcreate -> <- break to level II ok - broken -> <- break to none Thanks to Alan Romeril for providing the trace that allowed me to track this down. Jeremy.
* Fix race where wrong action (created or opened) could be returned.Jeremy Allison2001-07-051-0/+8
| | | | Jeremy.
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-2/+2
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-24/+2
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* Fixed the first locking error (test #8 found by locktest code fromJeremy Allison2001-06-301-1/+1
| | | | | Clarion locktest. Jeremy.
* Extra debug in open.c, fix for bad debug message in reply.cJeremy Allison2001-06-191-2/+2
| | | | Jeremy.
* Removed mktemp from HEAD - same as done in 2.2.Jeremy Allison2001-04-181-1/+1
| | | | Jeremy.
* Finally got the semantics right (hurrah!).Jeremy Allison2001-04-161-6/+14
| | | | Jeremy.
* Correct fix for open readonly with truncate.Jeremy Allison2001-04-161-17/+18
| | | | Jeremy.
* This little piece of insanity is inspired by theJeremy Allison2001-04-141-3/+18
| | | | | | | | | | | | fact that an NT client can open a file for O_RDONLY, but set the create disposition to FILE_EXISTS_TRUNCATE. If the client *can* write to the file, then it expects to truncate the file, even though it is opening for readonly. Quicken uses this stupid trick in backup file creation... Thanks *greatly* to "David W. Chapman Jr." <dwcjr@inethouston.net> for helping track this one down. It didn't bite us in 2.0.x as we always opened files read-write in that release. Jeremy.
* configure:Jeremy Allison2001-04-141-7/+47
| | | | | | | | | | | | | | | | | | | | | | configure.in: include/config.h.in: include/profile.h: smbd/vfs-wrap.c: smbd/vfs.c: Added fchmod and fchown to VFS (sorry Gerald - but we needed them anyway). smbd/dosmode.c: smbd/files.c: printing/printfsp.c: smbd/close.c: smbd/open.c: Fixed "dos filemode" correctly so there are no race conditions. Forces test of open of file O_WRONLY before allowing fchmod as root. Afterwards, calls standard close function that preserves POSIX locks due to POSIX-me-harder braindamage. :-). Andrew please review this code. Also - in removing the tmpdir param in smbrun an extra NULL parameter was missed in each print_run_command() call (which is a varargs fn.). Now fixed. Jeremy.
* Fixed potential file descriptor leak with MS-Access fix.Jeremy Allison2001-04-131-1/+9
| | | | Jeremy.
* This is a big, rather ugly patch. Whilst investigating the files not truncatedJeremy Allison2001-03-301-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | when copying to a full disk problem, I discovered that we were not allowing the delete on close flag to be set properly, this led to other things, and after investigation of the proper delete on close semantics and their relationship to the file_share_delete flag I discovered there were some cases where we weren't doing the deny modes properly. And this after only 5 years working on them..... :-) :-). So here's the latest attempt. I realised the delete on close flag needs to be set across all smbds with a dev/ino pair open - in addition, the delete on close flag, allow share delete and delete access requested all need to be stored in the share mode tdb. The "delete_on_close" entry in the fsp struct is now redundant and should really be removed. This may also mean we can get rid of the "iterate_fsp" calls that I didn't like adding in the first place. Whilst doing this patch, I also discovered we needed to do the se_map_generic() call for file opens and POSIX ACL mapping, so I added that also. This code, although ugly, now passes the deny mode torture tests plus the delete on close tests I added. I do need to add one more multiple connection delete on close test to make sure I got the semantics exactly right, plus we should also (as Andrew suggested) move to random testing here. The good news is that NT should now correctly delete the file on disk full error when copying to a disk :-). Jeremy.
* smbd/posix_acls.c: Saving and restoring errno here is the wrong place. Moved itJeremy Allison2001-03-261-3/+6
| | | | | to the places where [f]chmod_acl is called instead. Jeremy.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-4/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.