summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-12-03 23:23:36 +0100
committerGünther Deschner <gd@samba.org>2009-12-03 23:49:03 +0100
commit459a968fb4d6f96ea7f310f331d3547e2e466d6a (patch)
tree17a520411aac6f1f1339f9d25bfad91619bf19de
parent2f0548fd98ccbe9695d4e6ae0e21e5ceca76ac68 (diff)
downloadsamba-459a968fb4d6f96ea7f310f331d3547e2e466d6a.tar.gz
samba-459a968fb4d6f96ea7f310f331d3547e2e466d6a.tar.bz2
samba-459a968fb4d6f96ea7f310f331d3547e2e466d6a.zip
s3-spoolss: handle SEC_FLAG_MAXIMUM_ALLOWED in spoolss_OpenPrinterEx.
In case someone (smbtorture4) requests SEC_FLAG_MAXIMUM_ALLOWED, translate it to a request of PRINTER_ACCESS_ADMINISTER. Guenther
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 4a3f07f849..5b8a208a4b 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1676,6 +1676,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 */