]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove 'is_dfs' parameter to check_path_syntax_smb2().
authorJeremy Allison <jra@samba.org>
Mon, 27 Mar 2023 19:23:44 +0000 (12:23 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 31 Mar 2023 05:12:32 +0000 (05:12 +0000)
check_path_syntax_smb2() is now a simple wrapper around check_path_syntax().
Leave it alone for now to keep things separate when we add SMB3+POSIX parsing.

check_path_syntax_smb2_msdfs() is now no longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/proto.h
source3/smbd/smb2_create.c
source3/smbd/smb2_reply.c
source3/smbd/smb2_trans2.c

index 5637b02cbd5e77ccf0627da0569c5e1ca0bd30f6..4e61dc426d89f573d6ae2d88559e374982673231 100644 (file)
@@ -935,7 +935,7 @@ bool disk_quotas(connection_struct *conn, struct smb_filename *fname,
 
 NTSTATUS check_path_syntax(char *path);
 NTSTATUS check_path_syntax_posix(char *path);
-NTSTATUS check_path_syntax_smb2(char *path, bool dfs_path);
+NTSTATUS check_path_syntax_smb2(char *path);
 NTSTATUS smb2_strip_dfs_path(const char *in_path, const char **out_path);
 size_t srvstr_get_path(TALLOC_CTX *ctx,
                        const char *inbuf,
index 8e5667f2ebcf980d27870a55d8297aede0bc7acd..c17562e93e180c97a1a2cf15b866578edd2ef0c2 100644 (file)
@@ -511,7 +511,7 @@ static NTSTATUS smbd_smb2_create_durable_lease_check(struct smb_request *smb1req
        }
 
        /* This also converts '\' to '/' */
-       status = check_path_syntax_smb2(filename, is_dfs);
+       status = check_path_syntax_smb2(filename);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(filename);
                return status;
@@ -1041,7 +1041,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
        }
 
        /* convert '\\' into '/' */
-       status = check_path_syntax_smb2(state->fname, is_dfs);
+       status = check_path_syntax_smb2(state->fname);
        if (tevent_req_nterror(req, status)) {
                return tevent_req_post(req, state->ev);
        }
index 7bd4b4a5a18326ec2b689a2f731859043b26cceb..a2e7de1c80640d54699d7bb5eb56336664dd0ed8 100644 (file)
@@ -243,6 +243,7 @@ NTSTATUS check_path_syntax_posix(char *path)
        return check_path_syntax_internal(path, true);
 }
 
+#if 0
 /****************************************************************************
  Check the path for an SMB2 DFS path.
  SMB2 DFS paths look like hostname\share (followed by a possible \extrapath.
@@ -278,14 +279,16 @@ static NTSTATUS check_path_syntax_smb2_msdfs(char *path)
        *remaining_path++ = '/';
        return check_path_syntax(remaining_path);
 }
+#endif
 
-NTSTATUS check_path_syntax_smb2(char *path, bool dfs_path)
+NTSTATUS check_path_syntax_smb2(char *path)
 {
-       if (dfs_path) {
-               return check_path_syntax_smb2_msdfs(path);
-       } else {
-               return check_path_syntax(path);
-       }
+       /*
+        * Now a simple wrapper around check_path_syntax().
+        * Leave it alone for now to keep things separate
+        * when we add SMB3+POSIX parsing.
+        */
+       return check_path_syntax(path);
 }
 
 /****************************************************************************
index e01c50c762d715945cf25629e1bd1e0818cf74ba..2cd882bd88979e6f96b4405d8d29fe7191d6aa4b 100644 (file)
@@ -4445,7 +4445,7 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
        req->flags2 &= ~FLAGS2_DFS_PATHNAMES;
        ucf_flags &= ~UCF_DFS_PATHNAME;
 
-       status = check_path_syntax_smb2(newname, false);
+       status = check_path_syntax_smb2(newname);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -4556,7 +4556,7 @@ static NTSTATUS smb2_file_link_information(connection_struct *conn,
        req->flags2 &= ~FLAGS2_DFS_PATHNAMES;
        ucf_flags &= ~UCF_DFS_PATHNAME;
 
-       status = check_path_syntax_smb2(newname, false);
+       status = check_path_syntax_smb2(newname);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }