summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-07-19 21:41:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:13 -0500
commitae64b2f2aad54833fb29911c50406f784bd2d8b6 (patch)
tree92c60ccf0e4b66f2b200b698c29cb021ca2f4f78
parent21cd4ee355157737c4dfcf6cc901ed1410baceab (diff)
downloadsamba-ae64b2f2aad54833fb29911c50406f784bd2d8b6.tar.gz
samba-ae64b2f2aad54833fb29911c50406f784bd2d8b6.tar.bz2
samba-ae64b2f2aad54833fb29911c50406f784bd2d8b6.zip
r8617: Be very explicit if addprinterex is called that the "addprinter command"
must be defined in smb.conf. Jeremy. (This used to be commit 86f8368c997f0eece20724a0a7158832c66da9f7)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 66804028e1..7498a449c3 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7492,7 +7492,7 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_
/* check to see if the printer already exists */
if ((snum = print_queue_snum(printer->info_2->sharename)) != -1) {
- DEBUG(5, ("_spoolss_addprinterex: Attempted to add a printer named [%s] when one already existed!\n",
+ DEBUG(5, ("spoolss_addprinterex_level_2: Attempted to add a printer named [%s] when one already existed!\n",
printer->info_2->sharename));
free_a_printer(&printer, 2);
return WERR_PRINTER_ALREADY_EXISTS;
@@ -7505,7 +7505,12 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_
if ( !add_printer_hook(p->pipe_user.nt_user_token, printer) ) {
free_a_printer(&printer,2);
return WERR_ACCESS_DENIED;
- }
+ }
+ } else {
+ DEBUG(0,("spoolss_addprinterex_level_2: add printer for printer %s called and no"
+ "smb.conf parameter \"addprinter command\" is defined. This"
+ "parameter must exist for this call to succeed\n",
+ printer->info_2->sharename ));
}
/* use our primary netbios name since get_a_printer() will convert