Insufficient quoting of filenames

Bug #345866 reported by Matt Zimmerman
2
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Medium
Unassigned
foo2zjs (Ubuntu)
Fix Released
Medium
Unassigned
foomatic-db (Ubuntu)
Fix Released
Medium
Unassigned
foomatic-db-engine (Ubuntu)
Fix Released
Medium
Unassigned
foomatic-db-hpijs (Ubuntu)
Fix Released
Medium
Unassigned
ghostscript (Ubuntu)
Fix Released
Medium
Unassigned
hplip (Ubuntu)
Fix Released
Medium
Unassigned
m2300w (Ubuntu)
Fix Released
Medium
Unassigned
pxljr (Ubuntu)
Fix Released
Medium
Unassigned
splix (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: foomatic-db

I noticed this during an upgrade:

Setting up openprinting-ppds (20090218-0ubuntu2) ...
grep: DeskJet: No such file or directory
grep: DeskJet: No such file or directory
grep: 693C-1.ppd: No such file or directory
grep: 693C-1.ppd: No such file or directory

This indicates that grep is being invoked with a ppd pathname which contains whitespace, without quoting the pathname.

ProblemType: Bug
Architecture: i386
CupsErrorLog: Error: [Errno 13] Permission denied: '/var/log/cups/error_log'
Dependencies:

DistroRelease: Ubuntu 9.04
Lpstat:
 device for HP-OfficeJet-5500: usb://hp/officejet%205500%20series?serial=MY42EF108B96
 device for WorkCentre-7245: socket://10.45.43.5
 device for WorkCentre-7245-(Mono): socket://10.45.43.5
MachineType: HP Pavilion 061 D7223K-ABA A650E
Package: openprinting-ppds 20090218-0ubuntu2
PackageArchitecture: all
Papersize: letter
PpdFiles:
 DeskJet 693C-1: HP DeskJet 693C Foomatic/hpijs (recommended)
 WorkCentre-7245: Xerox WorkCentre 7245
 HP-OfficeJet-5500: HP OfficeJet 5500 Foomatic/hpijs (recommended)
 WorkCentre-7245-(Mono): WorkCentre 7245 (Mono)
ProcCmdLine: root=UUID=daf1bf61-d974-4e90-b2c7-5f4dfa4e56cf ro quiet splash crashkernel=384M-2G:64M@16M,2G-:128M@16M
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.28-8.24-generic
SourcePackage: foomatic-db

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

How did you succeed to create a print queue with a space in its name. I have tried with system-config-printer, localhost:631, and lpadmin. It always tells me that the queue name can only contain printable characters, no spaces.

Changed in foomatic-db (Ubuntu):
status: New → Incomplete
Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 345866] Re: Insufficient quoting of filenames

On Fri, Mar 20, 2009 at 03:46:50PM -0000, Till Kamppeter wrote:
> How did you succeed to create a print queue with a space in its name. I
> have tried with system-config-printer, localhost:631, and lpadmin. It
> always tells me that the queue name can only contain printable
> characters, no spaces.

I do not have a print queue with a space in its name. I have a PPD with a
space in its name:

/etc/cups/ppd/DeskJet 693C-1.ppd

--
 - mdz

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I can only create such a queue by hand-editing /etc/cups/printers.conf and renaming a PPD file in /etc/cups/ppd/ and then restarting CUPS. Did you create the queue for your HP DeskJet 693C that way?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

mdz, than its fortunately only an ugly message and nothing which got missed to be done.

The message is caused by a function of the postinstall script which updates the PPDs of the existing print queues if they have PPDs coming from (an older version of) this package. As the script is not aborted by these errors the real print queues still get updated.

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Fri, Mar 20, 2009 at 04:10:57PM -0000, Till Kamppeter wrote:
> I can only create such a queue by hand-editing /etc/cups/printers.conf
> and renaming a PPD file in /etc/cups/ppd/ and then restarting CUPS. Did
> you create the queue for your HP DeskJet 693C that way?

I don't remember how that file ended up there; I probably needed to
download a PPD for a printer at some point. There is no print queue for it.
There is no entry in /etc/cups/printers.conf. Just a PPD.

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Fri, Mar 20, 2009 at 04:37:13PM -0000, Till Kamppeter wrote:
> mdz, than its fortunately only an ugly message and nothing which got
> missed to be done.
>
> The message is caused by a function of the postinstall script which
> updates the PPDs of the existing print queues if they have PPDs coming
> from (an older version of) this package. As the script is not aborted by
> these errors the real print queues still get updated.

It's good that it didn't cause a problem, but it's still a bug in the
script. You can't use shell variables this way without quoting them. It
should be simple to fix by adding double quotes around the variable like
this: "$ppd"

Understand?

--
 - mdz

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have fixed it now, so that the errors do not occur any more. I can upload the fixed packages after the beta release.

Changed in foomatic-db (Ubuntu):
assignee: nobody → till-kamppeter
importance: Undecided → Low
Changed in foomatic-db (Ubuntu):
assignee: till-kamppeter → nobody
importance: Low → Medium
milestone: none → ubuntu-9.04
status: Incomplete → In Progress
Changed in ghostscript (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
Changed in cups (Ubuntu):
importance: Undecided → Medium
status: New → Fix Committed
Changed in foomatic-db-engine (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
milestone: none → ubuntu-9.04
Changed in ghostscript (Ubuntu):
milestone: none → ubuntu-9.04
Changed in foomatic-db-hpijs (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.04
status: New → In Progress
Changed in hplip (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.04
status: New → In Progress
Changed in splix (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.04
status: New → In Progress
Changed in foo2zjs (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.04
status: New → In Progress
Changed in pxljr (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.04
status: New → In Progress
Changed in m2300w (Ubuntu):
importance: Undecided → Medium
milestone: none → ubuntu-9.04
status: New → In Progress
Revision history for this message
Matt Zimmerman (mdz) wrote :

If this really affects a ton of different packages, that calls for it being
made into a tool rather than duplicating the code in every package's
maintainer scripts.

--
 - mdz

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Good idea, will look into it for Karmic.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 3.9.2-3ubuntu2

---------------
hplip (3.9.2-3ubuntu2) jaunty; urgency=low

  * debian/hpijs.postinst, debian/hpijs-ppds.postinst: Silenced non-fatal
    error messages when post-install script updates PPDs and there are PPDs
    not belonging to a CUPS queue in /etc/cups/ppd/ (LP: #345866).

 -- Till Kamppeter <email address hidden> Thu, 26 Mar 2009 15:28:49 +0100

Changed in hplip:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package foomatic-db - 20090218-0ubuntu3

---------------
foomatic-db (20090218-0ubuntu3) jaunty; urgency=low

  * debian/foomatic-db.postinst, debian/openprinting-ppds.postinst,
    debian/openprinting-ppds-extra.postinst: Silenced non-fatal error messages
    when post-instyall script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

 -- Till Kamppeter <email address hidden> Wed, 25 Mar 2009 16:13:49 +0100

Changed in foomatic-db:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package foomatic-db-hpijs - 20090218-0ubuntu3

---------------
foomatic-db-hpijs (20090218-0ubuntu3) jaunty; urgency=low

  * debian/foomatic-db-hpijs.postinst: Silenced non-fatal error messages when
    post-install script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

 -- Till Kamppeter <email address hidden> Thu, 26 Mar 2009 13:25:49 +0100

Changed in foomatic-db-hpijs:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package foomatic-db-engine - 4.0.0-0ubuntu6

---------------
foomatic-db-engine (4.0.0-0ubuntu6) jaunty; urgency=low

  * debian/foomatic-db-engine.postinst: Silenced non-fatal error messages when
    post-install script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

 -- Till Kamppeter <email address hidden> Thu, 26 Mar 2009 13:16:49 +0100

Changed in foomatic-db-engine:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package splix - 2.0.0-0.1ubuntu3

---------------
splix (2.0.0-0.1ubuntu3) jaunty; urgency=low

  * debian/splix.postinst: Silenced non-fatal error messages when
    post-install script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

 -- Till Kamppeter <email address hidden> Thu, 26 Mar 2009 16:57:49 +0100

Changed in splix:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pxljr - 1.1-0ubuntu6

---------------
pxljr (1.1-0ubuntu6) jaunty; urgency=low

  * debian/pxljr.postinst: Silenced non-fatal error messages when
    post-install script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

  * debian/local/apport-hook.py, debian/rules: Added apport hook (LP: #338442).

 -- Till Kamppeter <email address hidden> Thu, 26 Mar 2009 16:37:50 +0100

Changed in pxljr:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package foo2zjs - 20090217-0ubuntu4

---------------
foo2zjs (20090217-0ubuntu4) jaunty; urgency=low

  * debian/foo2zjs.postinst: Silenced non-fatal error messages when
    post-install script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

 -- Till Kamppeter <email address hidden> Thu, 26 Mar 2009 16:10:49 +0100

Changed in foo2zjs:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package m2300w - 0.51-0ubuntu7

---------------
m2300w (0.51-0ubuntu7) jaunty; urgency=low

  * debian/m2300w.postinst: Silenced non-fatal error messages when
    post-install script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

  * debian/local/apport-hook.py, debian/rules: Added apport hook (LP: #338442).

 -- Till Kamppeter <email address hidden> Thu, 26 Mar 2009 16:57:50 +0100

Changed in m2300w:
status: In Progress → Fix Released
Changed in ghostscript (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.3.9-16

---------------
cups (1.3.9-16) unstable; urgency=low

  [ Till Kamppeter ]
  * debian/local/filters/pdf-filters/pdftopdf/P2PResources.cxx: Fixed
    corruption of output when generating mmultiple copies of EOG or GIMP
    output files (LP: #345183).
  * debian/cups.postinst: Silenced non-fatal error messages when
    post-instyall script updates PPDs and there are PPDs not belonging to
    a CUPS queue in /etc/cups/ppd/ (LP: #345866).

  [ Martin Pitt ]
  * debian/local/apparmor-profile: Drop 'm' permission for /etc/passwd and
    friends, which was a workaround for a kernel apparmor bug on i386. This is
    fixed in current kernels. Thanks to Kees Cook for pointing this out!
    (LP: #270663)
  * debian/cups.install: Do not install the unnecessary (and broken) D-BUS
    configuration file any more. All cupsd does is to send signals, which are
    allowed by default. It does not provide any D-BUS service right now. Also
    remove the obsolete file on upgrades in debian/cups.preinst.
    (Closes: #510634, LP: #318742)
  * Add logfiles_adm_readable.dpatch: Make log files readable by group "adm".
    (LP: #345953)
  * debian/changelog: Fix cruft at the end of file.
  * debian/local/apparmor-profile: Explicitly deny access to /dev/tty and
    writing access to /etc/krb5.conf, so that accesses to them do not create
    log spewage. (LP: #348556)

 -- Martin Pitt <email address hidden> Fri, 27 Mar 2009 09:35:56 +0100

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.