[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Mar 25 23:09:04 UTC 2016


The branch, master has been updated
       via  9377f3b s3: smbd: DFS: Pass uint32_t ucf_flags through into unix_convert().
       via  6156c82 s3: smbd: DFS: Pass uint32_t ucf_flags through into dfs_redirect().
       via  b96ae7c s3: smbd: DFS: Pass uint32_t ucf_flags through into resolve_dfspath_wcard().
      from  94464ed pam_winbind: Create and use a wbclient context

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


- Log -----------------------------------------------------------------
commit 9377f3bce0866e2fadeea5ba87f7ee41f7d9ba31
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Mar 25 11:34:30 2016 -0700

    s3: smbd: DFS: Pass uint32_t ucf_flags through into unix_convert().
    
    This allows vendors to ensure that flags such as UCF_PREP_CREATEFILE
    are always passed to their VFS modules whilst smbd is doing pathname
    lookup - even before the create VFS call is done.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Richard Sharpe <realrichardsharpe at gmail.com>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Mar 26 00:08:40 CET 2016 on sn-devel-144

commit 6156c825bbb803cb70a03b0fe22d2576d82bab30
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Mar 25 11:26:39 2016 -0700

    s3: smbd: DFS: Pass uint32_t ucf_flags through into dfs_redirect().
    
    Eventually move this down to the call to unix_convert()
    inside the DFS code.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Richard Sharpe <realrichardsharpe at gmail.com>

commit b96ae7c69e48ecfc147b032d3d6e00a1ce65d226
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Mar 25 11:23:29 2016 -0700

    s3: smbd: DFS: Pass uint32_t ucf_flags through into resolve_dfspath_wcard().
    
    Eventually move this down to the call to unix_convert()
    inside the DFS code.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Richard Sharpe <realrichardsharpe at gmail.com>

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

Summary of changes:
 source3/smbd/filename.c |  3 +--
 source3/smbd/msdfs.c    | 17 +++++++++++------
 source3/smbd/proto.h    |  2 +-
 source3/smbd/trans2.c   |  2 +-
 4 files changed, 14 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 7271466..89c8bd6 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -1401,7 +1401,6 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx,
 				struct smb_filename **pp_smb_fname)
 {
 	NTSTATUS status;
-	bool allow_wcards = (ucf_flags & (UCF_COND_ALLOW_WCARD_LCOMP|UCF_ALWAYS_ALLOW_WCARD_LCOMP));
 	char *fname = NULL;
 
 	*pp_smb_fname = NULL;
@@ -1409,7 +1408,7 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx,
 	status = resolve_dfspath_wcard(ctx, conn,
 				dfs_path,
 				name_in,
-				allow_wcards,
+				ucf_flags,
 				!conn->sconn->using_smb2,
 				&fname,
 				ppath_contains_wcard);
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index cab6ff3..51e3dff 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -669,7 +669,7 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
 		const char *dfspath, /* Incoming complete dfs path */
 		const struct dfs_path *pdp, /* Parsed out
 					       server+share+extrapath. */
-		bool search_flag, /* Called from a findfirst ? */
+		uint32_t ucf_flags,
 		int *consumedcntp,
 		char **pp_targetpath)
 {
@@ -691,7 +691,7 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
 	 */
 
 	status = unix_convert(ctx, conn, pdp->reqpath, &smb_fname,
-			      search_flag ? UCF_ALWAYS_ALLOW_WCARD_LCOMP : 0);
+			      ucf_flags);
 
 	if (!NT_STATUS_IS_OK(status)) {
 		if (!NT_STATUS_EQUAL(status,
@@ -707,7 +707,10 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
 
 	if (is_msdfs_link_internal(ctx, conn, smb_fname->base_name,
 				   pp_targetpath, NULL)) {
-		if (search_flag) {
+		/* XX_ALLOW_WCARD_XXX is called from search functions. */
+		if (ucf_flags &
+				(UCF_COND_ALLOW_WCARD_LCOMP|
+				 UCF_ALWAYS_ALLOW_WCARD_LCOMP)) {
 			DEBUG(6,("dfs_path_lookup (FindFirst) No redirection "
 				 "for dfs link %s.\n", dfspath));
 			status = NT_STATUS_OK;
@@ -817,12 +820,14 @@ static NTSTATUS dfs_path_lookup(TALLOC_CTX *ctx,
 static NTSTATUS dfs_redirect(TALLOC_CTX *ctx,
 			connection_struct *conn,
 			const char *path_in,
-			bool search_wcard_flag,
+			uint32_t ucf_flags,
 			bool allow_broken_path,
 			char **pp_path_out,
 			bool *ppath_contains_wcard)
 {
 	NTSTATUS status;
+	bool search_wcard_flag = (ucf_flags &
+		(UCF_COND_ALLOW_WCARD_LCOMP|UCF_ALWAYS_ALLOW_WCARD_LCOMP));
 	struct dfs_path *pdp = talloc(ctx, struct dfs_path);
 
 	if (!pdp) {
@@ -1666,7 +1671,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
 				connection_struct *conn,
 				bool dfs_pathnames,
 				const char *name_in,
-				bool allow_wcards,
+				uint32_t ucf_flags,
 				bool allow_broken_path,
 				char **pp_name_out,
 				bool *ppath_contains_wcard)
@@ -1678,7 +1683,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
 		status = dfs_redirect(ctx,
 					conn,
 					name_in,
-					allow_wcards,
+					ucf_flags,
 					allow_broken_path,
 					pp_name_out,
 					&path_contains_wcard);
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 6f402ab..4be6521 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -488,7 +488,7 @@ NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,
 				connection_struct *conn,
 				bool dfs_pathnames,
 				const char *name_in,
-				bool allow_wcards,
+				uint32_t ucf_flags,
 				bool allow_broken_path,
 				char **pp_name_out,
 				bool *ppath_contains_wcard);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 69276f5..f351008 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6876,7 +6876,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
 	status = resolve_dfspath_wcard(ctx, conn,
 				       req->flags2 & FLAGS2_DFS_PATHNAMES,
 				       newname,
-				       true,
+				       UCF_COND_ALLOW_WCARD_LCOMP,
 				       !conn->sconn->using_smb2,
 				       &newname,
 				       &dest_has_wcard);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list