[Pkg-cups-devel] Bug#674520: cups ignores "Allow From @IF(eth0)" entries in /etc/cups/cupsd.conf
Stefan Gottwald
stefan.gottwald at citron.de
Fri May 25 08:09:26 UTC 2012
Package: cups
Version: 1.4.4-7+squeeze1
Severity: normal
Tags: squeeze patch
If /etc/cups/cupsd.conf is configured with something like this
<Location />
Order Deny,Allow
Deny From All
Allow From @IF(eth0)
Allow From @IF(eth2)
</Location>
the "Allow From @IF(...)" lines will be ignored.
After some searching through the cups source code, I found that in
scheduler/auth.c the "cupsdNetIFUpdate()" function is only called if "Allow
>From @LOCAL" is used. In the "Allow From @IF(...)" case the cupsdNetIFUpdate()
function is not called at all. So the "NetIFList" structure is not
filled/updated and the loop "for (iface = ...." will do nothing at all.
The simplest fix, which worked for me, was to add "cupsdNetIFUpdate();" before
this loop.
I build a new package with this fix and can confirm, that the problem is gone.
-- System Information:
Debian Release: 6.0.5
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-core2 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages cups depends on:
ii adduser 3.112+nmu2 add and remove users and groups
ii bc 1.06.95-2 The GNU bc arbitrary precision cal
ii cups-client 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii cups-common 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii cups-ppdc 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii debconf [debconf-2. 1.5.36.1 Debian configuration management sy
ii ghostscript 8.71~dfsg2-9 The GPL Ghostscript PostScript/PDF
ii libavahi-client3 0.6.27-2+squeeze1 Avahi client library
ii libavahi-common3 0.6.27-2+squeeze1 Avahi common library
ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib
ii libcups2 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii libcupscgi1 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii libcupsdriver1 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii libcupsimage2 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii libcupsmime1 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii libcupsppdc1 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii libdbus-1-3 1.2.24-4+squeeze1 simple interprocess messaging syst
ii libgcc1 1:4.4.5-8 GCC support library
ii libgnutls26 2.8.6-1+squeeze2 the GNU TLS library - runtime libr
ii libgssapi-krb5-2 1.8.3+dfsg-4squeeze5 MIT Kerberos runtime libraries - k
ii libijs-0.35 0.35-7 IJS raster image transport protoco
ii libkrb5-3 1.8.3+dfsg-4squeeze5 MIT Kerberos runtime libraries
ii libldap-2.4-2 2.4.23-7.2 OpenLDAP libraries
ii libpam0g 1.1.1-6.1+squeeze1 Pluggable Authentication Modules l
ii libpaper1 1.1.24 library for handling paper charact
ii libpoppler5 0.12.4-1.2 PDF rendering library
ii libslp1 1.2.1-7.8 OpenSLP libraries
ii libstdc++6 4.4.5-8 The GNU Standard C++ Library v3
ii libusb-0.1-4 2:0.1.12-16 userspace USB programming library
ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii poppler-utils 0.12.4-1.2 PDF utilitites (based on libpopple
ii procps 1:3.2.8-9squeeze1 /proc file system utilities
ii ssl-cert 1.0.28 simple debconf wrapper for OpenSSL
ii ttf-freefont 20090104-7 Freefont Serif, Sans and Mono True
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages cups recommends:
ii cups-driver-gutenprint 5.2.6-1 printer drivers for CUPS
ii foomatic-filters 4.0.5-6+squeeze2 OpenPrinting printer support - fil
ii ghostscript-cups 8.71~dfsg2-9 The GPL Ghostscript PostScript/PDF
Versions of packages cups suggests:
ii cups-bsd 1.4.4-7+squeeze1 Common UNIX Printing System(tm) -
ii cups-pdf 2.5.0-16 PDF printer for CUPS
ii foomatic-db 20100630-1 OpenPrinting printer support - dat
ii hplip 3.10.6-2+squeeze1 HP Linux Printing and Imaging Syst
ii smbclient 2:3.5.6~dfsg-3squeeze8 command-line SMB/CIFS clients for
ii udev 164-3 /dev/ and hotplug management daemo
pn xpdf-korean | xpd <none> (no description available)
-- Configuration Files:
/etc/cups/cupsd.conf [Errno 13] Keine Berechtigung: u'/etc/cups/cupsd.conf'
-- debconf information excluded
-------------- next part --------------
--- scheduler/auth.c.orig 2012-05-25 09:18:11.118294891 +0200
+++ scheduler/auth.c 2012-05-25 09:19:17.262796432 +0200
@@ -1278,6 +1278,8 @@
* Check the named interface...
*/
+ cupsdNetIFUpdate();
+
for (iface = (cupsd_netif_t *)cupsArrayFirst(NetIFList);
iface;
iface = (cupsd_netif_t *)cupsArrayNext(NetIFList))
More information about the Pkg-cups-devel
mailing list