summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-11-11 22:05:05 +0000
committerGerald Carter <jerry@samba.org>2002-11-11 22:05:05 +0000
commitb0f9f11f5fd3aa10be3f7dd3b5d1702222db014f (patch)
tree2e800219053a92a363b72ccc87b265a65dab4c90 /source3/rpc_server/srv_spoolss_nt.c
parent6ff60f301e48692087dd9ebd15ad784924868bb3 (diff)
downloadsamba-b0f9f11f5fd3aa10be3f7dd3b5d1702222db014f.tar.gz
samba-b0f9f11f5fd3aa10be3f7dd3b5d1702222db014f.tar.bz2
samba-b0f9f11f5fd3aa10be3f7dd3b5d1702222db014f.zip
fix for CR 601. Only call addprinter command when the port, driver, comment, or location field changed
(This used to be commit c6d45216f6d3573fb2342f4d3aa3a50415924674)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 2227d39f44..871aac8e68 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5780,8 +5780,14 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level,
}
/* Call addprinter hook */
-
- if (*lp_addprinter_cmd()) {
+ /* Check changes to see if this is really needed */
+
+ if ( *lp_addprinter_cmd()
+ && (!strequal(printer->info_2->drivername, old_printer->info_2->drivername)
+ || !strequal(printer->info_2->comment, old_printer->info_2->comment)
+ || !strequal(printer->info_2->portname, old_printer->info_2->portname)
+ || !strequal(printer->info_2->location, old_printer->info_2->location)) )
+ {
if ( !add_printer_hook(printer) ) {
result = WERR_ACCESS_DENIED;
goto done;