"killall -u snmp" in a pre-install step kills any running snmpd
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | net-snmp (Debian) |
Fix Released
|
Unknown
|
||
| | net-snmp (Ubuntu) |
High
|
ChristianEhrhardt | ||
Bug Description
If I am running snmpd (which I was) and I install snmp (which I did), it kills snmpd due to a pre-install step of the snmp package that calls a 'killall -u snmp' :(
Found the pre-install step here:
user@host3:~$ cat /var/lib/
#! /bin/sh
set -e
action="$1"
killall -u snmp 2>/dev/null || true
if [ "$action" = upgrade ]
then
if [ -L /usr/share/doc/snmp ]; then
rm -f /usr/share/doc/snmp
fi
if [ -d /usr/doc/snmp ]; then
rm -rf /usr/doc/snmp
fi
fi
exit 0
| affects: | debian → net-snmp (Debian) |
| Changed in net-snmp (Debian): | |
| status: | Unknown → New |
| Changed in net-snmp (Ubuntu): | |
| status: | Confirmed → Triaged |
| importance: | Undecided → High |
| Changed in net-snmp (Ubuntu): | |
| assignee: | nobody → ChristianEhrhardt (paelzer) |
| ChristianEhrhardt (paelzer) wrote : | #2 |
snmp and snmpd are part of one source being: net-snmp
I could confirm that this still affects wily/upstream
The killall was introduced way back by
* debian/
snmp user before install/uninstall, LP: #573391
-- Dustin Kirkland <email address hidden> Tue, 22 Jun 2010 14:04:48 -0500
Gimmick: killall is psmisc which is not a dependency of snmp - if we keep the killall we would have to add this dependency
The killall is done with "-u snmp" but no binary is given, so it kills everything of that user.
The reason for that was, that certain scripts would call deluser which fails as long as a user is logged in.
There would be complex solutions like storing&restoring the service state.
But it turns out that the original motivation why the killall was added is gone.
These days the install scripts no more call deluser (only snmpd.postrm).
So we can just remove the killall introduced by LP: #573391 to fix LP: #1245604
At the same time I submitted an equivalent fix to debian to fix it as well and one day be able to drop the diff.
| ChristianEhrhardt (paelzer) wrote : | #3 |
The attachment "debdiff for wily and upstream" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]
| tags: | added: patch |
| Robie Basak (racb) wrote : | #5 |
Uploaded, thanks!
| Changed in net-snmp (Ubuntu): | |
| status: | Triaged → Fix Committed |
| Launchpad Janitor (janitor) wrote : | #6 |
This bug was fixed in the package net-snmp - 5.7.3+dfsg-1ubuntu2
---------------
net-snmp (5.7.3+
* debian/
It turns out that the original motivation why killall was added is gone.
So we can just remove the killall introduced by Ubuntu LP #573391
(Closes: #781257, LP: #1245604)
-- Christian Ehrhardt <email address hidden> Fri, 09 Oct 2015 13:18:25 +0200
| Changed in net-snmp (Ubuntu): | |
| status: | Fix Committed → Fix Released |
| Changed in net-snmp (Debian): | |
| status: | New → Fix Committed |
| Changed in net-snmp (Debian): | |
| status: | Fix Committed → Fix Released |


Status changed to 'Confirmed' because the bug affects multiple users.