diff options
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r-- | source3/smbd/filename.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 29ebc37d1a..1eb6ce5065 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -276,6 +276,30 @@ NTSTATUS copy_smb_filename(TALLOC_CTX *ctx, } /**************************************************************************** + Simple check to determine if the filename is a stream. + ***************************************************************************/ +bool is_ntfs_stream_smb_fname(const struct smb_filename *smb_fname) +{ + if (lp_posix_pathnames()) { + return false; + } + + return smb_fname->stream_name; +} + +/**************************************************************************** + Returns true if the filename's stream == "::$DATA" + ***************************************************************************/ +bool is_ntfs_default_stream_smb_fname(const struct smb_filename *smb_fname) +{ + if (!is_ntfs_stream_smb_fname(smb_fname)) { + return false; + } + + return StrCaseCmp(smb_fname->stream_name, "::$DATA") == 0; +} + +/**************************************************************************** This routine is called to convert names from the dos namespace to unix namespace. It needs to handle any case conversions, mangling, format changes, streams etc. |