]> git.pld-linux.org Git - packages/samba.git/commitdiff
- skip printers with names begining with '.' if reading LPRng printcap
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 9 Oct 2007 15:39:53 +0000 (15:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    samba-lprng-no-dot-printers.patch -> 1.1

samba-lprng-no-dot-printers.patch [new file with mode: 0644]

diff --git a/samba-lprng-no-dot-printers.patch b/samba-lprng-no-dot-printers.patch
new file mode 100644 (file)
index 0000000..e86e5dc
--- /dev/null
@@ -0,0 +1,37 @@
+diff -ur samba-3.0.26a/source/param/loadparm.c samba-3.0.26a-lprng/source/param/loadparm.c
+--- samba-3.0.26a/source/param/loadparm.c      2007-09-11 16:21:57.000000000 +0200
++++ samba-3.0.26a-lprng/source/param/loadparm.c        2007-10-09 17:22:57.000000000 +0200
+@@ -5548,6 +5548,11 @@
+       return PRINTCAP_NAME;
+ }
++int lp_defaultprinting(void)
++{
++      return sDefault.iPrinting;
++}
++
+ /*******************************************************************
+  Ensure we don't use sendfile if server smb signing is active.
+ ********************************************************************/
+diff -ur samba-3.0.26a/source/printing/pcap.c samba-3.0.26a-lprng/source/printing/pcap.c
+--- samba-3.0.26a/source/printing/pcap.c       2005-10-18 04:44:57.000000000 +0200
++++ samba-3.0.26a-lprng/source/printing/pcap.c 2007-10-09 17:27:18.000000000 +0200
+@@ -113,6 +113,7 @@
+       pcap_cache_t *tmp_cache = NULL;
+       XFILE *pcap_file;
+       char *pcap_line;
++      enum printing_types printing = lp_defaultprinting();
+       DEBUG(3, ("reloading printcap cache\n"));
+@@ -210,6 +211,10 @@
+               comment[60] = 0;
+               name[MAXPRINTERLEN] = 0;
++              /* skip .name in case of LPRng */
++              if (printing == PRINT_LPRNG && *name = '.')
++                      continue;
++
+               if (*name && !pcap_cache_add(name, comment)) {
+                       x_fclose(pcap_file);
+                       goto done;
This page took 0.152018 seconds and 4 git commands to generate.