]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Always call canonicalize_connect_path() for a (synthesized) msdfs-share.
authorJeremy Allison <jra@samba.org>
Tue, 7 Apr 2020 00:34:22 +0000 (17:34 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 9 Apr 2020 19:40:35 +0000 (19:40 +0000)
Share path definitions don't need to be aware of symlinks.

This is strictly a change in behavior, but the vfs_widelinks
module (if loaded) copes with symlinks in the share definition.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/msdfs.c

index 9bac6f6f81ff7ae67ee34bb1003f23157ee10a99..ddfd7d7c7d92811c8055acfe5f6499a804f559e6 100644 (file)
@@ -254,6 +254,7 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
        const char *vfs_user;
        struct smbd_server_connection *sconn;
        const char *servicename = lp_const_servicename(snum);
+       bool ok;
 
        sconn = talloc_zero(ctx, struct smbd_server_connection);
        if (sconn == NULL) {
@@ -357,12 +358,11 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       if (!lp_widelinks(snum)) {
-               if (!canonicalize_connect_path(conn)) {
-                       DBG_ERR("Failed to canonicalize sharepath\n");
-                       conn_free(conn);
-                       return NT_STATUS_ACCESS_DENIED;
-               }
+       ok = canonicalize_connect_path(conn);
+       if (!ok) {
+               DBG_ERR("Failed to canonicalize sharepath\n");
+               conn_free(conn);
+               return NT_STATUS_ACCESS_DENIED;
        }
 
        talloc_free(conn->origpath);