summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-05 09:53:10 +0100
committerMichael Adam <obnox@samba.org>2007-12-19 23:08:01 +0100
commit233eb0e560acb26f8706fd3ab96d4c6379458414 (patch)
tree6605af3247d222d425cadd7376250008a72ed249 /source3/rpc_server
parent9460dfc93343f395f6a3867f9f8ec4dfb47bfbc7 (diff)
downloadsamba-233eb0e560acb26f8706fd3ab96d4c6379458414.tar.gz
samba-233eb0e560acb26f8706fd3ab96d4c6379458414.tar.bz2
samba-233eb0e560acb26f8706fd3ab96d4c6379458414.zip
Change the prototype of the vfs function get_nt_acl().
Up to now, get_nt_acl() took a files_struct pointer (fsp) and a file name. All the underlying functions should need and now do need (after the previous preparatory work), is a connection_struct and a file name. The connection_struct is already there in the vfs_handle passed to the vfs functions. So the files_struct argument can be eliminated. This eliminates the need of calling open_file_stat in a couple of places to produce the fsp needed. Michael (This used to be commit b5f600fab53c9d159a958c59795db3ba4a8acc63)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 125ccb4752..43f57a0109 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2089,7 +2089,6 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
char *filename_in = NULL;
char *filename = NULL;
char *qualname = NULL;
- files_struct *fsp = NULL;
SMB_STRUCT_STAT st;
NTSTATUS nt_status;
struct current_user user;
@@ -2149,25 +2148,7 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
goto error_exit;
}
- nt_status = open_file_stat(conn, NULL, filename, &st, &fsp);
- /* 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,
- READ_CONTROL_ACCESS,
- FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN,
- 0,
- FILE_ATTRIBUTE_DIRECTORY,
- NULL, &fsp);
- }
-
- if (!NT_STATUS_IS_OK(nt_status)) {
- DEBUG(3,("_srv_net_file_query_secdesc: Unable to open file %s\n", filename));
- r_u->status = ntstatus_to_werror(nt_status);
- goto error_exit;
- }
-
- nt_status = SMB_VFS_GET_NT_ACL(fsp, fsp->fsp_name,
+ nt_status = SMB_VFS_GET_NT_ACL(conn, filename,
(OWNER_SECURITY_INFORMATION
|GROUP_SECURITY_INFORMATION
|DACL_SECURITY_INFORMATION), &psd);
@@ -2188,17 +2169,12 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
psd->dacl->revision = (uint16) NT4_ACL_REVISION;
- close_file(fsp, NORMAL_CLOSE);
unbecome_user();
close_cnum(conn, user.vuid);
return r_u->status;
error_exit:
- if(fsp) {
- close_file(fsp, NORMAL_CLOSE);
- }
-
if (became_user)
unbecome_user();