20001110
 - (bal) Fixed dropped answer from skey_keyinfo() in auth1.c
 - (bal) Changed from --with-skey to --with-skey=PATH in configure.in
 - (bal) Added in check to verify S/Key library is being detected in
   configure.in
 - (bal) next-posix.h - added another prototype wrapped in POSIX ifdef/endif.
   Patch by Mark Miller <markm@swoon.net>
 - (bal) Added 'util.h' header to loginrec.c only if HAVE_UTIL_H is defined
   to remove warnings under MacOS X.  Patch by Mark Miller <markm@swoon.net>
 - (bal) Fixed LDFLAG mispelling in configure.in for --with-afs
diff --git a/ChangeLog b/ChangeLog
index 3ab6086..a3a54c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+20001110
+ - (bal) Fixed dropped answer from skey_keyinfo() in auth1.c
+ - (bal) Changed from --with-skey to --with-skey=PATH in configure.in
+ - (bal) Added in check to verify S/Key library is being detected in
+   configure.in
+ - (bal) next-posix.h - added another prototype wrapped in POSIX ifdef/endif. 
+   Patch by Mark Miller <markm@swoon.net>
+ - (bal) Added 'util.h' header to loginrec.c only if HAVE_UTIL_H is defined
+   to remove warnings under MacOS X.  Patch by Mark Miller <markm@swoon.net> 
+ - (bal) Fixed LDFLAG mispelling in configure.in for --with-afs
+
 20001107
  - (bal) acconfig.in - removed the double "USE_PIPES" entry. Patch by
    Mark Miller <markm@swoon.net>
diff --git a/INSTALL b/INSTALL
index 76d17b8..577a667 100644
--- a/INSTALL
+++ b/INSTALL
@@ -47,6 +47,12 @@
 Most platforms do not required this.  However older 4.3 BSD do not
 have a posix regex library. 
 
+S/Key Libraries:
+http://www.sparc.spb.su/solaris/skey/
+
+If you wish to use --with-skey then you will need the above library
+installed.  No other current S/Key library is currently known to be
+supported. (If it fails to compile copy the sha1.h to the openssh directory
 
 2. Building / Installation
 --------------------------
@@ -125,8 +131,8 @@
 to work.  Use the optional PATH argument to specify the root of your
 AFS installation. AFS requires Kerberos support to be enabled.
 
---with-skey will enable S/Key one time password support. You will need
-the S/Key libraries and header files installed for this to work.
+--with-skey=PATH will enable S/Key one time password support. You will 
+need the S/Key libraries and header files installed for this to work.
 
 --with-tcp-wrappers will enable TCP Wrappers (/etc/hosts.allow|deny)
 support. You will need libwrap.a and tcpd.h installed.
diff --git a/auth1.c b/auth1.c
index 520da64..ca0495d 100644
--- a/auth1.c
+++ b/auth1.c
@@ -273,7 +273,7 @@
 			if (options.skey_authentication == 1) {
 				char *skeyinfo = NULL;
 				if (pw != NULL)
-					skey_keyinfo(pw->pw_name);
+					skeyinfo = skey_keyinfo(pw->pw_name);
 				if (skeyinfo == NULL) {
 					debug("generating fake skeyinfo for %.100s.", luser);
 					skeyinfo = skey_fake_keyinfo(luser);
diff --git a/configure.in b/configure.in
index 0c43efc..be500da 100644
--- a/configure.in
+++ b/configure.in
@@ -1085,7 +1085,7 @@
 
 			if test "x$withval" != "xyes" ; then
 				CFLAGS="$CFLAGS -I${withval}/include"
-				LFLAGS="$LFLAGS -L${withval}/lib"
+				LDFLAGS="$LDFLAGS -L${withval}/lib"
 			fi
 
 			if test -z "$KRB4" ; then
@@ -1106,12 +1106,24 @@
 # Check whether user wants S/Key support
 SKEY_MSG="no" 
 AC_ARG_WITH(skey,
-	[  --with-skey             Enable S/Key support],
+	[  --with-skey=PATH         Enable S/Key support],
 	[
 		if test "x$withval" != "xno" ; then
+
+			if test "x$withval" != "xyes" ; then
+				CFLAGS="$CFLAGS -I${withval}/include"
+				LDFLAGS="$LDFLAGS -L${withval}/lib"
+			fi
+
 			AC_DEFINE(SKEY)
 			LIBS="$LIBS -lskey"
 			SKEY_MSG="yes" 
+	
+			AC_CHECK_FUNC(skey_keyinfo,
+				[],
+				[
+					AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
+				])
 		fi
 	]
 )
diff --git a/next-posix.h b/next-posix.h
index 7986817..4668775 100644
--- a/next-posix.h
+++ b/next-posix.h
@@ -39,6 +39,7 @@
 
 /* #ifdef POSIX wrapped functions that need defining */
 pid_t getppid(void);
+void vhangup(void);
 
 /* TERMCAP */
 int tcgetattr(int fd, struct termios *t);