Hi,

I discovered a couple of bash-isms in the lsh-authorize script.
lsh-authorize uses &> redirects which aren't supported in the POSIX
standard, AFAICT (ash doesn't support these redirects). The correct way
to do it is to use >/dev/null 2>&1 redirects. I also noticed the FIXME
comments in 1.3.7:

# FIXME: This test seems to not work properly with Solaris' /bin/sh.

Maybe the redirects are the cause of this problem on Solaris? I'd guess
that's the case, since Solaris /bin/sh seems to be pretty picky about
stuff like that.  I haven't tested though ... (I can test on my Uni
boxes at some stage though ...)

A patch is attached against 1.2.5.

Cheers,

Timshel

-- 
   Timshel Knoll <[EMAIL PROTECTED]>, Debian email: <[EMAIL PROTECTED]>
          Debian GNU/Linux developer: http://people.debian.org/~timshel/
                             GnuPG public key: finger [EMAIL PROTECTED]
Index: src/lsh-authorize
===================================================================
RCS file: /var/cvs/debian/lsh-utils/src/lsh-authorize,v
retrieving revision 1.3
diff -u -r1.3 lsh-authorize
--- src/lsh-authorize   12 Apr 2001 03:03:05 -0000      1.3
+++ src/lsh-authorize   28 Feb 2002 01:14:14 -0000
@@ -40,13 +40,13 @@
 create_dir ~/.lsh 0700
 create_dir ~/.lsh/authorized_keys_sha1 0700
 
-if type sexp-conv &>/dev/null ; then
+if type sexp-conv >/dev/null 2>&1 ; then
     SEXP_CONV=sexp-conv
 else
     SEXP_CONV=./sexp-conv
 fi
 
-if ! type $SEXP_CONV &>/dev/null; then
+if ! type $SEXP_CONV >/dev/null 2>&1; then
     echo "Can't find the sexp-conv program"
     exit 1
 fi

Reply via email to