summaryrefslogtreecommitdiffstats
path: root/source/smbd/open.c
Commit message (Collapse)AuthorAgeFilesLines
* smbd: fix the handling of create_options to pass RAW-OPENStefan Metzmacher2008-08-201-0/+5
| | | | | | | | Some of the bits generate INVALID_PARAMETER and some bits are ignored when they come from a client, that's why we need to use bits from the ignored range for our internal usage. metze
* If we're not allowing streams on this conn ptr,Jeremy Allison2008-07-241-0/+5
| | | | | | then don't allow create_file() to call down to create_file_unixpath() with a stream name. Jeremy.
* Remove current_user reference from printfsp.cVolker Lendecke2008-06-261-1/+1
|
* Wrap the unix token info in a unix_user_token in auth_serversupplied_infoVolker Lendecke2008-06-191-3/+4
| | | | No functional change, this is a preparation for more current_user ref removal
* Remove the current_user references from open.cVolker Lendecke2008-06-151-6/+4
| | | | | current_user_info was "only" used in a debug msg, and current_user.ut.uid is also available via conn->server_info
* Remove the current_user reference from fake_file.cVolker Lendecke2008-06-151-1/+2
| | | | | The current vuid is not only available there, it is also in the current smb_request structure.
* Remove "user" from connection_structVolker Lendecke2008-05-101-2/+3
|
* Remove the "stat_open()" function, flag, and all associated code. It was onlyJeremy Allison2008-05-021-55/+1
| | | | | | | being (correctly) used in the can_read/can_write checks for hide unreadable/unwritable and this is more properly done using the functions in smbd/file_access.c. Preparing to do NT access checks on all file access. Jeremy.
* Rename inherit_access_acl() -> inherit_access_posix_acl() to make use clear.Jeremy Allison2008-05-021-2/+2
| | | | Jeremy.
* Remove redundant parameter fd from SMB_VFS_CLOSE().Michael Adam2008-04-211-1/+1
| | | | | | Now all those redundant fd's have vanished from the VFS API. Michael
* Move the posix pending close functionality down into the VFS layer.Michael Adam2008-04-211-1/+9
| | | | | | | | | | | | | | | | | This hides the pending close fds from the outside. Call order of SMB_VFS_CLOSE is reversed. Originally, it was: fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close And now it is: fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close This is in preparation of removing the fd parameter from the SMB_VFS_CLOSE function. But it is also the right place for the pending close calls anyways. Michael
* locking: store the write time in the locking.tdbStefan Metzmacher2008-04-071-5/+10
| | | | | | | | | This is needed to implement the strange write time update logic later. We need to store 2 time timestamps to distinguish between the time the file system had before the first client opened the file and a forced timestamp update. metze
* Fix S3 to pass the test_raw_oplock_exclusive3 test.Jeremy Allison2008-03-111-2/+3
| | | | Jeremy.
* Fix debug messages.Jeremy Allison2008-02-221-4/+5
| | | | Jeremy.
* Fix a ton of IBM checker uninitialized variable warningsVolker Lendecke2008-01-221-2/+1
| | | | | | SET_STAT_INVALID only sets nlink, not the other fields We might consider to change SET_STAT_INVALID to always do ZERO_STRUCT
* Free case_state earlierVolker Lendecke2008-01-201-0/+2
| | | | | Found by a "set but never used" warning. Thanks to talloc_tos() this was not really a bug, but this way the code becomes much clearer.
* NT_STATUS_OBJECT_NAME_NOT_FOUND also means "no streams around :-)"Volker Lendecke2008-01-201-1/+2
|
* Couple of minor fixes for POSIX pathname processing in theJeremy Allison2008-01-191-1/+1
| | | | | | | | | | new stream code. (1) In smbd/filename, don't split the name at ':' if we know it's a posix path (this should be parameterized....). (2). When calling posix_mkdir, we get the flag FILE_FLAG_POSIX_SEMANTICS passed to open_directory(). I know for a posix client lp_posix_pathnames should be true (which is checked for in is_ntfs_stream_name() but we have an explicit flag here, so let's use it. Jeremy.
* Add streams supportVolker Lendecke2008-01-191-12/+202
| | | | | | | | | | This is the core of the streams support. The main change is that in files_struct there is now a base_fsp pointer that holds the main file open while a stream is open. This is necessary to get the rather strange delete semantics right: You can't delete the main file while a stream is open without FILE_SHARE_DELETE, and while a stream is open a successful unlink of the main file leads to DELETE_PENDING for all further access on the main file or any stream.
* delete on close even prevents stat opensVolker Lendecke2008-01-121-6/+6
|
* There's no point in calling FLOCK on a non-existing fdVolker Lendecke2008-01-121-7/+9
|
* use talloc_tos in a few more placesVolker Lendecke2008-01-101-4/+4
|
* Make use of talloc_pool in the main codepaths. Remove the sub-contexts.Jeremy Allison2008-01-091-7/+1
| | | | Jeremy.
* Replace an uninitialized variableVolker Lendecke2008-01-091-0/+2
| | | | Reported by the IBM checker
* Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().Michael Adam2008-01-081-3/+2
| | | | Michael
* Remove redundant parameter fd from SMB_VFS_KERNEL_FLOCK().Michael Adam2008-01-071-1/+1
| | | | Michael
* Remove redundant parameter fd from SMB_VFS_FTRUNCATE().Michael Adam2008-01-071-1/+1
| | | | Michael
* Remove redundant parameter fd from SMB_VFS_FCHOWN().Michael Adam2008-01-071-1/+1
| | | | Michael
* Remove redundant parameter fd from SMB_VFS_FCHMOD().Michael Adam2008-01-071-1/+1
| | | | Michael
* Remove redundant parameter fd from SMB_VFS_FSTAT().Michael Adam2008-01-071-3/+3
| | | | Michael
* Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().Michael Adam2008-01-061-2/+1
| | | | Michael
* Using a bool with a logical operation. IBM checker caught.Jeremy Allison2008-01-041-1/+1
| | | | Jeremy.
* Refactor the crypto code after a very helpful conversationJeremy Allison2008-01-041-2/+2
| | | | | | with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy.
* Use NULL instead of 0Volker Lendecke2008-01-011-4/+4
| | | | "struct security_descriptor" has pointers, not integers inside
* Fix setting the initial permission bitsVolker Lendecke2007-12-281-4/+9
| | | | | | | | | | | | | | | | | | | This fixes a make test failure on Solaris. When creating a new file, file_set_dosmode() called from open_file_ntcreate calculates a new permission mask, very likely different from what had been calculated in open_file_ntcreate. Further down we overwrote the newly calculated value with SMB_FCHMOD_ACL, ignoring what file_set_dosmode had calculated. Why did Linux not see this? fchmod_acl on a newly created file without acls would not retrieve an acl at all, whereas under Solaris acl(2) returns something even for files with just posix permissions returns something. Jeremy, given that we have very similar code in 3.0.28 this might also explain some of the bug reports that people have concerning ACLs on new files. Volker P.S: This one took a while to find...
* We need to return the correct atimeVolker Lendecke2007-12-261-1/+6
| | | | | On systems with nanosecond atime we need to re-stat after messing with the fd, at least Solaris 10 updates atime after we stat(2)ed the file.
* Remove redundant connection_struct from fd_close() parameter list.Michael Adam2007-12-221-11/+11
| | | | Michael
* Remove redundant connection_struct from fd_close_posix() parameter list.Michael Adam2007-12-221-1/+1
| | | | Michael
* separate out create_file_unixpath()Volker Lendecke2007-12-111-171/+242
|
* Move more stuff out of the wayVolker Lendecke2007-12-111-7/+7
|
* Move INTERNAL_OPEN_ONLY calculation out of the wayVolker Lendecke2007-12-111-4/+4
|
* Increase debug levelVolker Lendecke2007-12-101-1/+1
|
* Pass only internal oplock request values to create_fileVolker Lendecke2007-12-071-42/+5
| | | | | Other callers (e.g. reply_open_and_X) might have other ideas of the bit shuffling
* More parameter shufflingVolker Lendecke2007-12-071-1/+1
|
* Re-arrange create_file() parametersVolker Lendecke2007-12-071-1/+1
| | | | | This changes them to be a bit closer to open_file_ntcreate and thus provides less surprises to developers
* Make fname arg to create_file a "const char *"Volker Lendecke2007-12-071-6/+15
|
* There's no point in passing down a 0Volker Lendecke2007-12-051-15/+25
|
* Move create_file to open.cVolker Lendecke2007-12-051-0/+475
| | | | | I'm checking in this long sequence of micro-checkins for review, the overall patch from 3b057022a5 to this is not too large.
* Add MAX_DNS_NAME_LENGTH, remove more pstrings.Jeremy Allison2007-11-151-3/+3
| | | | Jeremy.
* Fix some cases where file_set_dosmode was being passedJeremy Allison2007-10-311-2/+4
| | | | | | | False instead of NULL. Fix more of the notifications to be correct for Samba4 RAW-NOTIFY torture (we had missed one when calling set_ea_dos_attribute(). Jeremy.