head	1.4;
access;
symbols
	RELEASE_4_7_0:1.3
	RELEASE_4_6_2:1.3
	RELEASE_4_6_1:1.3
	RELEASE_4_6_0:1.3
	RELEASE_5_0_DP1:1.3
	RELEASE_4_5_0:1.3
	RELEASE_4_4_0:1.3
	RELEASE_4_3_0:1.3
	RELEASE_4_2_0:1.3
	RELEASE_4_1_1:1.3
	RELEASE_4_1_0:1.3
	RELEASE_3_5_0:1.2;
locks; strict;
comment	@# @;


1.4
date	2002.12.18.03.49.07;	author dinoex;	state dead;
branches;
next	1.3;

1.3
date	2000.07.11.06.19.56;	author kevlo;	state Exp;
branches;
next	1.2;

1.2
date	2000.06.02.19.53.23;	author will;	state Exp;
branches;
next	1.1;

1.1
date	2000.06.02.02.56.29;	author will;	state Exp;
branches;
next	;


desc
@@


1.4
log
@- Fix some of the build problems on CURRENT, not all.
- make PREFIX aware
- mark BROKEN for conflicts with getopt.h
- take maintainership
@
text
@--- src/lsh-authorize.orig	Tue Jul 11 13:56:07 2000
+++ src/lsh-authorize	Tue Jul 11 14:00:58 2000
@@@@ -1,4 +1,4 @@@@
-#! /bin/sh
+#!/bin/sh
 
 usage () {
     echo Usage: $0 key-file
@@@@ -29,7 +29,7 @@@@
     exit 0
 fi
 
-create_dir () {
+create-dir () {
     if mkdir $1 2>/dev/null; then
 	echo Created $1
 	chmod $2 $1 || exit 1
@@@@ -37,26 +37,27 @@@@
 }
 
 # Create directories
-create_dir ~/.lsh 0700
-create_dir ~/.lsh/authorized_keys_sha1 0700
+create-dir ~/.lsh 0700
+create-dir ~/.lsh/authorized_keys_sha1 0700
 
-if type sexp-conv ; then
-    SEXP_CONV=sexp_conv
-else
-    SEXP_CONV=./sexp_conv
-fi
+PATH=$PATH:`dirname $0`
 
-if ! type $SEXP_CONV ; then
-    echo "Can't find the sexp_conv program"
-    exit 1
-fi
+SEXP_CONV="sexp_conv"
 
 while [ $# != 0 ]; do
-    hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash`
-    if [ -z $hash ] ; then
-	echo $0: File $1 not found.
-    else
+    if [ -f $1 ]; then
+      hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash`
+      if [ $? = 127 ]; then
+	echo "Can't find the sexp_conv program"
+       exit 1
+      fi
+      if [ -z "$hash" ] ; then
+	echo $0: File $1 not readable
+      else
         $SEXP_CONV < $1 -f canonical --once > ~/.lsh/authorized_keys_sha1/$hash
+      fi
+    else
+      echo $0: File $1 not found.
     fi
     shift
 done
@


1.3
log
@Update to version 1.0. The maintainer forgot to fix patches, I fixed them.

PR: 19834
Submitted by: Eric S <eric@@cybernut.com>
@
text
@@


1.2
log
@Update to 0.9.11, which fixes a serious bug in the lsh-authorize script.

PR:		18968
Submitted by:	maintainer
@
text
@d1 2
a2 2
--- src/lsh-authorize.orig	Sun Feb  6 09:39:43 2000
+++ src/lsh-authorize	Sun Apr 16 13:32:57 2000
d18 1
a18 1
@@@@ -37,22 +37,27 @@@@
d27 5
a31 1
-SEXP_CONV=`PATH=$PATH:. \type -path sexp_conv`
d34 1
a34 1
-if [ -z $SEXP_CONV ] ; then
d48 2
a49 2
+        echo "Can't find the sexp_conv program"
+	exit 1
d52 1
a52 1
+	echo $0: File $1 not readable.
@


1.1
log
@Add LSH, a login program similar to SSH.  It depends on SECSH, which does
not require any patent-encumbered encryption algorithms, unlike SSH1, which
depends on RSA, and SSH2, which is not free (of course, these days, this is
not so true thanks to OpenSSH, but it's good to have alternatives!).

PR:		18879
Submitted by:	Eric Schwertfeger <eric@@cybernut.com>
@
text
@d50 1
a50 1
         $SEXP_CONV < $1 -o canonical --once > ~/.lsh/authorized_keys_sha1/$hash
@

