Package: fcgiwrap Version: 1.0-1+squeeze1 Severity: minor Please find attached a patch to the initscript for the following issues: 1) PID files under /var/run/ all use the .pid file extension, not .pids on Debian systems 2) DAEMONUID and DAEMONGID are actually not used, and getent is used 3 times, so lessen their performance impact an even better solution would be to replace it all with something like the following lines altogether: ---- cut here ---- DAEMONUGID=$(getent passwd $DAEMONUSER | cut -f 3,4 -d:) || true if [ -z "$DAEMONUGID" ]; then log_failure_msg "The user \"$DAEMONUSER\", required to run $NAME, does not exist." exit 1 fi ---- cut here ---- 3) a missing comma, not necessary if using the proposed snippet in 2)
Regards -- System Information: Debian Release: 6.0.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 3.2.0-0.bpo.4-686-pae (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages fcgiwrap depends on: ii libc6 2.11.3-4 Embedded GNU C Library: Shared lib ii libfcgi0ldbl 2.4.0-8 Shared library of FastCGI ii spawn-fcgi 1.6.3-1 A fastcgi process spawner fcgiwrap recommends no packages. fcgiwrap suggests no packages. -- no debconf information
--- /etc/init.d/fcgiwrap 2011-04-04 11:11:34.000000000 +0200 +++ /tmp/fcgiwrap 2013-01-10 15:14:28.000000000 +0100 @@ -18,7 +18,7 @@ NAME="fcgiwrap" DESC="FastCGI wrapper" -PIDFILE="/var/run/$NAME.pids" +PIDFILE="/var/run/$NAME.pid" test -x $SPAWN_FCGI || exit 0 test -x $DAEMON || exit 0 @@ -63,10 +63,10 @@ if [ -n "$DAEMONUSER" ] ; then if getent passwd | grep -q "^$DAEMONUSER:"; then # Obtain the uid and gid - DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'` - DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'` + DAEMONUID=`getent passwd $DAEMONUSER | awk -F : '{print $3}'` + #DAEMONGID=`getent passwd $DAEMONUSER | awk -F : '{print $4}'` else - log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist." + log_failure_msg "The user $DAEMONUSER, required to run $NAME, does not exist." exit 1 fi fi