vfs_fruit: Replace closedir() by SMB_VFS_CLOSEDIR
authorAnoop C S <anoopcs@redhat.com>
Fri, 13 Oct 2017 15:08:31 +0000 (20:38 +0530)
committerGünther Deschner <gd@samba.org>
Mon, 16 Oct 2017 17:56:55 +0000 (19:56 +0200)
commit7917f9721c9f8efdf9e7b7c50a9e5147250e36fe
tree2712be6670dd98aed5ad07bf79e5edbe7375e926
parent2abc1272874a07c987e3e6eb8477925cc84904b9
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
source3/modules/vfs_fruit.c