From: Ralph Boehme Date: Fri, 13 Dec 2019 15:19:03 +0000 (+0100) Subject: s3: pass session info to get_referred_path() X-Git-Tag: ldb-2.1.0~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8517bb109c886fcc0b281dd715934138075bab1b;p=thirdparty%2Fsamba.git s3: pass session info to get_referred_path() Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 82238e4b96c..30efccbafa7 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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, diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c b/source3/rpc_server/dfs/srv_dfs_nt.c index 55cd045abd0..b19e4f5a53f 100644 --- a/source3/rpc_server/dfs/srv_dfs_nt.c +++ b/source3/rpc_server/dfs/srv_dfs_nt.c @@ -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 */ diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 0fc7a6313a2..43c31f95fc0 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -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, diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 8d491c24bf3..fa64e611347 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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,