s3-security: use shared Security Access Masks Rights.
authorGünther Deschner <gd@samba.org>
Wed, 2 Jun 2010 21:45:44 +0000 (23:45 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 3 Jun 2010 09:00:25 +0000 (11:00 +0200)
Guenther

source3/include/rpc_secdes.h
source3/rpc_server/srv_spoolss_nt.c

index 16791e072cb4f2a6c2764bfb0ed0a2ad5b6b8a09..ec1bbc61eaaf06fcb5f8f9c6dba4220432f2672f 100644 (file)
@@ -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
index 81c72c20ae0d956949f5bb4debb94ef1e5530ddd..104efdc274582f8be5c8b3d16bad498496e8b96d 100644 (file)
@@ -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);