s3:lib: implement logic directly in is_ntfs_default_stream_smb_fname()
authorRalph Boehme <slow@samba.org>
Wed, 25 Sep 2019 18:19:26 +0000 (11:19 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 2 Oct 2019 08:01:39 +0000 (08:01 +0000)
This allows changing the semantics of is_ntfs_stream_smb_fname() in the next
commit.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137

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

index 750c0bb83121af5e08c933ea65c3f724ed96200b..ee49ae5ff8ca8db696223d9f77ff9a9518c8377d 100644 (file)
@@ -272,7 +272,9 @@ 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)
 {
-       if (!is_ntfs_stream_smb_fname(smb_fname)) {
+       assert_valid_stream_smb_fname(smb_fname);
+
+       if (smb_fname->stream_name == NULL) {
                return false;
        }