]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_streams_xattr: make use of vfs_fake_fd_close()
authorStefan Metzmacher <metze@samba.org>
Fri, 18 Dec 2020 13:36:00 +0000 (14:36 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 8 Jan 2021 20:31:33 +0000 (20:31 +0000)
When we used vfs_fake_fd() we should use vfs_fake_fd_close()
in order to have things symetric.

That may allows us to change vfs_fake_fd() internally if required.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_streams_xattr.c

index b838878d4b33cd241a599024774509fca171ea98..72032824b937c1ddfa9e48ec4cb49836f6ea2821 100644 (file)
@@ -488,7 +488,7 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle,
 
  fail:
        if (fakefd >= 0) {
-               close(fakefd);
+               vfs_fake_fd_close(fakefd);
                fakefd = -1;
        }
 
@@ -510,7 +510,7 @@ static int streams_xattr_close(vfs_handle_struct *handle,
                return SMB_VFS_NEXT_CLOSE(handle, fsp);
        }
 
-       ret = close(fd);
+       ret = vfs_fake_fd_close(fd);
        fsp_set_fd(fsp, -1);
 
        return ret;