summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-12-15 16:33:37 -0800
committerJeremy Allison <jra@samba.org>2011-12-15 16:33:37 -0800
commitf448c0e6db1384425e78531150aa1d3f6f8bd951 (patch)
treec12b8296dae0e29b6b5e6bf906ea6e40eba19357
parent8eca2231238d0088b8a25409fdaf5fb2e837b330 (diff)
downloadsamba-f448c0e6db1384425e78531150aa1d3f6f8bd951.tar.gz
samba-f448c0e6db1384425e78531150aa1d3f6f8bd951.tar.bz2
samba-f448c0e6db1384425e78531150aa1d3f6f8bd951.zip
Second part of fix for bug #8663 - deleting a symlink fails if the symlink target is outside of the share.
Ensure we use UCF_UNIX_NAME_LOOKUP flags on filename_convert() when doing a UNIX infolevel in trans2setfilepathinfo().
-rw-r--r--source3/smbd/trans2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 0126419393..4417cb27e7 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -8007,6 +8007,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
}
} else {
char *fname = NULL;
+ uint32_t ucf_flags = 0;
/* set path info */
if (total_params < 7) {
@@ -8023,10 +8024,14 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
+ if (INFO_LEVEL_IS_UNIX(info_level)) {
+ ucf_flags |= UCF_UNIX_NAME_LOOKUP;
+ }
+
status = filename_convert(req, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
fname,
- 0,
+ ucf_flags,
NULL,
&smb_fname);
if (!NT_STATUS_IS_OK(status)) {