diff options
author | Günther Deschner <gd@samba.org> | 2010-10-02 22:17:46 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-10-07 16:09:14 +0000 |
commit | d8c86a7f773877af50508cf88c383c04f23d961b (patch) | |
tree | 25183e472c6cd60e3ffcf3c2d885716641284f2e | |
parent | 12112d545c278e49a0b1377a25bdf8a4598c0f47 (diff) | |
download | samba-d8c86a7f773877af50508cf88c383c04f23d961b.tar.gz samba-d8c86a7f773877af50508cf88c383c04f23d961b.tar.bz2 samba-d8c86a7f773877af50508cf88c383c04f23d961b.zip |
s3-spoolss: make it possible to have and announce a [prnproc$] share on the printserver.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct 7 16:09:14 UTC 2010 on sn-devel-104
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 14 |
1 files changed, 12 insertions, 2 deletions
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)) { |