diff -ur samba-3.0.26a/source3/param/loadparm.c samba-3.0.26a-lprng/source3/param/loadparm.c --- samba-3.0.26a/source3/param/loadparm.c 2007-09-11 16:21:57.000000000 +0200 +++ samba-3.0.26a-lprng/source3/param/loadparm.c 2007-10-09 17:22:57.000000000 +0200 @@ -5548,6 +5548,11 @@ return PRINTCAP_NAME; } +int lp_defaultprinting(void) +{ + return sDefault.printing; +} + /******************************************************************* Ensure we don't use sendfile if server smb signing is active. ********************************************************************/ --- samba-3.6.0/source3/printing/print_standard.c~ 2011-08-09 13:17:47.000000000 +0200 +++ samba-3.6.0/source3/printing/print_standard.c 2011-10-17 21:15:15.693523176 +0200 @@ -64,6 +64,7 @@ bool std_pcap_cache_reload(const char *p char *pcap_line; struct pcap_cache *pcache = NULL; bool print_warning = false; + enum printing_types printing = lp_defaultprinting(); if ((pcap_file = x_fopen(pcap_name, O_RDONLY, 0)) == NULL) { DEBUG(0, ("Unable to open printcap file %s for read!\n", pcap_name)); @@ -77,6 +79,10 @@ if (*pcap_line == '#' || *pcap_line == 0) continue; + /* skip .name in case of LPRng */ + if (printing == PRINT_LPRNG && *name == '.') + continue; + /* now we have a real printer line - cut at the first : */ if ((p = strchr_m(pcap_line, ':')) != NULL) *p = 0;