mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
s3: lib: Add new utility function cp_smb_filename_nostream().
Will be needed when we migrate lower-level VFS functions to take an struct smb_filename *, especially the SYS_ACL and XATTR modification modules, as these must ignore a passed-in stream name. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
7259661467
commit
63d2003ecd
@ -1114,6 +1114,8 @@ const char *fsp_str_dbg(const struct files_struct *fsp);
|
||||
const char *fsp_fnum_dbg(const struct files_struct *fsp);
|
||||
struct smb_filename *cp_smb_filename(TALLOC_CTX *mem_ctx,
|
||||
const struct smb_filename *in);
|
||||
struct smb_filename *cp_smb_filename_nostream(TALLOC_CTX *mem_ctx,
|
||||
const struct smb_filename *in);
|
||||
bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname);
|
||||
bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname);
|
||||
bool is_invalid_windows_ea_name(const char *name);
|
||||
|
@ -71,6 +71,22 @@ struct smb_filename *synthetic_smb_fname(TALLOC_CTX *mem_ctx,
|
||||
return cp_smb_filename(mem_ctx, &smb_fname_loc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function used by VFS calls that must *NOT* operate
|
||||
* on a stream filename, only the base_name.
|
||||
*/
|
||||
struct smb_filename *cp_smb_filename_nostream(TALLOC_CTX *mem_ctx,
|
||||
const struct smb_filename *smb_fname_in)
|
||||
{
|
||||
struct smb_filename *smb_fname = cp_smb_filename(mem_ctx,
|
||||
smb_fname_in);
|
||||
if (smb_fname == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
TALLOC_FREE(smb_fname->stream_name);
|
||||
return smb_fname;
|
||||
}
|
||||
|
||||
/**
|
||||
* There are a few legitimate users of this.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user