Fix logic mistake in shibd as non-root user probe
authorRuss Allbery <rra@debian.org>
Wed, 11 Nov 2009 01:34:29 +0000 (17:34 -0800)
committerRuss Allbery <rra@debian.org>
Wed, 11 Nov 2009 01:34:29 +0000 (17:34 -0800)
I introduced a logic error when refactoring the init script.  shibd -t
doesn't return non-zero status when it can't open the private key file.

configs/shibd-debian.in

index cbe55e6..c96f2d6 100644 (file)
@@ -64,7 +64,7 @@ prepare_environment () {
     # read.  If we get that error, we fall back on running shibd as root.
     if [ -n "$DAEMON_USER" ]; then
         DIAG=$(su -s $DAEMON $DAEMON_USER -- -t $DAEMON_OPTS 2>/dev/null)
-        if [ $? != 0 ] ; then
+        if [ $? = 0 ] ; then
             # openssl errstr 200100D (hex for 33558541) says:
             # error:0200100D:system library:fopen:Permission denied
             ERROR='ERROR OpenSSL : error code: 33558541 '