[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Dec 16 15:33:02 MST 2011


The branch, master has been updated
       via  a6854f2 Fix bug #8664 - Renaming a symlink fails if the symlink target is outside of the share.
       via  7dcef87 Restrict UCF_UNIX_NAME_LOOKUP (symlink allowed) to restricted set of calls.
      from  184b50e wafsamba: Fix undefined variable name in error message.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a6854f2c0aa5f7b4bd243f7df2ca86fb15deebe6
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Dec 16 12:26:45 2011 -0800

    Fix bug #8664 - Renaming a symlink fails if the symlink target is outside of the share.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Fri Dec 16 23:32:26 CET 2011 on sn-devel-104

commit 7dcef878cdf962b4dd9715dc92ffc51284bf168f
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Dec 16 11:26:41 2011 -0800

    Restrict UCF_UNIX_NAME_LOOKUP (symlink allowed) to restricted set of calls.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/reply.c  |    6 ++++--
 source3/smbd/trans2.c |    5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index d9b7500..257ce70 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -6649,6 +6649,8 @@ void reply_mv(struct smb_request *req)
 	TALLOC_CTX *ctx = talloc_tos();
 	struct smb_filename *smb_fname_src = NULL;
 	struct smb_filename *smb_fname_dst = NULL;
+	uint32_t src_ucf_flags = lp_posix_pathnames() ? UCF_UNIX_NAME_LOOKUP : UCF_COND_ALLOW_WCARD_LCOMP;
+	uint32_t dst_ucf_flags = UCF_SAVE_LCOMP | (lp_posix_pathnames() ? 0 : UCF_COND_ALLOW_WCARD_LCOMP);
 	bool stream_rename = false;
 
 	START_PROFILE(SMBmv);
@@ -6691,7 +6693,7 @@ void reply_mv(struct smb_request *req)
 				  conn,
 				  req->flags2 & FLAGS2_DFS_PATHNAMES,
 				  name,
-				  UCF_COND_ALLOW_WCARD_LCOMP,
+				  src_ucf_flags,
 				  &src_has_wcard,
 				  &smb_fname_src);
 
@@ -6709,7 +6711,7 @@ void reply_mv(struct smb_request *req)
 				  conn,
 				  req->flags2 & FLAGS2_DFS_PATHNAMES,
 				  newname,
-				  UCF_COND_ALLOW_WCARD_LCOMP | UCF_SAVE_LCOMP,
+				  dst_ucf_flags,
 				  &dest_has_wcard,
 				  &smb_fname_dst);
 
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 4417cb2..ec9901b 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -8024,7 +8024,10 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
 			return;
 		}
 
-		if (INFO_LEVEL_IS_UNIX(info_level)) {
+		if (info_level == SMB_SET_FILE_UNIX_BASIC ||
+				info_level == SMB_SET_FILE_UNIX_INFO2 ||
+				info_level == SMB_FILE_RENAME_INFORMATION ||
+				info_level == SMB_POSIX_PATH_UNLINK) {
 			ucf_flags |= UCF_UNIX_NAME_LOOKUP;
 		}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list