From 40e70cbd3c3a1df9205a7b18d07784c1754cc340 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 18 Dec 2020 14:36:00 +0100 Subject: [PATCH] vfs_streams_xattr: make use of vfs_fake_fd_close() 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 Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_streams_xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index b838878d4b3..72032824b93 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -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; -- 2.47.2