s3: smbd: In open_directory() move the call to smbd_check_access_rights() until after...
commitae8313a4458fc314a841f90c00edf6b1ad4e44cf
authorJeremy Allison <jra@samba.org>
Tue, 8 Jun 2021 03:58:34 +0000 (7 20:58 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:29 +0000 (9 13:14 +0000)
tree5cf82567c10fc8336f0fef7bb831b4a7207f095a
parentd2d52ebb6ccadc5b1287935b245a8b06abe03cb9
s3: smbd: In open_directory() move the call to smbd_check_access_rights() until after the fsp is set up.

This doesn't matter now, but later we will move to a handle-based call to
check access rights, so we will need the full handle setup.

Add a fd_close(fsp) in the error path now this is done after the fd open.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/open.c