From d8c86a7f773877af50508cf88c383c04f23d961b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sat, 2 Oct 2010 22:17:46 +0200 Subject: s3-spoolss: make it possible to have and announce a [prnproc$] share on the printserver. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Autobuild-User: Günther Deschner Autobuild-Date: Thu Oct 7 16:09:14 UTC 2010 on sn-devel-104 --- source3/rpc_server/srv_spoolss_nt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 4de2cdbae6..c05ba66e42 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -9606,6 +9606,9 @@ WERROR _spoolss_GetPrintProcessorDirectory(struct pipes_struct *p, struct spoolss_GetPrintProcessorDirectory *r) { WERROR result; + fstring prnproc_share; + bool prnproc_share_exists = false; + int snum; /* that's an [in out] buffer */ @@ -9622,10 +9625,17 @@ WERROR _spoolss_GetPrintProcessorDirectory(struct pipes_struct *p, /* We always should reply with a local print processor directory so that * users are not forced to have a [prnproc$] share on the Samba spoolss - * server - Guenther */ + * server, if users decide to do so, lets announce it though - Guenther */ + + fstrcpy(prnproc_share, "prnproc$"); + + snum = find_service(prnproc_share); + if (snum != -1) { + prnproc_share_exists = true; + } result = getprintprocessordirectory_level_1(p->mem_ctx, - NULL, /* r->in.server */ + prnproc_share_exists ? r->in.server : NULL, r->in.environment, &r->out.info->info1); if (!W_ERROR_IS_OK(result)) { -- cgit