[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Apr 8 22:28:31 MDT 2010


The branch, master has been updated
       via  3491f6d... Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo()
      from  3587815... Fix bug #7339 - MSDFS is non-functional in 3.5.x

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


- Log -----------------------------------------------------------------
commit 3491f6d119d1f4c7e0a259a9993ce96783b77e23
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 8 21:24:23 2010 -0700

    Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo()
    
    Remove the bool ms_dfs_link parameter from smbd_do_qfilepathinfo.
    It is not possible for this to be a DFS link. Remove the check_msdfs_link()
    call from call_trans2qfilepathinfo() - the call to filename_convert()
    above with a ucf_flags of zero *MUST* catch a DFS link and return
    NT_STATUS_PATH_NOT_COVERED in this case, so the code below checking
    for msdfs links is redundent. Don't add this to 3.5.x, as it's an
    optimization but not needed to fix bug #7339 - MSDFS is non-functional in 3.5.x.
    
    Jeremy.

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

Summary of changes:
 source3/smbd/globals.h      |    1 -
 source3/smbd/smb2_getinfo.c |    2 --
 source3/smbd/trans2.c       |   21 ++++-----------------
 3 files changed, 4 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index f9fd71e..033a777 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -187,7 +187,6 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
 			       struct smb_filename *smb_fname,
 			       bool delete_pending,
 			       struct timespec write_time_ts,
-			       bool ms_dfs_link,
 			       struct ea_list *ea_list,
 			       int lock_data_count,
 			       char *lock_data,
diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c
index 3b50ab9..3a8c077 100644
--- a/source3/smbd/smb2_getinfo.c
+++ b/source3/smbd/smb2_getinfo.c
@@ -246,7 +246,6 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
 		struct ea_list *ea_list = NULL;
 		int lock_data_count = 0;
 		char *lock_data = NULL;
-		bool ms_dfs_link = false;
 		NTSTATUS status;
 
 		ZERO_STRUCT(write_time_ts);
@@ -328,7 +327,6 @@ static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx,
 					       fsp->fsp_name,
 					       delete_pending,
 					       write_time_ts,
-					       ms_dfs_link,
 					       ea_list,
 					       lock_data_count,
 					       lock_data,
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 06b454a..991b605 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4154,7 +4154,6 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
 			       struct smb_filename *smb_fname,
 			       bool delete_pending,
 			       struct timespec write_time_ts,
-			       bool ms_dfs_link,
 			       struct ea_list *ea_list,
 			       int lock_data_count,
 			       char *lock_data,
@@ -4189,12 +4188,7 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
 		 smb_fname_str_dbg(smb_fname), fsp ? fsp->fnum : -1,
 		 info_level, max_data_bytes));
 
-	if (ms_dfs_link) {
-		mode = dos_mode_msdfs(conn, smb_fname);
-	} else {
-		mode = dos_mode(conn, smb_fname);
-	}
-
+	mode = dos_mode(conn, smb_fname);
 	nlink = psbuf->st_ex_nlink;
 
 	if (nlink && (mode&aDIR)) {
@@ -4976,7 +4970,6 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
 	struct ea_list *ea_list = NULL;
 	int lock_data_count = 0;
 	char *lock_data = NULL;
-	bool ms_dfs_link = false;
 	NTSTATUS status = NT_STATUS_OK;
 
 	if (!params) {
@@ -5188,14 +5181,8 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
 				return;
 			}
 
-		} else if (!VALID_STAT(smb_fname->st) &&
-			   SMB_VFS_STAT(conn, smb_fname) &&
-			   (info_level != SMB_INFO_IS_NAME_VALID)) {
-			ms_dfs_link = check_msdfs_link(conn,
-						       smb_fname->base_name,
-						       &smb_fname->st);
-
-			if (!ms_dfs_link) {
+		} else {
+			if (SMB_VFS_STAT(conn, smb_fname) != 0) {
 				DEBUG(3,("call_trans2qfilepathinfo: "
 					 "SMB_VFS_STAT of %s failed (%s)\n",
 					 smb_fname_str_dbg(smb_fname),
@@ -5319,7 +5306,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
 	status = smbd_do_qfilepathinfo(conn, req, info_level,
 				       fsp, smb_fname,
 				       delete_pending, write_time_ts,
-				       ms_dfs_link, ea_list,
+				       ea_list,
 				       lock_data_count, lock_data,
 				       req->flags2, max_data_bytes,
 				       ppdata, &data_size);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list