summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-09-02 13:19:02 +0200
committerGünther Deschner <gd@samba.org>2010-09-10 00:31:27 +0200
commit26ea51c7ab59f54f0b88f1367a0982404b9be18b (patch)
treedcf8d3fead8a1532dcc6c3f2bb2b3e92950f92e0 /source3
parent718fd39f10310d10ebc2276021d97d48f1163a88 (diff)
downloadsamba-26ea51c7ab59f54f0b88f1367a0982404b9be18b.tar.gz
samba-26ea51c7ab59f54f0b88f1367a0982404b9be18b.tar.bz2
samba-26ea51c7ab59f54f0b88f1367a0982404b9be18b.zip
s3-spoolss: allow a short printername w/o servername.
Verified with RPC-SPOOLSS-PRINTSERVER-enumprinters_old test. Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 1ff78dd2b2..8978971cfb 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -438,13 +438,8 @@ static bool set_printer_hnd_printertype(Printer_entry *Printer, const char *hand
{
DEBUG(3,("Setting printer type=%s\n", handlename));
- if ( strlen(handlename) < 3 ) {
- DEBUGADD(4,("A print server must have at least 1 char ! %s\n", handlename));
- return false;
- }
-
/* it's a print server */
- if (*handlename=='\\' && *(handlename+1)=='\\' && !strchr_m(handlename+2, '\\')) {
+ if (handlename && *handlename=='\\' && *(handlename+1)=='\\' && !strchr_m(handlename+2, '\\')) {
DEBUGADD(4,("Printer is a print server\n"));
Printer->printer_type = SPLHND_SERVER;
}