Variable mismatch in /etc/init.d/pdns-recursor

Bug #403957 reported by Christoph Rauch
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pdns-recursor (Ubuntu)
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned
Karmic
Fix Released
Undecided
Unassigned
Lucid
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: pdns-recursor

PowerDNS Recursor can be started, but not stopped via the initscript.

Cause:

Line 32 is currently:

PIDFILE=$SOCKETDIR/$NAME.pid

but should be:

PIDFILE=$PIDDIR/$NAME.pid

Kees Cook (kees)
Changed in pdns-recursor (Ubuntu Lucid):
status: New → Invalid
Changed in pdns-recursor (Ubuntu Karmic):
status: New → Fix Released
Revision history for this message
Imre Gergely (cemc) wrote :

Confirmed. It will be fixed shortly.

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

This bug was fixed in the package pdns-recursor - 3.1.7-2ubuntu0.1

---------------
pdns-recursor (3.1.7-2ubuntu0.1) jaunty-security; urgency=low

  * SECURITY UPDATE: first issue is remotely exploitable, likely
    leads to full compromise; second issue allows an attacker to
    spoof domain data for domain names he does not own (LP: #502987)
    - debian/patches/CVE-2009-4009-4010.dpatch: fixes the two
      problems
    - CVE-2009-4009, CVE-2009-4010
  * Fixed init.d script typo which prevented the stop() function from
    working (LP: #403957)
    - debian/init.d/pdns-recursor
 -- Imre Gergely <email address hidden> Thu, 07 Jan 2010 01:36:22 +0200

Changed in pdns-recursor (Ubuntu Jaunty):
status: New → Fix Released
Revision history for this message
Thomas Waldmann (tw-public) wrote :
Download full text (4.6 KiB)

Well, there is still something broken:

tw@x300:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 436kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com jaunty/universe pdns-recursor 3.1.7-2 [436kB]
Fetched 436kB in 0s (609kB/s)
(Reading database ... 256553 files and directories currently installed.)
Preparing to replace pdns-recursor 3.1.7-2 (using .../pdns-recursor_3.1.7-2_i386.deb) ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/pdns-recursor_3.1.7-2_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
postinst called with unknown argument `abort-upgrade'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/pdns-recursor_3.1.7-2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

tw@x300:~$ sudo apt-get install pdns-recursor
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  pdns-recursor
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B/446kB of archives.
After this operation, 16.4kB of additional disk space will be used.
(Reading database ... 256553 files and directories currently installed.)
Preparing to replace pdns-recursor 3.1.7-2 (using .../pdns-recursor_3.1.7-2ubuntu0.1_i386.deb) ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
 * Stopping PowerDNS recursor pdns-recursor invoke-rc.d: initscript pdns-recursor, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
postinst called with unknown argument `abort-upgrade'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/pdns-recursor_3.1.7-2ubuntu0.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

tw@x300:~$ sudo apt-get upgrade
Reading ...

Read more...

Revision history for this message
Imre Gergely (cemc) wrote :

The old init.d script is broken, this was fixed in the new package which is in updates. Unfortunately you can't update, because before it removes the old package, it tries to stop the daemon by invoking the old init script. One needs to manually correct the old init.d.

Please do the following:

- edit /etc/init.d/pdns-recursor, and change line 32 from:

PIDFILE=$SOCKETDIR/$NAME.pid

to:

PIDFILE=$PIDDIR/$NAME.pid

- do an apt-get install pdns-recursor (this should install the new package from -updates/-security).

Revision history for this message
Thomas Waldmann (tw-public) wrote :

Thanks Imre, that worked.

Maybe the new package could have included some scripting to do these steps automatically, if needed.

Revision history for this message
Imre Gergely (cemc) wrote :

Indeed it could. I'll do it ASAP.

Revision history for this message
Imre Gergely (cemc) wrote :

This affects only version 3.1.7-2 (which has the broken init script), it prevented the upgrade to 3.1.7-2ubuntu0.1.
Debdiff is against 3.1.7-2ubuntu0.1. Tested locally.

Changed in pdns-recursor (Ubuntu Jaunty):
status: Fix Released → In Progress
Imre Gergely (cemc)
Changed in pdns-recursor (Ubuntu Intrepid):
status: New → Invalid
Revision history for this message
Imre Gergely (cemc) wrote :

Updated debdiff as per IRC discussion.

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

This bug was fixed in the package pdns-recursor - 3.1.7-2ubuntu0.2

---------------
pdns-recursor (3.1.7-2ubuntu0.2) jaunty-security; urgency=low

  * Updated package maint. scripts to work around broken init script
    in 3.1.7-2 (LP: #403957)
    - debian/pdns-recursor.prerm: added fix for upgrading to work
    - debian/pdns-recursor.postinst: added fix for upgrading to work
 -- Imre Gergely <email address hidden> Sat, 09 Jan 2010 02:58:37 +0200

Changed in pdns-recursor (Ubuntu Jaunty):
status: In Progress → 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.