From: Ralph Boehme Date: Wed, 20 Jan 2021 14:15:25 +0000 (+0100) Subject: vfs_posix_eadb: support real dirfsps in posix_eadb_rmdir_internal() X-Git-Tag: tevent-0.11.0~1936 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=304e7955f1cfb2058b5bf0af6d5c083f669b3c66;p=thirdparty%2Fsamba.git vfs_posix_eadb: support real dirfsps in posix_eadb_rmdir_internal() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_posix_eadb.c b/source3/modules/vfs_posix_eadb.c index 8d930b9bc40..11f2057c7a3 100644 --- a/source3/modules/vfs_posix_eadb.c +++ b/source3/modules/vfs_posix_eadb.c @@ -381,15 +381,24 @@ static int posix_eadb_rmdir_internal(vfs_handle_struct *handle, NTSTATUS status; struct tdb_wrap *ea_tdb; int ret; - const char *path = smb_fname->base_name; + struct smb_filename *full_fname = NULL; SMB_VFS_HANDLE_GET_DATA(handle, ea_tdb, struct tdb_wrap, return -1); + full_fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (full_fname == NULL) { + return -1; + } + if (tdb_transaction_start(ea_tdb->tdb) != 0) { + TALLOC_FREE(full_fname); return -1; } - status = unlink_posix_eadb_raw(ea_tdb, path, -1); + status = unlink_posix_eadb_raw(ea_tdb, full_fname->base_name, -1); + TALLOC_FREE(full_fname); if (!NT_STATUS_IS_OK(status)) { tdb_transaction_cancel(ea_tdb->tdb); }