1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3: smbd: Add missing pop_sec_ctx() in error code path of close_directory()

If delete_all_streams() fails.

Found by Andrew Walker <awalker@ixsystems.com>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14944

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 14 03:34:47 UTC 2022 on sn-devel-184
This commit is contained in:
Jeremy Allison 2022-01-12 10:42:48 -08:00
parent 7163846a49
commit 5f9dbf3dec

View File

@ -1430,6 +1430,8 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
DEBUG(5, ("delete_all_streams failed: %s\n",
nt_errstr(status)));
file_free(req, fsp);
/* unbecome user. */
pop_sec_ctx();
return status;
}
}