From 881ee37c81c0b94c62c92cd4debf2fe52ad7cd63 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 4 Oct 2019 15:16:06 -0700 Subject: [PATCH] s3: VFS: vfs_posix_eadb: Convert streams_depot_rmdir_internal() to call UNLINKAT() instead of RMDIR(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/modules/vfs_streams_depot.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index e0cfac2d990..5be72fc1835 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -796,13 +796,19 @@ static int streams_depot_rmdir(vfs_handle_struct *handle, errno = ENOMEM; return -1; } - SMB_VFS_NEXT_RMDIR(handle, smb_fname_dir); + SMB_VFS_NEXT_UNLINKAT(handle, + dirfsp, + smb_fname_dir, + AT_REMOVEDIR); TALLOC_FREE(smb_fname_dir); } TALLOC_FREE(dirname); } - ret = SMB_VFS_NEXT_RMDIR(handle, smb_fname_base); + ret = SMB_VFS_NEXT_UNLINKAT(handle, + dirfsp, + smb_fname_base, + AT_REMOVEDIR); TALLOC_FREE(smb_fname_base); return ret; } -- 2.47.3