summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
AgeCommit message (Collapse)AuthorFilesLines
2008-10-08For the vfs_acl_xattr.c module, make sure we map GENERIC file and directory bitsJeremy Allison1-0/+4
to specific bits every time a security descriptor is set. The S4 torture suite proves that generic bits are not returned when querying an ACL set using them (ie. only the specific bits are stored on disk). Jeremy.
2008-09-26Fix bug #5797 - Moving readonly files fails. Reported by infomail@lordb.de.Jeremy Allison1-3/+1
We don't need to deny a DELETE open on a readonly file (I'm also adding a s4 torture test for this), the set_file_disposition call will return NT_STATUS_CANNOT_DELETE if the delete-on-close bit is set on a readonly file (and we already do this). Jeremy.
2008-09-15Fix bug 5761 "open of mangled directory name results in 'is a stream name'"Jeremy Allison1-3/+7
reported by Regan Heath <Regan.Heath@BridgeHeadSoftware.com>. Jeremy.
2008-08-20smbd: fix the handling of create_options to pass RAW-OPENStefan Metzmacher1-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 (This used to be commit 7b4c8a4e39f310eb450918fa841b0ea1b4af19f7)
2008-07-24If we're not allowing streams on this conn ptr,Jeremy Allison1-0/+5
then don't allow create_file() to call down to create_file_unixpath() with a stream name. Jeremy. (This used to be commit 167d611b525db6d103a7f83fd5a19792be4e7745)
2008-06-26Remove current_user reference from printfsp.cVolker Lendecke1-1/+1
(This used to be commit 510f45d01a19ce1c226755ac42a328241098b2e0)
2008-06-19Wrap the unix token info in a unix_user_token in auth_serversupplied_infoVolker Lendecke1-3/+4
No functional change, this is a preparation for more current_user ref removal (This used to be commit dcaedf345e62ab74ea87f0a3fa1e3199c75c5445)
2008-06-15Remove the current_user references from open.cVolker Lendecke1-6/+4
current_user_info was "only" used in a debug msg, and current_user.ut.uid is also available via conn->server_info (This used to be commit d0386914ff0f7b0f1edc3302fdc6a25f211712fa)
2008-06-15Remove the current_user reference from fake_file.cVolker Lendecke1-1/+2
The current vuid is not only available there, it is also in the current smb_request structure. (This used to be commit c8fd5eef32a86888c7a28317f0fdf717a26b7d4c)
2008-05-10Remove "user" from connection_structVolker Lendecke1-2/+3
(This used to be commit 368454a27cb53a408ec416cbf37235b304592fb5)
2008-05-02Remove the "stat_open()" function, flag, and all associated code. It was onlyJeremy Allison1-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. (This used to be commit 6bfb06ad95963ae2acb67c4694a98282d3b29faa)
2008-05-02Rename inherit_access_acl() -> inherit_access_posix_acl() to make use clear.Jeremy Allison1-2/+2
Jeremy. (This used to be commit b739c7f1cdb2b19a380b06681b00dcf490d788a9)
2008-04-21Remove redundant parameter fd from SMB_VFS_CLOSE().Michael Adam1-1/+1
Now all those redundant fd's have vanished from the VFS API. Michael (This used to be commit 14294535512a7f191c5008e622b6708e417854ae)
2008-04-21Move the posix pending close functionality down into the VFS layer.Michael Adam1-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 (This used to be commit 3cf56b124a2886c6260455bba4bf77d08e9a4f77)
2008-04-07locking: store the write time in the locking.tdbStefan Metzmacher1-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 (This used to be commit 6aaa2ce0eeb46f6735ec984a2e7aadde7a7f456d)
2008-03-11Fix S3 to pass the test_raw_oplock_exclusive3 test.Jeremy Allison1-2/+3
Jeremy. (This used to be commit 028302fac53083d66c969b876db1d831e53b8e35)
2008-02-22Fix debug messages.Jeremy Allison1-4/+5
Jeremy. (This used to be commit d265cedb55b07c6b8a13b9632fbdf8a05fbba886)
2008-01-22Fix a ton of IBM checker uninitialized variable warningsVolker Lendecke1-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 (This used to be commit 8cf8c5b2034fe093b5db7f069bc6be8d328399bf)
2008-01-20Free case_state earlierVolker Lendecke1-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. (This used to be commit b326f11dc39a8ce20d957aac976be0cf7108ba9d)
2008-01-20NT_STATUS_OBJECT_NAME_NOT_FOUND also means "no streams around :-)"Volker Lendecke1-1/+2
(This used to be commit 96b9a7b3eb92c9f133a3f43ffc4d57d0212e4ebd)
2008-01-19Couple of minor fixes for POSIX pathname processing in theJeremy Allison1-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. (This used to be commit 7bb7a0def6518784befa75e5303289d2b4d36dd4)
2008-01-19Add streams supportVolker Lendecke1-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. (This used to be commit 6022873cc155bdbbd3fb620689715f07a24d6ed1)
2008-01-12delete on close even prevents stat opensVolker Lendecke1-6/+6
(This used to be commit 85fe7f3f6ed4aae76e5cf31ab689b2dfacfd74de)
2008-01-12There's no point in calling FLOCK on a non-existing fdVolker Lendecke1-7/+9
(This used to be commit 9ff79f231f1206631662b5c521ecddf5df9141c0)
2008-01-10use talloc_tos in a few more placesVolker Lendecke1-4/+4
(This used to be commit 65dd869bea351010c67f02046ae4134bdada1a4c)
2008-01-09Make use of talloc_pool in the main codepaths. Remove the sub-contexts.Jeremy Allison1-7/+1
Jeremy. (This used to be commit bc932b8ad4396f76b71c43efe9a6346f89c3632c)
2008-01-09Replace an uninitialized variableVolker Lendecke1-0/+2
Reported by the IBM checker (This used to be commit 48f61e4b9fce5ea4f4bc3cf55530bb757c0def07)
2008-01-08Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().Michael Adam1-3/+2
Michael (This used to be commit 7b201c177b3668f54751ba17d6a0b53ed913e7f7)
2008-01-07Remove redundant parameter fd from SMB_VFS_KERNEL_FLOCK().Michael Adam1-1/+1
Michael (This used to be commit 195c519377c2fdc655e25760b52bc0694b8dda81)
2008-01-07Remove redundant parameter fd from SMB_VFS_FTRUNCATE().Michael Adam1-1/+1
Michael (This used to be commit 2ad66050a0452b8e7e08b1e7a01efa00c72fd451)
2008-01-07Remove redundant parameter fd from SMB_VFS_FCHOWN().Michael Adam1-1/+1
Michael (This used to be commit fbb193db3e0dc51cb000ae406a68bc547f31d9ab)
2008-01-07Remove redundant parameter fd from SMB_VFS_FCHMOD().Michael Adam1-1/+1
Michael (This used to be commit a54d5604da556d1250ca9948d4acc4a187a9fede)
2008-01-07Remove redundant parameter fd from SMB_VFS_FSTAT().Michael Adam1-3/+3
Michael (This used to be commit 0b86c420be94d295f6917a220b5d699f65b46711)
2008-01-06Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().Michael Adam1-2/+1
Michael (This used to be commit 4f2d139a186048f08180378a877b69d2f80ad51f)
2008-01-04Using a bool with a logical operation. IBM checker caught.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 7f9fe7da1e25bcc730f4c4226bf77f6d39b5ace4)
2008-01-04Refactor the crypto code after a very helpful conversationJeremy Allison1-2/+2
with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy. (This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
2008-01-01Use NULL instead of 0Volker Lendecke1-4/+4
"struct security_descriptor" has pointers, not integers inside (This used to be commit 13158014e3b05e44eea897fbcf470957301c5c97)
2007-12-28Fix setting the initial permission bitsVolker Lendecke1-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... (This used to be commit 2135dfe91bf1ae114a18c15286b535662200677d)
2007-12-26We need to return the correct atimeVolker Lendecke1-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. (This used to be commit 6e6ec0a563f8b7e3d4618ce60e776bcce53f40c4)
2007-12-22Remove redundant connection_struct from fd_close() parameter list.Michael Adam1-11/+11
Michael (This used to be commit 3611cc8561cf837adea83fc7c16ca7535f188466)
2007-12-22Remove redundant connection_struct from fd_close_posix() parameter list.Michael Adam1-1/+1
Michael (This used to be commit f3365b74ac016eaee1e82eef769dd618af5df201)
2007-12-11separate out create_file_unixpath()Volker Lendecke1-171/+242
(This used to be commit deaacf971e0fbffd0e5fe24f225ebf645a77e133)
2007-12-11Move more stuff out of the wayVolker Lendecke1-7/+7
(This used to be commit ae422fce01cd7520d6dd72e08719a5cd003cb640)
2007-12-11Move INTERNAL_OPEN_ONLY calculation out of the wayVolker Lendecke1-4/+4
(This used to be commit 0e96549b56e288c596ed8772197f97ffa5ade300)
2007-12-10Increase debug levelVolker Lendecke1-1/+1
(This used to be commit 4e6df5547167fc235971498cb296a5f74dec8b8b)
2007-12-07Pass only internal oplock request values to create_fileVolker Lendecke1-42/+5
Other callers (e.g. reply_open_and_X) might have other ideas of the bit shuffling (This used to be commit 6a58d823e51ccc8efd6682005e367c9096abc993)
2007-12-07More parameter shufflingVolker Lendecke1-1/+1
(This used to be commit 8f70f691ffa3e171a73d04a1c867aa6fca4d4583)
2007-12-07Re-arrange create_file() parametersVolker Lendecke1-1/+1
This changes them to be a bit closer to open_file_ntcreate and thus provides less surprises to developers (This used to be commit d000258b96b9bb714efdfe982947370a6dfb5d55)
2007-12-07Make fname arg to create_file a "const char *"Volker Lendecke1-6/+15
(This used to be commit da94b5f9e37f38880e8ca4c2c7f8de6838864321)
2007-12-05There's no point in passing down a 0Volker Lendecke1-15/+25
(This used to be commit 525a6887afcae8d8e740cf194a412c21da899649)