From 9b30c5c1457a42a92a61086f8127caf6c60fc076 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Jun 2009 17:23:54 -0700 Subject: Fix msdfs after the change to smb_filename struct. We must *always* pull the pathname, then call resolve_dfspath(), before unix_convert(). Jeremy. --- source3/rpc_server/srv_srvsvc_nt.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server/srv_srvsvc_nt.c') diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 7887f81ba3..1b07fc213e 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -2042,6 +2042,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p, connection_struct *conn = NULL; struct sec_desc_buf *sd_buf = NULL; files_struct *fsp = NULL; + char *fname = NULL; int snum; char *oldcwd = NULL; @@ -2066,7 +2067,17 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p, goto error_exit; } - nt_status = unix_convert(talloc_tos(), conn, r->in.file, &smb_fname, + nt_status = resolve_dfspath(talloc_tos(), + conn, + false, + r->in.file, + &fname); + if (!NT_STATUS_IS_OK(nt_status)) { + werr = ntstatus_to_werror(nt_status); + goto error_exit; + } + + nt_status = unix_convert(talloc_tos(), conn, fname, &smb_fname, 0); if (!NT_STATUS_IS_OK(nt_status)) { werr = ntstatus_to_werror(nt_status); @@ -2169,6 +2180,7 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p, char *oldcwd = NULL; struct security_descriptor *psd = NULL; uint32_t security_info_sent = 0; + char *fname = NULL; ZERO_STRUCT(st); @@ -2191,7 +2203,16 @@ WERROR _srvsvc_NetSetFileSecurity(pipes_struct *p, goto error_exit; } - nt_status = unix_convert(talloc_tos(), conn, r->in.file, &smb_fname, + nt_status = resolve_dfspath(talloc_tos(), + conn, + false, + r->in.file, + &fname); + if (!NT_STATUS_IS_OK(nt_status)) { + werr = ntstatus_to_werror(nt_status); + goto error_exit; + } + nt_status = unix_convert(talloc_tos(), conn, fname, &smb_fname, 0); if (!NT_STATUS_IS_OK(nt_status)) { werr = ntstatus_to_werror(nt_status); -- cgit