diff options
author | Gerald Carter <jerry@samba.org> | 2006-05-31 01:31:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:15 -0500 |
commit | 1a850a4f37654282039e4b8712a874365ca16681 (patch) | |
tree | b078186554eb954aee23547a42170c16828bf1cb /source3 | |
parent | c2ff57e32670d02f5372d28f3363c8f80658028f (diff) | |
download | samba-1a850a4f37654282039e4b8712a874365ca16681.tar.gz samba-1a850a4f37654282039e4b8712a874365ca16681.tar.bz2 samba-1a850a4f37654282039e4b8712a874365ca16681.zip |
r15975: Only call the printer publishing calls if 'security = ads'
(prevent a segv)
(This used to be commit a2ef525d9e3b4f050cb4e02fad67808d3e916373)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 2e224896c4..0281e3da0c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -6279,7 +6279,13 @@ static WERROR publish_or_unpublish_printer(pipes_struct *p, POLICY_HND *handle, #ifdef HAVE_ADS SPOOL_PRINTER_INFO_LEVEL_7 *info7 = info->info_7; int snum; - Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + Printer_entry *Printer; + + if ( lp_security() != SEC_ADS ) { + return WERR_UNKNOWN_LEVEL; + } + + Printer = find_printer_index_by_hnd(p, handle); DEBUG(5,("publish_or_unpublish_printer, action = %d\n",info7->action)); |