From 8344e945742ff343702b9667e26082c560014523 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 31 Oct 2008 10:51:45 -0700 Subject: Unify se_access_check with the S4 code. Will make calculation of SEC_FLAG_MAXIMUM_ALLOWED much easier for files. Jeremy. --- source3/printing/nt_printing.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/printing/nt_printing.c') diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 5ec0e1e9f3..9c1323eaa2 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -5825,10 +5825,10 @@ bool print_access_check(struct auth_serversupplied_info *server_info, int snum, } /* Check access */ - result = se_access_check(secdesc->sd, server_info->ptok, access_type, - &access_granted, &status); + status = se_access_check(secdesc->sd, server_info->ptok, access_type, + &access_granted); - DEBUG(4, ("access check was %s\n", result ? "SUCCESS" : "FAILURE")); + DEBUG(4, ("access check was %s\n", NT_STATUS_IS_OK(status) ? "SUCCESS" : "FAILURE")); /* see if we need to try the printer admin list */ @@ -5842,11 +5842,11 @@ bool print_access_check(struct auth_serversupplied_info *server_info, int snum, talloc_destroy(mem_ctx); - if (!result) { + if (!NT_STATUS_IS_OK(status)) { errno = EACCES; } - return result; + return NT_STATUS_IS_OK(status); } /**************************************************************************** -- cgit