summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2018-05-24 17:55:02 +0200
committerStefan Metzmacher <metze@samba.org>2018-06-14 20:52:22 +0200
commitf9860b67be505bbbff0b56a18d854261c1297e2b (patch)
tree68e912220e6e639cb19b859bf18a7137a56b70a2 /source3/rpc_server
parent185d47159a919b5d267c612b5410b68d9e42558e (diff)
downloadsamba-f9860b67be505bbbff0b56a18d854261c1297e2b.tar.gz
s3:rpc_server/srvsvc: _srvsvc_NetGetFileSecurity() to use create_conn_struct_tos_cwd()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 15bfdafa024..e11471e345a 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -2321,11 +2321,11 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
SMB_STRUCT_STAT st;
NTSTATUS nt_status;
WERROR werr;
+ struct conn_struct_tos *c = NULL;
connection_struct *conn = NULL;
struct sec_desc_buf *sd_buf = NULL;
files_struct *fsp = NULL;
int snum;
- struct smb_filename *oldcwd_fname = NULL;
uint32_t ucf_flags = 0;
ZERO_STRUCT(st);
@@ -2345,18 +2345,18 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
goto error_exit;
}
- nt_status = create_conn_struct_cwd(frame,
- server_event_context(),
- server_messaging_context(),
- &conn,
- snum, lp_path(frame, snum),
- p->session_info, &oldcwd_fname);
+ nt_status = create_conn_struct_tos_cwd(server_messaging_context(),
+ snum,
+ lp_path(frame, snum),
+ p->session_info,
+ &c);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(10, ("create_conn_struct failed: %s\n",
nt_errstr(nt_status)));
werr = ntstatus_to_werror(nt_status);
goto error_exit;
}
+ conn = c->conn;
nt_status = filename_convert(frame,
conn,
@@ -2433,15 +2433,6 @@ error_exit:
close_file(NULL, fsp, NORMAL_CLOSE);
}
- if (oldcwd_fname) {
- vfs_ChDir(conn, oldcwd_fname);
- }
-
- if (conn) {
- SMB_VFS_DISCONNECT(conn);
- conn_free(conn);
- }
-
TALLOC_FREE(frame);
return werr;
}