From 2794d2ee7f8e088060e4b86532176673cf7c2580 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 2 Jun 2010 23:45:44 +0200 Subject: s3-security: use shared Security Access Masks Rights. Guenther --- source3/include/rpc_secdes.h | 7 ------- source3/rpc_server/srv_spoolss_nt.c | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/include/rpc_secdes.h b/source3/include/rpc_secdes.h index 16791e072c..ec1bbc61ea 100644 --- a/source3/include/rpc_secdes.h +++ b/source3/include/rpc_secdes.h @@ -41,13 +41,6 @@ struct standard_mapping { uint32 std_all; }; - -/* Security Access Masks Rights */ - -#define SPECIFIC_RIGHTS_MASK 0x0000FFFF -#define STANDARD_RIGHTS_MASK 0x00FF0000 -#define GENERIC_RIGHTS_MASK 0xF0000000 - /* Generic access rights */ #define GENERIC_RIGHT_ALL_ACCESS 0x10000000 diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 81c72c20ae..104efdc274 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1537,7 +1537,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p, /* Deny any object specific bits that don't apply to print servers (i.e printer and job specific bits) */ - r->in.access_mask &= SPECIFIC_RIGHTS_MASK; + r->in.access_mask &= SEC_MASK_SPECIFIC; if (r->in.access_mask & ~(SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE)) { @@ -1638,7 +1638,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p, return WERR_ACCESS_DENIED; } - if ((r->in.access_mask & SPECIFIC_RIGHTS_MASK)& ~(PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)) { + if ((r->in.access_mask & SEC_MASK_SPECIFIC)& ~(PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)) { DEBUG(3, ("access DENIED for printer open - unknown bits\n")); close_printer_handle(p, r->out.handle); ZERO_STRUCTP(r->out.handle); -- cgit