vfs_fruit: Replace closedir() by SMB_VFS_CLOSEDIR
commit62e9e06877e748e89aef2739a32140d11473f542
authorAnoop C S <anoopcs@redhat.com>
Fri, 13 Oct 2017 15:08:31 +0000 (13 20:38 +0530)
committerKarolin Seeger <kseeger@samba.org>
Wed, 1 Nov 2017 09:49:25 +0000 (1 10:49 +0100)
treee9600d3a607871d801b74dcaad506078c4e03d76
parent79637804198bcaee85c7ba46258833356a905705
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)
source3/modules/vfs_fruit.c