]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: pass session info to get_referred_path()
authorRalph Boehme <slow@samba.org>
Fri, 13 Dec 2019 15:19:03 +0000 (16:19 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 20 Dec 2019 11:41:40 +0000 (11:41 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/modules/vfs_default.c
source3/rpc_server/dfs/srv_dfs_nt.c
source3/smbd/msdfs.c
source3/smbd/proto.h

index 82238e4b96c38e36260db459afea783d743e121b..30efccbafa73e151e54c830f20a86035bef2f95f 100644 (file)
@@ -225,7 +225,9 @@ static NTSTATUS vfswrap_get_dfs_referrals(struct vfs_handle_struct *handle,
        }
 
        /* The following call can change cwd. */
-       status = get_referred_path(r, pathnamep,
+       status = get_referred_path(r,
+                                  handle->conn->session_info,
+                                  pathnamep,
                                   handle->conn->sconn->remote_address,
                                   handle->conn->sconn->local_address,
                                   !handle->conn->sconn->using_smb2,
index 55cd045abd0fa8da00aa5f8cbd51b926b7407c22..b19e4f5a53f6714f5c4e09acd5afe00edaff1fd8 100644 (file)
@@ -75,7 +75,9 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
        }
 
        /* The following call can change the cwd. */
-       status = get_referred_path(ctx, r->in.path,
+       status = get_referred_path(ctx,
+                                  p->session_info,
+                                  r->in.path,
                                   p->remote_address,
                                   p->local_address,
                                   true, /*allow_broken_path */
@@ -147,7 +149,9 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
                        r->in.dfs_entry_path, r->in.servername, r->in.sharename));
        }
 
-       status = get_referred_path(ctx, r->in.dfs_entry_path,
+       status = get_referred_path(ctx,
+                                  p->session_info,
+                                  r->in.dfs_entry_path,
                                   p->remote_address,
                                   p->local_address,
                                   true, /*allow_broken_path */
@@ -379,7 +383,9 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
        }
 
        /* The following call can change the cwd. */
-       status = get_referred_path(ctx, r->in.dfs_entry_path,
+       status = get_referred_path(ctx,
+                                  p->session_info,
+                                  r->in.dfs_entry_path,
                                   p->remote_address,
                                   p->local_address,
                                   true, /*allow_broken_path */
index 0fc7a6313a2a0bf9e4bba9bc1c1ca6e633d867bd..43c31f95fc0d57f4617b23f086887540f5e07467 100644 (file)
@@ -1004,6 +1004,7 @@ static NTSTATUS self_ref(TALLOC_CTX *ctx,
 **********************************************************************/
 
 NTSTATUS get_referred_path(TALLOC_CTX *ctx,
+                          struct auth_session_info *session_info,
                           const char *dfs_path,
                           const struct tsocket_address *remote_address,
                           const struct tsocket_address *local_address,
index 8d491c24bf3abf1b63f1f915948aeb37203d0899..fa64e611347a4f40a1e0b5e32321229dfe44d806 100644 (file)
@@ -471,6 +471,7 @@ bool is_msdfs_link(connection_struct *conn,
                struct smb_filename *smb_fname);
 struct junction_map;
 NTSTATUS get_referred_path(TALLOC_CTX *ctx,
+                          struct auth_session_info *session_info,
                           const char *dfs_path,
                           const struct tsocket_address *remote_address,
                           const struct tsocket_address *local_address,