mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3: smbd: Add helper function check_path_syntax_smb2().
Not yet used, but uses check_path_syntax_smb2_msdfs() so remove the #ifdef's around that. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
bcba550228
commit
7bd7fa0a0b
@ -941,6 +941,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);
|
||||
size_t srvstr_get_path(TALLOC_CTX *ctx,
|
||||
const char *inbuf,
|
||||
uint16_t smb_flags2,
|
||||
|
@ -243,7 +243,6 @@ 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.
|
||||
@ -279,7 +278,15 @@ 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)
|
||||
{
|
||||
if (dfs_path) {
|
||||
return check_path_syntax_smb2_msdfs(path);
|
||||
} else {
|
||||
return check_path_syntax(path);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Pull a string and check the path allowing a wildcard - provide for error return.
|
||||
|
Loading…
Reference in New Issue
Block a user