[Pkg-net-snmp-devel] Bug#609430: snmpd.postinst needlessly deletes & re-adds snmp account

Peter Marschall peter at adpm.de
Sun Jan 9 13:52:12 UTC 2011


Package: snmpd
Version: 5.4.3~dfsg-2
Severity: normal
Tags: patch

Hi,

the check in snmpd.postinst whether a group named snmp exists
is broken:
  [ ! `getent group snmp >/dev/null` ]
is always true.

Please either use output redirection to /dev/null or backticks,
but don't combine them if you want the check to make sense.

The attached patch fixes the issue.

Best
Peter


-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages snmpd depends on:
ii  adduser                     3.112+nmu2   add and remove users and groups
ii  debconf [debconf-2.0]       1.5.36       Debian configuration management sy
ii  libc6                       2.11.2-7     Embedded GNU C Library: Shared lib
ii  libsnmp15                   5.4.3~dfsg-2 SNMP (Simple Network Management Pr
ii  libwrap0                    7.6.q-19     Wietse Venema's TCP wrappers libra
ii  lsb-base                    3.2-23.1     Linux Standard Base 3.2 init scrip

snmpd recommends no packages.

snmpd suggests no packages.

-- Configuration Files:
/etc/snmp/snmpd.conf [Errno 13] Permission denied: u'/etc/snmp/snmpd.conf'

-- debconf information:
  snmpd/upgradefrom521:
-------------- next part --------------
--- snmpd.postinst	2011-01-05 16:14:54.000000000 +0100
+++ snmpd.postinst	2011-01-09 14:41:22.504118902 +0100
@@ -3,7 +3,7 @@
 set -e
 
 if [ "x$1" = xconfigure ]; then
-	if [ ! `getent group snmp >/dev/null` ]; then
+	if ! getent group snmp >/dev/null ; then
 		 deluser --quiet --system snmp
 	fi
 	adduser --quiet --system --group --no-create-home --home /var/lib/snmp snmp


More information about the Pkg-net-snmp-devel mailing list