1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-23 06:50:21 +03:00

smbd: can_delete_directory_fsp() returns NTSTATUS

Don't go via errno

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2022-02-21 17:19:49 +01:00 committed by Ralph Boehme
parent be20147516
commit 9027cc357a

View File

@ -1915,14 +1915,12 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp)
char *talloced = NULL;
SMB_STRUCT_STAT st;
struct connection_struct *conn = fsp->conn;
struct smb_Dir *dir_hnd = OpenDir(talloc_tos(),
conn,
fsp->fsp_name,
NULL,
0);
struct smb_Dir *dir_hnd = NULL;
if (!dir_hnd) {
return map_nt_error_from_unix(errno);
status = OpenDir_ntstatus(
talloc_tos(), conn, fsp->fsp_name, NULL, 0, &dir_hnd);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
while ((dname = ReadDirName(dir_hnd, &dirpos, &st, &talloced))) {