summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;