summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-10-01 22:52:33 +0200
committerGünther Deschner <gd@samba.org>2010-10-02 00:42:52 +0200
commitd17a6f049386ebb8c1418837802dac069d7866e4 (patch)
tree8a0dc52e4e93edb63911b311d324779f019c6e3a /source3/rpc_server
parent455bbd5e1e21e3d295b84ee6895097ff420c3d20 (diff)
downloadsamba-d17a6f049386ebb8c1418837802dac069d7866e4.tar.gz
samba-d17a6f049386ebb8c1418837802dac069d7866e4.tar.bz2
samba-d17a6f049386ebb8c1418837802dac069d7866e4.zip
s3-spoolss: Strip off ", DrvConvert" and ",LocalOnly" in OpenPrinterEx as seen from Win7 clients.
These suffixes and their meaning are not documented (yet). Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 07733bd97e..d79c9314c6 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -547,6 +547,7 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
bool found = false;
struct spoolss_PrinterInfo2 *info2 = NULL;
WERROR result;
+ char *p;
/*
* Hopefully nobody names his printers like this. Maybe \ or ,
@@ -585,6 +586,18 @@ static bool set_printer_hnd_name(TALLOC_CTX *mem_ctx,
DEBUGADD(5, ("searching for [%s]\n", aprinter));
+ if ((p = strchr(aprinter, ',')) != NULL) {
+ if (*p == ' ')
+ p++;
+ if (strnequal(p+1, "DrvConvert", strlen("DrvConvert")) ||
+ strnequal(p+1, " DrvConvert", strlen(" DrvConvert"))) {
+ *p = '\0';
+ } else if (strnequal(p+1, "LocalOnly", strlen("LocalOnly")) ||
+ strnequal(p+1, " LocalOnly", strlen(" LocalOnly"))) {
+ *p = '\0';
+ }
+ }
+
/* check for the Port Monitor Interface */
if ( strequal( aprinter, SPL_XCV_MONITOR_TCPMON ) ) {
Printer->printer_type = SPLHND_PORTMON_TCP;