1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

smbd: Simplify check_access()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 17 22:58:10 CET 2015 on sn-devel-104
This commit is contained in:
Volker Lendecke 2015-11-17 15:19:31 +01:00 committed by Jeremy Allison
parent c2d5fdb629
commit 8f9bf74fbf

View File

@ -72,19 +72,16 @@ NTSTATUS check_access(connection_struct *conn,
const struct smb_filename *smb_fname,
uint32_t access_mask)
{
NTSTATUS status;
if (fsp) {
NTSTATUS status = check_access_fsp(fsp, access_mask);
return status;
status = check_access_fsp(fsp, access_mask);
} else {
NTSTATUS status = smbd_check_access_rights(conn,
smb_fname,
false,
access_mask);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
return NT_STATUS_OK;
status = smbd_check_access_rights(conn, smb_fname,
false, access_mask);
}
return status;
}
/********************************************************************