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
commit498830ccd212183a8c352ec5198af948788db519 (patch)
tree5916262a008b16f5c1c03b987ce3d2b098d9b7a9 /source3/rpc_server
parentf9860b67be505bbbff0b56a18d854261c1297e2b (diff)
downloadsamba-498830ccd212183a8c352ec5198af948788db519.tar.gz
s3:rpc_server/srvsvc: _srvsvc_NetSetFileSecurity form_junctions() 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 e11471e345a..e1963a40a0c 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -2452,9 +2452,9 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p,
SMB_STRUCT_STAT st;
NTSTATUS nt_status;
WERROR werr;
+ struct conn_struct_tos *c = NULL;
connection_struct *conn = NULL;
int snum;
- struct smb_filename *oldcwd_fname = NULL;
struct security_descriptor *psd = NULL;
uint32_t security_info_sent = 0;
uint32_t ucf_flags = 0;
@@ -2478,18 +2478,18 @@ WERROR _srvsvc_NetSetFileSecurity(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,
@@ -2549,15 +2549,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;
}