s3-spoolss: handle SEC_FLAG_MAXIMUM_ALLOWED in spoolss_OpenPrinterEx.
authorGünther Deschner <gd@samba.org>
Thu, 3 Dec 2009 22:23:36 +0000 (23:23 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Dec 2009 09:52:48 +0000 (10:52 +0100)
In case someone (smbtorture4) requests SEC_FLAG_MAXIMUM_ALLOWED, translate it
to a request of PRINTER_ACCESS_ADMINISTER.

Guenther
(cherry picked from commit 459a968fb4d6f96ea7f310f331d3547e2e466d6a)

source3/rpc_server/srv_spoolss_nt.c

index 1dfae32d07683056ab758ec52b88688feafade16..ecad469d8200a0a33463585237406f52e520615b 100644 (file)
@@ -1670,6 +1670,10 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p,
                        return WERR_BADFID;
                }
 
+               if (r->in.access_mask == SEC_FLAG_MAXIMUM_ALLOWED) {
+                       r->in.access_mask = PRINTER_ACCESS_ADMINISTER;
+               }
+
                se_map_standard(&r->in.access_mask, &printer_std_mapping);
 
                /* map an empty access mask to the minimum access mask */