From: Ralph Boehme Date: Fri, 13 Dec 2019 15:23:38 +0000 (+0100) Subject: s3: pass session_info to create_msdfs_link() X-Git-Tag: ldb-2.1.0~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a0ad072ac0e056ccd34f59f49c6391a50c17c74;p=thirdparty%2Fsamba.git s3: pass session_info to create_msdfs_link() Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c b/source3/rpc_server/dfs/srv_dfs_nt.c index b19e4f5a53f..878148d803b 100644 --- a/source3/rpc_server/dfs/srv_dfs_nt.c +++ b/source3/rpc_server/dfs/srv_dfs_nt.c @@ -108,7 +108,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r) jn->referral_list[jn->referral_count-1].ttl = REFERRAL_TTL; jn->referral_list[jn->referral_count-1].alternate_path = altpath; - if(!create_msdfs_link(jn)) { + if(!create_msdfs_link(jn, p->session_info)) { return WERR_NERR_DFSCANTCREATEJUNCTIONPOINT; } @@ -197,7 +197,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r) return WERR_NERR_DFSNOSUCHVOLUME; } } else { - if(!create_msdfs_link(jn)) { + if(!create_msdfs_link(jn, p->session_info)) { return WERR_NERR_DFSCANTCREATEJUNCTIONPOINT; } } diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 43c31f95fc0..3ac9740873f 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -1423,7 +1423,8 @@ char *msdfs_link_string(TALLOC_CTX *ctx, return NULL; } -bool create_msdfs_link(const struct junction_map *jucn) +bool create_msdfs_link(const struct junction_map *jucn, + struct auth_session_info *session_info) { TALLOC_CTX *frame = talloc_stackframe(); char *path = NULL; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index fa64e611347..d40ccd4af8a 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -491,7 +491,8 @@ struct referral; char *msdfs_link_string(TALLOC_CTX *ctx, const struct referral *reflist, size_t referral_count); -bool create_msdfs_link(const struct junction_map *jucn); +bool create_msdfs_link(const struct junction_map *jucn, + struct auth_session_info *session_info); bool remove_msdfs_link(const struct junction_map *jucn); struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn); NTSTATUS resolve_dfspath_wcard(TALLOC_CTX *ctx,