summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2017-10-13 20:38:31 +0530
committerKarolin Seeger <kseeger@samba.org>2017-11-01 10:49:25 +0100
commit62e9e06877e748e89aef2739a32140d11473f542 (patch)
treee9600d3a607871d801b74dcaad506078c4e03d76 /source3/modules
parent79637804198bcaee85c7ba46258833356a905705 (diff)
downloadsamba-62e9e06877e748e89aef2739a32140d11473f542.tar.gz
vfs_fruit: Replace closedir() by SMB_VFS_CLOSEDIR
Pointer to directory 'dh' inside fruit_rmdir() is obtained using SMB_VFS_OPENDIR. But this handle is closed directly by invoking closedir() rather than SMB_VFS_CLOSEDIR. This will result in a smbd crash if this handle was not obtained from local file system. Therefore use SMB_VFS_CLOSEDIR corresponding to SMB_VFS_OPENDIR to correctly close the directory handle. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13086 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Mon Oct 16 19:56:55 CEST 2017 on sn-devel-144 (cherry picked from commit 7917f9721c9f8efdf9e7b7c50a9e5147250e36fe)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_fruit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index ce77a8d7e10..0f320dc6e40 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -3764,7 +3764,7 @@ static int fruit_rmdir(struct vfs_handle_struct *handle,
exit_rmdir:
if (dh) {
- closedir(dh);
+ SMB_VFS_CLOSEDIR(handle->conn, dh);
}
return SMB_VFS_NEXT_RMDIR(handle, smb_fname);
}