summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-06-16 17:23:54 -0700
committerJeremy Allison <jra@samba.org>2009-06-16 17:23:54 -0700
commit9b30c5c1457a42a92a61086f8127caf6c60fc076 (patch)
tree801d7a9855513ba143eb3ee2c30fc48bd9e0438e /source3/rpc_server
parentfbe85c70ef0aed6ff3c20585ae1f001c0417665c (diff)
downloadsamba-9b30c5c1457a42a92a61086f8127caf6c60fc076.tar.gz
samba-9b30c5c1457a42a92a61086f8127caf6c60fc076.tar.bz2
samba-9b30c5c1457a42a92a61086f8127caf6c60fc076.zip
Fix msdfs after the change to smb_filename struct. We must *always*
pull the pathname, then call resolve_dfspath(), before unix_convert(). Jeremy.
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c25
1 files changed, 23 insertions, 2 deletions
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);