]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_default: use is_named_stream() for stream check
authorRalph Boehme <slow@samba.org>
Thu, 26 Sep 2019 19:19:31 +0000 (12:19 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 2 Oct 2019 08:01:40 +0000 (08:01 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_default.c

index 781c5e06fadac892795da0a18cc8877d7417770b..738be3bf2d69af297357710fbf8444b0bd369176 100644 (file)
@@ -551,7 +551,7 @@ static int vfswrap_open(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_open);
 
-       if (smb_fname->stream_name) {
+       if (is_named_stream(smb_fname)) {
                errno = ENOENT;
                goto out;
        }
@@ -1080,7 +1080,7 @@ static int vfswrap_renameat(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_renameat);
 
-       if (smb_fname_src->stream_name || smb_fname_dst->stream_name) {
+       if (is_named_stream(smb_fname_src) || is_named_stream(smb_fname_dst)) {
                errno = ENOENT;
                goto out;
        }
@@ -1102,7 +1102,7 @@ static int vfswrap_stat(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_stat);
 
-       if (smb_fname->stream_name) {
+       if (is_named_stream(smb_fname)) {
                errno = ENOENT;
                goto out;
        }
@@ -1132,7 +1132,7 @@ static int vfswrap_lstat(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_lstat);
 
-       if (smb_fname->stream_name) {
+       if (is_named_stream(smb_fname)) {
                errno = ENOENT;
                goto out;
        }
@@ -2215,7 +2215,7 @@ static int vfswrap_unlinkat(vfs_handle_struct *handle,
 
        SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
 
-       if (smb_fname->stream_name) {
+       if (is_named_stream(smb_fname)) {
                errno = ENOENT;
                goto out;
        }
@@ -2348,7 +2348,7 @@ static int vfswrap_ntimes(vfs_handle_struct *handle,
 
        START_PROFILE(syscall_ntimes);
 
-       if (smb_fname->stream_name) {
+       if (is_named_stream(smb_fname)) {
                errno = ENOENT;
                goto out;
        }