diff options
author | Jeremy Allison <jra@samba.org> | 2008-05-02 17:22:10 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-05-02 17:22:10 -0700 |
commit | b430b382202858a6c52c1cacbb91910b2dd7e16c (patch) | |
tree | 4d2e2900d03a5abde1e7dd24b5c23404972a3712 /source3/rpc_server | |
parent | 85dc0ad7beb50dbab6d98a22b114f20537425268 (diff) | |
download | samba-b430b382202858a6c52c1cacbb91910b2dd7e16c.tar.gz samba-b430b382202858a6c52c1cacbb91910b2dd7e16c.tar.bz2 samba-b430b382202858a6c52c1cacbb91910b2dd7e16c.zip |
Remove the "stat_open()" function, flag, and all associated code. It was only
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)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_srvsvc_nt.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 7188360f69..1b578cc9f8 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -2206,13 +2206,20 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p, goto error_exit; } - nt_status = open_file_stat(conn, NULL, filename, &st, &fsp); + nt_status = open_file_ntcreate(conn, NULL, filename, &st, + FILE_WRITE_ATTRIBUTES, + FILE_SHARE_READ|FILE_SHARE_WRITE, + FILE_OPEN, + 0, + FILE_ATTRIBUTE_NORMAL, + INTERNAL_OPEN_ONLY, + NULL, &fsp); if ( !NT_STATUS_IS_OK(nt_status) ) { /* Perhaps it is a directory */ if (NT_STATUS_EQUAL(nt_status, NT_STATUS_FILE_IS_A_DIRECTORY)) nt_status = open_directory(conn, NULL, filename, &st, - FILE_READ_ATTRIBUTES, + FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0, |