]> andersk Git - gssapi-openssh.git/commitdiff
Import of OpenSSH 3.2.2p1 OPENSSH_3_2_2P1
authorjbasney <jbasney>
Fri, 17 May 2002 16:21:34 +0000 (16:21 +0000)
committerjbasney <jbasney>
Fri, 17 May 2002 16:21:34 +0000 (16:21 +0000)
165 files changed:
openssh/CREDITS
openssh/ChangeLog
openssh/INSTALL
openssh/LICENCE
openssh/Makefile.in
openssh/README.privsep [new file with mode: 0644]
openssh/README.smartcard
openssh/WARNING.RNG
openssh/acconfig.h
openssh/auth-bsdauth.c
openssh/auth-krb4.c
openssh/auth-krb5.c
openssh/auth-options.c
openssh/auth-pam.c
openssh/auth-pam.h
openssh/auth-passwd.c
openssh/auth-rh-rsa.c
openssh/auth-rhosts.c
openssh/auth-rsa.c
openssh/auth-sia.c
openssh/auth-sia.h
openssh/auth-skey.c
openssh/auth.c
openssh/auth.h
openssh/auth1.c
openssh/auth2-chall.c
openssh/auth2.c
openssh/authfd.c
openssh/authfd.h
openssh/autom4te-2.53.cache/output.0 [new file with mode: 0644]
openssh/autom4te-2.53.cache/requests [new file with mode: 0644]
openssh/autom4te-2.53.cache/traces.0 [new file with mode: 0644]
openssh/bufaux.c
openssh/bufaux.h
openssh/channels.c
openssh/channels.h
openssh/cipher.c
openssh/cipher.h
openssh/clientloop.c
openssh/clientloop.h
openssh/compat.c
openssh/compat.h
openssh/compress.c
openssh/configure.ac
openssh/contrib/aix/buildbff.sh
openssh/contrib/aix/inventory.sh
openssh/contrib/caldera/openssh.spec
openssh/contrib/cygwin/README
openssh/contrib/cygwin/ssh-host-config
openssh/contrib/redhat/gnome-ssh-askpass.csh [new file with mode: 0644]
openssh/contrib/redhat/gnome-ssh-askpass.sh [new file with mode: 0644]
openssh/contrib/redhat/openssh.spec
openssh/contrib/redhat/sshd.init
openssh/contrib/redhat/sshd.pam
openssh/contrib/solaris/README
openssh/contrib/solaris/buildpkg.sh
openssh/contrib/suse/openssh.spec
openssh/defines.h
openssh/entropy.c
openssh/includes.h
openssh/kex.c
openssh/kex.h
openssh/kexdh.c
openssh/kexgex.c
openssh/key.c
openssh/key.h
openssh/loginrec.c
openssh/mdoc2man.pl
openssh/misc.h
openssh/monitor.c [new file with mode: 0644]
openssh/monitor.h [new file with mode: 0644]
openssh/monitor_fdpass.c [new file with mode: 0644]
openssh/monitor_fdpass.h [new file with mode: 0644]
openssh/monitor_mm.c [new file with mode: 0644]
openssh/monitor_mm.h [new file with mode: 0644]
openssh/monitor_wrap.c [new file with mode: 0644]
openssh/monitor_wrap.h [new file with mode: 0644]
openssh/myproposal.h
openssh/nchan.c
openssh/openbsd-compat/bsd-arc4random.c
openssh/openbsd-compat/bsd-cray.c
openssh/openbsd-compat/bsd-cray.h
openssh/openbsd-compat/bsd-cygwin_util.c
openssh/openbsd-compat/bsd-cygwin_util.h
openssh/openbsd-compat/bsd-misc.c
openssh/openbsd-compat/bsd-misc.h
openssh/openbsd-compat/fake-queue.h
openssh/openbsd-compat/fake-socket.h
openssh/openbsd-compat/inet_aton.c
openssh/openbsd-compat/readpassphrase.c
openssh/openbsd-compat/tree.h [new file with mode: 0644]
openssh/packet.c
openssh/packet.h
openssh/pathnames.h
openssh/radix.c
openssh/readpass.c
openssh/readpass.h
openssh/regress/Makefile [new file with mode: 0644]
openssh/regress/agent.sh [new file with mode: 0644]
openssh/regress/authorized_keys_root [new file with mode: 0644]
openssh/regress/broken-pipe.sh [new file with mode: 0644]
openssh/regress/bsd.regress.mk [new file with mode: 0644]
openssh/regress/connect-privsep.sh [new file with mode: 0644]
openssh/regress/connect.sh [new file with mode: 0644]
openssh/regress/copy.1 [new file with mode: 0755]
openssh/regress/copy.2 [new file with mode: 0755]
openssh/regress/dsa_ssh2.prv [new file with mode: 0644]
openssh/regress/dsa_ssh2.pub [new file with mode: 0644]
openssh/regress/exit-status.sh [new file with mode: 0644]
openssh/regress/forwarding.sh [new file with mode: 0644]
openssh/regress/keyscan.sh [new file with mode: 0644]
openssh/regress/proto-mismatch.sh [new file with mode: 0644]
openssh/regress/proto-version.sh [new file with mode: 0644]
openssh/regress/proxy-connect.sh [new file with mode: 0644]
openssh/regress/rsa_openssh.prv [new file with mode: 0644]
openssh/regress/rsa_openssh.pub [new file with mode: 0644]
openssh/regress/rsa_ssh2.prv [new file with mode: 0644]
openssh/regress/runtests.sh [new file with mode: 0755]
openssh/regress/sftp.sh [new file with mode: 0644]
openssh/regress/ssh-com-client.sh [new file with mode: 0644]
openssh/regress/ssh-com-keygen.sh [new file with mode: 0644]
openssh/regress/ssh-com-sftp.sh [new file with mode: 0644]
openssh/regress/ssh-com.sh [new file with mode: 0644]
openssh/regress/stderr-after-eof.sh [new file with mode: 0644]
openssh/regress/stderr-data.sh [new file with mode: 0644]
openssh/regress/t4.ok [new file with mode: 0644]
openssh/regress/t5.ok [new file with mode: 0644]
openssh/regress/test-exec.sh [new file with mode: 0644]
openssh/regress/transfer.sh [new file with mode: 0644]
openssh/regress/try-ciphers.sh [new file with mode: 0644]
openssh/regress/yes-head.sh [new file with mode: 0644]
openssh/rijndael.c
openssh/scard-opensc.c [new file with mode: 0644]
openssh/scard.c
openssh/scard.h
openssh/scard/Makefile.in
openssh/scp.c
openssh/servconf.c
openssh/servconf.h
openssh/serverloop.c
openssh/session.c
openssh/session.h
openssh/sftp-client.c
openssh/sftp-glob.h
openssh/sftp-int.c
openssh/sftp.c
openssh/ssh-add.c
openssh/ssh-agent.c
openssh/ssh-keygen.c
openssh/ssh-keyscan.c
openssh/ssh-rand-helper.8 [new file with mode: 0644]
openssh/ssh-rand-helper.c
openssh/ssh-rsa.c
openssh/ssh.1
openssh/ssh.c
openssh/ssh.h
openssh/sshconnect1.c
openssh/sshconnect2.c
openssh/sshd.8
openssh/sshd.c
openssh/sshd_config
openssh/sshpty.c
openssh/ttymodes.c
openssh/uidswap.c
openssh/version.h

index bcc0359a10541603a981cf80a7af39cf096d0423..1acb3f837a70ab1513d75625de724b09bb0e04a1 100644 (file)
@@ -75,7 +75,7 @@ Philippe WILLEM <Philippe.WILLEM@urssaf.fr> - Bugfixes
 Phill Camp <P.S.S.Camp@ukc.ac.uk> - login code fix
 Rip Loomis <loomisg@cist.saic.com> - Solaris package support, fixes
 SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp> - Multiple bugfixes
-Simon Wilkinson <sxw@dcs.ed.ac.uk> - PAM fixes
+Simon Wilkinson <sxw@dcs.ed.ac.uk> - PAM fixes, Compat with MIT KrbV
 Svante Signell <svante.signell@telia.com> - Bugfixes
 Thomas Neumann <tom@smart.ruhr.de> - Shadow passwords
 Tim Rice <tim@multitalents.net> - Portability & SCO fixes
index bd2d9c5f2db531126640361ea3ff5ea8946930fb..8f4d927ea059f927f6472135a7921fd13b8eeecf 100644 (file)
-20020307
- - (djm) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2002/03/06 00:20:54
-     [compat.c dh.c]
-     compat.c
-   - markus@cvs.openbsd.org 2002/03/06 00:23:27
-     [compat.c dh.c]
-     undo
-   - markus@cvs.openbsd.org 2002/03/06 00:24:39
-     [compat.c]
-     compat.c
-   - markus@cvs.openbsd.org 2002/03/06 00:25:55
-     [version.h]
-     OpenSSH_3.1
- - (djm) Update RPM spec files with new version number
-
-20020305
-   - stevesk@cvs.openbsd.org 2002/03/02 09:34:42
-     [LICENCE]
-     correct copyright dates for scp license; ok markus@
-
-20020304
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2002/02/26 18:52:32
-     [sftp.1]
-     Ic cannot have that many arguments; spotted by mouring@etoh.eviladmin.org
-   - mouring@cvs.openbsd.org 2002/02/26 19:04:37
-     [sftp.1]
-     > Ic cannot have that many arguments; spotted by mouring@etoh.eviladmin.org
-     Last Ic on the first line should not have a space between it and the final
-     comma.
-   - deraadt@cvs.openbsd.org 2002/02/26 19:06:43
-     [sftp.1]
-     no, look closely.  the comma was highlighted. split .Ic even more
-   - stevesk@cvs.openbsd.org 2002/02/26 20:03:51
-     [misc.c]
-     use socklen_t
-   - stevesk@cvs.openbsd.org 2002/02/27 21:23:13
-     [canohost.c channels.c packet.c sshd.c]
-     remove unneeded casts in [gs]etsockopt(); ok markus@
-   - markus@cvs.openbsd.org 2002/02/28 15:46:33
-     [authfile.c kex.c kexdh.c kexgex.c key.c ssh-dss.c]
-     add some const EVP_MD for openssl-0.9.7
-   - stevesk@cvs.openbsd.org 2002/02/28 19:36:28
-     [auth.c match.c match.h]
-     delay hostname lookup until we see a ``@'' in DenyUsers and AllowUsers
-     for sshd -u0; ok markus@
-   - stevesk@cvs.openbsd.org 2002/02/28 20:36:42
-     [sshd.8]
-     DenyUsers allows user@host pattern also
-   - stevesk@cvs.openbsd.org 2002/02/28 20:46:10
-     [sshd.8]
-     -u0 DNS for user@host
-   - stevesk@cvs.openbsd.org 2002/02/28 20:56:00
-     [auth.c]
-     log user not allowed details, from dwd@bell-labs.com; ok markus@
-   - markus@cvs.openbsd.org 2002/03/01 13:12:10
-     [auth.c match.c match.h]
-     undo the 'delay hostname lookup' change
-     match.c must not use compress.c (via canonhost.c/packet.c)
-     thanks to wilfried@
-   - markus@cvs.openbsd.org 2002/03/04 12:43:06
-     [auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
-   - markus@cvs.openbsd.org 2002/03/04 13:10:46
-     [misc.c]
-     error-> debug, because O_NONBLOCK for /dev/null causes too many different 
-     errnos; ok stevesk@, deraadt@
-     unused include
-   - stevesk@cvs.openbsd.org 2002/03/04 17:27:39
-     [auth-krb5.c auth-options.h auth.h authfd.h authfile.h bufaux.h buffer.h 
-      channels.h cipher.h compat.h compress.h crc32.h deattack.c getput.h 
-      groupaccess.c misc.c mpaux.h packet.h readconf.h rsa.h scard.h 
-      servconf.h ssh-agent.c ssh.h ssh2.h sshpty.h sshtty.c ttymodes.h 
-      uuencode.c xmalloc.h]
-     $OpenBSD$ and RCSID() cleanup: don't use RCSID() in .h files; add
-     missing RCSID() to .c files and remove dup /*$OpenBSD$*/ from .c
-     files.  ok markus@
-   - stevesk@cvs.openbsd.org 2002/03/04 18:30:23
-     [ssh-keyscan.c]
-     handle connection close during read of protocol version string.
-     fixes erroneous "bad greeting".  ok markus@
-   - markus@cvs.openbsd.org 2002/03/04 19:37:58
-     [channels.c]
-     off by one; thanks to joost@pine.nl
- - (bal) Added contrib/aix/ to support BFF package generation provided
-   by Darren Tucker <dtucker@zip.com.au>
-20020226
- - (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests
-   based on patch by mooney@dogbert.cc.ndsu.nodak.edu (Tim Mooney)
-   Bug 45 [configure.ac] modify skey test to work around conflict with autoconf
-   reported by nolan@naic.edu (Michael Nolan)
-   patch by  Pekka Savola <pekkas@netcore.fi>
-   Bug 74 [configure.ac defines.h] add sig_atomic_t test
-   reported by dwd@bell-labs.com (Dave Dykstra)
-   Bug 102 [defines.h] UNICOS fixes. patch by wendyp@cray.com
-   [configure.ac Makefile.in] link libwrap only with sshd
-   based on patch by Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-   Bug 123 link libpam only with sshd
-   reported by peak@argo.troja.mff.cuni.cz (Pavel Kankovsky)
-   [configure.ac defines.h] modify previous SCO3 fix to not break Solaris 7
-   [acconfig.h] remove unused HAVE_REGCOMP
-   [configure.ac] put back in search for prngd-socket
- - (stevesk) openbsd-compat/base64.h: typo in comment
- - (bal) Update sshd_config CVSID
+20020515
+ - (bal) CVS ID fix up on auth-passwd.c
  - (bal) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2002/02/15 23:54:10
-     [auth-krb5.c]
-     krb5_get_err_text() does not like context==NULL; he@nordu.net via google; 
-     ok provos@
-   - markus@cvs.openbsd.org 2002/02/22 12:20:34
-     [log.c log.h ssh-keyscan.c]
-     overwrite fatal() in ssh-keyscan.c; fixes pr 2354; ok provos@
-   - markus@cvs.openbsd.org 2002/02/23 17:59:02
-     [kex.c kexdh.c kexgex.c]
-     don't allow garbage after payload.
-   - stevesk@cvs.openbsd.org 2002/02/24 16:09:52
-     [sshd.c]
-     use u_char* here; ok markus@
-   - markus@cvs.openbsd.org 2002/02/24 16:57:19
-     [sftp-client.c]
-     early close(), missing free; ok stevesk@
-   - markus@cvs.openbsd.org 2002/02/24 16:58:32
-     [packet.c]
-     make 'cp' unsigned and merge with 'ucp'; ok stevesk@
-   - markus@cvs.openbsd.org 2002/02/24 18:31:09
-     [uuencode.c]
+   - deraadt@cvs.openbsd.org 2002/05/07 19:54:36
+     [ssh.h]
+     use ssh uid
+   - deraadt@cvs.openbsd.org 2002/05/08 21:06:34
+     [ssh.h]
+     move to sshd.sshd instead
+   - stevesk@cvs.openbsd.org 2002/05/11 20:24:48
+     [ssh.h]
      typo in comment
-   - markus@cvs.openbsd.org 2002/02/24 19:14:59
-     [auth2.c authfd.c authfd.h authfile.c kexdh.c kexgex.c key.c key.h 
-      ssh-dss.c ssh-dss.h ssh-keygen.c ssh-rsa.c ssh-rsa.h sshconnect2.c]
-     signed vs. unsigned: make size arguments u_int, ok stevesk@
-   - stevesk@cvs.openbsd.org 2002/02/24 19:59:42
-     [channels.c misc.c]
-     disable Nagle in connect_to() and channel_post_port_listener() (port
-     forwarding endpoints).  the intention is to preserve the on-the-wire
-     appearance to applications at either end; the applications can then
-     enable TCP_NODELAY according to their requirements. ok markus@
-   - markus@cvs.openbsd.org 2002/02/25 16:33:27
-     [ssh-keygen.c sshconnect2.c uuencode.c uuencode.h]
-     more u_* fixes
- - (bal) Imported missing fatal.c and fixed up Makefile.in
- - (tim) [configure.ac] correction to Bug 123 fix
-     [configure.ac] correction to sig_atomic_t test
-
-20020225
- - (bal) Last AIX patch.  Moved aix_usrinfo() outside of do_setuserconext()
-   since we need more session information than provided by that function.
-
-20020224
- - (bal) Drop Session *s usage in ports-aix.[ch] and pass just what we
-   need to do the jobs (AIX still does not fully compile, but that is
-   coming).
- - (bal) Part two.. Drop unused AIX header, fix up missing char *cp.  All
-   that is left is handling aix_usrinfo().
- - (tim) [loginrec.c session.c sshlogin.c sshlogin.h] Bug 84
-   patch by wknox@mitre.org (William Knox).
-   [sshlogin.h] declare record_utmp_only for session.c
-
-20020221
- - (bal) Minor session.c fixup for cygwin.  mispelt 'is_winnt' variable.
-
-20020219
- - (djm) OpenBSD CVS Sync
-   - mpech@cvs.openbsd.org 2002/02/13 08:33:47
-     [ssh-keyscan.1]
-     When you give command examples and etc., in a manual page prefix them with:     $ command
-     or
-     # command
-   - markus@cvs.openbsd.org 2002/02/14 23:27:59
-     [channels.c]
-     increase the SSH v2 window size to 4 packets. comsumes a little
-     bit more memory for slow receivers but increases througput.
-   - markus@cvs.openbsd.org 2002/02/14 23:28:00
-     [channels.h session.c ssh.c]
-     increase the SSH v2 window size to 4 packets. comsumes a little
-     bit more memory for slow receivers but increases througput.
-   - markus@cvs.openbsd.org 2002/02/14 23:41:01
-     [authfile.c cipher.c cipher.h kex.c kex.h packet.c]
-     hide some more implementation details of cipher.[ch] and prepares for move
-     to EVP, ok deraadt@
-   - stevesk@cvs.openbsd.org 2002/02/16 14:53:37
-     [ssh-keygen.1]
-     -t required now for key generation
-   - stevesk@cvs.openbsd.org 2002/02/16 20:40:08
-     [ssh-keygen.c]
-     default to rsa keyfile path for non key generation operations where
-     keyfile not specified.  fixes core dump in those cases.  ok markus@
-   - millert@cvs.openbsd.org 2002/02/16 21:27:53
-     [auth.h]
-     Part one of userland __P removal.  Done with a simple regexp with 
-     some minor hand editing to make comments line up correctly.  Another 
-     pass is forthcoming that handles the cases that could not be done 
-     automatically.
-   - millert@cvs.openbsd.org 2002/02/17 19:42:32
-     [auth.h]
-     Manual cleanup of remaining userland __P use (excluding packages 
-     maintained outside the tree)
-   - markus@cvs.openbsd.org 2002/02/18 13:05:32
-     [cipher.c cipher.h]
-     switch to EVP, ok djm@ deraadt@
-   - markus@cvs.openbsd.org 2002/02/18 17:55:20
-     [ssh.1]
-     -q: Fatal errors are _not_ displayed.
-   - deraadt@cvs.openbsd.org 2002/02/19 02:50:59
-     [sshd_config]
-     stategy is not an english word
- - (bal) Migrated IRIX jobs/projects/audit/etc code to 
-   openbsd-compat/port-irix.[ch] to improve readiblity of do_child()
- - (bal) Migrated AIX getuserattr and usrinfo code to 
-   openbsd-compat/port-aix.[c] to improve readilbity of do_child() and
-   simplify our diffs against upstream source.
- - (bal) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2002/02/15 23:11:26
-     [session.c]
-     split do_child(), ok mouring@
-   - markus@cvs.openbsd.org 2002/02/16 00:51:44
-     [session.c]
-     typo
- - (bal) CVS ID sync since the last two patches were merged mistakenly
-
-20020218
- - (tim) newer config.guess from ftp://ftp.gnu.org/gnu/config/config.guess
-
-20020213
- - (djm) Don't use system sys/queue.h on AIX. Report from 
-   gert@greenie.muc.de
- - (djm) Bug #114 - not starting PAM for SSH protocol 1 invalid users
-
-20020213
- - (djm) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2002/02/11 16:10:15
-     [kex.c]
-     restore kexinit handler if we reset the dispatcher, this unbreaks
-     rekeying s/kex_clear_dispatch/kex_reset_dispatch/
-   - markus@cvs.openbsd.org 2002/02/11 16:15:46
-     [sshconnect1.c]
-     include md5.h, not evp.h
-   - markus@cvs.openbsd.org 2002/02/11 16:17:55
-     [sshd.c]
-     do not complain about port > 1024 if rhosts-auth is disabled
-   - markus@cvs.openbsd.org 2002/02/11 16:19:39
-     [sshd.c]
-     include md5.h not hmac.h
-   - markus@cvs.openbsd.org 2002/02/11 16:21:42
-     [match.c]
-     support up to 40 algorithms per proposal
-   - djm@cvs.openbsd.org 2002/02/12 12:32:27
-     [sftp.1 sftp.c sftp-client.c sftp-client.h sftp-int.c]
-     Perform multiple overlapping read/write requests in file transfer. Mostly
-     done by Tobias Ringstrom <tori@ringstrom.mine.nu>; ok markus@
-   - djm@cvs.openbsd.org 2002/02/12 12:44:46
-     [sftp-client.c]
-     Let overlapped upload path handle servers which reorder ACKs. This may be
-     permitted by the protocol spec; ok markus@
-   - markus@cvs.openbsd.org 2002/02/13 00:28:13
-     [sftp-server.c]
-     handle SSH2_FILEXFER_ATTR_SIZE in SSH2_FXP_(F)SETSTAT; ok djm@
-   - markus@cvs.openbsd.org 2002/02/13 00:39:15
-     [readpass.c]
-     readpass.c is not longer from UCB, since we now use readpassphrase(3)
-   - djm@cvs.openbsd.org 2002/02/13 00:59:23
-     [sftp-client.c sftp-client.h sftp-glob.c sftp-glob.h sftp.h]
-     [sftp-int.c sftp-int.h]
-     API cleanup and backwards compat for filexfer v.0 servers; ok markus@
- - (djm) Sync openbsd-compat with OpenBSD CVS too
- - (djm) Bug #106: Add --without-rpath configure option. Patch from 
-   Nicolas.Williams@ubsw.com
- - (tim) [configure.ac, defines.h ] add rpc/rpc.h for INADDR_LOOPBACK
-    on SCO OSR3
-
-20020210
- - (djm) OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2002/02/09 17:37:34
-     [pathnames.h session.c ssh.1 sshd.8 sshd_config ssh-keyscan.1]
-     move ssh config files to /etc/ssh
- - (djm) Adjust portable Makefile.in tnd ssh-rand-helper.c o match
-   - deraadt@cvs.openbsd.org 2002/02/10 01:07:05
-     [readconf.h sshd.8]
-     more /etc/ssh; openbsd@davidkrause.com
-
-20020208
- - (djm) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2002/02/04 12:15:25
-     [sshd.c]
-     add SYSLOG_FACILITY_NOT_SET = -1, SYSLOG_LEVEL_NOT_SET = -1,
-     fixes arm/netbsd; based on patch from bjh21@netbsd.org; ok djm@
-   - stevesk@cvs.openbsd.org 2002/02/04 20:41:16
-     [ssh-agent.1]
-     more sync for default ssh-add identities; ok markus@
-   - djm@cvs.openbsd.org 2002/02/05 00:00:46
-     [sftp.1 sftp.c sftp-client.c sftp-client.h sftp-int.c]
-     Add "-B" option to specify copy buffer length (default 32k); ok markus@
-   - markus@cvs.openbsd.org 2002/02/05 14:32:55
-     [channels.c channels.h ssh.c]
-     merge channel_request() into channel_request_start()
-   - markus@cvs.openbsd.org 2002/02/06 14:22:42
-     [sftp.1]
-     sort options; ok mpech@, stevesk@
-   - mpech@cvs.openbsd.org 2002/02/06 14:27:23
-     [sftp.c]
-     sync usage() with manual.
-   - markus@cvs.openbsd.org 2002/02/06 14:37:22
-     [session.c]
-     minor KNF
-   - markus@cvs.openbsd.org 2002/02/06 14:55:16
-     [channels.c clientloop.c serverloop.c ssh.c]
-     channel_new never returns NULL, mouring@; ok djm@
-   - markus@cvs.openbsd.org 2002/02/07 09:35:39
-     [ssh.c]
-     remove bogus comments
-
-20020205
- - (djm) Cleanup after sync:
-   - :%s/reverse_mapping_check/verify_reverse_mapping/g
- - (djm) OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2002/01/24 21:09:25
-     [channels.c misc.c misc.h packet.c]
-     add set_nodelay() to set TCP_NODELAY on a socket (prep for nagle tuning).
-     no nagle changes just yet; ok djm@ markus@
-   - stevesk@cvs.openbsd.org 2002/01/24 21:13:23
-     [packet.c]
-     need misc.h for set_nodelay()
-   - markus@cvs.openbsd.org 2002/01/25 21:00:24
-     [sshconnect2.c]
-     unused include
-   - markus@cvs.openbsd.org 2002/01/25 21:42:11
-     [ssh-dss.c ssh-rsa.c]
-     use static EVP_MAX_MD_SIZE buffers for EVP_DigestFinal; ok stevesk@
-     don't use evp_md->md_size, it's not public.
-   - markus@cvs.openbsd.org 2002/01/25 22:07:40
-     [kex.c kexdh.c kexgex.c key.c mac.c]
-     use EVP_MD_size(evp_md) and not evp_md->md_size; ok steveks@
-   - stevesk@cvs.openbsd.org 2002/01/26 16:44:22
-     [includes.h session.c]
-     revert code to add x11 localhost display authorization entry for
-     hostname/unix:d and uts.nodename/unix:d if nodename was different than
-     hostname.  just add entry for unix:d instead.  ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/27 14:57:46
-     [channels.c servconf.c servconf.h session.c sshd.8 sshd_config]
-     add X11UseLocalhost; ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/27 18:08:17
-     [ssh.c]
-     handle simple case to identify FamilyLocal display; ok markus@
-   - markus@cvs.openbsd.org 2002/01/29 14:27:57
-     [ssh-add.c]
-     exit 2 if no agent, exit 1 if list fails; debian#61078; ok djm@
-   - markus@cvs.openbsd.org 2002/01/29 14:32:03
-     [auth2.c auth.c auth-options.c auth-rhosts.c auth-rh-rsa.c canohost.c]
-     [servconf.c servconf.h session.c sshd.8 sshd_config]
-     s/ReverseMappingCheck/VerifyReverseMapping/ and avoid confusion; 
-     ok stevesk@
-   - stevesk@cvs.openbsd.org 2002/01/29 16:29:02
-     [session.c]
-     limit subsystem length in log; ok markus@
-   - markus@cvs.openbsd.org 2002/01/29 16:41:19
-     [ssh-add.1]
-     add DIAGNOSTICS; ok stevesk@
-   - markus@cvs.openbsd.org 2002/01/29 22:46:41
-     [session.c]
-     don't depend on servconf.c; ok djm@
-   - markus@cvs.openbsd.org 2002/01/29 23:50:37
-     [scp.1 ssh.1]
-     mention exit status; ok stevesk@
-   - markus@cvs.openbsd.org 2002/01/31 13:35:11
-     [kexdh.c kexgex.c]
-     cross check announced key type and type from key blob
-   - markus@cvs.openbsd.org 2002/01/31 15:00:05
-     [serverloop.c]
-     no need for WNOHANG; ok stevesk@
-   - markus@cvs.openbsd.org 2002/02/03 17:53:25
-     [auth1.c serverloop.c session.c session.h]
-     don't use channel_input_channel_request and callback
-     use new server_input_channel_req() instead:
-       server_input_channel_req does generic request parsing on server side
-       session_input_channel_req handles just session specific things now
-     ok djm@
-   - markus@cvs.openbsd.org 2002/02/03 17:55:55
-     [channels.c channels.h]
-     remove unused channel_input_channel_request
-   - markus@cvs.openbsd.org 2002/02/03 17:58:21
-     [channels.c channels.h ssh.c]
-     generic callbacks are not really used, remove and
-     add a callback for msg of type SSH2_MSG_CHANNEL_OPEN_CONFIRMATION
-     ok djm@
-   - markus@cvs.openbsd.org 2002/02/03 17:59:23
-     [sshconnect2.c]
-     more cross checking if announced vs. used key type; ok stevesk@
-   - stevesk@cvs.openbsd.org 2002/02/03 22:35:57
-     [ssh.1 sshd.8]
-     some KeepAlive cleanup/clarify; ok markus@
-   - stevesk@cvs.openbsd.org 2002/02/03 23:22:59
-     [ssh-agent.1]
-     ssh-add also adds $HOME/.ssh/id_rsa and $HOME/.ssh/id_dsa now.
-   - stevesk@cvs.openbsd.org 2002/02/04 00:53:39
-     [ssh-agent.c]
-     unneeded includes
-   - markus@cvs.openbsd.org 2002/02/04 11:58:10
-     [auth2.c]
-     cross checking of announced vs actual pktype in pubkey/hostbaed auth; 
-     ok stevesk@
-   - markus@cvs.openbsd.org 2002/02/04 12:15:25
-     [log.c log.h readconf.c servconf.c]
-     add SYSLOG_FACILITY_NOT_SET = -1, SYSLOG_LEVEL_NOT_SET = -1,
-     fixes arm/netbsd; based on patch from bjh21@netbsd.org; ok djm@
-   - stevesk@cvs.openbsd.org 2002/02/04 20:41:16
-     [ssh-add.1]
-     more sync for default ssh-add identities; ok markus@
-   - djm@cvs.openbsd.org 2002/02/04 21:53:12
-     [sftp.1 sftp.c]
-     Add "-P" option to directly connect to a local sftp-server. Should be 
-     useful for regression testing; ok markus@
-   - djm@cvs.openbsd.org 2002/02/05 00:00:46
-     [sftp.1 sftp.c sftp-client.c sftp-client.h sftp-int.c]
-     Add "-B" option to specify copy buffer length (default 32k); ok markus@
-
-20020130
- - (djm) Delay PRNG seeding until we need it in ssh-keygen, from markus@
- - (tim) [configure.ac] fix logic on when ssh-rand-helper is installed.
-   [sshd_config] put back in line that tells what PATH was compiled into sshd.
-
-20020125
- - (djm) Don't grab Xserver or pointer by default. x11-ssh-askpass doesn't 
-   and grabbing can cause deadlocks with kinput2. 
-
-20020124
- - (stevesk) Makefile.in: bug #61; delete commented line for now.
-
-20020123
- - (djm) Fix non-standard shell syntax in autoconf. Patch from 
-   Dave Dykstra <dwd@bell-labs.com>
- - (stevesk) fix --with-zlib=
- - (djm) Use case statements in autoconf to clean up some tests
- - (bal) reverted out of 5/2001 change to atexit().  I assume I
-   did it to handle SonyOS.  If that is the case than we will
-   do a special case for them.
-
-20020122
- - (djm) autoconf hacking:
-   - We don't support --without-zlib currently, so don't allow it.
-   - Rework cryptographic random number support detection. We now detect 
-     whether OpenSSL seeds itself. If it does, then we don't bother with 
-     the ssh-rand-helper program. You can force the use of ssh-rand-helper
-     using the --with-rand-helper configure argument
-   - Simplify and clean up ssh-rand-helper configuration
-   - Add OpenSSL sanity check: verify that header version matches version
-     reported by library
- - (djm) Fix some bugs I introduced into ssh-rand-helper yesterday
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2001/12/21 08:52:22
-     [ssh-keygen.1 ssh-keygen.c]
-     Remove default (rsa1) key type; ok markus@
-   - djm@cvs.openbsd.org 2001/12/21 08:53:45
-     [readpass.c]
-     Avoid interruptable passphrase read; ok markus@
-   - djm@cvs.openbsd.org 2001/12/21 10:06:43
-     [ssh-add.1 ssh-add.c]
-     Try all standard key files (id_rsa, id_dsa, identity) when invoked with
-     no arguments; ok markus@
-   - markus@cvs.openbsd.org 2001/12/21 12:17:33
-     [serverloop.c]
-     remove ifdef for USE_PIPES since fdin != fdout; ok djm@
-   - deraadt@cvs.openbsd.org 2001/12/24 07:29:43
-     [ssh-add.c]
-     try all listed keys.. how did this get broken?
-   - markus@cvs.openbsd.org 2001/12/25 18:49:56
-     [key.c]
-     be more careful on allocation
-   - markus@cvs.openbsd.org 2001/12/25 18:53:00
-     [auth1.c]
-     be more carefull on allocation
-   - markus@cvs.openbsd.org 2001/12/27 18:10:29
-     [ssh-keygen.c]
-     -t is only needed for key generation (unbreaks -i, -e, etc).
-   - markus@cvs.openbsd.org 2001/12/27 18:22:16
-     [auth1.c authfile.c auth-rsa.c dh.c kexdh.c kexgex.c key.c rsa.c]
-     [scard.c ssh-agent.c sshconnect1.c sshd.c ssh-dss.c]
-     call fatal() for openssl allocation failures
-   - stevesk@cvs.openbsd.org 2001/12/27 18:22:53
-     [sshd.8]
-     clarify -p; ok markus@
-   - markus@cvs.openbsd.org 2001/12/27 18:26:13
-     [authfile.c]
-     missing include
-   - markus@cvs.openbsd.org 2001/12/27 19:37:23
-     [dh.c kexdh.c kexgex.c]
-     always use BN_clear_free instead of BN_free
-   - markus@cvs.openbsd.org 2001/12/27 19:54:53
-     [auth1.c auth.h auth-rh-rsa.c]
-     auth_rhosts_rsa now accept generic keys.
-   - markus@cvs.openbsd.org 2001/12/27 20:39:58
-     [auth1.c auth-rsa.c channels.c clientloop.c packet.c packet.h]
-     [serverloop.c session.c ssh.c sshconnect1.c sshd.c ttymodes.c]
-     get rid of packet_integrity_check, use packet_done() instead.
-   - markus@cvs.openbsd.org 2001/12/28 12:14:27
-     [auth1.c auth2.c auth2-chall.c auth-rsa.c channels.c clientloop.c]
-     [kex.c kexdh.c kexgex.c packet.c packet.h serverloop.c session.c]
-     [ssh.c sshconnect1.c sshconnect2.c sshd.c]
-     s/packet_done/packet_check_eom/ (end-of-message); ok djm@
-   - markus@cvs.openbsd.org 2001/12/28 13:57:33
-     [auth1.c kexdh.c kexgex.c packet.c packet.h sshconnect1.c sshd.c]
-     packet_get_bignum* no longer returns a size
-   - markus@cvs.openbsd.org 2001/12/28 14:13:13
-     [bufaux.c bufaux.h packet.c]
-     buffer_get_bignum: int -> void
-   - markus@cvs.openbsd.org 2001/12/28 14:50:54
-     [auth1.c auth-rsa.c channels.c dispatch.c kex.c kexdh.c kexgex.c]
-     [packet.c packet.h serverloop.c session.c ssh.c sshconnect1.c]
-     [sshconnect2.c sshd.c]
-     packet_read* no longer return the packet length, since it's not used.
-   - markus@cvs.openbsd.org 2001/12/28 15:06:00
-     [auth2.c auth2-chall.c channels.c channels.h clientloop.c dispatch.c]
-     [dispatch.h kex.c kex.h serverloop.c ssh.c sshconnect2.c]
-     remove plen from the dispatch fn. it's no longer used.
-   - stevesk@cvs.openbsd.org 2001/12/28 22:37:48
-     [ssh.1 sshd.8]
-     document LogLevel DEBUG[123]; ok markus@
-   - stevesk@cvs.openbsd.org 2001/12/29 21:56:01
-     [authfile.c channels.c compress.c packet.c sftp-server.c]
-     [ssh-agent.c ssh-keygen.c]
-     remove unneeded casts and some char->u_char cleanup; ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/03 04:11:08
-     [ssh_config]
-     grammar in comment
-   - stevesk@cvs.openbsd.org 2002/01/04 17:59:17
-     [readconf.c servconf.c]
-     remove #ifdef _PATH_XAUTH/#endif; ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/04 18:14:16
-     [servconf.c sshd.8]
-     protocol 2 HostKey code default is now /etc/ssh_host_rsa_key and
-     /etc/ssh_host_dsa_key like we have in sshd_config.  ok markus@
-   - markus@cvs.openbsd.org 2002/01/05 10:43:40
-     [channels.c]
-     fix hanging x11 channels for rejected cookies (e.g. 
-     XAUTHORITY=/dev/null xbiff) bug #36, based on patch from
-     djast@cs.toronto.edu
-   - stevesk@cvs.openbsd.org 2002/01/05 21:51:56
-     [ssh.1 sshd.8]
-     some missing and misplaced periods
-   - markus@cvs.openbsd.org 2002/01/09 13:49:27
-     [ssh-keygen.c]
-     append \n only for public keys
-   - markus@cvs.openbsd.org 2002/01/09 17:16:00
-     [channels.c]
-     merge channel_pre_open_15/channel_pre_open_20; ok provos@
-   - markus@cvs.openbsd.org 2002/01/09 17:26:35
-     [channels.c nchan.c]
-     replace buffer_consume(b, buffer_len(b)) with buffer_clear(b); 
+   - itojun@cvs.openbsd.org 2002/05/13 02:37:39
+     [auth-skey.c auth2.c]
+     less warnings.  skey_{respond,query} are public (in auth.h)
+   - markus@cvs.openbsd.org 2002/05/13 20:44:58
+     [auth-options.c auth.c auth.h]
+     move the packet_send_debug handling from auth-options.c to auth.c; 
      ok provos@
-   - markus@cvs.openbsd.org 2002/01/10 11:13:29
-     [serverloop.c]
-     skip client_alive_check until there are channels; ok beck@
-   - markus@cvs.openbsd.org 2002/01/10 11:24:04
-     [clientloop.c]
-     handle SSH2_MSG_GLOBAL_REQUEST (just reply with failure); ok djm@
-   - markus@cvs.openbsd.org 2002/01/10 12:38:26
-     [nchan.c]
-     remove dead code (skip drain)
-   - markus@cvs.openbsd.org 2002/01/10 12:47:59
-     [nchan.c]
-     more unused code (with channels.c:1.156)
-   - markus@cvs.openbsd.org 2002/01/11 10:31:05
-     [packet.c]
-     handle received SSH2_MSG_UNIMPLEMENTED messages; ok djm@
-   - markus@cvs.openbsd.org 2002/01/11 13:36:43
-     [ssh2.h]
-     add defines for msg type ranges
-   - markus@cvs.openbsd.org 2002/01/11 13:39:36
-     [auth2.c dispatch.c dispatch.h kex.c]
-     a single dispatch_protocol_error() that sends a message of 
-     type 'UNIMPLEMENTED'
-     dispatch_range(): set handler for a ranges message types
-     use dispatch_protocol_ignore() for authentication requests after
-     successful authentication (the drafts requirement).
-     serverloop/clientloop now send a 'UNIMPLEMENTED' message instead 
-     of exiting.
-   - markus@cvs.openbsd.org 2002/01/11 20:14:11
-     [auth2-chall.c auth-skey.c]
-     use strlcpy not strlcat; mouring@
-   - markus@cvs.openbsd.org 2002/01/11 23:02:18
-     [readpass.c]
-     use _PATH_TTY
-   - markus@cvs.openbsd.org 2002/01/11 23:02:51
-     [auth2-chall.c]
-     use snprintf; mouring@
-   - markus@cvs.openbsd.org 2002/01/11 23:26:30
-     [auth-skey.c]
-     use snprintf; mouring@
-   - markus@cvs.openbsd.org 2002/01/12 13:10:29
-     [auth-skey.c]
-     undo local change
-   - provos@cvs.openbsd.org 2002/01/13 17:27:07
-     [ssh-agent.c]
-     change to use queue.h macros; okay markus@
-   - markus@cvs.openbsd.org 2002/01/13 17:57:37
-     [auth2.c auth2-chall.c compat.c sshconnect2.c sshd.c]
-     use buffer API and avoid static strings of fixed size; 
-     ok provos@/mouring@
-   - markus@cvs.openbsd.org 2002/01/13 21:31:20
-     [channels.h nchan.c]
-     add chan_set_[io]state(), order states, state is now an u_int,
-     simplifies debugging messages; ok provos@
-   - markus@cvs.openbsd.org 2002/01/14 13:22:35
-     [nchan.c]
-     chan_send_oclose1() no longer calls chan_shutdown_write(); ok provos@
-   - markus@cvs.openbsd.org 2002/01/14 13:34:07
-     [nchan.c]
-     merge chan_[io]buf_empty[12]; ok provos@
-   - markus@cvs.openbsd.org 2002/01/14 13:40:10
-     [nchan.c]
-     correct fn names for ssh2, do not switch from closed to closed; 
+   - millert@cvs.openbsd.org 2002/05/13 15:53:19
+     [sshd.c]
+     Call setsid() in the child after sshd accepts the connection and forks.
+     This is needed for privsep which calls setlogin() when it changes uids.
+     Without this, there is a race where the login name of an existing 
+     connection, as returned by getlogin(), may be changed to the privsep 
+     user (sshd).  markus@ OK
+   - markus@cvs.openbsd.org 2002/05/13 21:26:49
+     [auth-rhosts.c]
+     handle debug messages during rhosts-rsa and hostbased authentication; 
      ok provos@
-   - markus@cvs.openbsd.org 2002/01/14 13:41:13
-     [nchan.c]
-     remove duplicated code; ok provos@
-   - markus@cvs.openbsd.org 2002/01/14 13:55:55
-     [channels.c channels.h nchan.c]
-     remove function pointers for events, remove chan_init*; ok provos@
-   - markus@cvs.openbsd.org 2002/01/14 13:57:03
-     [channels.h nchan.c]
-     (c) 2002
-   - markus@cvs.openbsd.org 2002/01/16 13:17:51
-     [channels.c channels.h serverloop.c ssh.c]
-     wrapper for channel_setup_fwd_listener
-   - stevesk@cvs.openbsd.org 2002/01/16 17:40:23
-     [sshd_config]
-     The stategy now used for options in the default sshd_config shipped
-     with OpenSSH is to specify options with their default value where
-     possible, but leave them commented.  Uncommented options change a
-     default value.  Subsystem is currently the only default option
-     changed.  ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/16 17:42:33
-     [ssh.1]
-     correct defaults for -i/IdentityFile; ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/16 17:55:33
-     [ssh_config]
-     correct some commented defaults.  add Ciphers default.  ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/17 04:27:37
-     [log.c]
-     casts to silence enum type warnings for bugzilla bug 37; ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/18 17:14:16
-     [sshd.8]
-     correct Ciphers default; paola.mannaro@ubs.com
-   - stevesk@cvs.openbsd.org 2002/01/18 18:14:17
-     [authfd.c bufaux.c buffer.c cipher.c packet.c ssh-agent.c ssh-keygen.c]
-     unneeded cast cleanup; ok markus@
-   - stevesk@cvs.openbsd.org 2002/01/18 20:46:34
-     [sshd.8]
-     clarify Allow(Groups|Users) and Deny(Groups|Users); suggestion from
-     allard@oceanpark.com; ok markus@
-   - markus@cvs.openbsd.org 2002/01/21 15:13:51
-     [sshconnect.c]
-     use read_passphrase+ECHO in confirm(), allows use of ssh-askpass
-     for hostkey confirm.
-   - markus@cvs.openbsd.org 2002/01/21 22:30:12
-     [cipher.c compat.c myproposal.h]
-     remove "rijndael-*", just use "aes-" since this how rijndael is called
-     in the drafts; ok stevesk@
-   - markus@cvs.openbsd.org 2002/01/21 23:27:10
-     [channels.c nchan.c]
-     cleanup channels faster if the are empty and we are in drain-state; 
-     ok deraadt@
-   - stevesk@cvs.openbsd.org 2002/01/22 02:52:41
-     [servconf.c]
-     typo in error message; from djast@cs.toronto.edu
- - (djm) Make auth2-pam.c compile again after dispatch.h and packet.h 
-   changes
- - (djm) Recent Glibc includes an incompatible sys/queue.h. Treat it as 
-   bogus in configure
- - (djm) Use local sys/queue.h if necessary in ssh-agent.c
-
-20020121
- - (djm) Rework ssh-rand-helper:
-   - Reduce quantity of ifdef code, in preparation for ssh_rand_conf
-   - Always seed from system calls, even when doing PRNGd seeding
-   - Tidy and comment #define knobs
-   - Remove unused facility for multiple runs through command list
-   - KNF, cleanup, update copyright
-
-20020114
- - (djm) Bug #50 - make autoconf entropy path checks more robust
-
-20020108
- - (djm) Merge Cygwin copy_environment with do_pam_environment, removing 
-   fixed env var size limit in the process. Report from Corinna Vinschen 
-   <vinschen@redhat.com>
- - (stevesk) defines.h: use "/var/spool/sockets/X11/%u" for HP-UX.  does
-   not depend on transition links.  from Lutz Jaenicke.
-
-20020106
- - (stevesk) defines.h: determine _PATH_UNIX_X; currently "/tmp/.X11-unix/X%u"
-   for all platforms except HP-UX, which is "/usr/spool/sockets/X11/%u".
-
-20020105
- - (bal) NCR requies use_pipes to operate correctly.
- - (stevesk) fix spurious ; from NCR change.
-
-20020103
- - (djm) Use bigcrypt() on systems with SCO_PROTECTED_PW. Patch from 
-   Roger Cornelius <rac@tenzing.org>
-
-20011229
- - (djm) Apply Cygwin pointer deref fix from Corinna Vinschen 
-   <vinschen@redhat.com> Could be abused to guess valid usernames
- - (djm) Typo in contrib/cygwin/README Fix from Corinna Vinschen
-   <vinschen@redhat.com>
-
-20011228
- - (djm) Remove recommendation to use GNU make, we should support most
-   make programs.
-
-20011225
- - (stevesk) [Makefile.in ssh-rand-helper.c]
-   portable lib and __progname support for ssh-rand-helper; ok djm@
-
-20011223
- - (bal) Removed contrib/chroot.diff and noted in contrib/README that it
-   was not being maintained.
-
-20011222
- - (djm) Ignore fix & patchlevel in OpenSSL version check. Patch from 
-   solar@openwall.com
- - (djm) Rework entropy code. If the OpenSSL PRNG is has not been 
-   internally seeded, execute a subprogram "ssh-rand-helper" to obtain
-   some entropy for us. Rewrite the old in-process entropy collecter as
-   an example ssh-rand-helper.
- - (djm) Always perform ssh_prng_cmds path lookups in configure, even if
-   we don't end up using ssh_prng_cmds (so we always get a valid file) 
-      
-20011221
- - (djm) Add option to gnome-ssh-askpass to stop it from grabbing the X
-   server. I have found this necessary to avoid server hangs with X input
-   extensions (e.g. kinput2). Enable by setting the environment variable
-   "GNOME_SSH_ASKPASS_NOGRAB"
-  - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/12/08 17:49:28
-     [channels.c pathnames.h]
-     use only one path to X11 UNIX domain socket vs. an array of paths
-     to try.  report from djast@cs.toronto.edu.  ok markus@
-   - markus@cvs.openbsd.org 2001/12/09 18:45:56
-     [auth2.c auth2-chall.c auth.h]
-     add auth2_challenge_stop(), simplifies cleanup of kbd-int sessions,
-     fixes memleak.
-   - stevesk@cvs.openbsd.org 2001/12/10 16:45:04
-     [sshd.c]
-     possible fd leak on error; ok markus@
-   - markus@cvs.openbsd.org 2001/12/10 20:34:31
-     [ssh-keyscan.c]
-     check that server supports v1 for -t rsa1, report from wirth@dfki.de
-   - jakob@cvs.openbsd.org 2001/12/18 10:04:21
-     [auth.h hostfile.c hostfile.h]
-     remove auth_rsa_read_key, make hostfile_ready_key non static; ok markus@
-   - jakob@cvs.openbsd.org 2001/12/18 10:05:15
-     [auth2.c]
-     log fingerprint on successful public key authentication; ok markus@
-   - jakob@cvs.openbsd.org 2001/12/18 10:06:24
-     [auth-rsa.c]
-     log fingerprint on successful public key authentication, simplify 
-     usage of key structs; ok markus@
-   - deraadt@cvs.openbsd.org 2001/12/19 07:18:56
-     [auth1.c auth2.c auth2-chall.c auth-bsdauth.c auth.c authfile.c auth.h]
-     [auth-krb4.c auth-rhosts.c auth-skey.c bufaux.c canohost.c channels.c]
-     [cipher.c clientloop.c compat.c compress.c deattack.c key.c log.c mac.c]
-     [match.c misc.c nchan.c packet.c readconf.c rijndael.c rijndael.h scard.c]
-     [servconf.c servconf.h serverloop.c session.c sftp.c sftp-client.c]
-     [sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c]
-     [sshconnect1.c sshconnect2.c sshconnect.c sshd.8 sshd.c sshd_config]
-     [ssh-keygen.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c]
-     basic KNF done while i was looking for something else
-   - markus@cvs.openbsd.org 2001/12/19 16:09:39
-     [serverloop.c]
-     fix race between SIGCHLD and select with an additional pipe.  writing
-     to the pipe on SIGCHLD wakes up select(). using pselect() is not
-     portable and siglongjmp() ugly. W. R. Stevens suggests similar solution.
-     initial idea by pmenage@ensim.com; ok deraadt@, djm@
-   - stevesk@cvs.openbsd.org 2001/12/19 17:16:13
-     [authfile.c bufaux.c bufaux.h buffer.c buffer.h packet.c packet.h ssh.c]
-     change the buffer/packet interface to use void* vs. char*; ok markus@
-   - markus@cvs.openbsd.org 2001/12/20 16:37:29
-     [channels.c channels.h session.c]
-     setup x11 listen socket for just one connect if the client requests so.
-     (v2 only, but the openssh client does not support this feature).
-   - djm@cvs.openbsd.org 2001/12/20 22:50:24
-     [auth2.c auth2-chall.c channels.c channels.h clientloop.c dispatch.c]
-     [dispatch.h kex.c kex.h packet.c packet.h serverloop.c ssh.c]
-     [sshconnect2.c]
-     Conformance fix: we should send failing packet sequence number when
-     responding with a SSH_MSG_UNIMPLEMENTED message. Spotted by
-     yakk@yakk.dot.net; ok markus@
-
-20011219
- - (stevesk) OpenBSD CVS sync X11 localhost display
-   - stevesk@cvs.openbsd.org 2001/11/29 14:10:51
-     [channels.h channels.c session.c]
-     sshd X11 fake server will now listen on localhost by default:
-     $ echo $DISPLAY
-     localhost:12.0
-     $ netstat -an|grep 6012
-     tcp        0      0  127.0.0.1.6012         *.*                    LISTEN
-     tcp6       0      0  ::1.6012               *.*                    LISTEN
-     sshd_config gatewayports=yes can be used to revert back to the old
-     behavior.  will control this with another option later.  ok markus@
-   - stevesk@cvs.openbsd.org 2001/12/19 08:43:11
-     [includes.h session.c]
-     handle utsname.nodename case for FamilyLocal X authorization; ok markus@
-       
-20011207
- - (bal) PCRE no longer required.  Banished from the source along with
-   fake-regex.h
- - (bal) OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/12/06 18:02:32
-     [channels.c sshconnect.c]
-     shutdown(sock, SHUT_RDWR) not needed here; ok markus@
-   - stevesk@cvs.openbsd.org 2001/12/06 18:09:23
-     [channels.c session.c]
-     strncpy->strlcpy.  remaining strncpy's are necessary.  ok markus@
-   - stevesk@cvs.openbsd.org 2001/12/06 18:20:32
-     [channels.c]
-     disable nagle for X11 fake server and client TCPs.  from netbsd.
-     ok markus@
-
-20011206
+   - mouring@cvs.openbsd.org 2002/05/15 15:47:49
+     [kex.c monitor.c monitor_wrap.c sshd.c]
+     'monitor' variable clashes with at least one lame platform (NeXT).  i
+     Renamed to 'pmonitor'.  provos@
+   - deraadt@cvs.openbsd.org 2002/05/04 02:39:35
+     [servconf.c sshd.8 sshd_config]
+     enable privsep by default; provos ok
+   - millert@cvs.openbsd.org 2002/05/06 23:34:33
+     [ssh.1 sshd.8]
+     Kill/adjust r(login|exec)d? references now that those are no longer in
+     the tree.
+   - markus@cvs.openbsd.org 2002/05/15 21:02:53
+     [servconf.c sshd.8 sshd_config]
+     disable privsep and enable setuid for the 3.2.2 release
+ - (bal) Fixed up PAM case.  I think.
+ - (bal) Clarified openbsd-compat/*-cray.* Licence provided by Wendy
  - (bal) OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/11/14 20:45:08
-     [sshd.c]
-     errno saving wrapping in a signal handler
-   - markus@cvs.openbsd.org 2001/11/16 12:46:13
-     [ssh-keyscan.c]
-     handle empty lines instead of dumping core; report from sha@sha-1.net
-   - stevesk@cvs.openbsd.org 2001/11/17 19:14:34
-     [auth2.c auth.c readconf.c servconf.c ssh-agent.c ssh-keygen.c]
-     enum/int type cleanup where it made sense to do so; ok markus@
-   - markus@cvs.openbsd.org 2001/11/19 11:20:21
-     [sshd.c]
-     fd leak on HUP; ok stevesk@
-   - stevesk@cvs.openbsd.org 2001/11/19 18:40:46
-     [ssh-agent.1]
-     clarify/state that private keys are not exposed to clients using the 
-     agent; ok markus@
-   - mpech@cvs.openbsd.org 2001/11/19 19:02:16
-     [deattack.c radix.c]
-     kill more registers
-     millert@ ok
-   - markus@cvs.openbsd.org 2001/11/21 15:51:24
-     [key.c]
-     mem leak
-   - stevesk@cvs.openbsd.org 2001/11/21 18:49:14
-     [ssh-keygen.1]
-     more on passphrase construction; ok markus@
-   - stevesk@cvs.openbsd.org 2001/11/22 05:27:29
-     [ssh-keyscan.c]
-     don't use "\n" in fatal()
-   - markus@cvs.openbsd.org 2001/11/22 12:34:22
-     [clientloop.c serverloop.c sshd.c]
-     volatile sig_atomic_t
-   - stevesk@cvs.openbsd.org 2001/11/29 19:06:39
-     [channels.h]
-     remove dead function prototype; ok markus@
-   - markus@cvs.openbsd.org 2001/11/29 22:08:48
-     [auth-rsa.c]
-     fix protocol error: send 'failed' message instead of a 2nd challenge
-     (happens if the same key is in authorized_keys twice).
-     reported Ralf_Meister@genua.de; ok djm@
-   - stevesk@cvs.openbsd.org 2001/11/30 20:39:28
-     [ssh.c]
-     sscanf() length dependencies are clearer now; can also shrink proto
-     and data if desired, but i have not done that.  ok markus@
-   - markus@cvs.openbsd.org 2001/12/01 21:41:48
-     [session.c sshd.8]
-     don't pass user defined variables to /usr/bin/login
-   - deraadt@cvs.openbsd.org 2001/12/02 02:08:32
-     [sftp-common.c]
-     zap };
-   - itojun@cvs.openbsd.org 2001/12/05 03:50:01
-     [clientloop.c serverloop.c sshd.c]
-     deal with LP64 printf issue with sig_atomic_t.  from thorpej
-   - itojun@cvs.openbsd.org 2001/12/05 03:56:39
-     [auth1.c auth2.c canohost.c channels.c deattack.c packet.c scp.c 
-      sshconnect2.c]
-     make it compile with more strict prototype checking
-   - deraadt@cvs.openbsd.org 2001/12/05 10:06:12
-     [authfd.c authfile.c bufaux.c channels.c compat.c kex.c kexgex.c 
-      key.c misc.c packet.c servconf.c ssh-agent.c sshconnect2.c 
-      sshconnect.c sshd.c ssh-dss.c ssh-keygen.c ssh-rsa.c]
-     minor KNF
-   - markus@cvs.openbsd.org 2001/12/05 15:04:48
+   - markus@cvs.openbsd.org 2002/05/15 21:05:29
      [version.h]
-     post 3.0.2
-   - markus@cvs.openbsd.org 2001/12/05 16:54:51
-     [compat.c match.c match.h]
-     make theo and djm happy: bye bye regexp
-   - markus@cvs.openbsd.org 2001/12/06 13:30:06
-     [servconf.c servconf.h sshd.8 sshd.c]
-     add -o to sshd, too. ok deraadt@
- - (bal) Minor white space fix up in servconf.c
-
-20011126
- - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c,
-   openbsd-compat/bsd-cygwin_util.h, openbsd-compat/daemon.c]
-   Allow SSHD to install as service under WIndows 9x/Me
-   [configure.ac] Fix to allow linking against PCRE on Cygwin
-   Patches by Corinna Vinschen <vinschen@redhat.com>
+     enter OpenSSH_3.2.2
+ - (bal) Caldara, Suse, and Redhat openssh.specs updated.
 
-20011115
- - (djm) Fix IPv4 default in ssh-keyscan. Spotted by Dan Astoorian 
-   <djast@cs.toronto.edu> Fix from markus@
- - (djm) Release 3.0.1p1
-
-20011113
- - (djm) Fix early (and double) free of remote user when using Kerberos. 
-   Patch from Simon Wilkinson <simon@sxw.org.uk>
- - (djm) AIX login{success,failed} changes. Move loginsuccess call to 
-   do_authenticated. Call loginfailed for protocol 2 failures > MAX like 
-   we do for protocol 1. Reports from Ralf Wenk <wera0003@fh-karlsruhe.de>,
-   K.Wolkersdorfer@fz-juelich.de and others
+20020514
+ - (stevesk) [README.privsep] PAM+privsep works with Solaris 8.
+ - (tim) [sshpty.c] set tty modes when allocating old style bsd ptys to
+   match what newer style ptys have when allocated. Based on a patch by
+   Roger Cornelius <rac@tenzing.org>
+ - (tim) [README.privsep] UnixWare 7 and OpenUNIX 8 work.
+ - (tim) [README.privsep] remove reference to UnixWare 7 and OpenUNIX 8
+   from PAM-enabled pragraph. UnixWare has no PAM.
+ - (tim) [contrib/caldera/openssh.spec] update version.
+
+20020513
+ - (stevesk) add initial README.privsep
+ - (stevesk) [configure.ac] nicer message: --with-privsep-user=user
+ - (djm) Add --with-superuser-path=xxx configure option to specify 
+   what $PATH the superuser receives.
+ - (djm) Bug #231: UsePrivilegeSeparation turns off Banner.
+ - (djm) Add --with-privsep-path configure option
+ - (djm) Update RPM spec file: different superuser path, use
+   /var/empty/sshd for privsep
+ - (djm) Bug #234: missing readpassphrase declaration and defines
+ - (djm) Add INSTALL warning about SSH protocol 1 blowfish w/ 
+    OpenSSL < 0.9.6
+
+20020511
+ - (tim) [configure.ac] applied a rework of djm's OpenSSL search cleanup patch.
+   Now only searches system and /usr/local/ssl (OpenSSL's default install path)
+   Others must use --with-ssl-dir=....
+ - (tim) [monitor_fdpass.c] fix for systems that have both
+   HAVE_ACCRIGHTS_IN_MSGHDR and HAVE_CONTROL_IN_MSGHDR. Ie. sys/socket.h 
+   has #define msg_accrights msg_control
+
+20020510
+ - (stevesk) [auth.c] Shadow account and expiration cleanup.  Now
+   check for root forced expire.  Still don't check for inactive.
+ - (djm) Rework RedHat RPM files. Based on spec from Nalin 
+   Dahyabhai <nalin@redhat.com> and patches from 
+   Pekka Savola <pekkas@netcore.fi>
+ - (djm) Try to drop supplemental groups at daemon startup. Patch from 
+   RedHat
+ - (bal) Back all the way out of auth-passwd.c changes.  Breaks too many
+   things that don't set pw->pw_passwd.
+
+20020509
+ - (tim) [Makefile.in] Unbreak make -f Makefile.in distprep
+
+20020508
+ - (tim) [openbsd-compat/bsd-arc4random.c] fix logic on when seed_rng() is
+   called. Report by Chris Maxwell <maxwell@cs.dal.ca>
+ - (tim) [Makefile.in configure.ac] set SHELL variable in Makefile
+ - (djm) Disable PAM kbd-int auth if privsep is turned on (it doesn't work)
+
+20020507
+ - (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
+   Add truncate() emulation to address Bug 208
+
+20020506
+ - (djm) Unbreak auth-passwd.c for PAM and SIA
+ - (djm) Unbreak PAM auth for protocol 1. Report from Pekka Savola 
+   <pekkas@netcore.fi>
+ - (djm) Don't reinitialise PAM credentials before we have started PAM.
+   Report from Pekka Savola <pekkas@netcore.fi>
+   
+20020506
+ - (bal) Fixed auth-passwd.c to resolve PermitEmptyPassword issue
+20020501
+ - (djm) Import OpenBSD regression tests. Requires BSD make to run
+ - (djm) Fix readpassphase compilation for systems which have it
+
+20020429
+ - (tim) [contrib/caldera/openssh.spec] update fixUP to reflect changes in
+   sshd_config.
+ - (tim) [contrib/cygwin/README] remove reference to regex.
+   patch from Corinna Vinschen <vinschen@redhat.com>
+
+20020426
+ - (djm) Bug #137, #209: fix make problems for scard/Ssh.bin, do uudecode
+   during distprep only
+ - (djm) Disable PAM password expiry until a complete fix for bug #188 
+   exists
+ - (djm) Bug #180: Set ToS bits on IPv4-in-IPv6 mapped addresses. Based on 
+   patch from openssh@misc.tecq.org
+
+20020425
+ - (stevesk) [defines.h] remove USE_TIMEVAL; unused
+ - (stevesk) [acconfig.h auth-passwd.c configure.ac sshd.c] HP-UX 10.26
+   support.  bug #184.  most from dcole@keysoftsys.com.
+
+20020424
  - (djm) OpenBSD CVS Sync
-   - dugsong@cvs.openbsd.org 2001/11/11 18:47:10
-     [auth-krb5.c]
-     fix krb5 authorization check. found by <jhawk@MIT.EDU>. from 
-     art@, deraadt@ ok
-   - markus@cvs.openbsd.org  2001/11/12 11:17:07
-     [servconf.c]
-     enable authorized_keys2 again. tested by fries@
-   - markus@cvs.openbsd.org  2001/11/13 02:03:57
+   - markus@cvs.openbsd.org 2002/04/23 12:54:10
      [version.h]
-     enter 3.0.1
- - (djm) Bump RPM package versions
-
-20011112
- - (djm) Makefile correctness fix from Mark D. Baushke <mdb@juniper.net>
- - (djm) Cygwin config patch from Corinna Vinschen <vinschen@redhat.com>
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/10/24 08:41:41
-     [sshd.c]
-     mention remote port in debug message
-   - markus@cvs.openbsd.org 2001/10/24 08:41:20
-     [ssh.c]
-     remove unused
-   - markus@cvs.openbsd.org 2001/10/24 08:51:35
-     [clientloop.c ssh.c]
-     ignore SIGPIPE early, makes ssh work if agent dies, netbsd-pr via itojun@
-   - markus@cvs.openbsd.org 2001/10/24 19:57:40
-     [clientloop.c]
-     make ~& (backgrounding) work again for proto v1; add support ~& for v2, too
-   - markus@cvs.openbsd.org 2001/10/25 21:14:32
-     [ssh-keygen.1 ssh-keygen.c]
-     better docu for fingerprinting, ok deraadt@
-   - markus@cvs.openbsd.org 2001/10/29 19:27:15
-     [sshconnect2.c]
-     hostbased: check for client hostkey before building chost
-   - markus@cvs.openbsd.org 2001/10/30 20:29:09
-     [ssh.1]
-     ssh.1
-   - markus@cvs.openbsd.org 2001/11/07 16:03:17
-     [packet.c packet.h sshconnect2.c]
-     pad using the padding field from the ssh2 packet instead of sending
-     extra ignore messages. tested against several other ssh servers.
-   - markus@cvs.openbsd.org 2001/11/07 21:40:21
-     [ssh-rsa.c]
-     ssh_rsa_sign/verify: SSH_BUG_SIGBLOB not supported
-   - markus@cvs.openbsd.org 2001/11/07 22:10:28
-     [ssh-dss.c ssh-rsa.c]
-     missing free and sync dss/rsa code.
-   - markus@cvs.openbsd.org 2001/11/07 22:12:01
-     [sshd.8]
-     s/Keepalive/KeepAlive/; from openbsd@davidkrause.com
-   - markus@cvs.openbsd.org 2001/11/07 22:41:51
-     [auth2.c auth-rh-rsa.c]
-     unused includes
-   - markus@cvs.openbsd.org 2001/11/07 22:53:21
-     [channels.h]
-     crank c->path to 256 so they can hold a full hostname; dwd@bell-labs.com
-   - markus@cvs.openbsd.org 2001/11/08 10:51:08
-     [readpass.c]
-     don't strdup too much data; from gotoh@taiyo.co.jp; ok millert.
-   - markus@cvs.openbsd.org 2001/11/08 17:49:53
-     [ssh.1]
-     mention setuid root requirements; noted by cnorris@csc.UVic.ca; ok stevesk@
-   - markus@cvs.openbsd.org 2001/11/08 20:02:24
-     [auth.c]
-     don't print ROOT in CAPS for the authentication messages, i.e.
-       Accepted publickey for ROOT from 127.0.0.1 port 42734 ssh2
-     becomes
-       Accepted publickey for root from 127.0.0.1 port 42734 ssh2
-   - markus@cvs.openbsd.org 2001/11/09 18:59:23
-     [clientloop.c serverloop.c]
-     don't memset too much memory, ok millert@
-     original patch from jlk@kamens.brookline.ma.us via nalin@redhat.com
-   - markus@cvs.openbsd.org 2001/11/10 13:19:45
-     [sshd.c]
-     cleanup libwrap support (remove bogus comment, bogus close(), add 
-     debug, etc).
-   - markus@cvs.openbsd.org 2001/11/10 13:22:42
-     [ssh-rsa.c]
-     KNF (unexpand)
-   - markus@cvs.openbsd.org 2001/11/10 13:37:20
-     [packet.c]
-     remove extra debug()
-   - markus@cvs.openbsd.org 2001/11/11 13:02:31
-     [servconf.c]
-     make AuthorizedKeysFile2 fallback to AuthorizedKeysFile if 
-     AuthorizedKeysFile is specified.
- - (djm) Reorder portable-specific server options so that they come first. 
-   This should help reduce diff collisions for new server options (as they
-   will appear at the end)
-
-20011109
- - (stevesk) auth-pam.c: use do_pam_authenticate(PAM_DISALLOW_NULL_AUTHTOK)
-   if permit_empty_passwd == 0 so null password check cannot be bypassed.
-   jayaraj@amritapuri.com OpenBSD bug 2168
-   - markus@cvs.openbsd.org 2001/11/09 19:08:35
-     [sshd.c]
-     remove extra trailing dot from log message; pilot@naughty.monkey.org
-
-20011103
- - (tim) [ contrib/caldera/openssh.spec contrib/caldera/sshd.init] Updates 
-   from Raymund Will <ray@caldera.de>
-   [acconfig.h configure.in] Clean up login checks.
-   Problem reported by Jim Knoble <jmknoble@pobox.com>
-
-20011101
- - (djm) Compat define for OpenSSL < 0.9.6 (No OPENSSL_free)
-
-20011031
- - (djm) Unsmoke drugs: config files should be noreplace.
-
-20011030
- - (djm) Redhat RPM spec: remove noreplace from config files, allow IPv6 
-   by default (can force IPv4 using --define "noipv6 1")
-
-20011029
- - (tim) [TODO defines.h loginrec.c] Change the references to configure.in
-   to configure.ac
-
-20011028
- - (djm) Avoid bug in Solaris PAM libs
- - (djm) Disconnect if no tty and PAM reports password expired
- - (djm) Fix for PAM password changes being echoed (from stevesk)
- - (stevesk) Fix compile problem with PAM password change fix
- - (stevesk) README: zlib location is http://www.gzip.org/zlib/
-
-20011027
- - (tim) [configure.ac] Fixes for ReliantUNIX (don't use libucb)
-   Patch by Robert Dahlem <Robert.Dahlem@siemens.com>
-
-20011026
- - (bal) Set the correct current time in login_utmp_only().  Patch by
-   Wayne Davison <wayned@users.sourceforge.net>
- - (tim) [scard/Makefile.in] Fix install: when building outside of source
-        tree and using --src=/full_path/to/openssh
-        Patch by Mark D. Baushke <mdb@juniper.net>
-
-20011025
- - (bal) Use VDISABLE if _POSIX_VDISABLE is set in readpassphrase.c.  Patch
-   by todd@
- - (tim) [configure.ac] Give path given in --with-xxx= for pcre,zlib, and
-        tcp-wrappers precedence over system libraries and includes.
-        Report from Dave Dykstra <dwd@bell-labs.com>
-
-20011024
- - (bal) Should be 3.0p1 not 3.0p2.  Corrected version.h already.
- - (tim) configure.in -> configure.ac
-
-20011023
- - (bal) Updated version to 3.0p1 in preparing for release.
- - (bal) Added 'PAM_TTY_KLUDGE' to Solaris platform.
- - (tim) [configure.in] Fix test for broken dirname. Based on patch from
-        Dave Dykstra <dwd@bell-labs.com>. Remove un-needed test for zlib.h.
-        [contrib/caldera/openssh.spec, contrib/redhat/openssh.spec,
-        contrib/suse/openssh.spec] Update version to match version.h
-
-20011022
- - (djm) Fix fd leak in loginrec.c (ro fd to lastlog was left open).
-   Report from Michal Zalewski <lcamtuf@coredump.cx>
-
-20011021
- - (tim) [configure.in] Clean up library testing. Add optional PATH to
-        --with-pcre, --with-zlib, and --with-tcp-wrappers. Based on
-        patch by albert chin (china@thewrittenword.com)
-        Re-arange AC_CHECK_HEADERS and AC_CHECK_FUNCS for eaiser reading
-        of patches to configure.in. Replace obsolete AC_STRUCT_ST_BLKSIZE
-        with AC_CHECK_MEMBERS. Add test for broken dirname() on
-        Solaris 2.5.1 by Dan Astoorian <djast@cs.toronto.edu>
-        [acconfig.h aclocal.m4 defines.h configure.in] Better socklen_t test.
-        patch by albert chin (china@thewrittenword.com)
-        [scp.c] Replace obsolete HAVE_ST_BLKSIZE with
-        HAVE_STRUCT_STAT_ST_BLKSIZE.
-        [Makefile.in] When running make in top level, always do make
-        in openbsd-compat. patch by Dave Dykstra <dwd@bell-labs.com>
-
-20011019
- - (bal) Fixed up init.d symlink issue and piddir stuff.  Patches by
-   Zoran Milojevic <Zoran.Milojevic@SS8.com> and j.petersen@msh.de 
-
-20011012
- - (djm) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/10/10 22:18:47
-     [channels.c channels.h clientloop.c nchan.c serverloop.c]
-     [session.c session.h]
-     try to keep channels open until an exit-status message is sent.
-     don't kill the login shells if the shells stdin/out/err is closed.
-     this should now work:
-     ssh -2n localhost 'exec > /dev/null 2>&1; sleep 10; exit 5'; echo ?
-   - markus@cvs.openbsd.org 2001/10/11 13:45:21
-     [session.c]
-     delay detach of session if a channel gets closed but the child is 
-     still alive.  however, release pty, since the fd's to the child are 
-     already closed.
-   - markus@cvs.openbsd.org 2001/10/11 15:24:00
-     [clientloop.c]
-     clear select masks if we return before calling select().
- - (djm) "make veryclean" fix from Tom Holroyd <tomh@po.crl.go.jp>
- - (djm) Clean some autoconf-2.52 junk when doing "make distclean"
- - (djm) Cleanup sshpty.c a little
- - (bal) First wave of contrib/solaris/ package upgrades.  Still more
-   work needs to be done, but it is a 190% better then the stuff we
-   had before!
- - (bal) Minor bug fix in contrib/solaris/opensshd.in .. $etcdir was not
-   set right.
-
-20011010
+     3.2.1
+   - djm@cvs.openbsd.org 2002/04/23 22:16:29
+     [sshd.c]
+     Improve error message; ok markus@ stevesk@
+
+20020423
+ - (stevesk) [acconfig.h configure.ac session.c] LOGIN_NO_ENDOPT for HP-UX
+ - (stevesk) [acconfig.h] NEED_IN_SYSTM_H unused
+ - (markus) OpenBSD CVS Sync
+   - markus@cvs.openbsd.org 2002/04/23 12:58:26
+     [radix.c]
+     send complete ticket; semerad@ss1000.ms.mff.cuni.cz
+ - (djm) Trim ChangeLog to include only post-3.1 changes
+ - (djm) Update RPM spec file versions
+ - (djm) Redhat spec enables KrbV by default
+ - (djm) Applied OpenSC smartcard updates from Markus & 
+   Antti Tapaninen <aet@cc.hut.fi>
+ - (djm) Define BROKEN_REALPATH for AIX, patch from 
+   Antti Tapaninen <aet@cc.hut.fi>
+ - (djm) Bug #214: Fix utmp for Irix (don't strip "tty"). Patch from 
+   Kevin Taylor <no@nowhere.org> (??) via Philipp Grau
+   <phgrau@zedat.fu-berlin.de>
+ - (djm) Bug #213: Simplify CMSG_ALIGN macros to avoid symbol clashes. 
+   Reported by Doug Manton <dmanton@emea.att.com>
+ - (djm) Bug #222: Fix tests for getaddrinfo on OSF/1. Spotted by
+   Robert Urban <urban@spielwiese.de>
+ - (djm) Bug #206 - blibpath isn't always needed for AIX ld, avoid 
+   sizeof(long long int) == 4 breakage. Patch from Matthew Clarke
+   <Matthew_Clarke@mindlink.bc.ca>
+ - (djm) Make privsep work with PAM (still experimental)
  - (djm) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/10/04 14:34:16
-     [key.c]
-     call OPENSSL_free() for memory allocated by openssl; from chombier@mac.com
-   - markus@cvs.openbsd.org 2001/10/04 15:05:40
-     [channels.c serverloop.c]
-     comment out bogus conditions for selecting on connection_in
-   - markus@cvs.openbsd.org 2001/10/04 15:12:37
-     [serverloop.c]
-     client_alive_check cleanup
-   - markus@cvs.openbsd.org 2001/10/06 00:14:50
-     [sshconnect.c]
-     remove unused argument
-   - markus@cvs.openbsd.org 2001/10/06 00:36:42
-     [session.c]
-     fix typo in error message, sync with do_exec_nopty
-   - markus@cvs.openbsd.org 2001/10/06 11:18:19
-     [sshconnect1.c sshconnect2.c sshconnect.c]
-     unify hostkey check error messages, simplify prompt.
-   - markus@cvs.openbsd.org 2001/10/07 10:29:52
-     [authfile.c]
-     grammer; Matthew_Clarke@mindlink.bc.ca
-   - markus@cvs.openbsd.org 2001/10/07 17:49:40
-     [channels.c channels.h]
-     avoid possible FD_ISSET overflow for channels established
-     during channnel_after_select() (used for dynamic channels).
-   - markus@cvs.openbsd.org 2001/10/08 11:48:57
-     [channels.c]
-     better debug
-   - markus@cvs.openbsd.org 2001/10/08 16:15:47
-     [sshconnect.c]
-     use correct family for -b option
-   - markus@cvs.openbsd.org 2001/10/08 19:05:05
-     [ssh.c sshconnect.c sshconnect.h ssh-keyscan.c]
-     some more IPv4or6 cleanup
-   - markus@cvs.openbsd.org 2001/10/09 10:12:08
-     [session.c]
-     chdir $HOME after krb_afslog(); from bbense@networking.stanford.edu
-   - markus@cvs.openbsd.org 2001/10/09 19:32:49
-     [session.c]
-     stat subsystem command before calling do_exec, and return error to client.
-   - markus@cvs.openbsd.org 2001/10/09 19:51:18
-     [serverloop.c]
-     close all channels if the connection to the remote host has been closed,
-     should fix sshd's hanging with WCHAN==wait
-   - markus@cvs.openbsd.org 2001/10/09 21:59:41
-     [channels.c channels.h serverloop.c session.c session.h]
-     simplify session close: no more delayed session_close, no more 
-     blocking wait() calls.
- - (bal) removed two unsed headers in openbsd-compat/bsd-misc.c 
- - (bal) seed_init() and seed_rng() required in ssh-keyscan.c
-
-20011007
- - (bal) ssh-copy-id corrected permissions for .ssh/ and authorized_keys.
-   Prompted by Matthew Vernon <matthew@sel.cam.ac.uk> 
-
-20011005
- - (bal) AES works under Cray, no more hack. 
-
-20011004
- - (bal) nchan2.ms resync.  BSD License applied.
-
-20011003
- - (bal) CVS ID fix up in version.h
- - (bal) OpenBSD CVS Sync:
-   - markus@cvs.openbsd.org 2001/09/27 11:58:16
-     [compress.c]
-     mem leak; chombier@mac.com
-   - markus@cvs.openbsd.org 2001/09/27 11:59:37
-     [packet.c]
-     missing called=1; chombier@mac.com
-   - markus@cvs.openbsd.org 2001/09/27 15:31:17
-     [auth2.c auth2-chall.c sshconnect1.c]
-     typos; from solar
-   - camield@cvs.openbsd.org 2001/09/27 17:53:24
-     [sshd.8]
-     don't talk about compile-time options
-     ok markus@
-   - djm@cvs.openbsd.org 2001/09/28 12:07:09
-     [ssh-keygen.c]
-     bzero private key after loading to smartcard; ok markus@
-   - markus@cvs.openbsd.org 2001/09/28 15:46:29
-     [ssh.c]
-     bug: read user config first; report kaukasoi@elektroni.ee.tut.fi
-   - markus@cvs.openbsd.org 2001/10/01 08:06:28
-     [scp.c]
-     skip filenames containing \n; report jdamery@chiark.greenend.org.uk
-     and matthew@debian.org
-   - markus@cvs.openbsd.org 2001/10/01 21:38:53
-     [channels.c channels.h ssh.c sshd.c]
-     remove ugliness; vp@drexel.edu via angelos
-   - markus@cvs.openbsd.org 2001/10/01 21:51:16
-     [readconf.c readconf.h ssh.1 sshconnect.c]
-     add NoHostAuthenticationForLocalhost; note that the hostkey is
-     now check for localhost, too.
-   - djm@cvs.openbsd.org 2001/10/02 08:38:50
-     [ssh-add.c]
-     return non-zero exit code on error; ok markus@
-   - stevesk@cvs.openbsd.org 2001/10/02 22:56:09
-     [sshd.c]
-     #include "channels.h" for channel_set_af()
-   - markus@cvs.openbsd.org 2001/10/03 10:01:20
-     [auth.c]
-     use realpath() for homedir, too. from jinmei@isl.rdc.toshiba.co.jp
-
-20011001
- - (stevesk) loginrec.c: fix type conversion problems exposed when using
-   64-bit off_t.
-       
-20010929
- - (bal) move reading 'config.h' up higher.  Patch by albert chin
-   <china@thewrittenword.com)
-
-20010928
- - (djm) OpenBSD CVS sync:
-   - djm@cvs.openbsd.org 2001/09/28 09:49:31
-     [scard.c]
-     Fix segv when smartcard communication error occurs during key load. 
-     ok markus@
- - (djm) Update spec files for new x11-askpass
-
-20010927
- - (stevesk) session.c: declare do_pre_login() before use
-   wayned@users.sourceforge.net
-
-20010925
- - (djm) Pull in auth-krb5.c from OpenBSD CVS. NB. it is not currently used.
- - (djm) Sync $sysconfdir/moduli
- - (djm) Add AC_SYS_LARGEFILE configure test
- - (djm) Avoid bad and unportable sprintf usage in compat code
-
-20010923
- - (bal) updated ssh.c to mirror minor getopts 'extern int' formating done
-   by stevesk@
- - (bal) Removed 'extern int optopt;' since it is dead wood.
- - (bal) Updated all *.specs for 2.9.9p1 and updated version.h
-
-20010923
- - (bal) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/09/23 11:09:13
-     [authfile.c]
-     relax permission check for private key files.
-   - markus@cvs.openbsd.org 2001/09/23 09:58:13
-     [LICENCE]
-     new rijndael implementation
-
-20010920
- - (tim) [scard/Makefile.in] Don't strip the Java binary
- - (stevesk) sun_len, SUN_LEN() configure stuff no longer required
+   - deraadt@cvs.openbsd.org 2002/04/20 09:02:03
+     [servconf.c]
+     No, afs requires explicit enabling
+   - markus@cvs.openbsd.org 2002/04/20 09:14:58
+     [bufaux.c bufaux.h]
+     add buffer_{get,put}_short
+   - markus@cvs.openbsd.org 2002/04/20 09:17:19
+     [radix.c]
+     rewrite using the buffer_* API, fixes overflow; ok deraadt@
+   - stevesk@cvs.openbsd.org 2002/04/21 16:19:27
+     [sshd.8 sshd_config]
+     document default AFSTokenPassing no; ok deraadt@
+   - stevesk@cvs.openbsd.org 2002/04/21 16:25:06
+     [sshconnect1.c]
+     spelling in error message; ok markus@
+   - markus@cvs.openbsd.org 2002/04/22 06:15:47
+     [radix.c]
+     fix check for overflow
+   - markus@cvs.openbsd.org 2002/04/22 16:16:53
+     [servconf.c sshd.8 sshd_config]
+     do not auto-enable KerberosAuthentication; ok djm@, provos@, deraadt@
+   - markus@cvs.openbsd.org 2002/04/22 21:04:52
+     [channels.c clientloop.c clientloop.h ssh.c]
+     request reply (success/failure) for -R style fwd in protocol v2,
+     depends on ordered replies.
+     fixes http://bugzilla.mindrot.org/show_bug.cgi?id=215; ok provos@
+
+20020421
+ - (tim) [entropy.c.] Portability fix for SCO Unix 3.2v4.x (SCO OSR 3.0).
+   entropy.c needs seteuid(getuid()) for the setuid(original_uid) to 
+   succeed. Patch by gert@greenie.muc.de. This fixes one part of Bug 208
+
+20020418
+ - (djm) Avoid SIGCHLD breakage when run from rsync. Fix from 
+   Sturle Sunde <sturle.sunde@usit.uio.no>
+
+20020417
+ - (djm) Tell users to configure /dev/random support into OpenSSL in 
+   INSTALL
+ - (djm) Fix .Nm in mdoc2man.pl from pspencer@fields.utoronto.ca
+ - (tim) [configure.ac] Issue warning on --with-default-path=/some_path
+   if LOGIN_CAP is enabled. Report & testing by Tuc <tuc@ttsg.com>
+
+20020415
+ - (djm) Unbreak "make install". Fix from Darren Tucker 
+   <dtucker@zip.com.au>
+ - (stevesk) bsd-cygwin_util.[ch] BSD license from Corinna Vinschen
+ - (tim) [configure.ac] add tests for recvmsg and sendmsg.
+   [monitor_fdpass.c] add checks for HAVE_SENDMSG and HAVE_RECVMSG for
+   systems that HAVE_ACCRIGHTS_IN_MSGHDR but no recvmsg or sendmsg.
+
+20020414
+ - (djm) ssh-rand-helper improvements
+   - Add commandline debugging options
+   - Don't write binary data if stdout is a tty (use hex instead)
+   - Give it a manpage
+ - (djm) Random number collection doc fixes from Ben
+
+20020413
+ - (djm) Add KrbV support patch from Simon Wilkinson <simon@sxw.org.uk>
+
+20020412
+ - (stevesk) [auth-sia.[ch]] add BSD license from Chris Adams
+ - (tim) [configure.ac] add <sys/types.h> to msghdr tests. Change -L
+   to -h on testing for /bin being symbolic link
+ - (bal) Mistaken in Cygwin scripts for ssh starting.  Patch by
+   Corinna Vinschen <vinschen@redhat.com> 
+ - (bal) disable privsep if no MAP_ANON.  We can re-enable it
+   after the release when we can do more testing.
+
+20020411
+ - (stevesk) [auth-sia.c] cleanup
+ - (tim) [acconfig.h defines.h includes.h] put includes in includes.h and
+   defines in defines.h [rijndael.c openbsd-compat/fake-socket.h
+   openbsd-compat/inet_aton.c] include "includes.h" instead of "config.h"
+   ok stevesk@
+
+20020410
+ - (stevesk) [configure.ac monitor.c] HAVE_SOCKETPAIR
+ - (stevesk) [auth-sia.c] compile fix Chris Adams <cmadams@hiwaay.net>
  - (bal) OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/09/20 00:15:54
-     [sshd.8]
-     fix ClientAliveCountMax
-   - markus@cvs.openbsd.org 2001/09/20 13:46:48
-     [auth2.c]
-     key_read returns now -1 or 1
-   - markus@cvs.openbsd.org 2001/09/20 13:50:40
-     [compat.c compat.h ssh.c]
-     bug compat: request a dummy channel for -N (no shell) sessions + 
-     cleanup; vinschen@redhat.com
-   - mouring@cvs.openbsd.org 2001/09/20 20:57:51
-     [sshd_config]
-     CheckMail removed.  OKed stevesk@
-
-20010919
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/09/19 10:08:51
-     [sshd.8]
-     command=xxx applies to subsystem now, too
-   - markus@cvs.openbsd.org 2001/09/19 13:23:29
-     [key.c]
-     key_read() now returns -1 on type mismatch, too
-   - stevesk@cvs.openbsd.org 2001/09/19 19:24:19
-     [readconf.c readconf.h scp.c sftp.c ssh.1]
-     add ClearAllForwardings ssh option and set it in scp and sftp; ok 
-     markus@
-   - stevesk@cvs.openbsd.org 2001/09/19 19:35:30
-     [authfd.c]
-     use sizeof addr vs. SUN_LEN(addr) for sockaddr_un.  Stevens 
-     blesses this and we do it this way elsewhere.  this helps in 
-     portable because not all systems have SUN_LEN() and 
-     sockaddr_un.sun_len.  ok markus@
-   - stevesk@cvs.openbsd.org 2001/09/19 21:04:53
-     [sshd.8]
-     missing -t in usage
-   - stevesk@cvs.openbsd.org 2001/09/19 21:41:57
-     [sshd.8]
-     don't advertise -V in usage; ok markus@
- - (bal) openbsd-compat/vis.[ch] is dead wood.  Removed.
-
-20010918
- - (djm) Configure support for smartcards. Based on Ben's work.
- - (djm) Revert setgroups call, it causes problems on OS-X
- - (djm) Avoid warning on BSDgetopt
- - (djm) More makefile infrastructre for smartcard support, also based
-   on Ben's work
- - (djm) Specify --datadir in RPM spec files so smartcard applet gets
-    put somewhere sane. Add Ssh.bin to manifest.
- - (djm) Make smartcard support conditional in Redhat RPM spec
- - (bal) LICENCE update.  Has not been done in a while.
- - (stevesk) nchan.c: we use X/Open Sockets on HP-UX now so shutdown(2)
-   returns ENOTCONN vs. EINVAL for socket not connected; remove EINVAL
-   check. ok Lutz Jaenicke
+   - markus@cvs.openbsd.org 2002/04/10 08:21:47
+     [auth1.c compat.c compat.h]
+     strip '@' from username only for KerbV and known broken clients, 
+     bug #204
+   - markus@cvs.openbsd.org 2002/04/10 08:56:01
+     [version.h]
+     OpenSSH_3.2
+ - Added p1 to idenify Portable release version.
+
+20020408
+ - (bal) Minor OpenSC updates.  Fix up header locations and update
+   README.smartcard provided by Juha Yrjölä <jyrjola@cc.hut.fi>
+
+20020407
+ - (stevesk) HAVE_CONTROL_IN_MSGHDR; not used right now.
+   Future: we may want to test if fd passing works correctly.
+ - (stevesk) [monitor_fdpass.c] fatal() for UsePrivilegeSeparation=yes
+   and no fd passing support.
+ - (stevesk) HAVE_MMAP and HAVE_SYS_MMAN_H and use them in
+   monitor_mm.c
+ - (stevesk) remove configure support for poll.h; it was removed
+   from sshd.c a long time ago.
+ - (stevesk) --with-privsep-user; default sshd
+ - (stevesk) wrap munmap() with HAVE_MMAP also.
+
+20020406
+ - (djm) Typo in Suse SPEC file. Fix from Carsten Grohmann 
+   <carsten.grohmann@dr-baldeweg.de>
+ - (bal) Added MAP_FAILED to allow AIX and Trusted HP to compile.
  - (bal) OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/09/17 17:57:57
-     [scp.1 scp.c sftp.1 sftp.c]
-     add -Fssh_config option; ok markus@
-   - stevesk@cvs.openbsd.org 2001/09/17 19:27:15
-     [kexdh.c kexgex.c key.c key.h ssh-dss.c ssh-keygen.c ssh-rsa.c]
-     u_char*/char* cleanup; ok markus
-   - markus@cvs.openbsd.org 2001/09/17 20:22:14
-     [scard.c]
-     never keep a connection to the smartcard open.
-     allows ssh-keygen -D U while the agent is running; report from 
-     jakob@
-   - stevesk@cvs.openbsd.org 2001/09/17 20:38:09
-     [sftp.1 sftp.c]
-     cleanup and document -1, -s and -S; ok markus@
-   - markus@cvs.openbsd.org 2001/09/17 20:50:22
-     [key.c ssh-keygen.c]
-     better error handling if you try to export a bad key to ssh.com
-   - markus@cvs.openbsd.org 2001/09/17 20:52:47
-     [channels.c channels.h clientloop.c]
-     try to fix agent-forwarding-backconnection-bug, as seen on HPUX, 
-     for example; with Lutz.Jaenicke@aet.TU-Cottbus.DE,
-   - markus@cvs.openbsd.org 2001/09/17 21:04:02
-     [channels.c serverloop.c]
-     don't send fake dummy packets on CR (\r)
-     bugreport from yyua@cs.sfu.ca via solar@@openwall.com
-   - markus@cvs.openbsd.org 2001/09/17 21:09:47
-     [compat.c]
-     more versions suffering the SSH_BUG_DEBUG bug;
-     3.0.x reported by dbutts@maddog.storability.com
-   - stevesk@cvs.openbsd.org 2001/09/17 23:56:07
-     [scp.1]
-     missing -B in usage string
-
-20010917
- - (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds
- - (tim) [includes.h openbsd-compat/getopt.c openbsd-compat/getopt.h]
-        rename getopt() to BSDgetopt() to keep form conflicting with
-        system getopt().
-        [Makefile.in configure.in] disable filepriv until I can add
-        missing procpriv calls.
-
-20010916
- - (djm) Workaround XFree breakage in RPM spec file
+   - djm@cvs.openbsd.org 2002/04/06 00:30:08
+     [sftp-client.c]
+     Fix occasional corruption on upload due to bad reuse of request 
+     id, spotted by chombier@mac.com; ok markus@
+   - mouring@cvs.openbsd.org 2002/04/06 18:24:09
+     [scp.c]
+     Fixes potental double // within path.
+     http://bugzilla.mindrot.org/show_bug.cgi?id=76
+ - (bal) Slight update to OpenSC support.  Better version checking. patch
+   by Juha Yrjölä <jyrjola@cc.hut.fi> 
+ - (bal) Revered out of runtime IRIX detection of joblimits.  Code is
+   incomplete.
+ - (bal) Quiet down configure.ac if /bin/test does not exist.
+ - (bal) We no longer use atexit()/xatexit()/on_exit()
+
+20020405
+ - (bal) Patch for OpenSC SmartCard library; ok markus@; patch by
+   Juha Yrjölä <jyrjola@cc.hut.fi>
+ - (bal) Minor documentation update to reflect smartcard library
+   support changes.
+ - (bal) Too many <sys/queue.h> issues.  Remove all workarounds and
+   using internal version only.
  - (bal) OpenBSD CVS Sync
-    - markus@cvs.openbsd.org 2001/09/16 14:46:54
-      [session.c]
-      calls krb_afslog() after setting $HOME; mattiasa@e.kth.se; fixes
-      pr 1943b
-
-20010915
- - (djm) Make do_pre_login static to avoid prototype #ifdef hell
- - (djm) Sync scard/ stuff
- - (djm) Redhat spec file cleanups from Pekka Savola <pekkas@netcore.fi> and
-   Redhat
- - (djm) Redhat initscript config sanity checking from Pekka Savola 
-   <pekkas@netcore.fi>
- - (djm) Clear supplemental groups at sshd start to prevent them from 
-   being propogated to random PAM modules. Based on patch from Redhat via
-   Pekka Savola <pekkas@netcore.fi>
- - (djm) Make sure rijndael.c picks config.h
- - (djm) Ensure that u_char gets defined
+   - stevesk@cvs.openbsd.org 2002/04/05 20:56:21
+     [sshd.8]
+     clarify sshrc some and handle X11UseLocalhost=yes; ok markus@
 
-20010914
+20020404
+ - (stevesk) [auth-pam.c auth-pam.h auth-passwd.c auth-sia.c auth-sia.h
+    auth1.c auth2.c] PAM, OSF_SIA password auth cleanup; from djm.
  - (bal) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/09/13
-     [rijndael.c rijndael.h]
-     missing $OpenBSD
-   - markus@cvs.openbsd.org 2001/09/14
+   - markus@cvs.openbsd.org 2002/04/03 09:26:11
+     [cipher.c myproposal.h]
+     re-add rijndael-cbc@lysator.liu.se for MacSSH; ash@lab.poc.net
+
+20020402
+ - (bal) Hand Sync of scp.c (reverted to upstream code)
+   - deraadt@cvs.openbsd.org 2002/03/30 17:45:46
+     [scp.c]
+     stretch banners
+ - (bal) CVS ID sync of uidswap.c
+ - (bal) OpenBSD CVS Sync (now for the real sync)
+   - markus@cvs.openbsd.org 2002/03/27 22:21:45
+     [ssh-keygen.c]
+     try to import keys with extra trailing === (seen with ssh.com < 
+     2.0.12)
+   - markus@cvs.openbsd.org 2002/03/28 15:34:51
      [session.c]
-     command=xxx overwrites subsystems, too
-   - markus@cvs.openbsd.org 2001/09/14
-     [sshd.c]
-     typo
-
-20010913
- - (bal) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/08/23 11:31:59
-     [cipher.c cipher.h]
-     switch to the optimised AES reference code from
-     http://www.esat.kuleuven.ac.be/~rijmen/rijndael/rijndael-fst-3.0.zip
-
-20010912
+     do not call record_login twice (for use_privsep)
+   - markus@cvs.openbsd.org 2002/03/29 18:59:32
+     [session.c session.h]
+     retrieve last login time before the pty is allocated, store per 
+     session
+   - stevesk@cvs.openbsd.org 2002/03/29 19:16:22
+     [sshd.8]
+     RSA key modulus size minimum 768; ok markus@
+   - stevesk@cvs.openbsd.org 2002/03/29 19:18:33
+     [auth-rsa.c ssh-rsa.c ssh.h]
+     make RSA modulus minimum #define; ok markus@
+   - markus@cvs.openbsd.org 2002/03/30 18:51:15
+     [monitor.c serverloop.c sftp-int.c sftp.c sshd.c]
+     check waitpid for EINTR; based on patch from peter@ifm.liu.se
+   - markus@cvs.openbsd.org 2002/04/01 22:02:16
+     [sftp-client.c]
+     20480 is an upper limit for older server
+   - markus@cvs.openbsd.org 2002/04/01 22:07:17
+     [sftp-client.c]
+     fallback to stat if server does not support lstat
+   - markus@cvs.openbsd.org 2002/04/02 11:49:39
+     [ssh-agent.c]
+     check $SHELL for -k and -d, too;
+     http://bugzilla.mindrot.org/show_bug.cgi?id=199
+   - markus@cvs.openbsd.org 2002/04/02 17:37:48
+     [sftp.c]
+     always call log_init()
+   - markus@cvs.openbsd.org 2002/04/02 20:11:38
+     [ssh-rsa.c]
+     ignore SSH_BUG_SIGBLOB for ssh-rsa; #187
+ - (bal) mispelling in uidswap.c (portable only)
+
+20020401
+ - (stevesk) [monitor.c] PAM should work again; will *not* work with
+   UsePrivilegeSeparation=yes.
+ - (stevesk) [auth1.c] fix password auth for protocol 1 when
+   !USE_PAM && !HAVE_OSF_SIA; merge issue.
+
+20020331
+ - (tim) [configure.ac] use /bin/test -L to work around broken builtin on
+   Solaris 8
+ - (tim) [sshconnect2.c] change uint32_t to u_int32_t
+
+20020330
+ - (stevesk) [configure.ac] remove header check for sys/ttcompat.h
+   bug 167
+
+20020327
+ - (bal) 'pw' should be 'authctxt->pw' in auth1.c spotted by 
+   kent@lysator.liu.se
  - (bal) OpenBSD CVS Sync
-   - jakob@cvs.openbsd.org 2001/08/16 19:18:34
-     [servconf.c servconf.h session.c sshd.8]
-     deprecate CheckMail. ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/16 20:14:57
-     [ssh.1 sshd.8]
-     document case sensitivity for ssh, sshd and key file
-     options and arguments; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/17 18:59:47
-     [servconf.h]
-     typo in comment
-   - stevesk@cvs.openbsd.org 2001/08/21 21:47:42
+   - markus@cvs.openbsd.org 2002/03/26 11:34:49
      [ssh.1 sshd.8]
-     minor typos and cleanup
-   - stevesk@cvs.openbsd.org 2001/08/22 16:21:21
-     [ssh.1]
-     hostname not optional; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/22 16:30:02
-     [sshd.8]
-     no rexd; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/22 17:45:16
-     [ssh.1]
-     document cipher des for protocol 1; ok deraadt@
-   - camield@cvs.openbsd.org 2001/08/23 17:59:31
+     update to recent drafts
+   - markus@cvs.openbsd.org 2002/03/26 11:37:05
+     [ssh.c]
+     update Copyright
+   - markus@cvs.openbsd.org 2002/03/26 15:23:40
+     [bufaux.c]
+     do not talk about packets in bufaux
+   - rees@cvs.openbsd.org 2002/03/26 18:46:59
+     [scard.c]
+     try_AUT0 in read_pubkey too, for those paranoid few who want to 
+     acl 'sh'
+   - markus@cvs.openbsd.org 2002/03/26 22:50:39
+     [channels.h]
+     CHANNEL_EFD_OUTPUT_ACTIVE is false for CHAN_CLOSE_RCVD, too
+   - markus@cvs.openbsd.org 2002/03/26 23:13:03
+     [auth-rsa.c]
+     disallow RSA keys < 768 for protocol 1, too (rhosts-rsa and rsa auth)
+   - markus@cvs.openbsd.org 2002/03/26 23:14:51
+     [kex.c]
+     generate a new cookie for each SSH2_MSG_KEXINIT message we send out
+   - mouring@cvs.openbsd.org 2002/03/27 11:45:42
+     [monitor.c]
+     monitor_allowed_key() returns int instead of pointer.  ok markus@
+  
+20020325
+ - (stevesk) import OpenBSD <sys/tree.h> as "openbsd-compat/tree.h"
+ - (bal) OpenBSD CVS Sync
+   - stevesk@cvs.openbsd.org 2002/03/23 20:57:26
      [sshd.c]
-     end request with 0, not NULL
-     ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/23 18:02:48
-     [ssh-agent.1]
-     fix usage; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/23 18:08:59
-     [ssh-add.1 ssh-keyscan.1]
-     minor cleanup
-   - danh@cvs.openbsd.org 2001/08/27 22:02:13
-     [ssh-keyscan.c]
-     fix memory fault if non-existent filename is given to the -f option
-     ok markus@
-   - markus@cvs.openbsd.org 2001/08/28 09:51:26
-     [readconf.c]
-     don't set DynamicForward unless Host matches
-   - markus@cvs.openbsd.org 2001/08/28 15:39:48
-     [ssh.1 ssh.c]
-     allow: ssh -F configfile host
-   - markus@cvs.openbsd.org 2001/08/29 20:44:03
-     [scp.c]
-     clear the malloc'd buffer, otherwise source() will leak malloc'd 
-     memory; ok theo@
-   - stevesk@cvs.openbsd.org 2001/08/29 23:02:21
-     [sshd.8]
-     add text about -u0 preventing DNS requests; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/29 23:13:10
-     [ssh.1 ssh.c]
-     document -D and DynamicForward; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/29 23:27:23
+     setproctitle() after preauth child; ok markus@
+   - markus@cvs.openbsd.org 2002/03/24 16:00:27
+     [serverloop.c]
+     remove unused debug
+   - markus@cvs.openbsd.org 2002/03/24 16:01:13
+     [packet.c]
+     debug->debug3 for extra padding
+   - stevesk@cvs.openbsd.org 2002/03/24 17:27:03
+     [kexgex.c]
+     typo; ok markus@
+   - stevesk@cvs.openbsd.org 2002/03/24 17:53:16
+     [monitor_fdpass.c]
+     minor cleanup and more error checking; ok markus@
+   - markus@cvs.openbsd.org 2002/03/24 18:05:29
+     [scard.c]
+     we need to figure out AUT0 for sc_private_encrypt, too
+   - stevesk@cvs.openbsd.org 2002/03/24 23:20:00
+     [monitor.c]
+     remove "\n" from fatal()
+   - markus@cvs.openbsd.org 2002/03/25 09:21:13
+     [auth-rsa.c]
+     return 0 (not NULL); tomh@po.crl.go.jp
+   - markus@cvs.openbsd.org 2002/03/25 09:25:06
+     [auth-rh-rsa.c]
+     rm bogus comment
+   - markus@cvs.openbsd.org 2002/03/25 17:34:27
+     [scard.c scard.h ssh-agent.c ssh-keygen.c ssh.c]
+     change sc_get_key to sc_get_keys and hide smartcard details in scard.c
+   - stevesk@cvs.openbsd.org 2002/03/25 20:12:10
+     [monitor_mm.c monitor_wrap.c]
+     ssize_t args use "%ld" and cast to (long)
+     size_t args use "%lu" and cast to (u_long)
+     ok markus@ and thanks millert@
+   - markus@cvs.openbsd.org 2002/03/25 21:04:02
      [ssh.c]
-     validate ports for -L/-R; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/29 23:39:40
-     [ssh.1 sshd.8]
-     additional documentation for GatewayPorts; ok markus@
-   - naddy@cvs.openbsd.org 2001/08/30 15:42:36
-     [ssh.1]
-     add -D to synopsis line; ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/30 16:04:35
-     [readconf.c ssh.1]
-     validate ports for LocalForward/RemoteForward.
-     add host/port alternative syntax for IPv6 (like -L/-R).
-     ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/30 20:36:34
-     [auth-options.c sshd.8]
-     validate ports for permitopen key file option. add host/port
-     alternative syntax for IPv6. ok markus@
-   - markus@cvs.openbsd.org 2001/08/30 22:22:32
-     [ssh-keyscan.c]
-     do not pass pointers to longjmp; fix from wayne@blorf.net
-   - markus@cvs.openbsd.org 2001/08/31 11:46:39
-     [sshconnect2.c]
-     disable kbd-interactive if we don't get SSH2_MSG_USERAUTH_INFO_REQUEST
-     messages
-   - stevesk@cvs.openbsd.org 2001/09/03 20:58:33
-     [readconf.c readconf.h ssh.c]
-     fatal() for nonexistent -Fssh_config. ok markus@
-   - deraadt@cvs.openbsd.org 2001/09/05 06:23:07
-     [scp.1 sftp.1 ssh.1 ssh-agent.1 sshd.8 ssh-keygen.1 ssh-keyscan.1]
-     avoid first person in manual pages
-   - stevesk@cvs.openbsd.org 2001/09/12 18:18:25
-     [scp.c]
-     don't forward agent for non third-party copies; ok markus@
-
-20010815
- - (bal) Fixed stray code in readconf.c that went in by mistake.
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/08/07 10:37:46
-     [authfd.c authfd.h]
-     extended failure messages from galb@vandyke.com
-   - deraadt@cvs.openbsd.org 2001/08/08 07:16:58
-     [scp.1]
-     when describing the -o option, give -o Protocol=1 as the specific example
-     since we are SICK AND TIRED of clueless people who cannot have difficulty
-     thinking on their own.
-   - markus@cvs.openbsd.org 2001/08/08 18:20:15
-     [uidswap.c]
-     permanently_set_uid is a noop if user is not privilegued;
-     fixes bug on solaris; from sbi@uchicago.edu
-   - markus@cvs.openbsd.org 2001/08/08 21:34:19
-     [uidswap.c]
-     undo last change; does not work for sshd
-   - jakob@cvs.openbsd.org 2001/08/11 22:51:27
-     [ssh.c tildexpand.c]
-     fix more paths beginning with "//"; <bradshaw@staff.crosswalk.com>. 
-     ok markus@
-   - stevesk@cvs.openbsd.org 2001/08/13 23:38:54
-     [scp.c]
-     don't need main prototype (also sync with rcp); ok markus@
-   - markus@cvs.openbsd.org 2001/08/14 09:23:02
-     [sftp.1 sftp-int.c]
-     "bye"; hk63a@netscape.net
-   - stevesk@cvs.openbsd.org 2001/08/14 17:54:29
-     [scp.1 sftp.1 ssh.1]
-     consistent documentation and example of ``-o ssh_option'' for sftp and
-     scp; document keyword=argument for ssh.
- - (bal) QNX resync.   OK tim@
-
-20010814
- - (stevesk) sshpty.c, cray.[ch]: whitespace, formatting and cleanup
-   for some #ifdef _CRAY code; ok wendyp@cray.com
- - (stevesk) sshpty.c: return 0 on error in cray pty code;
-   ok wendyp@cray.com
- - (stevesk) bsd-cray.c: utmp strings are not C strings
- - (stevesk) bsd-cray.c: more cleanup; ok wendyp@cray.com
-
-20010812
- - (djm) Fix detection of long long int support. Based on patch from 
-   Michael Stone <mstone@cs.loyola.edu>. ok stevesk, tim
-
-20010808
- - (bal) Minor correction to inet_ntop.h.  _BSD_RRESVPORT_H should be
-   _BSD_INET_NTOP_H.  Pointed out by Mark Miller <markm@swoon.net> 
-
-20010807
- - (tim) [configure.in sshconnect.c openbsd-compat/Makefile.in
-        openbsd-compat/openbsd-compat.h ] Add inet_ntop.c inet_ntop.h back
-        in. Needed for sshconnect.c
-        [sshconnect.c] fix INET6_ADDRSTRLEN for non IPv6 machines
-        [configure.in] make tests with missing libraries fail
-        patch by Wendy Palm <wendyp@cray.com>
-        Added openbsd-compat/bsd-cray.h. Selective patches from
-        William L. Jones <jones@mail.utexas.edu> 
+     simplify num_identity_files handling
+   - markus@cvs.openbsd.org 2002/03/25 21:13:51
+     [channels.c channels.h compat.c compat.h nchan.c]
+     don't send stderr data after EOF, accept this from older known 
+     (broken) sshd servers only, fixes
+     http://bugzilla.mindrot.org/show_bug.cgi?id=179
+   - stevesk@cvs.openbsd.org 2002/03/26 03:24:01
+     [monitor.h monitor_fdpass.h monitor_mm.h monitor_wrap.h]
+     $OpenBSD$
 
-20010806
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/07/22 21:32:27
-     [sshpty.c]
-     update comment
-   - pvalchev@cvs.openbsd.org 2001/07/22 21:32:42
-     [ssh.1]
-     There is no option "Compress", point to "Compression" instead; ok 
-     markus
-   - markus@cvs.openbsd.org 2001/07/22 22:04:19
-     [readconf.c ssh.1]
-     enable challenge-response auth by default; ok millert@
-   - markus@cvs.openbsd.org 2001/07/22 22:24:16
-     [sshd.8]
-     Xr login.conf
-   - markus@cvs.openbsd.org 2001/07/23 09:06:28
-     [sshconnect2.c]
-     reorder default sequence of userauth methods to match ssh behaviour:
-     hostbased,publickey,keyboard-interactive,password
-   - markus@cvs.openbsd.org 2001/07/23 12:47:05
-     [ssh.1]
-     sync PreferredAuthentications
-   - aaron@cvs.openbsd.org 2001/07/23 14:14:18
-     [ssh-keygen.1]
-     Fix typo.
-   - stevesk@cvs.openbsd.org 2001/07/23 18:14:58
-     [auth2.c auth-rsa.c]
-     use %lu; ok markus@
-   - stevesk@cvs.openbsd.org 2001/07/23 18:21:46
-     [xmalloc.c]
-     no zero size xstrdup() error; ok markus@
-   - markus@cvs.openbsd.org 2001/07/25 11:59:35
+20020324
+ - (stevesk) [session.c] disable LOGIN_NEEDS_TERM until we are sure
+   it can be removed. only used on solaris. will no longer compile with
+   privsep shuffling.
+
+20020322
+ - (stevesk) HAVE_ACCRIGHTS_IN_MSGHDR configure support
+ - (stevesk) [monitor.c monitor_wrap.c] #ifdef HAVE_PW_CLASS_IN_PASSWD
+ - (stevesk) configure and cpp __FUNCTION__ gymnastics to handle nielsisms
+ - (stevesk) [monitor_fdpass.c] support for access rights style file
+   descriptor passing
+ - (stevesk) [auth2.c] merge cleanup/sync
+ - (stevesk) [defines.h] hp-ux 11 has ancillary data style fd passing, but
+   is missing CMSG_LEN() and CMSG_SPACE() macros.
+ - (stevesk) [defines.h] #define MAP_ANON MAP_ANONYMOUS for HP-UX; other
+   platforms may need this--I'm not sure.  mmap() issues will need to be
+   addressed further.
+ - (tim) [cipher.c] fix problem with OpenBSD sync
+ - (stevesk) [LICENCE] OpenBSD sync
+
+20020321
+ - (bal) OpenBSD CVS Sync
+   - itojun@cvs.openbsd.org 2002/03/08 06:10:16
+     [sftp-client.c]
+     printf type mismatch
+   - itojun@cvs.openbsd.org 2002/03/11 03:18:49
+     [sftp-client.c]
+     correct type mismatches (u_int64_t != unsigned long long)
+   - itojun@cvs.openbsd.org 2002/03/11 03:19:53
+     [sftp-client.c]
+     indent
+   - markus@cvs.openbsd.org 2002/03/14 15:24:27
+     [sshconnect1.c]
+     don't trust size sent by (rogue) server; noted by 
+     s.esser@e-matters.de
+   - markus@cvs.openbsd.org 2002/03/14 16:38:26
+     [sshd.c]
+     split out ssh1 session key decryption; ok provos@
+   - markus@cvs.openbsd.org 2002/03/14 16:56:33
+     [auth-rh-rsa.c auth-rsa.c auth.h]
+     split auth_rsa() for better readability and privsep; ok provos@
+   - itojun@cvs.openbsd.org 2002/03/15 11:00:38
+     [auth.c]
+     fix file type checking (use S_ISREG).  ok by markus
+   - markus@cvs.openbsd.org 2002/03/16 11:24:53
+     [compress.c]
+     skip inflateEnd if inflate fails; ok provos@
+   - markus@cvs.openbsd.org 2002/03/16 17:22:09
+     [auth-rh-rsa.c auth.h]
+     split auth_rhosts_rsa(), ok provos@
+   - stevesk@cvs.openbsd.org 2002/03/16 17:41:25
+     [auth-krb5.c]
+     BSD license.  from Daniel Kouril via Dug Song.  ok markus@
+   - provos@cvs.openbsd.org 2002/03/17 20:25:56
+     [auth.c auth.h auth1.c auth2.c]
+     getpwnamallow returns struct passwd * only if user valid; 
+     okay markus@
+   - provos@cvs.openbsd.org 2002/03/18 01:12:14
+     [auth.h auth1.c auth2.c sshd.c]
+     have the authentication functions return the authentication context
+     and then do_authenticated; okay millert@
+   - dugsong@cvs.openbsd.org 2002/03/18 01:30:10
+     [auth-krb4.c]
+     set client to NULL after xfree(), from Rolf Braun 
+     <rbraun+ssh@andrew.cmu.edu>
+   - provos@cvs.openbsd.org 2002/03/18 03:41:08
+     [auth.c session.c]
+     move auth_approval into getpwnamallow with help from millert@
+   - markus@cvs.openbsd.org 2002/03/18 17:13:15
+     [cipher.c cipher.h]
+     export/import cipher states; needed by ssh-privsep
+   - markus@cvs.openbsd.org 2002/03/18 17:16:38
+     [packet.c packet.h]
+     export/import cipher state, iv and ssh2 seqnr; needed by ssh-privsep
+   - markus@cvs.openbsd.org 2002/03/18 17:23:31
+     [key.c key.h]
+     add key_demote() for ssh-privsep
+   - provos@cvs.openbsd.org 2002/03/18 17:25:29
+     [bufaux.c bufaux.h]
+     buffer_skip_string and extra sanity checking; needed by ssh-privsep
+   - provos@cvs.openbsd.org 2002/03/18 17:31:54
+     [compress.c]
+     export compression streams for ssh-privsep
+   - provos@cvs.openbsd.org 2002/03/18 17:50:31
+     [auth-bsdauth.c auth-options.c auth-rh-rsa.c auth-rsa.c]
+     [auth-skey.c auth.h auth1.c auth2-chall.c auth2.c kex.c kex.h kexdh.c]
+     [kexgex.c servconf.c]
+     [session.h servconf.h serverloop.c session.c sshd.c]
+     integrate privilege separated openssh; its turned off by default 
+     for now. work done by me and markus@
+   - provos@cvs.openbsd.org 2002/03/18 17:53:08
+     [sshd.8]
+     credits for privsep
+   - provos@cvs.openbsd.org 2002/03/18 17:59:09
+     [sshd.8]
+     document UsePrivilegeSeparation
+   - stevesk@cvs.openbsd.org 2002/03/18 23:52:51
+     [servconf.c]
+     UnprivUser/UnprivGroup usable now--specify numeric user/group; ok
+     provos@
+   - stevesk@cvs.openbsd.org 2002/03/19 03:03:43
+     [pathnames.h servconf.c servconf.h sshd.c]
+     _PATH_PRIVSEP_CHROOT_DIR; ok provos@
+   - stevesk@cvs.openbsd.org 2002/03/19 05:23:08
+     [sshd.8]
+     Banner has no default.
+   - mpech@cvs.openbsd.org 2002/03/19 06:32:56
+     [sftp-int.c]
+     use xfree() after xstrdup().
+
+     markus@ ok
+   - markus@cvs.openbsd.org 2002/03/19 10:35:39
+     [auth-options.c auth.h session.c session.h sshd.c]
+     clean up prototypes
+   - markus@cvs.openbsd.org 2002/03/19 10:49:35
+     [auth-krb5.c auth-rh-rsa.c auth.c cipher.c key.c misc.h]
+     [packet.c session.c sftp-client.c sftp-glob.h sftp.c ssh-add.c ssh.c]
+     [sshconnect2.c sshd.c ttymodes.c]
+     KNF whitespace
+   - markus@cvs.openbsd.org 2002/03/19 14:27:39
+     [auth.c auth1.c auth2.c]
+     make getpwnamallow() allways call pwcopy()
+   - markus@cvs.openbsd.org 2002/03/19 15:31:47
+     [auth.c]
+     check for NULL; from provos@
+   - stevesk@cvs.openbsd.org 2002/03/20 19:12:25
+     [servconf.c servconf.h ssh.h sshd.c]
+     for unprivileged user, group do:
+     pw=getpwnam(SSH_PRIVSEP_USER); do_setusercontext(pw).  ok provos@
+   - stevesk@cvs.openbsd.org 2002/03/20 21:08:08
+     [sshd.c]
+     strerror() on chdir() fail; ok provos@
+   - markus@cvs.openbsd.org 2002/03/21 10:21:20
+     [ssh-add.c]
+     ignore errors for nonexisting default keys in ssh-add,
+     fixes http://bugzilla.mindrot.org/show_bug.cgi?id=158
+   - jakob@cvs.openbsd.org 2002/03/21 15:17:26
+     [clientloop.c ssh.1]
+     add built-in command line for adding new port forwardings on the fly.
+     based on a patch from brian wellington. ok markus@.
+   - markus@cvs.openbsd.org 2002/03/21 16:38:06
      [scard.c]
-     typo in comment
-   - markus@cvs.openbsd.org 2001/07/25 14:35:18
-     [readconf.c ssh.1 ssh.c sshconnect.c]
-     cleanup connect(); connection_attempts 4 -> 1; from 
-     eivind@freebsd.org
-   - stevesk@cvs.openbsd.org 2001/07/26 17:18:22
-     [sshd.8 sshd.c]
-     add -t option to test configuration file and keys; pekkas@netcore.fi
-     ok markus@
-   - rees@cvs.openbsd.org 2001/07/26 20:04:27
-     [scard.c ssh-keygen.c]
-     Inquire Cyberflex class for 0xf0 cards
-     change aid to conform to 7816-5
-     remove gratuitous fid selects
-   - millert@cvs.openbsd.org 2001/07/27 14:50:45
-     [ssh.c]
-     If smart card support is compiled in and a smart card is being used
-     for authentication, make it the first method used.  markus@ OK
-   - deraadt@cvs.openbsd.org 2001/07/27 17:26:16
-     [scp.c]
-     shorten lines
-   - markus@cvs.openbsd.org 2001/07/28 09:21:15
-     [sshd.8]
-     cleanup some RSA vs DSA vs SSH1 vs SSH2 notes
-   - mouring@cvs.openbsd.org 2001/07/29 17:02:46
-     [scp.1]
-     Clarified -o option in scp.1  OKed by Markus@
-   - jakob@cvs.openbsd.org 2001/07/30 16:06:07
-     [scard.c scard.h]
-     better errorcodes from sc_*; ok markus@
-   - stevesk@cvs.openbsd.org 2001/07/30 16:23:30
-     [rijndael.c rijndael.h]
-     new BSD-style license:
-     Brian Gladman <brg@gladman.plus.com>:
-     >I have updated my code at:
-     >http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm
-     >with a copyright notice as follows:
-     >[...]
-     >I am not sure which version of my old code you are using but I am
-     >happy for the notice above to be substituted for my existing copyright
-     >intent if this meets your purpose.
-   - jakob@cvs.openbsd.org 2001/07/31 08:41:10
+     make compile w/ openssl 0.9.7
+   - markus@cvs.openbsd.org 2002/03/21 16:54:53
+     [scard.c scard.h ssh-keygen.c]
+     move key upload to scard.[ch]
+   - markus@cvs.openbsd.org 2002/03/21 16:57:15
      [scard.c]
-     do not complain about missing smartcards. ok markus@
-   - jakob@cvs.openbsd.org 2001/07/31 09:28:44
-     [readconf.c readconf.h ssh.1 ssh.c]
-     add 'SmartcardDevice' client option to specify which smartcard device 
-     is used to access a smartcard used for storing the user's private RSA 
-     key. ok markus@.
-   - jakob@cvs.openbsd.org 2001/07/31 12:42:50
-     [sftp-int.c sftp-server.c]
-     avoid paths beginning with "//"; <vinschen@redhat.com>
-     ok markus@
-   - jakob@cvs.openbsd.org 2001/07/31 12:53:34
+     remove const
+   - markus@cvs.openbsd.org 2002/03/21 16:58:13
+     [clientloop.c]
+     remove unused
+   - rees@cvs.openbsd.org 2002/03/21 18:08:15
      [scard.c]
-     close smartcard connection if card is missing
-   - markus@cvs.openbsd.org 2001/08/01 22:03:33
-     [authfd.c authfd.h readconf.c readconf.h scard.c scard.h ssh-add.c 
-      ssh-agent.c ssh.c]
-     use strings instead of ints for smartcard reader ids
-   - markus@cvs.openbsd.org 2001/08/01 22:16:45
-     [ssh.1 sshd.8]
-     refer to current ietf drafts for protocol v2
-   - markus@cvs.openbsd.org 2001/08/01 23:33:09
-     [ssh-keygen.c]
-     allow uploading RSA keys for non-default AUT0 (sha1 over passphrase 
-     like sectok).
-  - markus@cvs.openbsd.org 2001/08/01 23:38:45
-     [scard.c ssh.c]
-     support finish rsa keys.
-     free public keys after login -> call finish -> close smartcard.
-   - markus@cvs.openbsd.org 2001/08/02 00:10:17
-     [ssh-keygen.c]
-     add -D readerid option (download, i.e. print public RSA key to stdout).
-     check for card present when uploading keys.
-     use strings instead of ints for smartcard reader ids, too.
-   - jakob@cvs.openbsd.org 2001/08/02 08:58:35
-     [ssh-keygen.c]
-     change -u (upload smartcard key) to -U. ok markus@
-   - jakob@cvs.openbsd.org 2001/08/02 15:06:52
-     [ssh-keygen.c]
-     more verbose usage(). ok markus@
-   - jakob@cvs.openbsd.org 2001/08/02 15:07:23
-     [ssh-keygen.1]
-     document smartcard upload/download. ok markus@
-   - jakob@cvs.openbsd.org 2001/08/02 15:32:10
-     [ssh.c]
-     add smartcard to usage(). ok markus@
-   - jakob@cvs.openbsd.org 2001/08/02 15:43:57
-     [ssh-agent.c ssh.c ssh-keygen.c]
-     add /* SMARTCARD */ to #else/#endif. ok markus@
-  - jakob@cvs.openbsd.org 2001/08/02 16:14:05
-     [scard.c ssh-agent.c ssh.c ssh-keygen.c]
-     clean up some /* SMARTCARD */. ok markus@
-   - mpech@cvs.openbsd.org 2001/08/02 18:37:35
-     [ssh-keyscan.1]
-     o) .Sh AUTHOR -> .Sh AUTHORS;
-     o) .Sh EXAMPLE -> .Sh EXAMPLES;
-     o) Delete .Sh OPTIONS. Text moved to .Sh DESCRIPTION;
-     millert@ ok
-   - jakob@cvs.openbsd.org 2001/08/03 10:31:19
-     [ssh-add.1]
-     document smartcard options. ok markus@
-   - jakob@cvs.openbsd.org 2001/08/03 10:31:30
-     [ssh-add.c ssh-agent.c ssh-keyscan.c]
-     improve usage(). ok markus@
-   - markus@cvs.openbsd.org 2001/08/05 23:18:20
-     [ssh-keyscan.1 ssh-keyscan.c]
-     ssh 2 support; from wayned@users.sourceforge.net
-   - markus@cvs.openbsd.org 2001/08/05 23:29:58
-     [ssh-keyscan.c]
-     make -t dsa work with commercial servers, too
-   - stevesk@cvs.openbsd.org 2001/08/06 19:47:05
-     [scp.c]
-     use alarm vs. setitimer for portable; ok markus@
- - (bal) ssh-keyscan double -lssh hack due to seed_rng().
- - (bal) Second around of UNICOS patches.  A few other things left. 
-   Patches by William L. Jones <jones@mail.utexas.edu> 
-
-20010803
- - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on
-   a fast UltraSPARC.
-
-20010726
- - (stevesk) use mysignal() in protocol 1 loop now that the SIGCHLD
-   handler has converged.
-
-20010725
- - (bal) Added 'install-nokeys' to Makefile to assist package builders.
-
-20010724
- - (bal) 4711 not 04711 for ssh binary.
-
-20010722
- - (bal) Starting the Unicossmk merger.  File merged TODO, configure.in,
-        myproposal.h, ssh_prng_cmds.in, and openbsd-compat/Makefile.in.
-        Added openbsd-compat/bsd-cray.c.  Rest will be merged after
-        approval.  Selective patches from William L. Jones 
-        <jones@mail.utexas.edu> 
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/07/18 21:10:43
-     [sshpty.c]
-     pr #1946, allow sshd if /dev is readonly
-   - stevesk@cvs.openbsd.org 2001/07/18 21:40:40
-     [ssh-agent.c]
-     chdir("/") from bbraun@synack.net; ok markus@
-   - stevesk@cvs.openbsd.org 2001/07/19 00:41:44
-     [ssh.1]
-     escape chars are below now
-   - markus@cvs.openbsd.org 2001/07/20 14:46:11
-     [ssh-agent.c]
-     do not exit() from signal handlers; ok deraadt@
-   - stevesk@cvs.openbsd.org 2001/07/20 18:41:51
-     [ssh.1]
-     "the" command line
-
-20010719
- - (tim) [configure.in] put inet_aton back in AC_CHECK_FUNCS.
-        report from Mark Miller <markm@swoon.net>
-
-20010718
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/07/14 15:10:17
-     [readpass.c sftp-client.c sftp-common.c sftp-glob.c]
-     delete spurious #includes; ok deraadt@ markus@
-   - markus@cvs.openbsd.org 2001/07/15 16:17:08
-     [serverloop.c]
-     schedule client alive for ssh2 only, greg@cheers.bungi.com
-   - stevesk@cvs.openbsd.org 2001/07/15 16:57:21
-     [ssh-agent.1]
-     -d will not fork; ok markus@
-   - stevesk@cvs.openbsd.org 2001/07/15 16:58:29
-     [ssh-agent.c]
-     typo in usage; ok markus@
-   - markus@cvs.openbsd.org 2001/07/17 20:48:42
-     [ssh-agent.c]
-     update maxfd if maxfd is closed; report from jmcelroy@dtgnet.com
-   - markus@cvs.openbsd.org 2001/07/17 21:04:58
-     [channels.c channels.h clientloop.c nchan.c serverloop.c]
-     keep track of both maxfd and the size of the malloc'ed fdsets.
-     update maxfd if maxfd gets closed.
-   - mouring@cvs.openbsd.org 2001/07/18 16:45:52
-     [scp.c]
-     Missing -o in scp usage()
- - (bal) Cleaned up trailing spaces in ChangeLog.
- - (bal) Allow sshd to switch user context without password for Cygwin.
-         Patch by Corinna Vinschen <vinschen@redhat.com>
- - (bal) Updated cygwin README and ssh-host-config.  Patch by
-        Corinna Vinschen <vinschen@redhat.com>
-
-20010715
- - (bal) Set "BROKEN_GETADDRINFO" for darwin platform.  Reported by
-   Josh Larios <jdlarios@cac.washington.edu>
- - (tim) put openssh/openbsd-compat/inet_aton.[ch] back in.
-        needed by openbsd-compat/fake-getaddrinfo.c
-
-20010714
- - (stevesk) change getopt() declaration
- - (stevesk) configure.in: use ll suffix for long long constant
-   in snprintf() test
-
-20010713
- - (djm) Enable /etc/nologin check on PAM systems, as some lack the
-   pam_nologin module. Report from William Yodlowsky
-   <bsd@openbsd.rutgers.edu>
- - (djm) Revert dirname fix, a better one is on its way.
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/07/04 22:47:19
-     [ssh-agent.c]
-     ignore SIGPIPE when debugging, too
-   - markus@cvs.openbsd.org 2001/07/04 23:13:10
-     [scard.c scard.h ssh-agent.c]
-     handle card removal more gracefully, add sc_close() to scard.h
-   - markus@cvs.openbsd.org 2001/07/04 23:39:07
-     [ssh-agent.c]
-     for smartcards remove both RSA1/2 keys
-   - markus@cvs.openbsd.org 2001/07/04 23:49:27
-     [ssh-agent.c]
-     handle mutiple adds of the same smartcard key
-   - espie@cvs.openbsd.org 2001/07/05 11:43:33
-     [sftp-glob.c]
-     Directly cast to the right type. Ok markus@
-   - stevesk@cvs.openbsd.org 2001/07/05 20:32:47
-     [sshconnect1.c]
-     statement after label; ok dugsong@
-   - stevesk@cvs.openbsd.org 2001/07/08 15:23:38
-     [servconf.c]
-     fix ``MaxStartups max''; ok markus@
-   - fgsch@cvs.openbsd.org 2001/07/09 05:58:47
-     [ssh.c]
-     Use getopt(3); markus@ ok.
-   - deraadt@cvs.openbsd.org 2001/07/09 07:04:53
-     [session.c sftp-int.c]
-     correct type on last arg to execl(); nordin@cse.ogi.edu
-   - markus@cvs.openbsd.org 2001/07/10 21:49:12
-     [readpass.c]
-     don't panic if fork or pipe fail (just return an empty passwd).
-   - itojun@cvs.openbsd.org 2001/07/11 00:24:53
-     [servconf.c]
-     make it compilable in all 4 combination of KRB4/KRB5 settings.
-     dugsong ok
-     XXX isn't it sensitive to the order of -I/usr/include/kerberosIV and
-     -I/usr/include/kerberosV?
-   - markus@cvs.openbsd.org 2001/07/11 16:29:59
-     [ssh.c]
-     sort options string, fix -p, add -k
-   - markus@cvs.openbsd.org 2001/07/11 18:26:15
-     [auth.c]
-     no need to call dirname(pw->pw_dir).
-     note that dirname(3) modifies its argument on some systems.
- - (djm) Reorder Makefile.in so clean targets work a little better when
-   run directly from Makefile.in
- - (djm) Pull in getopt(3) from OpenBSD libc for the optreset extension.
-
-20010711
- - (djm) dirname(3) may modify its argument on glibc and other systems.
-   Patch from markus@, spotted by Tom Holroyd <tomh@po.crl.go.jp>
-
-20010704
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/06/25 08:25:41
-     [channels.c channels.h cipher.c clientloop.c compat.c compat.h
-      hostfile.c kex.c kex.h key.c key.h nchan.c packet.c serverloop.c
-      session.c session.h sftp-server.c ssh-add.c ssh-agent.c uuencode.h]
-     update copyright for 2001
-   - markus@cvs.openbsd.org 2001/06/25 17:18:27
-     [ssh-keygen.1]
-     sshd(8) will never read the private keys, but ssh(1) does;
-     hugh@mimosa.com
-   - provos@cvs.openbsd.org 2001/06/25 17:54:47
-     [auth.c auth.h auth-rsa.c]
-     terminate secure_filename checking after checking homedir.  that way
-     it works on AFS.  okay markus@
-   - stevesk@cvs.openbsd.org 2001/06/25 20:26:37
-     [auth2.c sshconnect2.c]
-     prototype cleanup; ok markus@
-   - markus@cvs.openbsd.org 2001/06/26 02:47:07
-     [ssh-keygen.c]
-     allow loading a private RSA key to a cyberflex card.
-   - markus@cvs.openbsd.org 2001/06/26 04:07:06
-     [ssh-agent.1 ssh-agent.c]
-     add debug flag
-   - markus@cvs.openbsd.org 2001/06/26 04:59:59
-     [authfd.c authfd.h ssh-add.c]
-     initial support for smartcards in the agent
-   - markus@cvs.openbsd.org 2001/06/26 05:07:43
-     [ssh-agent.c]
-     update usage
-   - markus@cvs.openbsd.org 2001/06/26 05:33:34
-     [ssh-agent.c]
-     more smartcard support.
-   - mpech@cvs.openbsd.org 2001/06/26 05:48:07
-     [sshd.8]
-     remove unnecessary .Pp between .It;
-     millert@ ok
-   - markus@cvs.openbsd.org 2001/06/26 05:50:11
-     [auth2.c]
-     new interface for secure_filename()
-   - itojun@cvs.openbsd.org 2001/06/26 06:32:58
-     [atomicio.h authfd.h authfile.h auth.h auth-options.h bufaux.h
-      buffer.h canohost.h channels.h cipher.h clientloop.h compat.h
-      compress.h crc32.h deattack.h dh.h dispatch.h groupaccess.h
-      hostfile.h kex.h key.h log.h mac.h match.h misc.h mpaux.h packet.h
-      radix.h readconf.h readpass.h rsa.h]
-     prototype pedant.  not very creative...
-     - () -> (void)
-     - no variable names
-   - itojun@cvs.openbsd.org 2001/06/26 06:33:07
-     [servconf.h serverloop.h session.h sftp-client.h sftp-common.h
-      sftp-glob.h sftp-int.h sshconnect.h ssh-dss.h sshlogin.h sshpty.h
-      ssh-rsa.h tildexpand.h uidswap.h uuencode.h xmalloc.h]
-     prototype pedant.  not very creative...
-     - () -> (void)
-     - no variable names
-   - dugsong@cvs.openbsd.org 2001/06/26 16:15:25
-     [auth1.c auth.h auth-krb4.c auth-passwd.c readconf.c readconf.h
-      servconf.c servconf.h session.c sshconnect1.c sshd.c]
-     Kerberos v5 support for SSH1, mostly from Assar Westerlund
-     <assar@freebsd.org> and Bjorn Gronvall <bg@sics.se>. markus@ ok
-   - markus@cvs.openbsd.org 2001/06/26 17:25:34
-     [ssh.1]
-     document SSH_ASKPASS; fubob@MIT.EDU
-   - markus@cvs.openbsd.org 2001/06/26 17:27:25
-     [authfd.h authfile.h auth.h auth-options.h bufaux.h buffer.h
-      canohost.h channels.h cipher.h clientloop.h compat.h compress.h
-      crc32.h deattack.h dh.h dispatch.h groupaccess.c groupaccess.h
-      hostfile.h kex.h key.h log.c log.h mac.h misc.c misc.h mpaux.h
-      packet.h radix.h readconf.h readpass.h rsa.h servconf.h serverloop.h
-      session.h sftp-common.c sftp-common.h sftp-glob.h sftp-int.h
-      sshconnect.h ssh-dss.h sshlogin.h sshpty.h ssh-rsa.h sshtty.h
-      tildexpand.h uidswap.h uuencode.h xmalloc.h]
-     remove comments from .h, since they are cut&paste from the .c files
-     and out of sync
-   - dugsong@cvs.openbsd.org 2001/06/26 17:41:49
-     [servconf.c]
-     #include <kafs.h>
-   - markus@cvs.openbsd.org 2001/06/26 20:14:11
-     [key.c key.h ssh.c sshconnect1.c sshconnect2.c]
-     add smartcard support to the client, too (now you can use both
-     the agent and the client).
-   - markus@cvs.openbsd.org 2001/06/27 02:12:54
-     [serverloop.c serverloop.h session.c session.h]
-     quick hack to make ssh2 work again.
-   - markus@cvs.openbsd.org 2001/06/27 04:48:53
-     [auth.c match.c sshd.8]
-     tridge@samba.org
-   - markus@cvs.openbsd.org 2001/06/27 05:35:42
-     [ssh-keygen.c]
-     use cyberflex_inq_class to inquire class.
-   - markus@cvs.openbsd.org 2001/06/27 05:42:25
-     [rsa.c rsa.h ssh-agent.c ssh-keygen.c]
-     s/generate_additional_parameters/rsa_generate_additional_parameters/
-     http://www.humppa.com/
-   - markus@cvs.openbsd.org 2001/06/27 06:26:36
-     [ssh-add.c]
-     convert to getopt(3)
-   - stevesk@cvs.openbsd.org 2001/06/28 19:57:35
-     [ssh-keygen.c]
-     '\0' terminated data[] is ok; ok markus@
-   - markus@cvs.openbsd.org 2001/06/29 07:06:34
-     [ssh-keygen.c]
-     new error handling for cyberflex_*
-   - markus@cvs.openbsd.org 2001/06/29 07:11:01
-     [ssh-keygen.c]
-     initialize early
-   - stevesk@cvs.openbsd.org 2001/06/29 18:38:44
-     [clientloop.c]
-     sync function definition with declaration; ok markus@
-   - stevesk@cvs.openbsd.org 2001/06/29 18:40:28
-     [channels.c]
-     use socklen_t for getsockopt arg #5; ok markus@
-   - stevesk@cvs.openbsd.org 2001/06/30 18:08:40
-     [channels.c channels.h clientloop.c]
-     adress -> address; ok markus@
-   - markus@cvs.openbsd.org 2001/07/02 13:59:15
-     [serverloop.c session.c session.h]
-     wait until !session_have_children(); bugreport from
-     Lutz.Jaenicke@aet.TU-Cottbus.DE
-   - markus@cvs.openbsd.org 2001/07/02 22:29:20
-     [readpass.c]
-     do not return NULL, use "" instead.
-   - markus@cvs.openbsd.org 2001/07/02 22:40:18
-     [ssh-keygen.c]
-     update for sectok.h interface changes.
-   - markus@cvs.openbsd.org 2001/07/02 22:52:57
-     [channels.c channels.h serverloop.c]
-     improve cleanup/exit logic in ssh2:
-     stop listening to channels, detach channel users (e.g. sessions).
-     wait for children (i.e. dying sessions), send exit messages,
-     cleanup all channels.
- - (bal) forget a few new files in sync up.
- - (bal) Makefile fix up requires scard.c
- - (stevesk) sync misc.h
- - (stevesk) more sync for session.c
- - (stevesk) sync servconf.h (comments)
- - (tim) [contrib/caldera/openssh.spec] sync with Caldera
- - (tim) [openbsd-compat/dirname.h] Remove ^M causing some compilers to
-        issue warning (line 1: tokens ignored at end of directive line)
- - (tim) [sshconnect1.c] give the compiler something to do for success:
-        if KRB5 and AFS are not defined
-        (ERROR: "sshconnect1.c", line 1274: Syntax error before or at: })
-
-20010629
- - (bal) Removed net_aton() since we don't use it any more
- - (bal) Fixed _DISABLE_VPOSIX in readpassphrase.c.
- - (bal) Updated zlib's home.  Thanks to David Howe <DaveHowe@gmx.co.uk>.
- - (stevesk) remove _REENTRANT #define
- - (stevesk) session.c: use u_int for envsize
- - (stevesk) remove cli.[ch]
-
-20010628
- - (djm) Sync openbsd-compat with -current libc
- - (djm) Fix from Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> for my
-   broken makefile
- - (bal) Removed strtok_r() and inet_ntop() since they are no longer used.
- - (bal) Remove getusershell() since it's no longer used.
-
-20010627
- - (djm) Reintroduce pam_session call for non-pty sessions.
- - (djm) Remove redundant and incorrect test for max auth attempts in
-   PAM kbdint code. Based on fix from Matthew Melvin
-  <matthewm@webcentral.com.au>
- - (djm) Rename sysconfdir/primes => sysconfdir/moduli
- - (djm) Oops, forgot make logic for primes=>moduli. Also try to rename
-   existing primes->moduli if it exists.
- - (djm) Sync with -current openbsd-compat/readpassphrase.c:
-   - djm@cvs.openbsd.org 2001/06/27 13:23:30
-     typo, spotted by Tom Holroyd <tomh@po.crl.go.jp>; ok deraadt@
- - (djm) Turn up warnings if gcc or egcs detected
- - (stevesk) for HP-UX 11.X use X/Open socket interface;
-    pulls in modern socket prototypes and eliminates a number of compiler
-    warnings.  see xopen_networking(7).
- - (stevesk) fix x11 forwarding from _PATH_XAUTH change
- - (stevesk) use X/Open socket interface for HP-UX 10.X also
-
-20010625
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/06/21 21:08:25
-     [session.c]
-     don't reset forced_command (we allow multiple login shells in
-     ssh2); dwd@bell-labs.com
-   - mpech@cvs.openbsd.org 2001/06/22 10:17:51
-     [ssh.1 sshd.8 ssh-keyscan.1]
-     o) .Sh AUTHOR -> .Sh AUTHORS;
-     o) remove unnecessary .Pp;
-     o) better -mdoc style;
-     o) typo;
-     o) sort SEE ALSO;
-     aaron@ ok
-   - provos@cvs.openbsd.org 2001/06/22 21:27:08
-     [dh.c pathnames.h]
-     use /etc/moduli instead of /etc/primes, okay markus@
-   - provos@cvs.openbsd.org 2001/06/22 21:28:53
-     [sshd.8]
-     document /etc/moduli
-   - markus@cvs.openbsd.org 2001/06/22 21:55:49
-     [auth2.c auth-rsa.c pathnames.h ssh.1 sshd.8 sshd_config
-      ssh-keygen.1]
-     merge authorized_keys2 into authorized_keys.
-     authorized_keys2 is used for backward compat.
-     (just append authorized_keys2 to authorized_keys).
-   - provos@cvs.openbsd.org 2001/06/22 21:57:59
-     [dh.c]
-     increase linebuffer to deal with larger moduli; use rewind instead of
-     close/open
-   - markus@cvs.openbsd.org 2001/06/22 22:21:20
-     [sftp-server.c]
-     allow long usernames/groups in readdir
-   - markus@cvs.openbsd.org 2001/06/22 23:35:21
-     [ssh.c]
-     don't overwrite argv (fixes ssh user@host in 'ps'), report by ericj@
-   - deraadt@cvs.openbsd.org 2001/06/23 00:16:16
-     [scp.c]
-     slightly better care
-   - markus@cvs.openbsd.org 2001/06/23 00:20:57
-     [auth2.c auth.c auth.h auth-rh-rsa.c]
-     *known_hosts2 is obsolete for hostbased authentication and
-     only used for backward compat. merge ssh1/2 hostkey check
-     and move it to auth.c
-   - deraadt@cvs.openbsd.org 2001/06/23 02:33:05
-     [sftp.1 sftp-server.8 ssh-keygen.1]
-     join .%A entries; most by bk@rt.fm
-   - markus@cvs.openbsd.org 2001/06/23 02:34:33
-     [kexdh.c kexgex.c kex.h pathnames.h readconf.c servconf.h ssh.1
-      sshconnect1.c sshconnect2.c sshconnect.c sshconnect.h sshd.8]
-     get rid of known_hosts2, use it for hostkey lookup, but do not
-     modify.
-   - markus@cvs.openbsd.org 2001/06/23 03:03:59
-     [sshd.8]
-     draft-ietf-secsh-dh-group-exchange-01.txt
-   - markus@cvs.openbsd.org 2001/06/23 03:04:42
-     [auth2.c auth-rh-rsa.c]
-     restore correct ignore_user_known_hosts logic.
-   - markus@cvs.openbsd.org 2001/06/23 05:26:02
-     [key.c]
-     handle sigature of size 0 (some broken clients send this).
-   - deraadt@cvs.openbsd.org 2001/06/23 05:57:09
-     [sftp.1 sftp-server.8 ssh-keygen.1]
-     ok, tmac is now fixed
-   - markus@cvs.openbsd.org 2001/06/23 06:41:10
-     [ssh-keygen.c]
-     try to decode ssh-3.0.0 private rsa keys
-     (allow migration to openssh, not vice versa), #910
-   - itojun@cvs.openbsd.org 2001/06/23 15:12:20
-     [auth1.c auth2.c auth2-chall.c authfd.c authfile.c auth-rhosts.c
-      canohost.c channels.c cipher.c clientloop.c deattack.c dh.c
-      hostfile.c kex.c kexdh.c kexgex.c key.c nchan.c packet.c radix.c
-      readpass.c scp.c servconf.c serverloop.c session.c sftp.c
-      sftp-client.c sftp-glob.c sftp-int.c sftp-server.c ssh-add.c
-      ssh-agent.c ssh.c sshconnect1.c sshconnect2.c sshconnect.c sshd.c
-      ssh-keygen.c ssh-keyscan.c]
-     more strict prototypes.  raise warning level in Makefile.inc.
-     markus ok'ed
-     TODO; cleanup headers
-   - markus@cvs.openbsd.org 2001/06/23 17:05:22
-     [ssh-keygen.c]
-     fix import for (broken?) ssh.com/f-secure private keys
-     (i tested > 1000 RSA keys)
-   - itojun@cvs.openbsd.org 2001/06/23 17:48:18
-     [sftp.1 ssh.1 sshd.8 ssh-keyscan.1]
-     kill whitespace at EOL.
-   - markus@cvs.openbsd.org 2001/06/23 19:12:43
-     [sshd.c]
-     pidfile/sigterm race; bbraun@synack.net
-   - markus@cvs.openbsd.org 2001/06/23 22:37:46
-     [sshconnect1.c]
-     consistent with ssh2: skip key if empty passphrase is entered,
-     retry num_of_passwd_prompt times if passphrase is wrong. ok fgsch@
-   - markus@cvs.openbsd.org 2001/06/24 05:25:10
-     [auth-options.c match.c match.h]
-     move ip+hostname check to match.c
-   - markus@cvs.openbsd.org 2001/06/24 05:35:33
-     [readpass.c readpass.h ssh-add.c sshconnect2.c ssh-keygen.c]
-     switch to readpassphrase(3)
-     2.7/8-stable needs readpassphrase.[ch] from libc
-   - markus@cvs.openbsd.org 2001/06/24 05:47:13
-     [sshconnect2.c]
-     oops, missing format string
-   - markus@cvs.openbsd.org 2001/06/24 17:18:31
-     [ttymodes.c]
-     passing modes works fine: debug2->3
- - (djm) -Wall fix for session.c
- - (djm) Bring in readpassphrase() from OpenBSD libc. Compiles OK on Linux and
-   Solaris
-
-20010622
- - (stevesk) handle systems without pw_expire and pw_change.
-
-20010621
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/06/16 08:49:38
-     [misc.c]
-     typo; dunlap@apl.washington.edu
-   - markus@cvs.openbsd.org 2001/06/16 08:50:39
-     [channels.h]
-     bad //-style comment; thx to stevev@darkwing.uoregon.edu
-   - markus@cvs.openbsd.org 2001/06/16 08:57:35
-     [scp.c]
-     no stdio or exit() in signal handlers.
-   - markus@cvs.openbsd.org 2001/06/16 08:58:34
-     [misc.c]
-     copy pw_expire and pw_change, too.
-   - markus@cvs.openbsd.org 2001/06/19 12:34:09
-     [session.c]
-     cleanup forced command handling, from dwd@bell-labs.com
-   - markus@cvs.openbsd.org 2001/06/19 14:09:45
-     [session.c sshd.8]
-     disable x11-fwd if use_login is enabled; from lukem@wasabisystems.com
-   - markus@cvs.openbsd.org 2001/06/19 15:40:45
-     [session.c]
-     allocate and free at the same level.
-   - markus@cvs.openbsd.org 2001/06/20 13:56:39
-     [channels.c channels.h clientloop.c packet.c serverloop.c]
-     move from channel_stop_listening to channel_free_all,
-     call channel_free_all before calling waitpid() in serverloop.
-     fixes the utmp handling; report from Lutz.Jaenicke@aet.TU-Cottbus.DE
-
-20010615
- - (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL
-   around grantpt().
- - (stevesk) update TODO: STREAMS pty systems don't call vhangup() now
-
-20010614
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/06/13 09:10:31
-     [session.c]
-     typo, use pid not s->pid, mstone@cs.loyola.edu
-
-20010613
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/06/12 10:58:29
-     [session.c]
-     merge session_free into session_close()
-     merge pty_cleanup_proc into session_pty_cleanup()
-   - markus@cvs.openbsd.org 2001/06/12 16:10:38
-     [session.c]
-     merge ssh1/ssh2 tty msg parse and alloc code
-   - markus@cvs.openbsd.org 2001/06/12 16:11:26
-     [packet.c]
-     do not log() packet_set_maxsize
-   - markus@cvs.openbsd.org 2001/06/12 21:21:29
-     [session.c]
-     remove xauth-cookie-in-tmp handling. use default $XAUTHORITY, since
-     we do already trust $HOME/.ssh
-     you can use .ssh/sshrc and .ssh/environment if you want to customize
-     the location of the xauth cookies
-   - markus@cvs.openbsd.org 2001/06/12 21:30:57
-     [session.c]
-     unused
-
-20010612
- - scp.c ID update (upstream synced vfsprintf() from us)
- - OpenBSD CVS Sync
-  - markus@cvs.openbsd.org 2001/06/10 11:29:20
-     [dispatch.c]
-     we support rekeying
-     protocol errors are fatal.
-   - markus@cvs.openbsd.org 2001/06/11 10:18:24
-     [session.c]
-     reset pointer to NULL after xfree(); report from solar@openwall.com
-   - markus@cvs.openbsd.org 2001/06/11 16:04:38
-     [sshd.8]
-     typo; bdubreuil@crrel.usace.army.mil
-
-20010611
- - (bal) NeXT/MacOS X lack libgen.h and dirname().  Patch by Mark Miller
-   <markm@swoon.net>
- - (bal) Handle broken krb4 issues on Solaris with multiple defined u_*_t
-   types.  Patch by Jan IVEN <Jan.Iven@cern.ch>
- - (bal) Fixed Makefile.in so that 'configure; make install' works.
-
-20010610
- - (bal) Missed two files in major resync.  auth-bsdauth.c and auth-skey.c
-
-20010609
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/30 12:55:13
-     [auth-options.c auth2.c channels.c channels.h clientloop.c nchan.c
-      packet.c serverloop.c session.c ssh.c ssh1.h]
-     channel layer cleanup: merge header files and split .c files
-   - markus@cvs.openbsd.org 2001/05/30 15:20:10
-     [ssh.c]
-     merge functions, simplify.
-   - markus@cvs.openbsd.org 2001/05/31 10:30:17
-     [auth-options.c auth2.c channels.c channels.h clientloop.c nchan.c
-      packet.c serverloop.c session.c ssh.c]
-     undo the .c file split, just merge the header and keep the cvs
-     history
- - (bal) Channels.c and Channels.h -- "Merge Functions, simplify" (draged
-   out of ssh Attic)
- - (bal) Ooops.. nchan.c (and remove nchan.h) resync from OpenBSD ssh
-   Attic.
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/31 13:08:04
-     [sshd_config]
-     group options and add some more comments
-   - markus@cvs.openbsd.org 2001/06/03 14:55:39
-     [channels.c channels.h session.c]
-     use fatal_register_cleanup instead of atexit, sync with x11 authdir
-     handling
-   - markus@cvs.openbsd.org 2001/06/03 19:36:44
-     [ssh-keygen.1]
-     1-2 bits of entrophy per character (not per word), ok stevesk@
-   - markus@cvs.openbsd.org 2001/06/03 19:38:42
-     [scp.c]
-     pass -v to ssh; from slade@shore.net
-   - markus@cvs.openbsd.org 2001/06/03 20:06:11
-     [auth2-chall.c]
-     the challenge response device decides how to handle non-existing
-     users.
-     -> fake challenges for skey and cryptocard
-   - markus@cvs.openbsd.org 2001/06/04 21:59:43
-     [channels.c channels.h session.c]
-     switch uid when cleaning up tmp files and sockets; reported by
-     zen-parse@gmx.net on bugtraq
-   - markus@cvs.openbsd.org 2001/06/04 23:07:21
-     [clientloop.c serverloop.c sshd.c]
-     set flags in the signal handlers, do real work in the main loop,
-     ok provos@
-   - markus@cvs.openbsd.org 2001/06/04 23:16:16
-     [session.c]
-     merge ssh1/2 x11-fwd setup, create listener after tmp-dir
-   - pvalchev@cvs.openbsd.org 2001/06/05 05:05:39
-     [ssh-keyscan.1 ssh-keyscan.c]
-     License clarification from David Mazieres, ok deraadt@
-   - markus@cvs.openbsd.org 2001/06/05 10:24:32
-     [channels.c]
-     don't delete the auth socket in channel_stop_listening()
-     auth_sock_cleanup_proc() will take care of this.
-   - markus@cvs.openbsd.org 2001/06/05 16:46:19
-     [session.c]
-     let session_close() delete the pty.  deny x11fwd if xauthfile is set.
-   - markus@cvs.openbsd.org 2001/06/06 23:13:54
-     [ssh-dss.c ssh-rsa.c]
-     cleanup, remove old code
-   - markus@cvs.openbsd.org 2001/06/06 23:19:35
-     [ssh-add.c]
-     remove debug message; Darren.Moffat@eng.sun.com
-   - markus@cvs.openbsd.org 2001/06/07 19:57:53
-     [auth2.c]
-     style is used for bsdauth.
-     disconnect on user/service change (ietf-drafts)
-   - markus@cvs.openbsd.org 2001/06/07 20:23:05
-     [authfd.c authfile.c channels.c kexdh.c kexgex.c packet.c ssh.c
-      sshconnect.c sshconnect1.c]
-     use xxx_put_cstring()
-   - markus@cvs.openbsd.org 2001/06/07 22:25:02
-     [session.c]
-     don't overwrite errno
-     delay deletion of the xauth cookie
-   - markus@cvs.openbsd.org 2001/06/08 15:25:40
-     [includes.h pathnames.h readconf.c servconf.c]
-     move the path for xauth to pathnames.h
- - (bal) configure.in fix for Tru64 (forgeting to reset $LIB)
- - (bal) ANSIify strmode()
- - (bal) --with-catman should be --with-mantype patch by Dave
-   Dykstra <dwd@bell-labs.com>
-
-20010606
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/17 21:34:15
-     [ssh.1]
-     no spaces in PreferredAuthentications;
-     meixner@rbg.informatik.tu-darmstadt.de
-   - markus@cvs.openbsd.org 2001/05/18 14:13:29
-     [auth-chall.c auth.h auth1.c auth2-chall.c auth2.c readconf.c
-      readconf.h servconf.c servconf.h sshconnect1.c sshconnect2.c sshd.c]
-     improved kbd-interactive support. work by per@appgate.com and me
-   - djm@cvs.openbsd.org 2001/05/19 00:36:40
-     [session.c]
-     Disable X11 forwarding if xauth binary is not found. Patch from Nalin
-     Dahyabhai <nalin@redhat.com>; ok markus@
-   - markus@cvs.openbsd.org 2001/05/19 16:05:41
-     [scp.c]
-     ftruncate() instead of open()+O_TRUNC like rcp.c does
-     allows scp /path/to/file localhost:/path/to/file
-   - markus@cvs.openbsd.org 2001/05/19 16:08:43
-     [sshd.8]
-     sort options; Matthew.Stier@fnc.fujitsu.com
-   - markus@cvs.openbsd.org 2001/05/19 16:32:16
-     [ssh.1 sshconnect2.c]
-     change preferredauthentication order to
-        publickey,hostbased,password,keyboard-interactive
-     document that hostbased defaults to no, document order
-   - markus@cvs.openbsd.org 2001/05/19 16:46:19
-     [ssh.1 sshd.8]
-     document MACs defaults with .Dq
-   - stevesk@cvs.openbsd.org 2001/05/19 19:43:57
-     [misc.c misc.h servconf.c sshd.8 sshd.c]
-     sshd command-line arguments and configuration file options that
-     specify time may be expressed using a sequence of the form:
-     time[qualifier], where time is a positive integer value and qualifier
-     is one of the following:
-         <none>,s,m,h,d,w
-     Examples:
-         600     600 seconds (10 minutes)
-         10m     10 minutes
-         1h30m   1 hour 30 minutes (90 minutes)
-     ok markus@
-   - stevesk@cvs.openbsd.org 2001/05/19 19:57:09
-     [channels.c]
-     typo in error message
-   - markus@cvs.openbsd.org 2001/05/20 17:20:36
-     [auth-rsa.c auth.c auth.h auth2.c servconf.c servconf.h sshd.8
-      sshd_config]
-     configurable authorized_keys{,2} location; originally from peter@;
-     ok djm@
-   - markus@cvs.openbsd.org 2001/05/24 11:12:42
-     [auth.c]
-     fix comment; from jakob@
-   - stevesk@cvs.openbsd.org 2001/05/24 18:57:53
-     [clientloop.c readconf.c ssh.c ssh.h]
-     don't perform escape processing when ``EscapeChar none''; ok markus@
-   - markus@cvs.openbsd.org 2001/05/25 14:37:32
-     [ssh-keygen.c]
-     use -P for -e and -y, too.
-   - markus@cvs.openbsd.org 2001/05/28 08:04:39
-     [ssh.c]
-     fix usage()
-   - markus@cvs.openbsd.org 2001/05/28 10:08:55
-     [authfile.c]
-     key_load_private: set comment to filename for PEM keys
-   - markus@cvs.openbsd.org 2001/05/28 22:51:11
-     [cipher.c cipher.h]
-     simpler 3des for ssh1
-   - markus@cvs.openbsd.org 2001/05/28 23:14:49
-     [channels.c channels.h nchan.c]
-     undo broken channel fix and try a different one. there
-     should be still some select errors...
-   - markus@cvs.openbsd.org 2001/05/28 23:25:24
-     [channels.c]
-     cleanup, typo
-   - markus@cvs.openbsd.org 2001/05/28 23:58:35
-     [packet.c packet.h sshconnect.c sshd.c]
-     remove some lines, simplify.
-   - markus@cvs.openbsd.org 2001/05/29 12:31:27
-     [authfile.c]
-     typo
-
-20010528
- - (tim) [conifgure.in] add setvbuf test needed for sftp-int.c
-   Patch by Corinna Vinschen <vinschen@redhat.com>
-
-20010517
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/12 19:53:13
-     [sftp-server.c]
-     readlink does not NULL-terminate; mhe@home.se
-   - deraadt@cvs.openbsd.org 2001/05/15 22:04:01
-     [ssh.1]
-     X11 forwarding details improved
-   - markus@cvs.openbsd.org 2001/05/16 20:51:57
-     [authfile.c]
-     return comments for private pem files, too; report from nolan@naic.edu
-   - markus@cvs.openbsd.org 2001/05/16 21:53:53
-     [clientloop.c]
-     check for open sessions before we call select(); fixes the x11 client
-     bug reported by bowman@math.ualberta.ca
-   - markus@cvs.openbsd.org 2001/05/16 22:09:21
-     [channels.c nchan.c]
-     more select() error fixes (don't set rfd/wfd to -1).
- - (bal) Enabled USE_PIPES for Cygwin on Corinna Vinschen <vinschen@redhat.com>
- - (bal) Corrected on_exit() emulation via atexit().
-
-20010512
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/11 14:59:56
-     [clientloop.c misc.c misc.h]
-     add unset_nonblock for stdout/err flushing in client_loop().
- - (bal) Patch to partial sync up contrib/solaris/ packaging software.
-   Patch by pete <ninjaz@webexpress.com>
-
-20010511
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/09 22:51:57
-     [channels.c]
-     fix -R for protocol 2, noticed by greg@nest.cx.
-     bug was introduced with experimental dynamic forwarding.
-   - markus@cvs.openbsd.org 2001/05/09 23:01:31
-     [rijndael.h]
-     fix prototype; J.S.Peatfield@damtp.cam.ac.uk
-
-20010509
-  - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/06 21:23:31
-     [cli.c]
-     cli_read() fails to catch SIGINT + overflow; from obdb@zzlevo.net
-   - markus@cvs.openbsd.org 2001/05/08 19:17:31
-     [channels.c serverloop.c clientloop.c]
-     adds correct error reporting to async connect()s
-     fixes the server-discards-data-before-connected-bug found by
-     onoe@sm.sony.co.jp
-   - mouring@cvs.openbsd.org 2001/05/08 19:45:25
-     [misc.c misc.h scp.c sftp.c]
-     Use addargs() in sftp plus some clean up of addargs().  OK Markus
-   - markus@cvs.openbsd.org 2001/05/06 21:45:14
-     [clientloop.c]
-     use atomicio for flushing stdout/stderr bufs. thanks to
-     jbw@izanami.cee.hw.ac.uk
-   - markus@cvs.openbsd.org 2001/05/08 22:48:07
-     [atomicio.c]
-     no need for xmalloc.h, thanks to espie@
- - (bal) UseLogin patch for Solaris/UNICOS.  Patch by Wayne Davison
-   <wayne@blorf.net>
- - (bal) ./configure support to disable SIA on OSF1.  Patch by
-   Chris Adams <cmadams@hiwaay.net>
- - (bal) Updates from the Sony NEWS-OS platform by NAKAJI Hiroyuki
-   <nakaji@tutrp.tut.ac.jp>
-
-20010508
- - (bal) Fixed configure test for USE_SIA.
-
-20010506
- - (djm) Update config.guess and config.sub with latest versions (from
-   ftp://ftp.gnu.org/gnu/config/) to allow configure on ia64-hpux.
-   Suggested by Jason Mader <jason@ncac.gwu.edu>
- - (bal) White Space and #ifdef sync with OpenBSD
- - (bal) Add 'seed_rng()' to ssh-add.c
- - (bal) CVS ID updates for readpass.c, readpass.h, cli.c, and cli.h
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/05/05 13:42:52
-     [sftp.1 ssh-add.1 ssh-keygen.1]
-     typos, grammar
-
-20010505
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/05/04 14:21:56
-     [ssh.1 sshd.8]
-     typos
-   - markus@cvs.openbsd.org 2001/05/04 14:34:34
-     [channels.c]
-     channel_new() reallocs channels[], we cannot use Channel *c after
-     calling channel_new(), XXX fix this in the future...
-   - markus@cvs.openbsd.org 2001/05/04 23:47:34
-     [channels.c channels.h clientloop.c nchan.c nchan.h serverloop.c ssh.c]
-     move to Channel **channels (instead of Channel *channels), fixes realloc
-     problems.  channel_new now returns a Channel *, favour Channel * over
-     channel id.  remove old channel_allocate interface.
-
-20010504
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/05/03 15:07:39
-     [channels.c]
-     typo in debug() string
-   - markus@cvs.openbsd.org 2001/05/03 15:45:15
-     [session.c]
-     exec shell -c /bin/sh .ssh/sshrc, from abartlet@pcug.org.au
-   - stevesk@cvs.openbsd.org 2001/05/03 21:43:01
-     [servconf.c]
-     remove "\n" from fatal()
-   - mouring@cvs.openbsd.org 2001/05/03 23:09:53
-     [misc.c misc.h scp.c sftp.c]
-     Move colon() and cleanhost() to misc.c where I should I have put it in
-     the first place
- - (bal) Updated Cygwin README by Corinna Vinschen <vinschen@redhat.com>
- - (bal) Avoid socket file security issues in ssh-agent for Cygwin.
-   Patch by Egor Duda <deo@logos-m.ru>
-
-20010503
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/05/02 16:41:20
-     [ssh-add.c]
-     fix prompt for ssh-add.
-
-20010502
- - OpenBSD CVS Sync
-   - mouring@cvs.openbsd.org 2001/05/02 01:25:39
-     [readpass.c]
-     Put the 'const' back into ssh_askpass() function.  Pointed out
-     by Mark Miller <markm@swoon.net>.  OK Markus
-
-20010501
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/30 11:18:52
-     [readconf.c readconf.h ssh.1 ssh.c sshconnect.c]
-     implement 'ssh -b bind_address' like 'telnet -b'
-   - markus@cvs.openbsd.org 2001/04/30 15:50:46
-     [compat.c compat.h kex.c]
-     allow interop with weaker key generation used by ssh-2.0.x, x < 10
-   - markus@cvs.openbsd.org 2001/04/30 16:02:49
-     [compat.c]
-     ssh-2.0.10 has the weak-key-bug, too.
- - (tim) [contrib/caldera/openssh.spec] add Requires line for Caldera 3.1
-
-20010430
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/29 18:32:52
-     [serverloop.c]
-     fix whitespace
-   - markus@cvs.openbsd.org 2001/04/29 19:16:52
-     [channels.c clientloop.c compat.c compat.h serverloop.c]
-     more ssh.com-2.0.x bug-compat; from per@appgate.com
- - (tim) New version of mdoc2man.pl from Mark D. Roth <roth+openssh@feep.net>
- - (djm) Add .cvsignore files, suggested by Wayne Davison <wayne@blorf.net>
-
-20010429
- - (bal) Updated INSTALL.  PCRE moved to a new place.
- - (djm) Release OpenSSH-2.9p1
-
-20010427
- - (bal) Fixed uidswap.c so it should work on non-posix complient systems.
-   patch based on 2.5.2 version by djm.
- - (bal) Build manpages and config files once unless changed.  Patch by
-   Carson Gaspar <carson@taltos.org>
- - (bal) arpa/nameser.h does not exist on Cygwin.  Patch by Corinna
-   Vinschen <vinschen@redhat.com>
- - (bal) Add /etc/sysconfig/sshd support to redhat's sshd.init. Patch by
-   Pekka Savola <pekkas@netcore.fi>
- - (bal) Cygwin lacks setgroups() API.  Patch by Corinna Vinschen
-   <vinschen@redhat.com>
- - (bal) version.h synced, RPM specs updated for 2.9
- - (tim) update contrib/caldera files with what Caldera is using.
-   <sps@caldera.de>
-
-20010425
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/23 21:57:07
-     [ssh-keygen.1 ssh-keygen.c]
-     allow public key for -e, too
-   - markus@cvs.openbsd.org 2001/04/23 22:14:13
-     [ssh-keygen.c]
-     remove debug
- - (bal) Whitespace resync w/ OpenBSD for uidswap.c
- - (djm) Add new server configuration directive 'PAMAuthenticationViaKbdInt'
-   (default: off), implies KbdInteractiveAuthentication. Suggestion from
-   markus@
- - (djm) Include crypt.h if available in auth-passwd.c
- - tim@mindrot.org 2001/04/25 21:38:01 [configure.in]
-   man page detection fixes for SCO
-
-20010424
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/22 23:58:36
-     [ssh-keygen.1 ssh.1 sshd.8]
-     document hostbased and other cleanup
- - (stevesk) start_pam() doesn't use DNS now for sshd -u0.
- - (stevesk) auth-pam.c: use PERMIT_NO_PASSWD
- - (bal) sys/queue.h is bogus for NCR platform.  Patch by Daniel Carroll
-   <dan@mesastate.edu>
- - (bal) Fixed contrib/postinstall.in.  Patch by wsanders@wsanders.net
-
-20010422
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/20 16:32:22
-     [uidswap.c]
-     set non-privileged gid before uid; tholo@ and deraadt@
-   - mouring@cvs.openbsd.org 2001/04/21 00:55:57
-     [sftp.1]
-     Spelling
-   - djm@cvs.openbsd.org 2001/04/22 08:13:30
-     [ssh.1]
-     typos spotted by stevesk@; ok deraadt@
-   - markus@cvs.openbsd.org 2001/04/22 12:34:05
-     [scp.c]
-     scp > 2GB; niles@scyld.com; ok deraadt@, djm@
-   - markus@cvs.openbsd.org 2001/04/22 13:25:37
-     [ssh-keygen.1 ssh-keygen.c]
-     rename arguments -x -> -e (export key), -X -> -i (import key)
-     xref draft-ietf-secsh-publickeyfile-01.txt
-   - markus@cvs.openbsd.org 2001/04/22 13:32:27
-     [sftp-server.8 sftp.1 ssh.1 sshd.8]
-     xref draft-ietf-secsh-*
-   - markus@cvs.openbsd.org 2001/04/22 13:41:02
-     [ssh-keygen.1 ssh-keygen.c]
-     style, noted by stevesk; sort flags in usage
-
-20010421
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2001/04/20 07:17:51
-     [clientloop.c ssh.1]
-     Split out and improve escape character documentation, mention ~R in
-     ~? help text; ok markus@
- - Update RPM spec files for CVS version.h
- - (stevesk) set the default PAM service name to __progname instead
-   of the hard-coded value "sshd"; from Mark D. Roth <roth@feep.net>
- - (stevesk) document PAM service name change in INSTALL
- - tim@mindrot.org 2001/04/21 14:25:57 [Makefile.in configure.in]
-   fix perl test, fix nroff test, fix Makefile to build outside source tree
-
-20010420
- - OpenBSD CVS Sync
-   - ian@cvs.openbsd.org 2001/04/18 16:21:05
-     [ssh-keyscan.1]
-     Fix typo reported in PR/1779
-   - markus@cvs.openbsd.org 2001/04/18 21:57:42
-     [readpass.c ssh-add.c]
-     call askpass from ssh, too, based on work by roth@feep.net, ok deraadt
-   - markus@cvs.openbsd.org 2001/04/18 22:03:45
-     [auth2.c sshconnect2.c]
-     use FDQN with trailing dot in the hostbased auth packets, ok deraadt@
-   - markus@cvs.openbsd.org 2001/04/18 22:48:26
-     [auth2.c]
-     no longer const
-   - markus@cvs.openbsd.org 2001/04/18 23:43:26
-     [auth2.c compat.c sshconnect2.c]
-     more ssh v2 hostbased-auth interop: ssh.com >= 2.1.0 works now
-     (however the 2.1.0 server seems to work only if debug is enabled...)
-   - markus@cvs.openbsd.org 2001/04/18 23:44:51
-     [authfile.c]
-     error->debug; noted by fries@
-   - markus@cvs.openbsd.org 2001/04/19 00:05:11
-     [auth2.c]
-     use local variable, no function call needed.
-     (btw, hostbased works now with ssh.com >= 2.0.13)
-  - (bal) Put scp-common.h back into scp.c (it exists in the upstream
-    tree) pointed out by Tom Holroyd <tomh@po.crl.go.jp>
-
-20010418
-  - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/17 19:34:25
-     [session.c]
-     move auth_approval to do_authenticated().
-     do_child(): nuke hostkeys from memory
-     don't source .ssh/rc for subsystems.
-   - markus@cvs.openbsd.org 2001/04/18 14:15:00
-     [canohost.c]
-     debug->debug3
-  - (bal) renabled 'catman-do:' and fixed it.  So now catman pages should
-    be working again.
-  - (bal) Makfile day... Cleaned up multiple mantype support (Patch by
-    Mark D. Roth <roth+openssh@feep.net>), and fixed PIDDIR support.
-
-20010417
-  - (bal) Add perl5 check for HP/UX, Removed GNUness from Makefile.in
-    and temporary commented out 'catman-do:' since it is broken.  Patches
-    for the first two by Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
-  - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/04/16 08:26:04
-     [key.c]
-     better safe than sorry in later mods; yongari@kt-is.co.kr
-   - markus@cvs.openbsd.org 2001/04/17 08:14:01
-     [sshconnect1.c]
-     check for key!=NULL, thanks to costa
-   - markus@cvs.openbsd.org 2001/04/17 09:52:48
-     [clientloop.c]
-     handle EINTR/EAGAIN on read; ok deraadt@
-   - markus@cvs.openbsd.org 2001/04/17 10:53:26
-     [key.c key.h readconf.c readconf.h ssh.1 sshconnect2.c]
-     add HostKeyAlgorithms; based on patch from res@shore.net; ok provos@
-   - markus@cvs.openbsd.org 2001/04/17 12:55:04
-     [channels.c ssh.c]
-     undo socks5 and https support since they are not really used and
-     only bloat ssh.  remove -D from usage(), since '-D' is experimental.
-
-20010416
-  - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/04/15 01:35:22
-     [ttymodes.c]
-     fix comments
-   - markus@cvs.openbsd.org 2001/04/15 08:43:47
-     [dh.c sftp-glob.c sftp-glob.h sftp-int.c sshconnect2.c sshd.c]
-     some unused variable and typos; from tomh@po.crl.go.jp
-   - markus@cvs.openbsd.org 2001/04/15 16:58:03
-     [authfile.c ssh-keygen.c sshd.c]
-     don't use errno for key_{load,save}_private; discussion w/ solar@openwall
-   - markus@cvs.openbsd.org 2001/04/15 17:16:00
-     [clientloop.c]
-     set stdin/out/err to nonblocking in SSH proto 1, too. suggested by ho@
-     should fix some of the blocking problems for rsync over SSH-1
-   - stevesk@cvs.openbsd.org 2001/04/15 19:41:21
-     [sshd.8]
-     some ClientAlive cleanup; ok markus@
-   - stevesk@cvs.openbsd.org 2001/04/15 21:28:35
-     [readconf.c servconf.c]
-     use fatal() or error() vs. fprintf(); ok markus@
- - (djm) Convert mandoc manpages to man automatically. Patch from Mark D.
-   Roth <roth+openssh@feep.net>
- - (bal) CVS ID fix up and slight manpage fix from OpenBSD tree.
-  - (djm) OpenBSD CVS Sync
-   - mouring@cvs.openbsd.org 2001/04/16 02:31:44
-     [scp.c sftp.c]
-     IPv6 support for sftp (which I bungled in my last patch) which is
-     borrowed from scp.c.  Thanks to Markus@ for pointing it out.
-   - deraadt@cvs.openbsd.org 2001/04/16 08:05:34
-     [xmalloc.c]
-     xrealloc dealing with ptr == nULL; mouring
-   - djm@cvs.openbsd.org 2001/04/16 08:19:31
-     [session.c]
-     Split motd and hushlogin checks into seperate functions, helps for
-     portable. From Chris Adams <cmadams@hiwaay.net>; ok markus@
- - Fix OSF SIA support displaying too much information for quiet
-   logins and logins where access was denied by SIA. Patch from Chris Adams
-   <cmadams@hiwaay.net>
-
-20010415
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/04/14 04:31:01
-     [ssh-add.c]
-     do not double free
-   - markus@cvs.openbsd.org 2001/04/14 16:17:14
-     [channels.c]
-     remove some channels that are not appropriate for keepalive.
-   - markus@cvs.openbsd.org 2001/04/14 16:27:57
-     [ssh-add.c]
-     use clear_pass instead of xfree()
-   - stevesk@cvs.openbsd.org 2001/04/14 16:33:20
-     [clientloop.c packet.h session.c ssh.c ttymodes.c ttymodes.h]
-     protocol 2 tty modes support; ok markus@
-   - stevesk@cvs.openbsd.org 2001/04/14 17:04:42
-     [scp.c]
-     'T' handling rcp/scp sync; ok markus@
- - Missed sshtty.[ch] in Sync.
-
-20010414
- - Sync with OpenBSD glob.c, strlcat.c and vis.c changes
- - Cygwin sftp/sftp-server binary mode patch from Corinna Vinschen
-   <vinschen@redhat.com>
- - OpenBSD CVS Sync
-   - beck@cvs.openbsd.org 2001/04/13 22:46:54
-     [channels.c channels.h servconf.c servconf.h serverloop.c sshd.8]
-     Add options ClientAliveInterval and ClientAliveCountMax to sshd.
-     This gives the ability to do a "keepalive" via the encrypted channel
-     which can't be spoofed (unlike TCP keepalives). Useful for when you want
-     to use ssh connections to authenticate people for something, and know
-     relatively quickly when they are no longer authenticated. Disabled
-     by default (of course). ok markus@
-
-20010413
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/12 14:29:09
-     [ssh.c]
-     show debug output during option processing, report from
-     pekkas@netcore.fi
-   - markus@cvs.openbsd.org 2001/04/12 19:15:26
-     [auth-rhosts.c auth.h auth2.c buffer.c canohost.c canohost.h
-      compat.c compat.h hostfile.c pathnames.h readconf.c readconf.h
-      servconf.c servconf.h ssh.c sshconnect.c sshconnect.h sshconnect1.c
-      sshconnect2.c sshd_config]
-     implement HostbasedAuthentication (= RhostRSAAuthentication for ssh v2)
-     similar to RhostRSAAuthentication unless you enable (the experimental)
-     HostbasedUsesNameFromPacketOnly option.  please test. :)
-   - markus@cvs.openbsd.org 2001/04/12 19:39:27
-     [readconf.c]
-     typo
-   - stevesk@cvs.openbsd.org 2001/04/12 20:09:38
-     [misc.c misc.h readconf.c servconf.c ssh.c sshd.c]
-     robust port validation; ok markus@ jakob@
-   - mouring@cvs.openbsd.org 2001/04/12 23:17:54
-     [sftp-int.c sftp-int.h sftp.1 sftp.c]
-     Add support for:
-        sftp [user@]host[:file [file]]  - Fetch remote file(s)
-        sftp [user@]host[:dir[/]]       - Start in remote dir/
-     OK deraadt@
-   - stevesk@cvs.openbsd.org 2001/04/13 01:26:17
-     [ssh.c]
-     missing \n in error message
- - (bal) Added openbsd-compat/inet_ntop.[ch] since HP/UX (and others)
-   lack it.
-
-20010412
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/10 07:46:58
-     [channels.c]
-     cleanup socks4 handling
-   - itojun@cvs.openbsd.org 2001/04/10 09:13:22
-     [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8]
-     document id_rsa{.pub,}.  markus ok
-   - markus@cvs.openbsd.org 2001/04/10 12:15:23
-     [channels.c]
-     debug cleanup
-   - djm@cvs.openbsd.org 2001/04/11 07:06:22
-     [sftp-int.c]
-     'mget' and 'mput' aliases; ok markus@
-   - markus@cvs.openbsd.org 2001/04/11 10:59:01
-     [ssh.c]
-     use strtol() for ports, thanks jakob@
-   - markus@cvs.openbsd.org 2001/04/11 13:56:13
-     [channels.c ssh.c]
-     https-connect and socks5 support. i feel so bad.
-   - lebel@cvs.openbsd.org 2001/04/11 16:25:30
-     [sshd.8 sshd.c]
-     implement the -e option into sshd:
-      -e      When this option is specified, sshd will send the output to the
-              standard error instead of the system log.
-     markus@ OK.
-
-20010410
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/04/08 20:52:55
-     [sftp.c]
-     do not modify an actual argv[] entry
-   - stevesk@cvs.openbsd.org 2001/04/08 23:28:27
-     [sshd.8]
-     spelling
-   - stevesk@cvs.openbsd.org 2001/04/09 00:42:05
-     [sftp.1]
-     spelling
-   - markus@cvs.openbsd.org 2001/04/09 15:12:23
-     [ssh-add.c]
-     passphrase caching: ssh-add tries last passphrase, clears passphrase if
-     not successful and after last try.
-     based on discussions with espie@, jakob@, ... and code from jakob@ and
-     wolfgang@wsrcc.com
-   - markus@cvs.openbsd.org 2001/04/09 15:19:49
-     [ssh-add.1]
-     ssh-add retries the last passphrase...
-   - stevesk@cvs.openbsd.org 2001/04/09 18:00:15
-     [sshd.8]
-     ListenAddress mandoc from aaron@
-
-20010409
- - (stevesk) use setresgid() for setegid() if needed
- - (stevesk) configure.in: typo
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/04/08 16:01:36
-     [sshd.8]
-     document ListenAddress addr:port
-   - markus@cvs.openbsd.org 2001/04/08 13:03:00
-     [ssh-add.c]
-     init pointers with NULL, thanks to danimal@danimal.org
-   - markus@cvs.openbsd.org 2001/04/08 11:27:33
-     [clientloop.c]
-     leave_raw_mode if ssh2 "session" is closed
-   - markus@cvs.openbsd.org 2001/04/06 21:00:17
-     [auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth2.c channels.c session.c
-      ssh.c sshconnect.c sshconnect.h uidswap.c uidswap.h]
-     do gid/groups-swap in addition to uid-swap, should help if /home/group
-     is chmod 750 + chgrp grp /home/group/, work be deraadt and me, thanks
-     to olar@openwall.com is comments.  we had many requests for this.
-   - markus@cvs.openbsd.org 2001/04/07 08:55:18
-     [buffer.c channels.c channels.h readconf.c ssh.c]
-     allow the ssh client act as a SOCKS4 proxy (dynamic local
-     portforwarding).  work by Dan Kaminsky <dankamin@cisco.com> and me.
-     thanks to Dan for this great patch: use 'ssh -D 1080 host' and make
-     netscape use localhost:1080 as a socks proxy.
-   - markus@cvs.openbsd.org 2001/04/08 11:24:33
-     [uidswap.c]
-     KNF
-
-20010408
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/04/06 22:12:47
-     [hostfile.c]
-     unused; typo in comment
-   - stevesk@cvs.openbsd.org 2001/04/06 22:25:25
-     [servconf.c]
-     in addition to:
-     ListenAddress host|ipv4_addr|ipv6_addr
-     permit:
-     ListenAddress [host|ipv4_addr|ipv6_addr]:port
-     ListenAddress host|ipv4_addr:port
-     sshd.8 updates coming.  ok markus@
-
-20010407
- - (bal) CVS ID Resync of version.h
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/05 23:39:20
-     [serverloop.c]
-     keep the ssh session even if there is no active channel.
-     this is more in line with the protocol spec and makes
-        ssh -N -L 1234:server:110 host
-     more useful.
-     based on discussion with <mats@mindbright.se> long time ago
-     and recent mail from <res@shore.net>
-   - deraadt@cvs.openbsd.org 2001/04/06 16:46:59
-     [scp.c]
-     remove trailing / from source paths; fixes pr#1756
-
-20010406
- - (stevesk) logintest.c: fix for systems without __progname
- - (stevesk) Makefile.in: log.o is in libssh.a
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/05 10:00:06
-     [compat.c]
-     2.3.x does old  GEX, too; report jakob@
-   - markus@cvs.openbsd.org 2001/04/05 10:39:03
-     [compress.c compress.h packet.c]
-     reset compress state per direction when rekeying.
-   - markus@cvs.openbsd.org 2001/04/05 10:39:48
-     [version.h]
-     temporary version 2.5.4 (supports rekeying).
-     this is not an official release.
-   - markus@cvs.openbsd.org 2001/04/05 10:42:57
-     [auth-chall.c authfd.c channels.c clientloop.c kex.c kexgex.c key.c
-      mac.c packet.c serverloop.c sftp-client.c sftp-client.h sftp-glob.c
-      sftp-glob.h sftp-int.c sftp-server.c sftp.c ssh-keygen.c sshconnect.c
-      sshconnect2.c sshd.c]
-     fix whitespace: unexpand + trailing spaces.
-   - markus@cvs.openbsd.org 2001/04/05 11:09:17
-     [clientloop.c compat.c compat.h]
-     add SSH_BUG_NOREKEY and detect broken (=all old) openssh versions.
-   - markus@cvs.openbsd.org 2001/04/05 15:45:43
-     [ssh.1]
-     ssh defaults to protocol v2; from quisar@quisar.ambre.net
-   - stevesk@cvs.openbsd.org 2001/04/05 15:48:18
-     [canohost.c canohost.h session.c]
-     move get_remote_name_or_ip() to canohost.[ch]; for portable.  ok markus@
-   - markus@cvs.openbsd.org 2001/04/05 20:01:10
-     [clientloop.c]
-     for ~R print message if server does not support rekeying. (and fix ~R).
-   - markus@cvs.openbsd.org 2001/04/05 21:02:46
-     [buffer.c]
-     better error message
-   - markus@cvs.openbsd.org 2001/04/05 21:05:24
-     [clientloop.c ssh.c]
-     don't request a session for 'ssh -N', pointed out slade@shore.net
-
-20010405
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/04/04 09:48:35
-     [kex.c kex.h kexdh.c kexgex.c packet.c sshconnect2.c sshd.c]
-     don't sent multiple kexinit-requests.
-     send newkeys, block while waiting for newkeys.
-     fix comments.
-   - markus@cvs.openbsd.org 2001/04/04 14:34:58
-     [clientloop.c kex.c kex.h serverloop.c sshconnect2.c sshd.c]
-     enable server side rekeying + some rekey related clientup.
-     todo: we should not send any non-KEX messages after we send KEXINIT
-   - markus@cvs.openbsd.org 2001/04/04 15:50:55
-     [compat.c]
-     f-secure 1.3.2 does not handle IGNORE; from milliondl@ornl.gov
-   - markus@cvs.openbsd.org 2001/04/04 20:25:38
-     [channels.c channels.h clientloop.c kex.c kex.h serverloop.c
-      sshconnect2.c sshd.c]
-     more robust rekeying
-     don't send channel data after rekeying is started.
-   - markus@cvs.openbsd.org 2001/04/04 20:32:56
-     [auth2.c]
-     we don't care about missing bannerfiles; from tsoome@ut.ee, ok deraadt@
-   - markus@cvs.openbsd.org 2001/04/04 22:04:35
-     [kex.c kexgex.c serverloop.c]
-     parse full kexinit packet.
-     make server-side more robust, too.
-   - markus@cvs.openbsd.org 2001/04/04 23:09:18
-     [dh.c kex.c packet.c]
-     clear+free keys,iv for rekeying.
-     + fix DH mem leaks. ok niels@
- - (stevesk) don't use vhangup() if defined(HAVE_DEV_PTMX); also removes
-    BROKEN_VHANGUP
-
-20010404
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/04/02 17:32:23
-     [ssh-agent.1]
-     grammar; slade@shore.net
-   - stevesk@cvs.openbsd.org 2001/04/03 13:56:11
-     [sftp-glob.c ssh-agent.c ssh-keygen.c]
-     free() -> xfree()
-   - markus@cvs.openbsd.org 2001/04/03 19:53:29
-     [dh.c dh.h kex.c kex.h sshconnect2.c sshd.c]
-     move kex to kex*.c, used dispatch_set() callbacks for kex. should
-     make rekeying easier.
-   - todd@cvs.openbsd.org 2001/04/03 21:19:38
-     [ssh_config]
-     id_rsa1/2 -> id_rsa; ok markus@
-   - markus@cvs.openbsd.org 2001/04/03 23:32:12
-     [kex.c kex.h packet.c sshconnect2.c sshd.c]
-     undo parts of recent my changes: main part of keyexchange does not
-     need dispatch-callbacks, since application data is delayed until
-     the keyexchange completes (if i understand the drafts correctly).
-     add some infrastructure for re-keying.
-   - markus@cvs.openbsd.org 2001/04/04 00:06:54
-     [clientloop.c sshconnect2.c]
-     enable client rekeying
-        (1) force rekeying with ~R, or
-        (2) if the server requests rekeying.
-     works against ssh-2.0.12/2.0.13/2.1.0/2.2.0/2.3.0/2.3.1/2.4.0
- - (bal) Oops.. Missed including kexdh.c and kexgex.c in OpenBSD sync.
-
-20010403
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/04/02 14:15:31
-     [sshd.8]
-     typo; ok markus@
-   - stevesk@cvs.openbsd.org 2001/04/02 14:20:23
-     [readconf.c servconf.c]
-     correct comment; ok markus@
- - (stevesk) nchan.c: remove ostate checks and add EINVAL to
-    shutdown(SHUT_RD) error() bypass for HP-UX.
-
-20010402
- - (stevesk) log.c openbsd sync; missing newlines
- - (stevesk) sshpty.h openbsd sync; PTY_H -> SSHPTY_H
-
-20010330
- - (djm) Another openbsd-compat/glob.c sync
- - (djm) OpenBSD CVS Sync
-   - provos@cvs.openbsd.org 2001/03/28 21:59:41
-     [kex.c kex.h sshconnect2.c sshd.c]
-     forgot to include min and max params in hash, okay markus@
-   - provos@cvs.openbsd.org 2001/03/28 22:04:57
-     [dh.c]
-     more sanity checking on primes file
-   - markus@cvs.openbsd.org 2001/03/28 22:43:31
-     [auth.h auth2.c auth2-chall.c]
-     check auth_root_allowed for kbd-int auth, too.
-   - provos@cvs.openbsd.org 2001/03/29 14:24:59
-     [sshconnect2.c]
-     use recommended defaults
-   - stevesk@cvs.openbsd.org 2001/03/29 21:06:21
-     [sshconnect2.c sshd.c]
-     need to set both STOC and CTOS for SSH_BUG_BIGENDIANAES; ok markus@
-   - markus@cvs.openbsd.org 2001/03/29 21:17:40
-     [dh.c dh.h kex.c kex.h]
-     prepare for rekeying: move DH code to dh.c
-   - djm@cvs.openbsd.org 2001/03/29 23:42:01
-     [sshd.c]
-     Protocol 1 key regeneration log => verbose, some KNF; ok markus@
-
-20010329
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/03/26 15:47:59
-     [ssh.1]
-     document more defaults; misc. cleanup.  ok markus@
-   - markus@cvs.openbsd.org 2001/03/26 23:12:42
-     [authfile.c]
-     KNF
-   - markus@cvs.openbsd.org 2001/03/26 23:23:24
-     [rsa.c rsa.h ssh-agent.c ssh-keygen.c]
-     try to read private f-secure ssh v2 rsa keys.
-   - markus@cvs.openbsd.org 2001/03/27 10:34:08
-     [ssh-rsa.c sshd.c]
-     use EVP_get_digestbynid, reorder some calls and fix missing free.
-   - markus@cvs.openbsd.org 2001/03/27 10:57:00
-     [compat.c compat.h ssh-rsa.c]
-     some older systems use NID_md5 instead of NID_sha1 for RSASSA-PKCS1-v1_5
-     signatures in SSH protocol 2, ok djm@
-   - provos@cvs.openbsd.org 2001/03/27 17:46:50
-     [compat.c compat.h dh.c dh.h ssh2.h sshconnect2.c sshd.c version.h]
-     make dh group exchange more flexible, allow min and max group size,
-     okay markus@, deraadt@
-   - stevesk@cvs.openbsd.org 2001/03/28 19:56:23
-     [scp.c]
-     start to sync scp closer to rcp; ok markus@
-   - stevesk@cvs.openbsd.org 2001/03/28 20:04:38
-     [scp.c]
-     usage more like rcp and add missing -B to usage; ok markus@
-   - markus@cvs.openbsd.org 2001/03/28 20:50:45
-     [sshd.c]
-     call refuse() before close(); from olemx@ans.pl
-
-20010328
- - (djm) Reorder tests and library inclusion for Krb4/AFS to try to
-   resolve linking conflicts with libcrypto. Report and suggested fix
-   from Holger Trapp <Holger.Trapp@Informatik.TU-Chemnitz.DE>
- - (djm) Work around Solaris' broken struct dirent. Diagnosis and suggested
-   fix from Philippe Levan <levan@epix.net>
- - (djm) Rework krbIV tests to get us closer to building on Redhat. Still
-   doesn't work because of conflicts between krbIV's and OpenSSL's des.h
- - (djm) Sync openbsd-compat/glob.c
-
-20010327
- - Attempt sync with sshlogin.c w/ OpenBSD (mainly CVS ID)
- - Fix pointer issues in waitpid() and wait() replaces.  Patch by Lutz
-   Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2001/03/25 00:01:34
-     [session.c]
-     shorten; ok markus@
-   - stevesk@cvs.openbsd.org 2001/03/25 13:16:11
-     [servconf.c servconf.h session.c sshd.8 sshd_config]
-     PrintLastLog option; from chip@valinux.com with some minor
-     changes by me.  ok markus@
-   - markus@cvs.openbsd.org 2001/03/26 08:07:09
-     [authfile.c authfile.h ssh-add.c ssh-keygen.c ssh.c sshconnect.c
-      sshconnect.h sshconnect1.c sshconnect2.c sshd.c]
-     simpler key load/save interface, see authfile.h
- - (djm) Reestablish PAM credentials (which can be supplemental group
-   memberships) after initgroups() blows them away. Report and suggested
-   fix from Nalin Dahyabhai <nalin@redhat.com>
-
-20010324
- - Fixed permissions ssh-keyscan.  Thanks to Christopher Linn <celinn@mtu.edu>.
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2001/03/23 11:04:07
-     [compat.c compat.h sshconnect2.c sshd.c]
-     Compat for OpenSSH with broken Rijndael/AES. ok markus@
-   - markus@cvs.openbsd.org 2001/03/23 12:02:49
-     [auth1.c]
-     authctxt is now passed to do_authenticated
-   - markus@cvs.openbsd.org 2001/03/23 13:10:57
-     [sftp-int.c]
-     fix put, upload to _absolute_ path, ok djm@
-   - markus@cvs.openbsd.org 2001/03/23 14:28:32
-     [session.c sshd.c]
-     ignore SIGPIPE, restore in child, fixes x11-fwd crashes; with djm@
- - (djm) Pull out our own SIGPIPE hacks
-
-20010323
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/03/22 20:22:55
-     [sshd.c]
-     do not place linefeeds in buffer
-
-20010322
- - (djm) Better AIX no tty fix, spotted by Gert Doering <gert@greenie.muc.de>
- - (bal) version.c CVS ID resync
- - (bal) auth-chall.c auth-passwd.c auth.h auth1.c auth2.c session.c CVS ID
-   resync
- - (bal) scp.c CVS ID resync
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/20 19:10:16
-     [readconf.c]
-     default to SSH protocol version 2
-   - markus@cvs.openbsd.org 2001/03/20 19:21:21
-     [session.c]
-     remove unused arg
-   - markus@cvs.openbsd.org 2001/03/20 19:21:21
-     [session.c]
-     remove unused arg
-   - markus@cvs.openbsd.org 2001/03/21 11:43:45
-     [auth1.c auth2.c session.c session.h]
-     merge common ssh v1/2 code
-   - jakob@cvs.openbsd.org 2001/03/21 14:20:45
-     [ssh-keygen.c]
-     add -B flag to usage
-   - markus@cvs.openbsd.org 2001/03/21 21:06:30
-     [session.c]
-     missing init; from mib@unimelb.edu.au
-
-20010321
- - (djm) Fix ttyname breakage for AIX and Tru64. Patch from Steve
-   VanDevender <stevev@darkwing.uoregon.edu>
- - (djm) Make sure pam_retval is initialised on call to pam_end. Patch
-   from Solar Designer <solar@openwall.com>
- - (djm) Don't loop forever when changing password via PAM. Patch
-   from Solar Designer <solar@openwall.com>
- - (djm) Generate config files before build
- - (djm) Correctly handle SIA and AIX when no tty present. Spotted and
-   suggested fix from Mike Battersby <mib@unimelb.edu.au>
-
-20010320
- - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS).
- - (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS).
- - (bal) Oops.  Missed globc.h change (OpenBSD CVS).
- - (djm) OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/19 17:07:23
-     [auth.c readconf.c]
-     undo /etc/shell and proto 2,1 change for openssh-2.5.2
-   - markus@cvs.openbsd.org 2001/03/19 17:12:10
-     [version.h]
-     version 2.5.2
- - (djm) Update RPM spec version
- - (djm) Release 2.5.2p1
-- tim@mindrot.org 2001/03/19 18:33:47 [defines.h]
-  change S_ISLNK macro to work for UnixWare 2.03
-- tim@mindrot.org 2001/03/19 20:45:11 [openbsd-compat/glob.c]
-  add get_arg_max(). Use sysconf() if ARG_MAX is not defined
-
-20010319
- - (djm) Seed PRNG at startup, rather than waiting for arc4random calls to
-   do it implicitly.
- - (djm) Add getusershell() functions from OpenBSD CVS
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/18 12:07:52
-     [auth-options.c]
-     ignore permitopen="host:port" if AllowTcpForwarding==no
- - (djm) Make scp work on systems without 64-bit ints
- - tim@mindrot.org 2001/03/18 18:28:39 [defines.h]
-   move HAVE_LONG_LONG_INT where it works
- - (bal) Use 'NGROUPS' for NeXT Since 'MAX_NGROUPS' is wrapped up in -lposix
-   stuff.  Change suggested by Mark Miller <markm@swoon.net>
- - (bal) Small fix to scp.  %lu vs %ld
- - (bal) NeXTStep lacks S_ISLNK.  Plus split up S_IS*
- - (djm) OpenBSD CVS Sync
-   - djm@cvs.openbsd.org     2001/03/19 03:52:51
-     [sftp-client.c]
-     Report ssh connection closing correctly; ok deraadt@
-   - deraadt@cvs.openbsd.org 2001/03/18 23:30:55
-     [compat.c compat.h sshd.c]
-     specifically version match on ssh scanners.  do not log scan
-     information to the console
-   - djm@cvs.openbsd.org      2001/03/19 12:10:17
-     [sshd.8]
-     Document permitopen authorized_keys option; ok markus@
-   - djm@cvs.openbsd.org     2001/03/19 05:49:52
-     [ssh.1]
-     document PreferredAuthentications option; ok markus@
- - (bal) Minor NeXT fixed.  Forgot to #undef NGROUPS_MAX
-
-20010318
- - (bal) Fixed scp type casing issue which causes "scp: protocol error:
-   size not delimited" fatal errors when tranfering.
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/17 17:27:59
-     [auth.c]
-     check /etc/shells, too
- - tim@mindrot.org 2001/03/17 18:45:25 [compat.c]
-     openbsd-compat/fake-regex.h
-
-20010317
- - Support usrinfo() on AIX. Based on patch from Gert Doering
-   <gert@greenie.muc.de>
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/15 15:05:59
-     [scp.c]
-     use %lld in printf, ok millert@/deraadt@; report from ssh@client.fi
-   - markus@cvs.openbsd.org 2001/03/15 22:07:08
-     [session.c]
-     pass Session to do_child + KNF
-   - djm@cvs.openbsd.org 2001/03/16 08:16:18
-     [sftp-client.c sftp-client.h sftp-glob.c sftp-int.c]
-     Revise globbing for get/put to be more shell-like. In particular,
-     "get/put file* directory/" now works. ok markus@
-   - markus@cvs.openbsd.org 2001/03/16 09:55:53
-     [sftp-int.c]
-     fix memset and whitespace
-   - markus@cvs.openbsd.org 2001/03/16 13:44:24
-     [sftp-int.c]
-     discourage strcat/strcpy
-   - markus@cvs.openbsd.org 2001/03/16 19:06:30
-     [auth-options.c channels.c channels.h serverloop.c session.c]
-     implement "permitopen" key option, restricts -L style forwarding to
-     to specified host:port pairs. based on work by harlan@genua.de
- - Check for gl_matchc support in glob_t and fall back to the
-   openbsd-compat/glob.[ch] support if it does not exist.
-
-20010315
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/14 08:57:14
-     [sftp-client.c]
-     Wall
-   - markus@cvs.openbsd.org 2001/03/14 15:15:58
-     [sftp-int.c]
-     add version command
-   - deraadt@cvs.openbsd.org 2001/03/14 22:50:25
-     [sftp-server.c]
-     note no getopt()
- - (stevesk) ssh-keyscan.c: specify "openbsd-compat/fake-queue.h"
- - (bal) Cygwin README change by Corinna Vinschen <vinschen@redhat.com>
-
-20010314
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/13 17:34:42
-     [auth-options.c]
-     missing xfree, deny key on parse error; ok stevesk@
-   - djm@cvs.openbsd.org 2001/03/13 22:42:54
-     [sftp-client.c sftp-client.h sftp-glob.c sftp-glob.h sftp-int.c]
-     sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@
- - (bal) Fix strerror() in bsd-misc.c
- - (djm) Add replacement glob() from OpenBSD libc if the system glob is
-   missing or lacks the GLOB_ALTDIRFUNC extension
- - (djm) Remove -I$(srcdir)/openbsd-compat from CFLAGS, refer to headers
-   relatively. Avoids conflict between glob.h and /usr/include/glob.h
-
-20010313
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/12 22:02:02
-     [key.c key.h ssh-add.c ssh-keygen.c sshconnect.c sshconnect2.c]
-     remove old key_fingerprint interface, s/_ex//
-
-20010312
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/11 13:25:36
-     [auth2.c key.c]
-     debug
-   - jakob@cvs.openbsd.org 2001/03/11 15:03:16
-     [key.c key.h]
-     add improved fingerprint functions. based on work by Carsten
-     Raskgaard <cara@int.tele.dk> and modified by me. ok markus@.
-   - jakob@cvs.openbsd.org 2001/03/11 15:04:16
-     [ssh-keygen.1 ssh-keygen.c]
-     print both md5, sha1 and bubblebabble fingerprints when using
-     ssh-keygen -l -v. ok markus@.
-   - jakob@cvs.openbsd.org 2001/03/11 15:13:09
-     [key.c]
-     cleanup & shorten some var names key_fingerprint_bubblebabble.
-   - deraadt@cvs.openbsd.org 2001/03/11 16:39:03
-     [ssh-keygen.c]
-     KNF, and SHA1 binary output is just creeping featurism
- - tim@mindrot.org 2001/03/11 17:29:32 [configure.in]
-   test if snprintf() supports %ll
-   add /dev to search path for PRNGD/EGD socket
-   fix my mistake in USER_PATH test program
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/11 18:29:51
-     [key.c]
-     style+cleanup
-   - markus@cvs.openbsd.org 2001/03/11 22:33:24
-     [ssh-keygen.1 ssh-keygen.c]
-     remove -v again. use -B instead for bubblebabble. make -B consistent
-     with -l and make -B work with /path/to/known_hosts. ok deraadt@
- - (djm) Bump portable version number for generating test RPMs
- - (djm) Add "static_openssl" RPM build option, remove rsh build dependency
- - (bal) Reorder includes in Makefile.
-
-20010311
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/10 12:48:27
-     [sshconnect2.c]
-     ignore nonexisting private keys; report rjmooney@mediaone.net
-   - deraadt@cvs.openbsd.org 2001/03/10 12:53:51
-     [readconf.c ssh_config]
-     default to SSH2, now that m68k runs fast
-   - stevesk@cvs.openbsd.org 2001/03/10 15:02:05
-     [ttymodes.c ttymodes.h]
-     remove unused sgtty macros; ok markus@
-   - deraadt@cvs.openbsd.org 2001/03/10 15:31:00
-     [compat.c compat.h sshconnect.c]
-     all known netscreen ssh versions, and older versions of OSU ssh cannot
-     handle password padding (newer OSU is fixed)
- - tim@mindrot.org 2001/03/10 16:33:42 [configure.in Makefile.in sshd_config]
-   make sure $bindir is in USER_PATH so scp will work
- - OpenBSD CVS Sync
-   - markus@cvs.openbsd.org 2001/03/10 17:51:04
-     [kex.c match.c match.h readconf.c readconf.h sshconnect2.c]
-     add PreferredAuthentications
-
-20010310
- - OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/03/09 03:14:39
-     [ssh-keygen.c]
-     create *.pub files with umask 0644, so that you can mv them to
-     authorized_keys
-   - deraadt@cvs.openbsd.org 2001/03/09 12:30:29
-     [sshd.c]
-     typo; slade@shore.net
- - Removed log.o from sftp client.  Not needed.
-
-20010309
- - OpenBSD CVS Sync
-   - stevesk@cvs.openbsd.org 2001/03/08 18:47:12
-     [auth1.c]
-     unused; ok markus@
-   - stevesk@cvs.openbsd.org 2001/03/08 20:44:48
-     [sftp.1]
-     spelling, cleanup; ok deraadt@
-   - markus@cvs.openbsd.org 2001/03/08 21:42:33
-     [compat.c compat.h readconf.h ssh.c sshconnect1.c sshconnect2.c]
-     implement client side of SSH2_MSG_USERAUTH_PK_OK (test public key ->
-     no need to do enter passphrase or do expensive sign operations if the
-     server does not accept key).
-
-20010308
- - OpenBSD CVS Sync
-   - djm@cvs.openbsd.org 2001/03/07 10:11:23
-     [sftp-client.c sftp-client.h sftp-int.c sftp-server.c sftp.1 sftp.c sftp.h]
-     Support for new draft (draft-ietf-secsh-filexfer-01). New symlink handling
-     functions and small protocol change.
-   - markus@cvs.openbsd.org 2001/03/08 00:15:48
-     [readconf.c ssh.1]
-     turn off useprivilegedports by default. only rhost-auth needs
-     this. older sshd's may need this, too.
- - (stevesk) Reliant Unix (SNI) needs HAVE_BOGUS_SYS_QUEUE_H;
-   Dirk Markwardt <D.Markwardt@tu-bs.de>
-
-20010307
- - (bal) OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/03/06 06:11:18
-     [ssh-keyscan.c]
-     appease gcc
-   - deraadt@cvs.openbsd.org 2001/03/06 06:11:44
-     [sftp-int.c sftp.1 sftp.c]
-     sftp -b batchfile; mouring@etoh.eviladmin.org
-   - deraadt@cvs.openbsd.org 2001/03/06 15:10:42
-     [sftp.1]
-     order things
-   - deraadt@cvs.openbsd.org 2001/03/07 01:19:06
-     [ssh.1 sshd.8]
-     the name "secure shell" is boring, noone ever uses it
-   - deraadt@cvs.openbsd.org 2001/03/07 04:05:58
-     [ssh.1]
-     removed dated comment
- - Cygwin contrib improvements from Corinna Vinschen <vinschen@redhat.com>
-
-20010306
- - (bal) OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/03/05 14:28:47
-     [sshd.8]
-     alpha order; jcs@rt.fm
-   - stevesk@cvs.openbsd.org 2001/03/05 15:44:51
-     [servconf.c]
-     sync error message; ok markus@
-   - deraadt@cvs.openbsd.org 2001/03/05 15:56:16
-     [myproposal.h ssh.1]
-     switch to aes128-cbc/hmac-md5 by default in SSH2 -- faster;
-     provos & markus ok
-   - deraadt@cvs.openbsd.org 2001/03/05 16:07:15
-     [sshd.8]
-     detail default hmac setup too
-   - markus@cvs.openbsd.org 2001/03/05 17:17:21
-     [kex.c kex.h sshconnect2.c sshd.c]
-     generate a 2*need size (~300 instead of 1024/2048) random private
-     exponent during the DH key agreement. according to Niels (the great
-     german advisor) this is safe since /etc/primes contains strong
-     primes only.
-
-     References:
-             P. C. van Oorschot and M. J. Wiener, On Diffie-Hellman key
-             agreement with short exponents, In Advances in Cryptology
-             - EUROCRYPT'96, LNCS 1070, Springer-Verlag, 1996, pp.332-343.
-   - stevesk@cvs.openbsd.org 2001/03/05 17:40:48
-     [ssh.1]
-     more ssh_known_hosts2 documentation; ok markus@
-   - stevesk@cvs.openbsd.org 2001/03/05 17:58:22
-     [dh.c]
-     spelling
-   - deraadt@cvs.openbsd.org 2001/03/06 00:33:04
-     [authfd.c cli.c ssh-agent.c]
-     EINTR/EAGAIN handling is required in more cases
-   - millert@cvs.openbsd.org 2001/03/06 01:06:03
-     [ssh-keyscan.c]
-     Don't assume we wil get the version string all in one read().
-     deraadt@ OK'd
-   - millert@cvs.openbsd.org 2001/03/06 01:08:27
-     [clientloop.c]
-     If read() fails with EINTR deal with it the same way we treat EAGAIN
-
-20010305
- - (bal) CVS ID touch up on sshpty.[ch] and sshlogin.[ch]
- - (bal) CVS ID touch up on sftp-int.c
- - (bal) CVS ID touch up on uuencode.c
- - (bal) CVS ID touch up on auth2.c, serverloop.c, session.c & sshd.c
- - (bal) OpenBSD CVS Sync
-   - deraadt@cvs.openbsd.org 2001/02/17 23:48:48
-     [sshd.8]
-     it's the OpenSSH one
-   - deraadt@cvs.openbsd.org 2001/02/21 07:37:04
-     [ssh-keyscan.c]
-     inline -> __inline__, and some indent
-   - deraadt@cvs.openbsd.org 2001/02/21 09:05:54
-     [authfile.c]
-     improve fd handling
-   - deraadt@cvs.openbsd.org 2001/02/21 09:12:56
-     [sftp-server.c]
-     careful with & and &&; markus ok
-   - stevesk@cvs.openbsd.org 2001/02/21 21:14:04
-     [ssh.c]
-     -i supports DSA identities now; ok markus@
-   - deraadt@cvs.openbsd.org 2001/02/22 04:29:37
-     [servconf.c]
-     grammar; slade@shore.net
-   - deraadt@cvs.openbsd.org 2001/02/22 06:43:55
-     [ssh-keygen.1 ssh-keygen.c]
-     document -d, and -t defaults to rsa1
-   - deraadt@cvs.openbsd.org 2001/02/22 08:03:51
-     [ssh-keygen.1 ssh-keygen.c]
-     bye bye -d
-   - deraadt@cvs.openbsd.org 2001/02/22 18:09:06
-     [sshd_config]
-     activate RSA 2 key
-   - markus@cvs.openbsd.org 2001/02/22 21:57:27
-     [ssh.1 sshd.8]
-     typos/grammar from matt@anzen.com
-   - markus@cvs.openbsd.org 2001/02/22 21:59:44
-     [auth.c auth.h auth1.c auth2.c misc.c misc.h ssh.c]
-     use pwcopy in ssh.c, too
-   - markus@cvs.openbsd.org 2001/02/23 15:34:53
-     [serverloop.c]
-     debug2->3
-   - markus@cvs.openbsd.org 2001/02/23 18:15:13
-     [sshd.c]
-     the random session key depends now on the session_key_int
-     sent by the 'attacker'
-             dig1 = md5(cookie|session_key_int);
-             dig2 = md5(dig1|cookie|session_key_int);
-             fake_session_key = dig1|dig2;
-     this change is caused by a mail from anakin@pobox.com
-     patch based on discussions with my german advisor niels@openbsd.org
-   - deraadt@cvs.openbsd.org 2001/02/24 10:37:55
-     [readconf.c]
-     look for id_rsa by default, before id_dsa
-   - deraadt@cvs.openbsd.org 2001/02/24 10:37:26
-     [sshd_config]
-     ssh2 rsa key before dsa key
-   - markus@cvs.openbsd.org 2001/02/27 10:35:27
-     [packet.c]
-     fix random padding
-   - markus@cvs.openbsd.org 2001/02/27 11:00:11
-     [compat.c]
-     support SSH-2.0-2.1 ; from Christophe_Moret@hp.com
-   - deraadt@cvs.openbsd.org 2001/02/28 05:34:28
-     [misc.c]
-     pull in protos
-   - deraadt@cvs.openbsd.org 2001/02/28 05:36:28
-     [sftp.c]
-     do not kill the subprocess on termination (we will see if this helps
-     things or hurts things)
-   - markus@cvs.openbsd.org 2001/02/28 08:45:39
-     [clientloop.c]
-     fix byte counts for ssh protocol v1
-   - markus@cvs.openbsd.org 2001/02/28 08:54:55
-     [channels.c nchan.c nchan.h]
-     make sure remote stderr does not get truncated.
-     remove closed fd's from the select mask.
-   - markus@cvs.openbsd.org 2001/02/28 09:57:07
-     [packet.c packet.h sshconnect2.c]
-     in ssh protocol v2 use ignore messages for padding (instead of
-     trailing \0).
-   - markus@cvs.openbsd.org 2001/02/28 12:55:07
-     [channels.c]
-     unify debug messages
-   - deraadt@cvs.openbsd.org 2001/02/28 17:52:54
-     [misc.c]
-     for completeness, copy pw_gecos too
-   - markus@cvs.openbsd.org 2001/02/28 21:21:41
-     [sshd.c]
-     generate a fake session id, too
-   - markus@cvs.openbsd.org 2001/02/28 21:27:48
-     [channels.c packet.c packet.h serverloop.c]
-     use ignore message to simulate a SSH2_MSG_CHANNEL_DATA message
-     use random content in ignore messages.
-   - markus@cvs.openbsd.org 2001/02/28 21:31:32
-     [channels.c]
-     typo
-   - deraadt@cvs.openbsd.org 2001/03/01 02:11:25
-     [authfd.c]
-     split line so that p will have an easier time next time around
-   - deraadt@cvs.openbsd.org 2001/03/01 02:29:04
-     [ssh.c]
-     shorten usage by a line
-   - deraadt@cvs.openbsd.org 2001/03/01 02:45:10
-     [auth-rsa.c auth2.c deattack.c packet.c]
-     KNF
-   - deraadt@cvs.openbsd.org 2001/03/01 03:38:33
-     [cli.c cli.h rijndael.h ssh-keyscan.1]
-     copyright notices on all source files
-   - markus@cvs.openbsd.org 2001/03/01 22:46:37
-     [ssh.c]
-     don't truncate remote ssh-2 commands; from mkubita@securities.cz
-     use min, not max for logging, fixes overflow.
-   - deraadt@cvs.openbsd.org 2001/03/02 06:21:01
-     [sshd.8]
-     explain SIGHUP better
-   - deraadt@cvs.openbsd.org 2001/03/02 09:42:49
-     [sshd.8]
-     doc the dsa/rsa key pair files
-   - deraadt@cvs.openbsd.org 2001/03/02 18:54:31
-     [atomicio.c atomicio.h auth-chall.c auth.c auth2-chall.c crc32.h
-      scp.c serverloop.c session.c sftp-server.8 sftp.1 ssh-add.1 ssh-add.c
-      ssh-agent.1 ssh-agent.c ssh-keygen.1 ssh.1 sshd.8]
-     make copyright lines the same format
-   - deraadt@cvs.openbsd.org 2001/03/03 06:53:12
-     [ssh-keyscan.c]
-     standard theo sweep
-   - millert@cvs.openbsd.org 2001/03/03 21:19:41
-     [ssh-keyscan.c]
-     Dynamically allocate read_wait and its copies.  Since maxfd is
-     based on resource limits it is often (usually?) larger than FD_SETSIZE.
-   - millert@cvs.openbsd.org 2001/03/03 21:40:30
-     [sftp-server.c]
-     Dynamically allocate fd_set; deraadt@ OK
-   - millert@cvs.openbsd.org 2001/03/03 21:41:07
-     [packet.c]
-     Dynamically allocate fd_set; deraadt@ OK
-   - deraadt@cvs.openbsd.org 2001/03/03 22:07:50
-     [sftp-server.c]
-     KNF
-   - markus@cvs.openbsd.org 2001/03/03 23:52:22
-     [sftp.c]
-     clean up arg processing. based on work by Christophe_Moret@hp.com
-   - markus@cvs.openbsd.org 2001/03/03 23:59:34
-     [log.c ssh.c]
-     log*.c -> log.c
-   - markus@cvs.openbsd.org 2001/03/04 00:03:59
-     [channels.c]
-     debug1->2
-   - stevesk@cvs.openbsd.org 2001/03/04 10:57:53
-     [ssh.c]
-     add -m to usage; ok markus@
-   - stevesk@cvs.openbsd.org 2001/03/04 11:04:41
-     [sshd.8]
-     small cleanup and clarify for PermitRootLogin; ok markus@
-   - stevesk@cvs.openbsd.org 2001/03/04 11:16:06
-     [servconf.c sshd.8]
-     kill obsolete RandomSeed; ok markus@ deraadt@
-   - stevesk@cvs.openbsd.org 2001/03/04 12:54:04
-     [sshd.8]
-     spelling
-   - millert@cvs.openbsd.org 2001/03/04 17:42:28
-     [authfd.c channels.c dh.c log.c readconf.c servconf.c sftp-int.c
-      ssh.c sshconnect.c sshd.c]
-     log functions should not be passed strings that end in newline as they
-     get passed on to syslog() and when logging to stderr, do_log() appends
-     its own newline.
-   - deraadt@cvs.openbsd.org 2001/03/04 18:21:28
-     [sshd.8]
-     list SSH2 ciphers
- - (bal) Put HAVE_PW_CLASS_IN_PASSWD back into pwcopy()
- - (bal) Fix up logging since it changed.  removed log-*.c
- - (djm) Fix up LOG_AUTHPRIV for systems that have it
- - (stevesk) OpenBSD sync:
-   - deraadt@cvs.openbsd.org 2001/03/05 08:37:27
-     [ssh-keyscan.c]
-     skip inlining, why bother
- - (stevesk) sftp.c: handle __progname
-
-20010304
- - (bal) Remove make-ssh-known-hosts.1 since it's no longer valid.
- - (bal) Updated contrib/README to remove 'make-ssh-known-hosts' and
-   give Mark Roth credit for mdoc2man.pl
-
-20010303
- - (djm) Remove make-ssh-known-hosts.pl, ssh-keyscan is better.
- - (djm) Document PAM ChallengeResponseAuthentication in sshd.8
- - (djm) Disable and comment ChallengeResponseAuthentication in sshd_config
- - (djm) Allow PRNGd entropy collection from localhost TCP socket. Replace
-   "--with-egd-pool" configure option with "--with-prngd-socket" and
-   "--with-prngd-port" options. Debugged and improved by Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE>
-
-20010301
- - (djm) Properly add -lcrypt if needed.
- - (djm) Force standard PAM conversation function in a few more places.
-   Patch from Redhat 2.5.1p1-2 RPM, probably Nalin Dahyabhai
-   <nalin@redhat.com>
- - (djm) Cygwin needs pw->pw_gecos copied too. Patch from Corinna Vinschen
-   <vinschen@redhat.com>
- - (djm) Released 2.5.1p2
-
-20010228
- - (djm) Detect endianness in configure and use it in rijndael.c. Fixes
-   "Bad packet length" bugs.
- - (djm) Fully revert PAM session patch (again). All PAM session init is
-   now done before the final fork().
- - (djm) EGD detection patch from Tim Rice <tim@multitalents.net>
- - (djm) Remove /tmp from EGD socket search list
-
-20010227
- - (bal) Applied shutdown() patch for sftp.c by  Corinna Vinschen
-   <vinschen@redhat.com>
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/02/23 15:37:45
-     [session.c]
-     handle SSH_PROTOFLAG_SCREEN_NUMBER for buggy clients
- - (bal) sshd.init support for all Redhat release.  Patch by Jim Knoble
-   <jmknoble@jmknoble.cx>
- - (djm) Fix up POSIX saved uid support. Report from Mark Miller
-   <markm@swoon.net>
- - (djm) Search for -lcrypt on FreeBSD too
- - (djm) fatal() on OpenSSL version mismatch
- - (djm) Move PAM init to after fork for non-Solaris derived PAMs
- - (djm) Warning fix on entropy.c saved uid stuff. Patch from Mark Miller
-   <markm@swoon.net>
- - (djm) Fix PAM fix
- - (djm) Remove 'noreplace' flag from sshd_config in RPM spec files. This
-   change is being made as 2.5.x configfiles are not back-compatible with
-   2.3.x.
- - (djm) Avoid warnings for missing broken IP_TOS. Patch from Mark Miller
-   <markm@swoon.net>
- - (djm) Open Server 5 doesn't need BROKEN_SAVED_UIDS. Patch from Tim Rice
-   <tim@multitalents.net>
- - (djm) Avoid multiple definition of _PATH_LS. Patch from Tim Rice
-   <tim@multitalents.net>
-
-20010226
- - (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again.
- - (djm) Some systems (SCO3, NeXT) have weird saved uid semantics.
-   Based on patch from Tim Rice <tim@multitalents.net>
-
-20010225
- - (djm) Use %{_libexecdir} rather than hardcoded path in RPM specfile
-   Patch from Adrian Ho <lexfiend@usa.net>
- - (bal) Replace 'unsigned long long' to 'u_int64_t' since not every
-   platform defines u_int64_t as being that.
-
-20010224
- - (bal) Missed part of the UNIX sockets patch.  Patch by Corinna
-   Vinschen <vinschen@redhat.com>
- - (bal) Reorder where 'strftime' is detected to resolve linking
-   issues on SCO.  Patch by Tim Rice <tim@multitalents.net>
-
-20010224
- - (bal) pam_stack fix to correctly detect between RH7 and older RHs.
-   Patch by Pekka Savola <pekkas@netcore.fi>
- - (bal) Renamed sigaction.[ch] to sigact.[ch].  Causes problems with
-   some platforms.
- - (bal) Generalize lack of UNIX sockets since this also effects Cray
-   not just Cygwin.  Based on patch by Wendy Palm <wendyp@cray.com>
-
-20010223
- - (bal) Fix --define rh7 in openssh.spec file.  Patch by Steve Tell
-   <tell@telltronics.org>
- - (bal) Patch to force OpenSSH rpm to require the same version of OpenSSL
-   that it was compiled against.  Patch by Pekka Savola <pekkas@netcore.fi>
- - (bal) Double -I for OpenSSL on SCO.  Patch by Tim Rice
-   <tim@multitalents.net>
-
-20010222
- - (bal) Corrected SCO luid patch by svaughan <svaughan@asterion.com>
- - (bal) Added mdoc2man.pl from Mark Roth <roth@feep.net>
- - (bal) Removed reference to liblogin from contrib/README.  It was
-   integrated into OpenSSH a long while ago.
- - (stevesk) remove erroneous #ifdef sgi code.
-   Michael Stone <mstone@cs.loyola.edu>
-
-20010221
- - (bal) Removed -L/usr/ucblib -R/usr/ucblib for Solaris platform.
- - (bal) Fixed OpenSSL rework to use $saved_*.  Patch by Tim Rice
-   <tim@multitalents.net>
- - (bal) Reverted out of 2001/02/15 patch by djm below because it
-   breaks Solaris.
-       - (djm) Move PAM session setup back to before setuid to user.
-         fixes problems on Solaris-drived PAMs.
- - (stevesk) session.c: back out to where we were before:
-    - (djm) Move PAM session initialisation until after fork in sshd. Patch
-      from Nalin Dahyabhai <nalin@redhat.com>
-
-20010220
- - (bal) Fix mixed up params to memmove() from Jan 5th in setenv.c and
-   getcwd.c.
- - (bal) OpenBSD CVS Sync:
-   - deraadt@cvs.openbsd.org 2001/02/19 23:09:05
-     [sshd.c]
-     clarify message to make it not mention "ident"
-
-20010219
- - (bal) Markus' blessing to rename login.[ch] -> sshlogin.[ch] and
-   pty.[ch] -> sshpty.[ch]
- - (djm) Rework search for OpenSSL location. Skip directories which don't
-   exist, don't add -L$ssldir/lib if it doesn't exist. Should help SCO
-   with its limit of 6 -L options.
- - OpenBSD CVS Sync:
-   - reinhard@cvs.openbsd.org        2001/02/17 08:24:40
-     [sftp.1]
-     typo
-   - deraadt@cvs.openbsd.org 2001/02/17 16:28:58
-     [ssh.c]
-     cleanup -V output; noted by millert
-   - deraadt@cvs.openbsd.org 2001/02/17 16:48:48
-     [sshd.8]
-     it's the OpenSSH one
-   - markus@cvs.openbsd.org  2001/02/18 11:33:54
-     [dispatch.c]
-     typo, SSH2_MSG_KEXINIT, from aspa@kronodoc.fi
-   - markus@cvs.openbsd.org  2001/02/19 02:53:32
-     [compat.c compat.h serverloop.c]
-     ssh-1.2.{18-22} has broken handling of ignore messages; report from
-     itojun@
-   - markus@cvs.openbsd.org  2001/02/19 03:35:23
-     [version.h]
-     OpenSSH_2.5.1 adds bug compat with 1.2.{18-22}
-   - deraadt@cvs.openbsd.org 2001/02/19 03:36:25
-     [scp.c]
-     np is changed by recursion; vinschen@redhat.com
- - Update versions in RPM spec files
- - Release 2.5.1p1
-
-20010218
- - (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice
-   <tim@multitalents.net>
- - (Bal) Patch for lack of RA_RESTART in misc.c for mysignal by
-   stevesk
- - (djm) Fix my breaking of cygwin builds, Patch from Corinna Vinschen
-   <vinschen@redhat.com> and myself.
- - (djm) Close listen_sock on bind() failures. Patch from Arkadiusz
-   Miskiewicz <misiek@pld.ORG.PL>
- - (djm) Robustify EGD/PRNGd code in face of socket closures. Patch from
-   Todd C. Miller <Todd.Miller@courtesan.com>
- - (djm) Use ttyname() to determine name of tty returned by openpty()
-   rather then risking overflow. Patch from Marek Michalkiewicz
-   <marekm@amelek.gda.pl>
- - (djm) Swapped tests for no_libsocket and no_libnsl in configure.in.
-   Patch from Marek Michalkiewicz <marekm@amelek.gda.pl>
- - (djm) Doc fixes from Pekka Savola <pekkas@netcore.fi>
- - (djm) Use SA_INTERRUPT along SA_RESTART if present (equivalent for
-   SunOS)
- - (djm) SCO needs librpc for libwrap. Patch from Tim Rice
-   <tim@multitalents.net>
- - (stevesk) misc.c: cpp rework of SA_(INTERRUPT|RESTART) handling.
- - (stevesk) scp.c: use mysignal() for updateprogressmeter() handler.
- - (djm) SA_INTERRUPT is the converse of SA_RESTART, apply it only for
-   SIGALRM.
- - (djm) Move entropy.c over to mysignal()
- - (djm) SunOS 4.x also needs to define HAVE_BOGUS_SYS_QUEUE_H as it has
-   a <sys/queue.h> that lacks the TAILQ_* macros. Patch from Todd C.
-   Miller <Todd.Miller@courtesan.com>
- - (djm) Update RPM spec files for 2.5.0p1
- - (djm) Merge BSD_AUTH support from Markus Friedl and David J. MacKenzie
-   enable with --with-bsd-auth.
- - (stevesk) entropy.c: typo; should be SIGPIPE
-
-20010217
- - (bal) OpenBSD Sync:
-   - markus@cvs.openbsd.org 2001/02/16 13:38:18
-     [channel.c]
-     remove debug
-   - markus@cvs.openbsd.org 2001/02/16 14:03:43
-     [session.c]
-     proper payload-length check for x11 w/o screen-number
-
-20010216
- - (bal) added '--with-prce'  to allow overriding of system regex when
-   required (tested by David Dulek <ddulek@fastenal.com>)
- - (bal) Added DG/UX case and set that they have a broken IPTOS.
- - (djm) Mini-configure reorder patch from Tim Rice <tim@multitalents.net>
-   Fixes linking on SCO.
- - (djm) Make gnome-ssh-askpass handle multi-line prompts. Patch from
-   Nalin Dahyabhai <nalin@redhat.com>
- - (djm) BSD license for gnome-ssh-askpass (was X11)
- - (djm) KNF on gnome-ssh-askpass
- - (djm) USE_PIPES for a few more sysv platforms
- - (djm) Cleanup configure.in a little
- - (djm) Ask users to check config.log when we can't find necessary libs
- - (djm) Set "login ID" on systems with setluid. Only enabled for SCO
-   OpenServer for now. Based on patch from svaughan <svaughan@asterion.com>
- - (djm) OpenBSD CVS:
-   - markus@cvs.openbsd.org  2001/02/15 16:19:59
-     [channels.c channels.h serverloop.c sshconnect.c sshconnect.h]
-     [sshconnect1.c sshconnect2.c]
-     genericize password padding function for SSH1 and SSH2.
-     add stylized echo to 2, too.
- - (djm) Add roundup() macro to defines.h
- - (stevesk) set SA_RESTART flag in mysignal() for SIGCHLD;
-   needed on Unixware 2.x.
-
-20010215
- - (djm) Move PAM session setup back to before setuid to user. Fixes
-   problems on Solaris-derived PAMs.
- - (djm) Clean up PAM namespace. Suggested by Darren Moffat
-   <Darren.Moffat@eng.sun.com>
- - (bal) Sync w/ OpenSSH for new release
-   - markus@cvs.openbsd.org 2001/02/12 12:45:06
-     [sshconnect1.c]
-     fix xmalloc(0), ok dugsong@
-   - markus@cvs.openbsd.org 2001/02/11 12:59:25
-     [Makefile.in sshd.8 sshconnect2.c readconf.h readconf.c packet.c
-      sshd.c ssh.c ssh.1 servconf.h servconf.c myproposal.h kex.h kex.c]
-     1) clean up the MAC support for SSH-2
-     2) allow you to specify the MAC with 'ssh -m'
-     3) or the 'MACs' keyword in ssh(d)_config
-     4) add hmac-{md5,sha1}-96
-             ok stevesk@, provos@
-   - markus@cvs.openbsd.org 2001/02/12 16:16:23
-     [auth-passwd.c auth.c auth.h auth1.c auth2.c servconf.c servconf.h
-      ssh-keygen.c sshd.8]
-     PermitRootLogin={yes,without-password,forced-commands-only,no}
-     (before this change, root could login even if PermitRootLogin==no)
-   - deraadt@cvs.openbsd.org 2001/02/12 22:56:09
-     [clientloop.c packet.c ssh-keyscan.c]
-     deal with EAGAIN/EINTR selects which were skipped
-   - markus@cvs.openssh.org 2001/02/13 22:49:40
-     [auth1.c auth2.c]
-     setproctitle(user) only if getpwnam succeeds
-   - markus@cvs.openbsd.org 2001/02/12 23:26:20
-     [sshd.c]
-     missing memset; from solar@openwall.com
-   - stevesk@cvs.openbsd.org 2001/02/12 20:53:33
-     [sftp-int.c]
-     lumask now works with 1 numeric arg; ok markus@, djm@
-   - djm@cvs.openbsd.org 2001/02/14 9:46:03
-     [sftp-client.c sftp-int.c sftp.1]
-     Fix and document 'preserve modes & times' option ('-p' flag in sftp);
-     ok markus@
- - (bal) replaced PATH_MAX in sftp-int.c w/ MAXPATHLEN.
- - (djm) Move to Jim's 1.2.0 X11 askpass program
- - (stevesk) OpenBSD sync:
-   - deraadt@cvs.openbsd.org 2001/02/15 01:38:04
-     [serverloop.c]
-     indent
-
-20010214
- - (djm) Don't try to close PAM session or delete credentials if the
-   session has not been open or credentials not set. Based on patch from
-   Andrew Bartlett <abartlet@pcug.org.au>
- - (djm) Move PAM session initialisation until after fork in sshd. Patch
-   from Nalin Dahyabhai <nalin@redhat.com>
- - (bal) Missing function prototype in bsd-snprintf.c patch by
-   Mark Miller <markm@swoon.net>
- - (djm) Split out and improve OSF SIA auth code. Patch from Chris Adams
-   <cmadams@hiwaay.net> with a little modification and KNF.
- - (stevesk) fix for SIA patch, misplaced session_setup_sia()
-
-20010213
- - (djm) Only test -S potential EGD sockets if they exist and are readable.
- - (bal) Cleaned out bsd-snprintf.c.  VARARGS have been banished and
-   I did a base KNF over the whe whole file to make it more acceptable.
-   (backed out of original patch and removed it from ChangeLog)
- - (bal) Use chown() if fchown() does not exist in ftp-server.c patch by
-   Tim Rice <tim@multitalents.net>
- - (stevesk) auth1.c: fix PAM passwordless check.
-
-20010212
- - (djm) Update Redhat specfile to allow --define "skip_x11_askpass 1",
-   --define "skip_gnome_askpass 1", --define "rh7 1" and make the
-   implicit rpm-3.0.5 dependancy explicit. Patch and suggestions from
-   Pekka Savola <pekkas@netcore.fi>
- - (djm) Clean up PCRE text in INSTALL
- - (djm) Fix OSF SIA auth NULL pointer deref. Report from Mike Battersby
-   <mib@unimelb.edu.au>
- - (bal) NCR SVR4 compatiblity provide by Don Bragg <thewizarddon@yahoo.com>
- - (stevesk) session.c: remove debugging code.
-
-20010211
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/02/07 22:35:46
-     [auth1.c auth2.c sshd.c]
-     move k_setpag() to a central place; ok dugsong@
-   - markus@cvs.openbsd.org 2001/02/10 12:52:02
-     [auth2.c]
-     offer passwd before s/key
-   - markus@cvs.openbsd.org 2001/02/8 22:37:10
-     [canohost.c]
-     remove last call to sprintf; ok deraadt@
-   - markus@cvs.openbsd.org 2001/02/10 1:33:32
-     [canohost.c]
-     add debug message, since sshd blocks here if DNS is not available
-   - markus@cvs.openbsd.org 2001/02/10 12:44:02
-     [cli.c]
-     don't call vis() for \r
-   - danh@cvs.openbsd.org 2001/02/10 0:12:43
-     [scp.c]
-     revert a small change to allow -r option to work again; ok deraadt@
-   - danh@cvs.openbsd.org 2001/02/10 15:14:11
-     [scp.c]
-     fix memory leak; ok markus@
-   - djm@cvs.openbsd.org 2001/02/10 0:45:52
-     [scp.1]
-     Mention that you can quote pathnames with spaces in them
-   - markus@cvs.openbsd.org 2001/02/10 1:46:28
-     [ssh.c]
-     remove mapping of argv[0] -> hostname
-   - markus@cvs.openbsd.org 2001/02/06 22:26:17
-     [sshconnect2.c]
-     do not ask for passphrase in batch mode; report from ejb@ql.org
-   - itojun@cvs.opebsd.org 2001/02/08 10:47:05
-     [sshconnect.c sshconnect1.c sshconnect2.c]
-     %.30s is too short for IPv6 numeric address.  use %.128s for now.
-     markus ok
-   - markus@cvs.openbsd.org 2001/02/09 12:28:35
-     [sshconnect2.c]
-     do not free twice, thanks to /etc/malloc.conf
-   - markus@cvs.openbsd.org 2001/02/09 17:10:53
-     [sshconnect2.c]
-     partial success: debug->log; "Permission denied" if no more auth methods
-   - markus@cvs.openbsd.org 2001/02/10 12:09:21
-     [sshconnect2.c]
-     remove some lines
-   - markus@cvs.openbsd.org 2001/02/09 13:38:07
-     [auth-options.c]
-     reset options if no option is given; from han.holl@prismant.nl
-   - markus@cvs.openbsd.org 2001/02/08 21:58:28
-     [channels.c]
-     nuke sprintf, ok deraadt@
-   - markus@cvs.openbsd.org 2001/02/08 21:58:28
-     [channels.c]
-     nuke sprintf, ok deraadt@
-   - markus@cvs.openbsd.org 2001/02/06 22:43:02
-     [clientloop.h]
-     remove confusing callback code
-   - deraadt@cvs.openbsd.org 2001/02/08 14:39:36
-     [readconf.c]
-     snprintf
-   - itojun@cvs.openbsd.org 2001/02/08 19:30:52
-     sync with netbsd tree changes.
-     - more strict prototypes, include necessary headers
-     - use paths.h/pathnames.h decls
-     - size_t typecase to int -> u_long
-   - itojun@cvs.openbsd.org 2001/02/07 18:04:50
-     [ssh-keyscan.c]
-     fix size_t -> int cast (use u_long).  markus ok
-   - markus@cvs.openbsd.org 2001/02/07 22:43:16
-     [ssh-keyscan.c]
-     s/getline/Linebuf_getline/; from roumen.petrov@skalasoft.com
-   - itojun@cvs.openbsd.org 2001/02/09 9:04:59
-     [ssh-keyscan.c]
-     do not assume malloc() returns zero-filled region.  found by
-     malloc.conf=AJ.
-   - markus@cvs.openbsd.org 2001/02/08 22:35:30
-     [sshconnect.c]
-     don't connect if batch_mode is true and stricthostkeychecking set to
-    'ask'
-   - djm@cvs.openbsd.org 2001/02/04 21:26:07
-     [sshd_config]
-     type: ok markus@
-   - deraadt@cvs.openbsd.org 2001/02/06 22:07:50
-     [sshd_config]
-     enable sftp-server by default
-   - deraadt 2001/02/07 8:57:26
-     [xmalloc.c]
-     deal with new ANSI malloc stuff
-   - markus@cvs.openbsd.org 2001/02/07 16:46:08
-     [xmalloc.c]
-     typo in fatal()
-   - itojun@cvs.openbsd.org 2001/02/07 18:04:50
-     [xmalloc.c]
-     fix size_t -> int cast (use u_long).  markus ok
-   - 1.47 Thu Feb 8 23:11:42 GMT 2001 by dugsong
-     [serverloop.c sshconnect1.c]
-     mitigate SSH1 traffic analysis - from Solar Designer
-     <solar@openwall.com>, ok provos@
- - (bal) fixed sftp-client.c.  Return 'status' instead of '0'
-   (from the OpenBSD tree)
- - (bal) Synced ssh.1, ssh-add.1 and sshd.8 w/ OpenBSD
- - (bal) sftp-sever.c  '%8lld' to '%8llu' (OpenBSD Sync)
- - (bal) uuencode.c resync w/ OpenBSD tree, plus whitespace.
- - (bal) A bit more whitespace cleanup
- - (djm) Set PAM_RHOST earlier, patch from Andrew Bartlett
-   <abartlet@pcug.org.au>
- - (stevesk) misc.c: ssh.h not needed.
- - (stevesk) compat.c: more friendly cpp error
- - (stevesk) OpenBSD sync:
-   - stevesk@cvs.openbsd.org 2001/02/11 06:15:57
-     [LICENSE]
-     typos and small cleanup; ok deraadt@
-
-20010210
- - (djm) Sync sftp and scp stuff from OpenBSD:
-   - djm@cvs.openbsd.org     2001/02/07 03:55:13
-     [sftp-client.c]
-     Don't free handles before we are done with them. Based on work from
-     Corinna Vinschen <vinschen@redhat.com>. ok markus@
-   - djm@cvs.openbsd.org     2001/02/06 22:32:53
-     [sftp.1]
-     Punctuation fix from Pekka Savola <pekkas@netcore.fi>
-   - deraadt@cvs.openbsd.org 2001/02/07 04:07:29
-     [sftp.1]
-     pretty up significantly
-   - itojun@cvs.openbsd.org  2001/02/07 06:49:42
-     [sftp.1]
-     .Bl-.El mismatch.  markus ok
-   - djm@cvs.openbsd.org     2001/02/07 06:12:30
-     [sftp-int.c]
-     Check that target is a directory before doing ls; ok markus@
-   - itojun@cvs.openbsd.org  2001/02/07 11:01:18
-     [scp.c sftp-client.c sftp-server.c]
-     unsigned long long -> %llu, not %qu.  markus ok
-   - stevesk@cvs.openbsd.org 2001/02/07 11:10:39
-     [sftp.1 sftp-int.c]
-     more man page cleanup and sync of help text with man page; ok markus@
-   - markus@cvs.openbsd.org  2001/02/07 14:58:34
-     [sftp-client.c]
-     older servers reply with SSH2_FXP_NAME + count==0 instead of EOF
-   - djm@cvs.openbsd.org     2001/02/07 15:27:19
-     [sftp.c]
-     Don't forward agent and X11 in sftp. Suggestion from Roumen Petrov
-     <roumen.petrov@skalasoft.com>
-   - stevesk@cvs.openbsd.org 2001/02/07 15:36:04
-     [sftp-int.c]
-     portable; ok markus@
-   - stevesk@cvs.openbsd.org 2001/02/07 15:55:47
-     [sftp-int.c]
-     lowercase cmds[].c also; ok markus@
-   - markus@cvs.openbsd.org  2001/02/07 17:04:52
-     [pathnames.h sftp.c]
-     allow sftp over ssh protocol 1; ok djm@
-   - deraadt@cvs.openbsd.org 2001/02/08 07:38:55
-     [scp.c]
-     memory leak fix, and snprintf throughout
-   - deraadt@cvs.openbsd.org 2001/02/08 08:02:02
-     [sftp-int.c]
-     plug a memory leak
-   - stevesk@cvs.openbsd.org 2001/02/08 10:11:23
-     [session.c sftp-client.c]
-     %i -> %d
-   - stevesk@cvs.openbsd.org 2001/02/08 10:57:59
-     [sftp-int.c]
-     typo
-   - stevesk@cvs.openbsd.org 2001/02/08 15:28:07
-     [sftp-int.c pathnames.h]
-     _PATH_LS; ok markus@
-   - djm@cvs.openbsd.org     2001/02/09 04:46:25
-     [sftp-int.c]
-     Check for NULL attribs for chown, chmod & chgrp operations, only send
-     relevant attribs back to server; ok markus@
-   - djm@cvs.openbsd.org     2001/02/06 15:05:25
-     [sftp.c]
-     Use getopt to process commandline arguments
-   - djm@cvs.openbsd.org     2001/02/06 15:06:21
-     [sftp.c ]
-     Wait for ssh subprocess at exit
-   - djm@cvs.openbsd.org     2001/02/06 15:18:16
-     [sftp-int.c]
-     stat target for remote chdir before doing chdir
-   - djm@cvs.openbsd.org     2001/02/06 15:32:54
-     [sftp.1]
-     Punctuation fix from Pekka Savola <pekkas@netcore.fi>
-   - provos@cvs.openbsd.org  2001/02/05 22:22:02
-     [sftp-int.c]
-     cleanup get_pathname, fix pwd after failed cd. okay djm@
- - (djm) Update makefile.in for _PATH_SFTP_SERVER
- - (bal) sftp-client.c replace NULL w/ 0 in do_ls() (pending in OpenBSD tree)
-
-20010209
- - (bal) patch to vis.c to deal with HAVE_VIS right by Robert Mooney
-   <rjmooney@mediaone.net>
- - (bal) .c.o rule in openbsd-compat/Makefile.in did not make it to the
-   main tree while porting forward.  Pointed out by Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - (bal) double entry in configure.in.  Pointed out by Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - (stevesk) OpenBSD sync:
-   - markus@cvs.openbsd.org  2001/02/08 11:20:01
-     [auth2.c]
-     strict checking
-   - markus@cvs.openbsd.org  2001/02/08 11:15:22
-     [version.h]
-     update to 2.3.2
-   - markus@cvs.openbsd.org  2001/02/08 11:12:30
-     [auth2.c]
-     fix typo
- - (djm) Update spec files
- - (bal) OpenBSD sync:
-   - deraadt@cvs.openbsd.org 2001/02/08 14:38:54
-     [scp.c]
-     memory leak fix, and snprintf throughout
-   - markus@cvs.openbsd.org 2001/02/06 22:43:02
-     [clientloop.c]
-     remove confusing callback code
- - (djm) Add CVS Id's to files that we have missed
- - (bal) OpenBSD Sync (more):
-   - itojun@cvs.openbsd.org 2001/02/08 19:30:52
-     sync with netbsd tree changes.
-     - more strict prototypes, include necessary headers
-     - use paths.h/pathnames.h decls
-     - size_t typecase to int -> u_long
-   - markus@cvs.openbsd.org 2001/02/06 22:07:42
-     [ssh.c]
-     fatal() if subsystem fails
-   - markus@cvs.openbsd.org 2001/02/06 22:43:02
-     [ssh.c]
-     remove confusing callback code
-   - jakob@cvs.openbsd.org 2001/02/06 23:03:24
-     [ssh.c]
-     add -1 option (force protocol version 1). ok markus@
-   - jakob@cvs.openbsd.org 2001/02/06 23:06:21
-     [ssh.c]
-     reorder -{1,2,4,6} options. ok markus@
- - (bal) Missing 'const' in readpass.h
- - (bal) OpenBSD Sync (so at least the thing compiles for 2.3.2 =)
-   - djm@cvs.openbsd.org 2001/02/06 23:30:28
-     [sftp-client.c]
-     replace arc4random with counter for request ids; ok markus@
- - (djm) Define _PATH_TTY for systems that don't. Report from Lutz
-   Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
-
-20010208
- - (djm) Don't delete external askpass program in make uninstall target.
-   Report and fix from Roumen Petrov <roumen.petrov@skalasoft.com>
- - (djm) Fix linking of sftp, don't need arc4random any more.
- - (djm) Try to use shell that supports "test -S" for EGD socket search.
-   Based on patch from Tim Rice <tim@multitalents.net>
-
-20010207
- - (bal) Save the whole path to AR in configure.  Some Solaris 2.7 installs
-   seem lose track of it while in openbsd-compat/  (two confirmed reports)
- - (djm) Much KNF on PAM code
- - (djm) Revise auth-pam.c conversation function to be a little more
-   readable.
- - (djm) Revise kbd-int PAM conversation function to fold all text messages
-   to before first prompt. Fixes hangs if last pam_message did not require
-   a reply.
- - (djm) Fix password changing when using PAM kbd-int authentication
-
-20010205
- - (bal) Disable groupaccess by setting NGROUPS_MAX to 0 for platforms
-   that don't have NGROUPS_MAX.
- - (bal) AIX patch for auth1.c by William L. Jones <jones@hpc.utexas.edu>
- - (stevesk) OpenBSD sync:
-   - stevesk@cvs.openbsd.org 2001/02/04 08:32:27
-     [many files; did this manually to our top-level source dir]
-     unexpand and remove end-of-line whitespace; ok markus@
-   - stevesk@cvs.openbsd.org 2001/02/04 15:21:19
-     [sftp-server.c]
-     SSH2_FILEXFER_ATTR_UIDGID support; ok markus@
-   - deraadt@cvs.openbsd.org 2001/02/04 17:02:32
-     [sftp-int.c]
-     ? == help
-   - deraadt@cvs.openbsd.org 2001/02/04 16:47:46
-     [sftp-int.c]
-     sort commands, so that abbreviations work as expected
-   - stevesk@cvs.openbsd.org 2001/02/04 15:17:52
-     [sftp-int.c]
-     debugging sftp: precedence and missing break.  chmod, chown, chgrp
-     seem to be working now.
-   - markus@cvs.openbsd.org 2001/02/04 14:41:21
-     [sftp-int.c]
-     use base 8 for umask/chmod
-   - markus@cvs.openbsd.org 2001/02/04 11:11:54
-     [sftp-int.c]
-     fix LCD
-   - markus@cvs.openbsd.org  2001/02/04 08:10:44
-     [ssh.1]
-     typo; dpo@club-internet.fr
-   - stevesk@cvs.openbsd.org 2001/02/04 06:30:12
-     [auth2.c authfd.c packet.c]
-     remove duplicate #include's; ok markus@
-   - deraadt@cvs.openbsd.org 2001/02/04 16:56:23
-     [scp.c sshd.c]
-     alpha happiness
-   - stevesk@cvs.openbsd.org 2001/02/04 15:12:17
-     [sshd.c]
-     precedence; ok markus@
-   - deraadt@cvs.openbsd.org 2001/02/04 08:14:15
-     [ssh.c sshd.c]
-     make the alpha happy
-   - markus@cvs.openbsd.org  2001/01/31 13:37:24
-     [channels.c channels.h serverloop.c ssh.c]
-     do not disconnect if local port forwarding fails, e.g. if port is
-     already in use
-   - markus@cvs.openbsd.org  2001/02/01 14:58:09
-     [channels.c]
-     use ipaddr in channel messages, ietf-secsh wants this
-   - markus@cvs.openbsd.org  2001/01/31 12:26:20
-     [channels.c]
-     ssh.com-2.0.1x does not send additional info in CHANNEL_OPEN_FAILURE
-     messages; bug report from edmundo@rano.org
-   - markus@cvs.openbsd.org  2001/01/31 13:48:09
-     [sshconnect2.c]
-     unused
-   - deraadt@cvs.openbsd.org 2001/02/04 08:23:08
-     [sftp-client.c sftp-server.c]
-     make gcc on the alpha even happier
-
-20010204
- - (bal) I think this is the last of the bsd-*.h that don't belong.
- - (bal) Minor Makefile fix
- - (bal) openbsd-compat/Makefile minor fix.  Ensure dependancies are done
-   right.
- - (bal) Changed order of LIB="" in -with-skey due to library resolving.
- - (bal) next-posix.h changed to bsd-nextstep.h
- - (djm) OpenBSD CVS sync:
-   - markus@cvs.openbsd.org  2001/02/03 03:08:38
-     [auth-options.c auth-rh-rsa.c auth-rhosts.c auth.c canohost.c]
-     [canohost.h servconf.c servconf.h session.c sshconnect1.c sshd.8]
-     [sshd_config]
-     make ReverseMappingCheck optional in sshd_config; ok djm@,dugsong@
-   - markus@cvs.openbsd.org  2001/02/03 03:19:51
-     [ssh.1 sshd.8 sshd_config]
-     Skey is now called ChallengeResponse
-   - markus@cvs.openbsd.org  2001/02/03 03:43:09
-     [sshd.8]
-     use no-pty option in .ssh/authorized_keys* if you need a 8-bit clean
-     channel. note from Erik.Anggard@cygate.se (pr/1659)
-   - stevesk@cvs.openbsd.org 2001/02/03 10:03:06
-     [ssh.1]
-     typos; ok markus@
-   - djm@cvs.openbsd.org     2001/02/04 04:11:56
-     [scp.1 sftp-server.c ssh.1 sshd.8 sftp-client.c sftp-client.h]
-     [sftp-common.c sftp-common.h sftp-int.c sftp-int.h sftp.1 sftp.c]
-     Basic interactive sftp client; ok theo@
- - (djm) Update RPM specs for new sftp binary
- - (djm) Update several bits for new optional reverse lookup stuff. I
-   think I got them all.
- - (djm) Makefile.in fixes
- - (stevesk) add mysignal() wrapper and use it for the protocol 2
-   SIGCHLD handler.
- - (djm) Use setvbuf() instead of setlinebuf(). Suggest from stevesk@
-
-20010203
- - (bal) Cygwin clean up by Corinna Vinschen <vinschen@redhat.com>
- - (bal) renamed queue.h to fake-queue.h (even if it's an OpenBSD
-   based file) to ensure #include space does not get confused.
- - (bal) Minor Makefile.in tweak.  dirname may not exist on some
-   platforms so builds fail.  (NeXT being a well known one)
-
-20010202
- - (bal) Makefile fix where sourcedir != builddir by Corinna Vinschen
-   <vinschen@redhat.com>
- - (bal) Makefile fix to use $(MAKE) instead of 'make'  for platforms
-   that use 'gmake'.   Patch by Tim Rice <tim@multitalents.net>
-
-20010201
- - (bal) Minor fix to Makefile to stop rebuilding executables if no
-   changes have occured to any of the supporting code.  Patch by
-   Roumen Petrov <roumen.petrov@skalasoft.com>
-
-20010131
- - (djm) OpenBSD CVS Sync:
-   - djm@cvs.openbsd.org     2001/01/30 15:48:53
-     [sshconnect.c]
-     Make warning message a little more consistent. ok markus@
- - (djm) Fix autoconf logic for --with-lastlog=no Report and diagnosis from
-   Philipp Buehler <lists@fips.de> and Kevin Steves <stevesk@sweden.hp.com>
-   respectively.
- - (djm) Don't log SSH2 PAM KbdInt responses to debug, they may contain
-   passwords.
- - (bal) Reorder.  Move all bsd-*, fake-*, next-*, and cygwin* stuff to
-   openbsd-compat/.  And resolve all ./configure and Makefile.in issues
-   assocated.
-
-20010130
- - (djm) OpenBSD CVS Sync:
-   - markus@cvs.openbsd.org  2001/01/29 09:55:37
-     [channels.c channels.h clientloop.c serverloop.c]
-     fix select overflow; ok deraadt@ and stevesk@
-   - markus@cvs.openbsd.org  2001/01/29 12:42:35
-     [canohost.c canohost.h channels.c clientloop.c]
-     add get_peer_ipaddr(socket), x11-fwd in ssh2 requires ipaddr, not DNS
-   - markus@cvs.openbsd.org  2001/01/29 12:47:32
-     [rsa.c rsa.h ssh-agent.c sshconnect1.c sshd.c]
-     handle rsa_private_decrypt failures; helps against the Bleichenbacher
-     pkcs#1 attack
-   - djm@cvs.openbsd.org     2001/01/29 05:36:11
-     [ssh.1 ssh.c]
-     Allow invocation of sybsystem by commandline (-s); ok markus@
- - (stevesk) configure.in: remove duplicate PROG_LS
-
-20010129
- - (stevesk) sftp-server.c: use %lld vs. %qd
-
-20010128
- - (bal) Put USE_PIPES back into sco3.2v5
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/01/28 10:15:34
-     [dispatch.c]
-     re-keying is not supported; ok deraadt@
-   - markus@cvs.openbsd.org 2001/01/28 10:24:04
-     [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8]
-     cleanup AUTHORS sections
-   - markus@cvs.openbsd.org 2001/01/28 10:37:26
-     [sshd.c sshd.8]
-     remove -Q, no longer needed
-   - stevesk@cvs.openbsd.org 2001/01/28 20:36:16
-     [readconf.c ssh.1]
-     ``StrictHostKeyChecking ask'' documentation and small cleanup.
-     ok markus@
-   - stevesk@cvs.openbsd.org 2001/01/28 20:43:25
-     [sshd.8]
-     spelling.  ok markus@
-   - stevesk@cvs.openbsd.org 2001/01/28 20:53:21
-     [xmalloc.c]
-     use size_t for strlen() return.  ok markus@
-   - stevesk@cvs.openbsd.org 2001/01/28 22:27:05
-     [authfile.c]
-     spelling.  use sizeof vs. strlen().  ok markus@
-   - niklas@cvs.openbsd.org 2001/01/29 1:59:14
-     [atomicio.h canohost.h clientloop.h deattack.h dh.h dispatch.h
-      groupaccess.c groupaccess.h hmac.h hostfile.h includes.h kex.h
-      key.h log.h login.h match.h misc.h myproposal.h nchan.ms pathnames.h
-      radix.h readpass.h rijndael.h serverloop.h session.h sftp.h ssh-add.1
-      ssh-dss.h ssh-keygen.1 ssh-keyscan.1 ssh-rsa.h ssh1.h ssh_config
-      sshconnect.h sshd_config tildexpand.h uidswap.h uuencode.h]
-     $OpenBSD$
-  - (bal) Minor auth2.c resync.  Whitespace and moving of an #include.
-
-20010126
- - (bal) SSH_PROGRAM vs _PATH_SSH_PROGRAM fix pointed out by Roumen
-   Petrov <roumen.petrov@skalasoft.com>
- - (bal) OpenBSD Sync
-   - deraadt@cvs.openbsd.org 2001/01/25 8:06:33
-     [ssh-agent.c]
-     call _exit() in signal handler
-
-20010125
- - (djm) Sync bsd-* support files:
-   - deraadt@cvs.openbsd.org 2000/01/26 03:43:20
-     [rresvport.c bindresvport.c]
-     new bindresvport() semantics that itojun, shin, jean-luc and i have
-     agreed on, which will be happy for the future. bindresvport_sa() for
-     sockaddr *, too.  docs later..
-   - deraadt@cvs.openbsd.org 2000/01/24 02:24:21
-     [bindresvport.c]
-     in bindresvport(), if sin is non-NULL, example sin->sin_family for
-     the actual family being processed
- - (djm) Mention PRNGd in documentation, it is nicer than EGD
- - (djm) Automatically search for "well-known" EGD/PRNGd sockets in autoconf
- - (bal) AC_FUNC_STRFTIME added to autoconf
- - (bal) OpenBSD Resync
-   - stevesk@cvs.openbsd.org 2001/01/24 21:03:50
-     [channels.c]
-     missing freeaddrinfo(); ok markus@
-
-20010124
- - (bal) OpenBSD Resync
-   - markus@cvs.openbsd.org 2001/01/23 10:45:10
-     [ssh.h]
-     nuke comment
- - (bal) no 64bit support patch from Tim Rice <tim@multitalents.net>
- - (bal) #ifdef around S_IFSOCK if platform does not support it.
-   patch by Tim Rice <tim@multitalents.net>
- - (bal) fake-regex.h cleanup based on Tim Rice's patch.
- - (stevesk) sftp-server.c: fix chmod() mode mask
-
-20010123
- - (bal) regexp.h typo in configure.in.  Should have been regex.h
- - (bal) SSH_USER_DIR to _PATH_SSH_USER_DIR patch by stevesk@
- - (bal) SSH_ASKPASS_DEFAULT to _PATH_SSH_ASKPASS_DEFAULT
- - (bal) OpenBSD Resync
-   - markus@cvs.openbsd.org 2001/01/22 8:15:00
-     [auth-krb4.c sshconnect1.c]
-     only AFS needs radix.[ch]
-   - markus@cvs.openbsd.org 2001/01/22 8:32:53
-     [auth2.c]
-     no need to include; from mouring@etoh.eviladmin.org
-   - stevesk@cvs.openbsd.org 2001/01/22 16:55:21
-     [key.c]
-     free() -> xfree(); ok markus@
-   - stevesk@cvs.openbsd.org 2001/01/22 17:22:28
-     [sshconnect2.c sshd.c]
-     fix memory leaks in SSH2 key exchange; ok markus@
-   - markus@cvs.openbsd.org 2001/01/22 23:06:39
-     [auth1.c auth2.c readconf.c readconf.h servconf.c servconf.h
-      sshconnect1.c sshconnect2.c sshd.c]
-     rename skey -> challenge response.
-     auto-enable kbd-interactive for ssh2 if challenge-reponse is enabled.
-
-
-20010122
- - (bal) OpenBSD Resync
-   - markus@cvs.openbsd.org 2001/01/19 12:45:26 GMT 2001 by markus
-     [servconf.c ssh.h sshd.c]
-     only auth-chall.c needs #ifdef SKEY
-   - markus@cvs.openbsd.org 2001/01/19 15:55:10 GMT 2001 by markus
-     [auth-krb4.c auth-options.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c
-      auth1.c auth2.c channels.c clientloop.c dh.c dispatch.c nchan.c
-      packet.c pathname.h readconf.c scp.c servconf.c serverloop.c
-      session.c ssh-add.c ssh-keygen.c ssh-keyscan.c ssh.c ssh.h
-      ssh1.h sshconnect1.c sshd.c ttymodes.c]
-     move ssh1 definitions to ssh1.h, pathnames to pathnames.h
-   - markus@cvs.openbsd.org 2001/01/19 16:48:14
-     [sshd.8]
-     fix typo; from stevesk@
-   - markus@cvs.openbsd.org 2001/01/19 16:50:58
-     [ssh-dss.c]
-     clear and free digest, make consistent with other code (use dlen); from
-     stevesk@
-   - markus@cvs.openbsd.org 2001/01/20 15:55:20 GMT 2001 by markus
-     [auth-options.c auth-options.h auth-rsa.c auth2.c]
-     pass the filename to auth_parse_options()
-   - markus@cvs.openbsd.org 2001/01/20 17:59:40 GMT 2001
-     [readconf.c]
-     fix SIGSEGV from -o ""; problem noted by jehsom@togetherweb.com
-   - stevesk@cvs.openbsd.org 2001/01/20 18:20:29
-     [sshconnect2.c]
-     dh_new_group() does not return NULL.  ok markus@
-   - markus@cvs.openbsd.org 2001/01/20 21:33:42
-     [ssh-add.c]
-     do not loop forever if askpass does not exist; from
-     andrew@pimlott.ne.mediaone.net
-   - djm@cvs.openbsd.org 2001/01/20 23:00:56
-     [servconf.c]
-     Check for NULL return from strdelim; ok markus
-   - djm@cvs.openbsd.org 2001/01/20 23:02:07
-     [readconf.c]
-     KNF; ok markus
-   - jakob@cvs.openbsd.org 2001/01/21 9:00:33
-     [ssh-keygen.1]
-     remove -R flag; ok markus@
-   - markus@cvs.openbsd.org 2001/01/21 19:05:40
-     [atomicio.c automicio.h auth-chall.c auth-krb4.c auth-options.c
-      auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c
-      auth.c auth.h auth1.c auth2-chall.c auth2.c authfd.c authfile.c
-      bufaux.c  bufaux.h buffer.c canahost.c canahost.h channels.c
-      cipher.c cli.c clientloop.c clientloop.h compat.c compress.c
-      deattack.c dh.c dispatch.c groupaccess.c hmac.c hostfile.c kex.c
-      key.c key.h log-client.c log-server.c log.c log.h login.c login.h
-      match.c misc.c misc.h nchan.c packet.c pty.c radix.h readconf.c
-      readpass.c readpass.h rsa.c scp.c servconf.c serverloop.c serverloop.h
-      session.c sftp-server.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c
-      ssh-keyscan.c ssh-rsa.c ssh.c ssh.h sshconnect.c sshconnect.h
-      sshconnect1.c sshconnect2.c sshd.c tildexpand.c tildexpand.h
-      ttysmodes.c uidswap.c xmalloc.c]
-     split ssh.h and try to cleanup the #include mess. remove unnecessary
-     #includes.  rename util.[ch] -> misc.[ch]
- - (bal) renamed 'PIDDIR' to '_PATH_SSH_PIDDIR' to match OpenBSD tree
- - (bal) Moved #ifdef KRB4 in auth-krb4.c above the #include to resolve
-   conflict when compiling for non-kerb install
- - (bal) removed the #ifdef SKEY in auth1.c to match Markus' changes
-   on 1/19.
-
-20010120
- - (bal) OpenBSD Resync
-   - markus@cvs.openbsd.org 2001/01/19 12:45:26
-     [ssh-chall.c servconf.c servconf.h ssh.h sshd.c]
-     only auth-chall.c needs #ifdef SKEY
- - (bal) Slight auth2-pam.c clean up.
- - (bal) Includes a fake-regexp.h to be only used if regcomp() is found,
-   but no 'regexp.h' found (SCO OpenServer 3 lacks the header).
-
-20010119
- - (djm) Update versions in RPM specfiles
- - (bal) OpenBSD Resync
-   - markus@cvs.openbsd.org 2001/01/18 16:20:21
-     [log-client.c log-server.c log.c readconf.c servconf.c ssh.1 ssh.h
-      sshd.8 sshd.c]
-     log() is at pri=LOG_INFO, since LOG_NOTICE goes to /dev/console on many
-     systems
-   - markus@cvs.openbsd.org 2001/01/18 16:59:59
-     [auth-passwd.c auth.c auth.h auth1.c auth2.c serverloop.c session.c
-      session.h sshconnect1.c]
-     1) removes fake skey from sshd, since this will be much
-        harder with /usr/libexec/auth/login_XXX
-     2) share/unify code used in ssh-1 and ssh-2 authentication (server side)
-     3) make addition of BSD_AUTH and other challenge reponse methods
-        easier.
-   - markus@cvs.openbsd.org 2001/01/18 17:12:43
-     [auth-chall.c auth2-chall.c]
-     rename *-skey.c *-chall.c since the files are not skey specific
- - (djm) Merge patch from Tim Waugh (via Nalin Dahyabhai <nalin@redhat.com>)
-   to fix NULL pointer deref and fake authloop breakage in PAM code.
- - (bal) Updated contrib/cygwin/ by Corinna Vinschen <vinschen@redhat.com>
- - (bal) Minor cygwin patch to auth1.c.  Suggested by djm.
-
-20010118
- - (bal) Super Sized OpenBSD Resync
-   - markus@cvs.openbsd.org 2001/01/11 22:14:20 GMT 2001 by markus
-     [sshd.c]
-     maxfd+1
-   - markus@cvs.openbsd.org 2001/01/13 17:59:18
-     [ssh-keygen.1]
-     small ssh-keygen manpage cleanup; stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/13 18:03:07
-     [scp.c ssh-keygen.c sshd.c]
-     getopt() returns -1 not EOF; stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/13 18:06:54
-     [ssh-keyscan.c]
-     use SSH_DEFAULT_PORT; from stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/13 18:12:47
-     [ssh-keyscan.c]
-     free() -> xfree(); fix memory leak; from stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/13 18:14:13
-     [ssh-add.c]
-     typo, from stevesk@sweden.hp.com
-   - markus@cvs.openbsd.org 2001/01/13 18:32:50
-     [packet.c session.c ssh.c sshconnect.c sshd.c]
-     split out keepalive from packet_interactive (from dale@accentre.com)
-     set IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT for ssh2, too.
-   - markus@cvs.openbsd.org 2001/01/13 18:36:45
-     [packet.c packet.h]
-     reorder, typo
-   - markus@cvs.openbsd.org 2001/01/13 18:38:00
-     [auth-options.c]
-     fix comment
-   - markus@cvs.openbsd.org 2001/01/13 18:43:31
-     [session.c]
-     Wall
-   - markus@cvs.openbsd.org 2001/01/13 19:14:08
-     [clientloop.h clientloop.c ssh.c]
-     move callback to headerfile
-   - markus@cvs.openbsd.org 2001/01/15 21:40:10
-     [ssh.c]
-     use log() instead of stderr
-   - markus@cvs.openbsd.org 2001/01/15 21:43:51
-     [dh.c]
-     use error() not stderr!
-   - markus@cvs.openbsd.org 2001/01/15 21:45:29
-     [sftp-server.c]
-     rename must fail if newpath exists, debug off by default
-   - markus@cvs.openbsd.org 2001/01/15 21:46:38
-     [sftp-server.c]
-     readable long listing for sftp-server, ok deraadt@
-   - markus@cvs.openbsd.org 2001/01/16 19:20:06
-     [key.c ssh-rsa.c]
-     make "ssh-rsa" key format for ssh2 confirm to the ietf-drafts; from
-     galb@vandyke.com.  note that you have to delete older ssh2-rsa keys,
-     since they are in the wrong format, too. they must be removed from
-     .ssh/authorized_keys2 and .ssh/known_hosts2, etc.
-     (cd; grep -v ssh-rsa .ssh/authorized_keys2 > TMP && mv TMP
-     .ssh/authorized_keys2) additionally, we now check that
-     BN_num_bits(rsa->n) >= 768.
-   - markus@cvs.openbsd.org 2001/01/16 20:54:27
-     [sftp-server.c]
-     remove some statics. simpler handles; idea from nisse@lysator.liu.se
-   - deraadt@cvs.openbsd.org 2001/01/16 23:58:08
-     [bufaux.c radix.c sshconnect.h sshconnect1.c]
-     indent
- - (bal) Added bsd-strmode.[ch] since some non-OpenBSD platforms may
-   be missing such feature.
-
-
-20010117
- - (djm) Only write random seed file at exit
- - (djm) Make PAM support optional, enable with --with-pam
- - (djm) Try to use libcrypt on Linux, but link it after OpenSSL (which
-   provides a crypt() of its own)
- - (djm) Avoid a warning in bsd-bindresvport.c
- - (djm) Try to avoid adding -I/usr/include to CPPFLAGS during SSL tests. This
-   can cause weird segfaults errors on Solaris
- - (djm) Avoid warning in PAM code by making read_passphrase arguments const
- - (djm) Add --with-pam to RPM spec files
-
-20010115
- - (bal) sftp-server.c change to use chmod() if fchmod() does not exist.
- - (bal) utimes() support via utime() interface on machine that lack utimes().
-
-20010114
- - (stevesk) initial work for OpenBSD "support supplementary group in
-   {Allow,Deny}Groups" patch:
-   - import getgrouplist.c from OpenBSD (bsd-getgrouplist.c)
-   - add bsd-getgrouplist.h
-   - new files groupaccess.[ch]
-   - build but don't use yet (need to merge auth.c changes)
- - (stevesk) complete:
-   - markus@cvs.openbsd.org  2001/01/13 11:56:48
-     [auth.c sshd.8]
-     support supplementary group in {Allow,Deny}Groups
-     from stevesk@pobox.com
-
-20010112
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/01/10 22:56:22
-     [bufaux.h bufaux.c sftp-server.c sftp.h getput.h]
-     cleanup sftp-server implementation:
-     add buffer_get_int64, buffer_put_int64, GET_64BIT, PUT_64BIT
-     parse SSH2_FILEXFER_ATTR_EXTENDED
-     send SSH2_FX_EOF if readdir returns no more entries
-     reply to SSH2_FXP_EXTENDED message
-     use #defines from the draft
-     move #definations to sftp.h
-     more info:
-     http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-00.txt
-   - markus@cvs.openbsd.org 2001/01/10 19:43:20
-     [sshd.c]
-     XXX - generate_empheral_server_key() is not safe against races,
-     because it calls log()
-   - markus@cvs.openbsd.org 2001/01/09 21:19:50
-     [packet.c]
-     allow TCP_NDELAY for ipv6; from netbsd via itojun@
-
-20010110
- - (djm) SNI/Reliant Unix needs USE_PIPES and $DISPLAY hack. Report from
-   Bladt Norbert <Norbert.Bladt@adi.ch>
-
-20010109
- - (bal) Resync CVS ID of cli.c
- - (stevesk) auth1.c: free should be after WITH_AIXAUTHENTICATE
-   code.
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/01/08 22:29:05
-     [auth2.c compat.c compat.h servconf.c servconf.h sshd.8
-      sshd_config version.h]
-     implement option 'Banner /etc/issue.net' for ssh2, move version to
-     2.3.1 (needed for bugcompat detection, 2.3.0 would fail if Banner
-     is enabled).
-   - markus@cvs.openbsd.org 2001/01/08 22:03:23
-     [channels.c ssh-keyscan.c]
-     O_NDELAY -> O_NONBLOCK; thanks stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/08 21:55:41
-     [sshconnect1.c]
-     more cleanups and fixes from stevesk@pobox.com:
-     1) try_agent_authentication() for loop will overwrite key just
-        allocated with key_new(); don't alloc
-     2) call ssh_close_authentication_connection() before exit
-        try_agent_authentication()
-     3) free mem on bad passphrase in try_rsa_authentication()
-   - markus@cvs.openbsd.org 2001/01/08 21:48:17
-     [kex.c]
-     missing free; thanks stevesk@pobox.com
-  - (bal) Detect if clock_t structure exists, if not define it.
-  - (bal) Detect if O_NONBLOCK exists, if not define it.
-  - (bal) removed news4-posix.h (now empty)
-  - (bal) changed bsd-bindresvport.c and bsd-rresvport.c to use 'socklen_t'
-    instead of 'int'
- - (stevesk) sshd_config: sync
- - (stevesk) defines.h: remove spurious ``;''
-
-20010108
- - (bal) Fixed another typo in cli.c
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/01/07 21:26:55
-     [cli.c]
-     typo
-   - markus@cvs.openbsd.org 2001/01/07 21:26:55
-     [cli.c]
-     missing free, stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/07 19:06:25
-     [auth1.c]
-     missing free, stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/07 11:28:04
-     [log-client.c log-server.c log.c readconf.c servconf.c ssh.1
-      ssh.h sshd.8 sshd.c]
-     rename SYSLOG_LEVEL_INFO->SYSLOG_LEVEL_NOTICE
-     syslog priority changes:
-             fatal() LOG_ERR  -> LOG_CRIT
-             log()   LOG_INFO -> LOG_NOTICE
- - Updated TODO
-
-20010107
- - (bal) OpenBSD Sync
-   - markus@cvs.openbsd.org 2001/01/06 11:23:27
-     [ssh-rsa.c]
-     remove unused
-   - itojun@cvs.openbsd.org 2001/01/05 08:23:29
-     [ssh-keyscan.1]
-     missing .El
-   - markus@cvs.openbsd.org 2001/01/04 22:41:03
-     [session.c sshconnect.c]
-     consistent use of _PATH_BSHELL; from stevesk@pobox.com
-   - djm@cvs.openbsd.org 2001/01/04 22:35:32
-     [ssh.1 sshd.8]
-     Mention AES as available SSH2 Cipher; ok markus
-   - markus@cvs.openbsd.org 2001/01/04 22:25:58
-     [sshd.c]
-     sync usage()/man with defaults; from stevesk@pobox.com
-   - markus@cvs.openbsd.org 2001/01/04 22:21:26
-     [sshconnect2.c]
-     handle SSH2_MSG_USERAUTH_BANNER; fixes bug when connecting to a server
-     that prints a banner (e.g. /etc/issue.net)
-
-20010105
- - (bal) contrib/caldera/ provided by Tim Rice <tim@multitalents.net>
- - (bal) bsd-getcwd.c and bsd-setenv.c changed from bcopy() to memmove()
-
-20010104
- - (djm) Fix memory leak on systems with BROKEN_GETADDRINFO. Based on
-   work by Chris Vaughan <vaughan99@yahoo.com>
-
-20010103
- - (bal) fixed up sshconnect.c so it was closer inline with the OpenBSD
-   tree (mainly positioning)
- - (bal) OpenSSH CVS Update
-   - markus@cvs.openbsd.org 2001/01/02 20:41:02
-     [packet.c]
-     log remote ip on disconnect; PR 1600 from jcs@rt.fm
-   - markus@cvs.openbsd.org 2001/01/02 20:50:56
-     [sshconnect.c]
-     strict_host_key_checking for host_status != HOST_CHANGED &&
-     ip_status == HOST_CHANGED
- - (bal) authfile.c: Synced CVS ID tag
- - (bal) UnixWare 2.0 fixes by Tim Rice <tim@multitalents.net>
- - (bal) Disable sftp-server if no 64bit int support exists.  Based on
-   patch by Tim Rice <tim@multitalents.net>
- - (bal) Makefile.in changes to uninstall: target to remove sftp-server
-   and sftp-server.8 manpage.
-
-20010102
- - (bal) OpenBSD CVS Update
-   - markus@cvs.openbsd.org 2001/01/01 14:52:49
-     [scp.c]
-     use shared fatal(); from stevesk@pobox.com
-
-20001231
- - (bal) Reverted out of MAXHOSTNAMELEN.  This should be set per OS.
-   for multiple reasons.
- - (bal) Reverted out of a partial NeXT patch.
-
-20001230
- - (bal) OpenBSD CVS Update
-   - markus@cvs.openbsd.org 2000/12/28 18:58:30
-     [ssh-keygen.c]
-     enable 'ssh-keygen -l -f ~/.ssh/{authorized_keys,known_hosts}{,2}
-   - markus@cvs.openbsd.org 2000/12/29 22:19:13
-     [channels.c]
-     missing xfree; from vaughan99@yahoo.com
- - (bal) Resynced CVS ID with OpenBSD for channel.c and uidswap.c
- - (bal) if no MAXHOSTNAMELEN is defined.  Default to 64 character defination.
-   Suggested by Christian Kurz <shorty@debian.org>
- - (bal) Add in '.c.o' section to Makefile.in to address make programs that
-    don't honor CPPFLAGS by default.  Suggested by Lutz Jaenicke
-    <Lutz.Jaenicke@aet.TU-Cottbus.DE>
-
-20001229
- - (bal) Fixed spelling of 'authorized_keys' in ssh-copy-id.1 by Christian
-   Kurz <shorty@debian.org>
- - (bal) OpenBSD CVS Update
-   - markus@cvs.openbsd.org 2000/12/28 14:25:51
-     [auth.h auth2.c]
-     count authentication failures only
-   - markus@cvs.openbsd.org 2000/12/28 14:25:03
-     [sshconnect.c]
-     fingerprint for MITM attacks, too.
-   - markus@cvs.openbsd.org 2000/12/28 12:03:57
-     [sshd.8 sshd.c]
-     document -D
-   - markus@cvs.openbsd.org 2000/12/27 14:19:21
-     [serverloop.c]
-     less chatty
-   - markus@cvs.openbsd.org 2000/12/27 12:34
-     [auth1.c sshconnect2.c sshd.c]
-     typo
-   - markus@cvs.openbsd.org 2000/12/27 12:30:19
-     [readconf.c readconf.h ssh.1 sshconnect.c]
-     new option: HostKeyAlias: allow the user to record the host key
-     under a different name. This is useful for ssh tunneling over
-     forwarded connections or if you run multiple sshd's on different
-     ports on the same machine.
-   - markus@cvs.openbsd.org 2000/12/27 11:51:53
-     [ssh.1 ssh.c]
-     multiple -t force pty allocation, document ORIGINAL_COMMAND
-   - markus@cvs.openbsd.org 2000/12/27 11:41:31
-     [sshd.8]
-     update for ssh-2
- - (stevesk) compress.[ch] sync with openbsd; missed in prototype
-   fix merge.
-
-20001228
- - (bal) Patch to add libutil.h to loginrec.c only if the platform has
-   libutil.h.  Suggested by Pekka Savola <pekka@netcore.fi>
- - (djm) Update to new x11-askpass in RPM spec
- - (bal) SCO patch to not include <sys/queue.h> since it's unrelated
-   header.  Patch by Tim Rice <tim@multitalents.net>
- - Updated TODO w/ known HP/UX issue
- - (bal) removed extra <netdb.h> noticed by Kevin Steves and removed the
-   bad reference to 'NeXT including it else were' on the #ifdef version.
-
-20001227
- - (bal) Typo in configure.in: entut?ent should be endut?ent.  Suggested by
-   Takumi Yamane <yamtak@b-session.com>
- - (bal) Checks for getrlimit(), sysconf(), and setdtablesize().  Patch
-   by Corinna Vinschen <vinschen@redhat.com>
- - (djm) Fix catman-do target for non-bash
- - (bal) Typo in configure.in: entut?ent should be endut?ent.  Suggested by
-   Takumi Yamane <yamtak@b-session.com>
- - (bal) Checks for getrlimit(), sysconf(), and setdtablesize().  Patch
-   by Corinna Vinschen <vinschen@redhat.com>
- - (djm) Fix catman-do target for non-bash
- - (bal) Fixed NeXT's lack of CPPFLAGS honoring.
- - (bal) ssh-keyscan.c: NeXT (and older BSDs) don't support getrlimit() w/
-   'RLIMIT_NOFILE'
- - (djm) Remove *.Ylonen files. They are no longer in the OpenBSD tree,
-   the info in COPYING.Ylonen has been moved to the start of each
-   SSH1-derived file and README.Ylonen is well out of date.
-
-20001223
- - (bal) Fixed Makefile.in to support recompile of all ssh and sshd objects
-   if a change to config.h has occurred.  Suggested by Gert Doering
-   <gert@greenie.muc.de>
- - (bal) OpenBSD CVS Update:
-   - markus@cvs.openbsd.org 2000/12/22 16:49:40
-     [ssh-keygen.c]
-     fix ssh-keygen -x -t type > file; from Roumen.Petrov@skalasoft.com
-
-20001222
- - Updated RCSID for pty.c
- - (bal) OpenBSD CVS Updates:
-  - markus@cvs.openbsd.org 2000/12/21 15:10:16
-    [auth-rh-rsa.c hostfile.c hostfile.h sshconnect.c]
-    print keyfile:line for changed hostkeys, for deraadt@, ok deraadt@
-  - markus@cvs.openbsd.org 2000/12/20 19:26:56
-    [authfile.c]
-    allow ssh -i userkey for root
-  - markus@cvs.openbsd.org 2000/12/20 19:37:21
-    [authfd.c authfd.h kex.c sshconnect2.c sshd.c uidswap.c uidswap.h]
-    fix prototypes; from stevesk@pobox.com
-  - markus@cvs.openbsd.org 2000/12/20 19:32:08
-    [sshd.c]
-    init pointer to NULL; report from Jan.Ivan@cern.ch
-  - markus@cvs.openbsd.org 2000/12/19 23:17:54
-    [auth-krb4.c auth-options.c auth-options.h auth-rhosts.c auth-rsa.c
-     auth1.c auth2-skey.c auth2.c authfd.c authfd.h authfile.c bufaux.c
-     bufaux.h buffer.c canohost.c channels.c clientloop.c compress.c
-     crc32.c deattack.c getput.h hmac.c hmac.h hostfile.c kex.c kex.h
-     key.c key.h log.c login.c match.c match.h mpaux.c mpaux.h packet.c
-     packet.h radix.c readconf.c rsa.c scp.c servconf.c servconf.h
-     serverloop.c session.c sftp-server.c ssh-agent.c ssh-dss.c ssh-dss.h
-     ssh-keygen.c ssh-keyscan.c ssh-rsa.c ssh-rsa.h ssh.c ssh.h  uuencode.c
-     uuencode.h sshconnect1.c sshconnect2.c sshd.c tildexpand.c]
-    replace 'unsigned bla' with 'u_bla' everywhere. also replace 'char
-    unsigned' with u_char.
-
-20001221
- - (stevesk) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org 2000/12/19 15:43:45
-     [authfile.c channels.c sftp-server.c ssh-agent.c]
-     remove() -> unlink() for consistency
-   - markus@cvs.openbsd.org 2000/12/19 15:48:09
-     [ssh-keyscan.c]
-     replace <ssl/x.h> with <openssl/x.h>
-   - markus@cvs.openbsd.org 2000/12/17 02:33:40
-     [uidswap.c]
-     typo; from wsanchez@apple.com
-
-20001220
- - (djm) Workaround PAM inconsistencies between Solaris derived PAM code
-   and Linux-PAM. Based on report and fix from Andrew Morgan
-   <morgan@transmeta.com>
-
-20001218
- - (stevesk) rsa.c: entropy.h not needed.
- - (bal) split CFLAGS into CFLAGS and CPPFLAGS in configure.in and Makefile.
-   Suggested by Wilfredo Sanchez <wsanchez@apple.com>
-
-20001216
- - (stevesk) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org 2000/12/16 02:53:57
-     [scp.c]
-     allow + in usernames; request from Florian.Weimer@RUS.Uni-Stuttgart.DE
-   - markus@cvs.openbsd.org 2000/12/16 02:39:57
-     [scp.c]
-     unused; from stevesk@pobox.com
-
-20001215
- - (stevesk) Old OpenBSD patch wasn't completely applied:
-   - markus@cvs.openbsd.org 2000/01/24 22:11:20
-     [scp.c]
-     allow '.' in usernames; from jedgar@fxp.org
- - (stevesk) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org 2000/12/13 16:26:53
-     [ssh-keyscan.c]
-     fatal already adds \n; from stevesk@pobox.com
-   - markus@cvs.openbsd.org 2000/12/13 16:25:44
-     [ssh-agent.c]
-     remove redundant spaces; from stevesk@pobox.com
-   - ho@cvs.openbsd.org 2000/12/12 15:50:21
-     [pty.c]
-     When failing to set tty owner and mode on a read-only filesystem, don't
-     abort if the tty already has correct owner and reasonably sane modes.
-     Example; permit 'root' to login to a firewall with read-only root fs.
-     (markus@ ok)
-   - deraadt@cvs.openbsd.org 2000/12/13 06:36:05
-     [pty.c]
-     KNF
-   - markus@cvs.openbsd.org 2000/12/12 14:45:21
-     [sshd.c]
-     source port < 1024 is no longer required for rhosts-rsa since it
-     adds no additional security.
-   - markus@cvs.openbsd.org 2000/12/12 16:11:49
-     [ssh.1 ssh.c]
-     rhosts-rsa is no longer automagically disabled if ssh is not privileged.
-     UsePrivilegedPort=no disables rhosts-rsa _only_ for old servers.
-     these changes should not change the visible default behaviour of the ssh client.
-   - deraadt@cvs.openbsd.org 2000/12/11 10:27:33
-     [scp.c]
-     when copying 0-sized files, do not re-print ETA time at completion
-   - provos@cvs.openbsd.org 2000/12/15 10:30:15
-     [kex.c kex.h sshconnect2.c sshd.c]
-     compute diffie-hellman in parallel between server and client. okay markus@
-
-20001213
- - (djm) Make sure we reset the SIGPIPE disposition after we fork. Report
-   from Andreas M. Kirchwitz <amk@krell.zikzak.de>
- - (stevesk) OpenBSD CVS update:
-   - markus@cvs.openbsd.org 2000/12/12 15:30:02
-     [ssh-keyscan.c ssh.c sshd.c]
-     consistently use __progname; from stevesk@pobox.com
-
-20001211
- - (bal) Applied patch to include ssh-keyscan into Redhat's package, and
-   patch to install ssh-keyscan manpage.  Patch by Pekka Savola
-   <pekka@netcore.fi>
- - (bal) OpenbSD CVS update
-   - markus@cvs.openbsd.org 2000/12/10 17:01:53
-     [sshconnect1.c]
-     always request new challenge for skey/tis-auth, fixes interop with
-     other implementations; report from roth@feep.net
-
-20001210
- - (bal) OpenBSD CVS updates
-   - markus@cvs.openbsd.org 2000/12/09 13:41:51
-     [cipher.c cipher.h rijndael.c rijndael.h rijndael_boxes.h]
-     undo rijndael changes
-   - markus@cvs.openbsd.org 2000/12/09 13:48:31
-     [rijndael.c]
-     fix byte order bug w/o introducing new implementation
-   - markus@cvs.openbsd.org 2000/12/09 14:08:27
-     [sftp-server.c]
-     "" -> "." for realpath; from vinschen@redhat.com
-   - markus@cvs.openbsd.org 2000/12/09 14:06:54
-     [ssh-agent.c]
-     extern int optind; from stevesk@sweden.hp.com
-   - provos@cvs.openbsd.org 2000/12/09 23:51:11
-     [compat.c]
-     remove unnecessary '\n'
-
-20001209
- - (bal) OpenBSD CVS updates:
-   - djm@cvs.openbsd.org 2000/12/07 4:24:59
-     [ssh.1]
-     Typo fix from Wilfredo Sanchez <wsanchez@apple.com>; ok theo
-
-20001207
- - (bal) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org 2000/12/06 22:58:14
-     [compat.c compat.h packet.c]
-     disable debug messages for ssh.com/f-secure 2.0.1x, 2.1.0
-   - markus@cvs.openbsd.org 2000/12/06 23:10:39
-     [rijndael.c]
-     unexpand(1)
-   - markus@cvs.openbsd.org 2000/12/06 23:05:43
-     [cipher.c cipher.h rijndael.c rijndael.h rijndael_boxes.h]
-     new rijndael implementation. fixes endian bugs
-
-20001206
- - (bal) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org 2000/12/05 20:34:09
-     [channels.c channels.h clientloop.c serverloop.c]
-     async connects for -R/-L; ok deraadt@
-   - todd@cvs.openssh.org 2000/12/05 16:47:28
-     [sshd.c]
-     tweak comment to reflect real location of pid file; ok provos@
- - (stevesk) Import <sys/queue.h> from OpenBSD for systems that don't
-   have it (used in ssh-keyscan).
- - (stevesk) OpenBSD CVS update:
-   - markus@cvs.openbsd.org 2000/12/06 19:57:48
-     [ssh-keyscan.c]
-     err(3) -> internal error(), from stevesk@sweden.hp.com
-
-20001205
- - (bal) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org 2000/12/04 19:24:02
-     [ssh-keyscan.c ssh-keyscan.1]
-     David Maziere's ssh-keyscan, ok niels@
- - (bal) Updated Makefile.in to include ssh-keyscan that was just added
-   to the recent OpenBSD source tree.
- - (stevesk) fix typos in contrib/hpux/README
-
-20001204
- - (bal) More C functions defined in NeXT that are unaccessable without
-   defining -POSIX.
- - (bal) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org 2000/12/03 11:29:04
-     [compat.c]
-     remove fallback to SSH_BUG_HMAC now that the drafts are updated
-   - markus@cvs.openbsd.org 2000/12/03 11:27:55
-     [compat.c]
-     correctly match "2.1.0.pl2 SSH" etc; from
-     pekkas@netcore.fi/bugzilla.redhat
-   - markus@cvs.openbsd.org 2000/12/03 11:15:03
-     [auth2.c compat.c compat.h sshconnect2.c]
-     support f-secure/ssh.com 2.0.12; ok niels@
-
-20001203
- - (bal) OpenBSD CVS updates:
-  - markus@cvs.openbsd.org 2000/11/30 22:54:31
-    [channels.c]
-    debug->warn if tried to do -R style fwd w/o client requesting this;
-    ok neils@
-  - markus@cvs.openbsd.org 2000/11/29 20:39:17
-    [cipher.c]
-    des_cbc_encrypt -> des_ncbc_encrypt since it already updates the IV
-  - markus@cvs.openbsd.org 2000/11/30 18:33:05
-    [ssh-agent.c]
-    agents must not dump core, ok niels@
-  - markus@cvs.openbsd.org 2000/11/30 07:04:02
-    [ssh.1]
-    T is for both protocols
-  - markus@cvs.openbsd.org 2000/12/01 00:00:51
-    [ssh.1]
-    typo; from green@FreeBSD.org
-  - markus@cvs.openbsd.org 2000/11/30 07:02:35
-    [ssh.c]
-    check -T before isatty()
-  - provos@cvs.openbsd.org 2000/11/29 13:51:27
-    [sshconnect.c]
-    show IP address and hostname when new key is encountered. okay markus@
-  - markus@cvs.openbsd.org 2000/11/30 22:53:35
-    [sshconnect.c]
-    disable agent/x11/port fwding if hostkey has changed; ok niels@
-  - marksu@cvs.openbsd.org 2000/11/29 21:11:59
-    [sshd.c]
-    sshd -D, startup w/o deamon(), for monitoring scripts or inittab;
-    from handler@sub-rosa.com and eric@urbanrange.com; ok niels@
- - (djm) Added patch from Nalin Dahyabhai <nalin@redhat.com> to enable
-   PAM authentication using KbdInteractive.
- - (djm) Added another TODO
-
-20001202
- - (bal) Backed out of part of Alain St-Denis' loginrec.c patch.
- - (bal) Irix need some sort of mansubdir, patch by Michael Stone
-   <mstone@cs.loyola.edu>
-
-20001129
- - (djm) Back out all the serverloop.c hacks. sshd will now hang again
-   if there are background children with open fds.
- - (djm) bsd-rresvport.c bzero -> memset
- - (djm) Don't fail in defines.h on absence of 64 bit types (we will
-   still fail during compilation of sftp-server).
- - (djm) Fail if ar is not found during configure
- - (djm) OpenBSD CVS updates:
-   - provos@cvs.openbsd.org  2000/11/22 08:38:31
-     [sshd.8]
-     talk about /etc/primes, okay markus@
-   - markus@cvs.openbsd.org  2000/11/23 14:03:48
-     [ssh.c sshconnect1.c sshconnect2.c]
-     complain about invalid ciphers for ssh1/ssh2, fall back to reasonable
-     defaults
-   - markus@cvs.openbsd.org  2000/11/25 09:42:53
-     [sshconnect1.c]
-     reorder check for illegal ciphers, bugreport from espie@
-   - markus@cvs.openbsd.org  2000/11/25 10:19:34
-     [ssh-keygen.c ssh.h]
-     print keytype when generating a key.
-     reasonable defaults for RSA1/RSA/DSA keys.
- - (djm) Patch from Pekka Savola <Pekka.Savola@netcore.fi> to include a few
-   more manpage paths in fixpaths calls
- - (djm) Also add xauth path at Pekka's suggestion.
- - (djm) Add Redhat RPM patch for AUTHPRIV SyslogFacility
-
-20001125
- - (djm) Give up privs when reading seed file
-
-20001123
- - (bal) Merge OpenBSD changes:
-   - markus@cvs.openbsd.org  2000/11/15 22:31:36
-     [auth-options.c]
-     case insensitive key options; from stevesk@sweeden.hp.com
-   - markus@cvs.openbsd.org  2000/11/16 17:55:43
-     [dh.c]
-     do not use perror() in sshd, after child is forked()
-   - markus@cvs.openbsd.org  2000/11/14 23:42:40
-     [auth-rsa.c]
-     parse option only if key matches; fix some confusing seen by the client
-   - markus@cvs.openbsd.org  2000/11/14 23:44:19
-     [session.c]
-     check no_agent_forward_flag for ssh-2, too
-   - markus@cvs.openbsd.org  2000/11/15
-     [ssh-agent.1]
-     reorder SYNOPSIS; typo, use .It
-   - markus@cvs.openbsd.org  2000/11/14 23:48:55
-     [ssh-agent.c]
-     do not reorder keys if a key is removed
-   - markus@cvs.openbsd.org  2000/11/15 19:58:08
-     [ssh.c]
-     just ignore non existing user keys
-   - millert@cvs.openbsd.org  200/11/15 20:24:43
-     [ssh-keygen.c]
-     Add missing \n at end of error message.
-
-20001122
- - (bal) Minor patch to ensure platforms lacking IRIX job limit supports
-   are compilable.
- - (bal) Updated TODO as of 11/18/2000 with known things to resolve.
-
-20001117
- - (bal) Changed from 'primes' to 'primes.out' for consistancy sake.  It
-   has no affect the output.  Patch by Corinna Vinschen <vinschen@redhat.com>
- - (stevesk) Reworked progname support.
- - (bal) Misplaced #include "includes.h" in bsd-setproctitle.c.  Patch by
-   Shinichi Maruyama <marya@st.jip.co.jp>
-
-20001116
- - (bal) Added in MAXSYMLINK test in bsd-realpath.c.  Required for some SCO
-   releases.
- - (bal) Make builds work outside of source tree.  Patch by Mark D. Roth
-   <roth@feep.net>
-
-20001113
- - (djm) Add pointer to http://www.imasy.or.jp/~gotoh/connect.c to
-   contrib/README
- - (djm) Merge OpenBSD changes:
-   - markus@cvs.openbsd.org  2000/11/06 16:04:56
-     [channels.c channels.h clientloop.c nchan.c serverloop.c]
-     [session.c ssh.c]
-     agent forwarding and -R for ssh2, based on work from
-     jhuuskon@messi.uku.fi
-   - markus@cvs.openbsd.org  2000/11/06 16:13:27
-     [ssh.c sshconnect.c sshd.c]
-     do not disabled rhosts(rsa) if server port > 1024; from
-     pekkas@netcore.fi
-   - markus@cvs.openbsd.org  2000/11/06 16:16:35
-     [sshconnect.c]
-     downgrade client to 1.3 if server is 1.4; help from mdb@juniper.net
-   - markus@cvs.openbsd.org  2000/11/09 18:04:40
-     [auth1.c]
-     typo; from mouring@pconline.com
-   - markus@cvs.openbsd.org  2000/11/12 12:03:28
-     [ssh-agent.c]
-     off-by-one when removing a key from the agent
-   - markus@cvs.openbsd.org  2000/11/12 12:50:39
-     [auth-rh-rsa.c auth2.c authfd.c authfd.h]
-     [authfile.c hostfile.c kex.c kex.h key.c key.h myproposal.h]
-     [readconf.c readconf.h rsa.c rsa.h servconf.c servconf.h ssh-add.c]
-     [ssh-agent.c ssh-keygen.1 ssh-keygen.c ssh.1 ssh.c ssh_config]
-     [sshconnect1.c sshconnect2.c sshd.8 sshd.c sshd_config ssh-dss.c]
-     [ssh-dss.h ssh-rsa.c ssh-rsa.h dsa.c dsa.h]
-     add support for RSA to SSH2.  please test.
-     there are now 3 types of keys: RSA1 is used by ssh-1 only,
-     RSA and DSA are used by SSH2.
-     you can use 'ssh-keygen -t rsa -f ssh2_rsa_file' to generate RSA
-     keys for SSH2 and use the RSA keys for hostkeys or for user keys.
-     SSH2 RSA or DSA keys are added to .ssh/authorised_keys2 as before.
- - (djm) Fix up Makefile and Redhat init script to create RSA host keys
- - (djm) Change to interim version
- - (djm) Fix RPM spec file stupidity
- - (djm) fixpaths to DSA and RSA keys too
-
-20001112
- - (bal) SCO Patch to add needed libraries for configure.in.  Patch by
-   Phillips Porch <root@theporch.com>
- - (bal) IRIX patch to adding Job Limits.  Patch by Denis Parker
-   <dcp@sgi.com>
- - (stevesk) pty.c: HP-UX 10 and 11 don't define TIOCSCTTY.  Add error() to
-   failed ioctl(TIOCSCTTY) call.
-
-20001111
- - (djm) Added /etc/primes for kex DH group neg, fixup Makefile.in and
-   packaging files
- - (djm) Fix new Makefile.in warnings
- - (djm) Fix vsprintf("%h") in bsd-snprintf.c, short int va_args are
-   promoted to type int. Report and fix from Dan Astoorian
-   <djast@cs.toronto.edu>
- - (djm) Hardwire sysconfdir in RPM spec files as some RPM versions get
-   it wrong. Report from Bennett Todd <bet@rahul.net>
-
-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>
- - (bal) sshd.init files corrected to assign $? to RETVAL.  Patch by
-   Jarno Huuskonen <jhuuskon@messi.uku.fi>
- - (bal) fixpaths fixed to stop it from quitely failing. Patch by
-   Mark D. Roth <roth@feep.net>
-
-20001106
- - (djm) Use Jim's new 1.0.3 askpass in Redhat RPMs
- - (djm) Manually fix up missed diff hunks (mainly RCS idents)
- - (djm) Remove UPGRADING document in favour of a link to the better
-   maintained FAQ on www.openssh.com
- - (djm) Fix multiple dependancy on gnome-libs from Pekka Savola
-   <pekkas@netcore.fi>
- - (djm) Don't need X11-askpass in RPM spec file if building without it
-   from Pekka Savola <pekkas@netcore.fi>
- - (djm) Release 2.3.0p1
- - (bal) typo in configure.in in regards to --with-ldflags from Marko
-   Asplund <aspa@kronodoc.fi>
- - (bal) fixed next-posix.h.  Forgot prototype of getppid().
-
-20001105
- - (bal) Sync with OpenBSD:
-   - markus@cvs.openbsd.org 2000/10/31 9:31:58
-     [compat.c]
-     handle all old openssh versions
-   - markus@cvs.openbsd.org 2000/10/31 13:1853
-     [deattack.c]
-     so that large packets do not wrap "n"; from netbsd
- - (bal) rijndel.c - fix up RCSID to match OpenBSD tree
- - (bal) auth2-skey.c - Checked in.  Missing from portable tree.
- - (bal) Reworked NEWS-OS and NeXT ports to extract waitpid() and
-   setsid() into more common files
- - (stevesk) pty.c: use __hpux to identify HP-UX.
- - (bal) Missed auth-skey.o in Makefile.in and minor correction to
-   bsd-waitpid.c
-
-20001029
- - (stevesk) Fix typo in auth.c: USE_PAM not PAM
- - (stevesk) Create contrib/cygwin/ directory; patch from
-   Corinna Vinschen <vinschen@redhat.com>
- - (bal) Resolved more $xno and $xyes issues in configure.in
- - (bal) next-posix.h - spelling and forgot a prototype
-
-20001028
- - (djm) fix select hack in serverloop.c from Philippe WILLEM
-   <Philippe.WILLEM@urssaf.fr>
- - (djm) Fix mangled AIXAUTHENTICATE code
- - (djm) authctxt->pw may be NULL. Fix from Markus Friedl
-   <markus.friedl@informatik.uni-erlangen.de>
- - (djm) Sync with OpenBSD:
-   - markus@cvs.openbsd.org  2000/10/16 15:46:32
-     [ssh.1]
-     fixes from pekkas@netcore.fi
-   - markus@cvs.openbsd.org  2000/10/17 14:28:11
-     [atomicio.c]
-     return number of characters processed; ok deraadt@
-   - markus@cvs.openbsd.org  2000/10/18 12:04:02
-     [atomicio.c]
-     undo
-   - markus@cvs.openbsd.org  2000/10/18 12:23:02
-     [scp.c]
-     replace atomicio(read,...) with read(); ok deraadt@
-   - markus@cvs.openbsd.org  2000/10/18 12:42:00
-     [session.c]
-     restore old record login behaviour
-   - deraadt@cvs.openbsd.org 2000/10/19 10:41:13
-     [auth-skey.c]
-     fmt string problem in unused code
-   - provos@cvs.openbsd.org  2000/10/19 10:45:16
-     [sshconnect2.c]
-     don't reference freed memory. okay deraadt@
-   - markus@cvs.openbsd.org  2000/10/21 11:04:23
-     [canohost.c]
-     typo, eramore@era-t.ericsson.se; ok niels@
-   - markus@cvs.openbsd.org  2000/10/23 13:31:55
-     [cipher.c]
-     non-alignment dependent swap_bytes(); from
-     simonb@wasabisystems.com/netbsd
-   - markus@cvs.openbsd.org  2000/10/26 12:38:28
-     [compat.c]
-     add older vandyke products
-   - markus@cvs.openbsd.org  2000/10/27 01:32:19
-     [channels.c channels.h clientloop.c serverloop.c session.c]
-     [ssh.c util.c]
-     enable non-blocking IO on channels, and tty's (except for the
-     client ttys).
-
-20001027
- - (djm) Increase REKEY_BYTES to 2^24 for arc4random
-
-20001025
- - (djm) Added WARNING.RNG file and modified configure to ask users of the
-   builtin entropy code to read it.
- - (djm) Prefer builtin regex to PCRE.
- - (bal) Added USE_PIPS defined to NeXT configure.in since scp hangs randomly.
- - (bal) Apply fixes to configure.in pointed out by Pavel Roskin
-   <proski@gnu.org>
-
-20001020
- - (djm) Don't define _REENTRANT for SNI/Reliant Unix
- - (bal) Imported NEWS-OS waitpid() macros into NeXT.  Since implementation
-   is more correct then current version.
-
-20001018
- - (stevesk) Add initial support for setproctitle().  Current
-   support is for the HP-UX pstat(PSTAT_SETCMD, ...) method.
- - (stevesk) Add egd startup scripts to contrib/hpux/
-
-20001017
- - (djm) Add -lregex to cywin libs from Corinna Vinschen
-   <vinschen@cygnus.com>
- - (djm) Don't rely on atomicio's retval to determine length of askpass
-   supplied passphrase. Problem report from Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - (bal) Changed from GNU rx to PCRE on suggestion from djm.
- - (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki
-   <nakaji@tutrp.tut.ac.jp>
-
-20001016
- - (djm) Sync with OpenBSD:
-   - markus@cvs.openbsd.org  2000/10/14 04:01:15
-     [cipher.c]
-     debug3
-   - markus@cvs.openbsd.org  2000/10/14 04:07:23
-     [scp.c]
-     remove spaces from arguments; from djm@mindrot.org
-   - markus@cvs.openbsd.org  2000/10/14 06:09:46
-     [ssh.1]
-     Cipher is for SSH-1 only
-   - markus@cvs.openbsd.org  2000/10/14 06:12:09
-     [servconf.c servconf.h serverloop.c session.c sshd.8]
-     AllowTcpForwarding; from naddy@
-   - markus@cvs.openbsd.org  2000/10/14 06:16:56
-     [auth2.c compat.c compat.h sshconnect2.c version.h]
-     OpenSSH_2.3; note that is is not complete, but the version number
-     needs to be changed for interoperability reasons
-   - markus@cvs.openbsd.org  2000/10/14 06:19:45
-     [auth-rsa.c]
-     do not send RSA challenge if key is not allowed by key-options; from
-     eivind@ThinkSec.com
-   - markus@cvs.openbsd.org  2000/10/15 08:14:01
-     [rijndael.c session.c]
-     typos; from stevesk@sweden.hp.com
-   - markus@cvs.openbsd.org  2000/10/15 08:18:31
-     [rijndael.c]
-     typo
- - (djm) Copy manpages back over from OpenBSD - too tedious to wade
-   through diffs
- - (djm) Added condrestart to Redhat init script. Patch from Pekka Savola
-   <pekkas@netcore.fi>
- - (djm) Update version in Redhat spec file
- - (djm) Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the
-   Redhat 7.0 spec file
- - (djm) Make inability to read/write PRNG seedfile non-fatal
-
-
-20001015
- - (djm) Fix ssh2 hang on background processes at logout.
-
-20001014
- - (bal) Add support for realpath and getcwd for platforms with broken
-   or missing realpath implementations for sftp-server.
- - (bal) Corrected mistake in INSTALL in regards to GNU rx library
- - (bal) Add support for GNU rx library for those lacking regexp support
- - (djm) Don't accept PAM_PROMPT_ECHO_ON messages during initial auth
- - (djm) Revert SSH2 serverloop hack, will find a better way.
- - (djm) Add workaround for Linux 2.4's gratuitious errno change. Patch
-   from Martin Johansson <fatbob@acc.umu.se>
- - (djm) Big OpenBSD sync:
-   - markus@cvs.openbsd.org  2000/09/30 10:27:44
-     [log.c]
-     allow loglevel debug
-   - markus@cvs.openbsd.org  2000/10/03 11:59:57
-     [packet.c]
-     hmac->mac
-   - markus@cvs.openbsd.org  2000/10/03 12:03:03
-     [auth-krb4.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth1.c]
-     move fake-auth from auth1.c to individual auth methods, disables s/key in
-     debug-msg
-   - markus@cvs.openbsd.org  2000/10/03 12:16:48
-     ssh.c
-     do not resolve canonname, i have no idea why this was added oin ossh
-   - markus@cvs.openbsd.org  2000/10/09 15:30:44
-     ssh-keygen.1 ssh-keygen.c
-     -X now reads private ssh.com DSA keys, too.
-   - markus@cvs.openbsd.org  2000/10/09 15:32:34
-     auth-options.c
-     clear options on every call.
-   - markus@cvs.openbsd.org  2000/10/09 15:51:00
-     authfd.c authfd.h
-     interop with ssh-agent2, from <res@shore.net>
-   - markus@cvs.openbsd.org  2000/10/10 14:20:45
-     compat.c
-     use rexexp for version string matching
-   - provos@cvs.openbsd.org  2000/10/10 22:02:18
-     [kex.c kex.h myproposal.h ssh.h ssh2.h sshconnect2.c sshd.c dh.c dh.h]
-     First rough implementation of the diffie-hellman group exchange.  The
-     client can ask the server for bigger groups to perform the diffie-hellman
-     in, thus increasing the attack complexity when using ciphers with longer
-     keys.  University of Windsor provided network, T the company.
-   - markus@cvs.openbsd.org  2000/10/11 13:59:52
-     [auth-rsa.c auth2.c]
-     clear auth options unless auth sucessfull
-   - markus@cvs.openbsd.org  2000/10/11 14:00:27
-     [auth-options.h]
-     clear auth options unless auth sucessfull
-   - markus@cvs.openbsd.org  2000/10/11 14:03:27
-     [scp.1 scp.c]
-     support 'scp -o' with help from mouring@pconline.com
-   - markus@cvs.openbsd.org  2000/10/11 14:11:35
-     [dh.c]
-     Wall
-   - markus@cvs.openbsd.org  2000/10/11 14:14:40
-     [auth.h auth2.c readconf.c readconf.h readpass.c servconf.c servconf.h]
-     [ssh.h sshconnect2.c sshd_config auth2-skey.c cli.c cli.h]
-     add support for s/key (kbd-interactive) to ssh2, based on work by
-     mkiernan@avantgo.com and me
-   - markus@cvs.openbsd.org  2000/10/11 14:27:24
-     [auth.c auth1.c auth2.c authfile.c cipher.c cipher.h kex.c kex.h]
-     [myproposal.h packet.c readconf.c session.c ssh.c ssh.h sshconnect1.c]
-     [sshconnect2.c sshd.c]
-     new cipher framework
-   - markus@cvs.openbsd.org  2000/10/11 14:45:21
-     [cipher.c]
-     remove DES
-   - markus@cvs.openbsd.org  2000/10/12 03:59:20
-     [cipher.c cipher.h sshconnect1.c sshconnect2.c sshd.c]
-     enable DES in SSH-1 clients only
-   - markus@cvs.openbsd.org  2000/10/12 08:21:13
-     [kex.h packet.c]
-     remove unused
-   - markus@cvs.openbsd.org  2000/10/13 12:34:46
-     [sshd.c]
-     Kludge for F-Secure Macintosh < 1.0.2; appro@fy.chalmers.se
-   - markus@cvs.openbsd.org  2000/10/13 12:59:15
-     [cipher.c cipher.h myproposal.h  rijndael.c rijndael.h]
-     rijndael/aes support
-   - markus@cvs.openbsd.org  2000/10/13 13:10:54
-     [sshd.8]
-     more info about -V
-   - markus@cvs.openbsd.org  2000/10/13 13:12:02
-     [myproposal.h]
-     prefer no compression
- - (djm) Fix scp user@host handling
- - (djm) Don't clobber ssh_prng_cmds on install
- - (stevesk) Include config.h in rijndael.c so we define intXX_t and
-   u_intXX_t types on all platforms.
- - (stevesk) rijndael.c: cleanup missing declaration warnings.
- - (stevesk) ~/.hushlogin shouldn't cause required password change to
-   be bypassed.
- - (stevesk) Display correct path to ssh-askpass in configure output.
-   Report from Lutz Jaenicke.
-
-20001007
- - (stevesk) Print PAM return value in PAM log messages to aid
-   with debugging.
- - (stevesk) Fix detection of pw_class struct member in configure;
-   patch from KAMAHARA Junzo <kamahara@cc.kshosen.ac.jp>
-
-20001002
- - (djm) Fix USER_PATH, report from Kevin Steves <stevesk@sweden.hp.com>
- - (djm) Add host system and CC to end-of-configure report. Suggested by
-   Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
-
-20000931
- - (djm) Cygwin fixes from Corinna Vinschen <vinschen@cygnus.com>
-
-20000930
- - (djm) Irix ssh_prng_cmds path fix from Pekka Savola <pekkas@netcore.fi>
- - (djm) Support in bsd-snprintf.c for long long conversions from
-   Ben Lindstrom <mouring@pconline.com>
- - (djm) Cleanup NeXT support from Ben Lindstrom <mouring@pconline.com>
- - (djm) Ignore SIGPIPEs from serverloop to child. Fixes crashes with
-   very short lived X connections. Bug report from Tobias Oetiker
-   <oetiker@ee.ethz.ch>. Fix from Markus Friedl <markus@cvs.openbsd.org>
- - (djm) Add recent InitScripts as a RPM dependancy for openssh-server
-   patch from Pekka Savola <pekkas@netcore.fi>
- - (djm) Forgot to cvs add LICENSE file
- - (djm) Add LICENSE to RPM spec files
- - (djm) CVS OpenBSD sync:
-   - markus@cvs.openbsd.org  2000/09/26 13:59:59
-     [clientloop.c]
-     use debug2
-   - markus@cvs.openbsd.org  2000/09/27 15:41:34
-     [auth2.c sshconnect2.c]
-     use key_type()
-   - markus@cvs.openbsd.org  2000/09/28 12:03:18
-     [channels.c]
-     debug -> debug2 cleanup
- - (djm) Irix strips "/dev/tty" from [uw]tmp entries (other systems only
-   strip "/dev/"). Fix loginrec.c based on patch from Alain St-Denis
-   <Alain.St-Denis@ec.gc.ca>
- - (djm) Fix 9 character passphrase failure with gnome-ssh-askpass.
-   Problem was caused by interrupted read in ssh-add. Report from Donald
-   J. Barry <don@astro.cornell.edu>
-
-20000929
- - (djm) Fix SSH2 not terminating until all background tasks done problem.
- - (djm) Another off-by-one fix from Pavel Kankovsky
-   <peak@argo.troja.mff.cuni.cz>
- - (djm) Clean up. Strip some unnecessary differences with OpenBSD's code,
-   tidy necessary differences. Use Markus' new debugN() in entropy.c
- - (djm) Merged big SCO portability patch from Tim Rice
-   <tim@multitalents.net>
-
-20000926
- - (djm) Update X11-askpass to 1.0.2 in RPM spec file
- - (djm) Define _REENTRANT to pickup strtok_r() on HP/UX
- - (djm) Security: fix off-by-one buffer overrun in fake-getnameinfo.c.
-   Report and fix from Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
-
-20000924
- - (djm) Merged cleanup patch from Mark Miller <markm@swoon.net>
- - (djm) A bit more cleanup - created cygwin_util.h
- - (djm) Include strtok_r() from OpenBSD libc. Fixes report from Mark Miller
-   <markm@swoon.net>
-
-20000923
- - (djm) Fix address logging in utmp from Kevin Steves
-   <stevesk@sweden.hp.com>
- - (djm) Redhat spec and manpage fixes from Pekka Savola <pekkas@netcore.fi>
- - (djm) Seperate tests for int64_t and u_int64_t types
- - (djm) Tweak password expiry checking at suggestion of Kevin Steves
-   <stevesk@sweden.hp.com>
- - (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
- - (djm) Use printf %lld instead of %qd in sftp-server.c. Fix from
-   Michael Stone <mstone@cs.loyola.edu>
- - (djm) OpenBSD CVS sync:
-   - markus@cvs.openbsd.org  2000/09/17 09:38:59
-     [sshconnect2.c sshd.c]
-     fix DEBUG_KEXDH
-   - markus@cvs.openbsd.org  2000/09/17 09:52:51
-     [sshconnect.c]
-     yes no; ok niels@
-   - markus@cvs.openbsd.org  2000/09/21 04:55:11
-     [sshd.8]
-     typo
-   - markus@cvs.openbsd.org  2000/09/21 05:03:54
-     [serverloop.c]
-     typo
-   - markus@cvs.openbsd.org  2000/09/21 05:11:42
-     scp.c
-     utime() to utimes(); mouring@pconline.com
-   - markus@cvs.openbsd.org  2000/09/21 05:25:08
-     sshconnect2.c
-     change login logic in ssh2, allows plugin of other auth methods
-   - markus@cvs.openbsd.org  2000/09/21 05:25:35
-     [auth2.c channels.c channels.h clientloop.c dispatch.c dispatch.h]
-     [serverloop.c]
-     add context to dispatch_run
-   - markus@cvs.openbsd.org  2000/09/21 05:07:52
-     authfd.c authfd.h ssh-agent.c
-     bug compat for old ssh.com software
-
-20000920
- - (djm) Fix bad path substitution. Report from Andrew Miner
-   <asminer@cs.iastate.edu>
-
-20000916
- - (djm) Fix SSL search order from Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - (djm) New SuSE spec from Corinna Vinschen <corinna@vinschen.de>
- - (djm) Update CygWin support from Corinna Vinschen <vinschen@cygnus.com>
- - (djm) Use a real struct sockaddr inside the fake struct sockaddr_storage.
-   Patch from Larry Jones <larry.jones@sdrc.com>
- - (djm) Add Steve VanDevender's <stevev@darkwing.uoregon.edu> PAM
-   password change patch.
- - (djm) Bring licenses on my stuff in line with OpenBSD's
- - (djm) Cleanup auth-passwd.c and unify HP/UX authentication. Patch from
-   Kevin Steves <stevesk@sweden.hp.com>
- - (djm) Shadow expiry check fix from Pavel Troller <patrol@omni.sinus.cz>
- - (djm) Re-enable int64_t types - we need them for sftp
- - (djm) Use libexecdir from configure , rather than libexecdir/ssh
- - (djm) Update Redhat SPEC file accordingly
- - (djm) Add Kevin Steves <stevesk@sweden.hp.com> HP/UX contrib files
- - (djm) Add Charles Levert <charles@comm.polymtl.ca> getpgrp patch
- - (djm) Fix password auth on HP/UX 10.20. Patch from Dirk De Wachter
-   <Dirk.DeWachter@rug.ac.be>
- - (djm) Fixprogs and entropy list fixes from Larry Jones
-   <larry.jones@sdrc.com>
- - (djm) Fix for SuSE spec file from Takashi YOSHIDA
-   <tyoshida@gemini.rc.kyushu-u.ac.jp>
- - (djm) Merge OpenBSD changes:
-   - markus@cvs.openbsd.org  2000/09/05 02:59:57
-     [session.c]
-     print hostname (not hushlogin)
-   - markus@cvs.openbsd.org  2000/09/05 13:18:48
-     [authfile.c ssh-add.c]
-     enable ssh-add -d for DSA keys
-   - markus@cvs.openbsd.org  2000/09/05 13:20:49
-     [sftp-server.c]
-     cleanup
-   - markus@cvs.openbsd.org  2000/09/06 03:46:41
-     [authfile.h]
-     prototype
-   - deraadt@cvs.openbsd.org 2000/09/07 14:27:56
-     [ALL]
-     cleanup copyright notices on all files.  I have attempted to be
-     accurate with the details.  everything is now under Tatu's licence
-     (which I copied from his readme), and/or the core-sdi bsd-ish thing
-     for deattack, or various openbsd developers under a 2-term bsd
-     licence.  We're not changing any rules, just being accurate.
-   - markus@cvs.openbsd.org  2000/09/07 14:40:30
-     [channels.c channels.h clientloop.c serverloop.c ssh.c]
-     cleanup window and packet sizes for ssh2 flow control; ok niels
-   - markus@cvs.openbsd.org  2000/09/07 14:53:00
-     [scp.c]
-     typo
-   - markus@cvs.openbsd.org  2000/09/07 15:13:37
-     [auth-options.c auth-options.h auth-rh-rsa.c auth-rsa.c auth.c]
-     [authfile.h canohost.c channels.h compat.c hostfile.h log.c match.h]
-     [pty.c readconf.c]
-     some more Copyright fixes
-   - markus@cvs.openbsd.org  2000/09/08 03:02:51
-     [README.openssh2]
-     bye bye
-   - deraadt@cvs.openbsd.org 2000/09/11 18:38:33
-     [LICENCE cipher.c]
-     a few more comments about it being ARC4 not RC4
-   - markus@cvs.openbsd.org  2000/09/12 14:53:11
-     [log-client.c log-server.c log.c ssh.1 ssh.c ssh.h sshd.8 sshd.c]
-     multiple debug levels
-   - markus@cvs.openbsd.org  2000/09/14 14:25:15
-     [clientloop.c]
-     typo
-   - deraadt@cvs.openbsd.org 2000/09/15 01:13:51
-     [ssh-agent.c]
-     check return value for setenv(3) for failure, and deal appropriately
-
-20000913
- - (djm) Fix server not exiting with jobs in background.
-
-20000905
- - (djm) Import OpenBSD CVS changes
-   - markus@cvs.openbsd.org  2000/08/31 15:52:24
-     [Makefile sshd.8 sshd_config sftp-server.8 sftp-server.c]
-     implement a SFTP server. interops with sftp2, scp2 and the windows
-     client from ssh.com
-   - markus@cvs.openbsd.org  2000/08/31 15:56:03
-     [README.openssh2]
-     sync
-   - markus@cvs.openbsd.org  2000/08/31 16:05:42
-     [session.c]
-     Wall
-   - markus@cvs.openbsd.org  2000/08/31 16:09:34
-     [authfd.c ssh-agent.c]
-     add a flag to SSH2_AGENTC_SIGN_REQUEST for future extensions
-   - deraadt@cvs.openbsd.org 2000/09/01 09:25:13
-     [scp.1 scp.c]
-     cleanup and fix -S support; stevesk@sweden.hp.com
-   - markus@cvs.openbsd.org  2000/09/01 16:29:32
-     [sftp-server.c]
-     portability fixes
-   - markus@cvs.openbsd.org  2000/09/01 16:32:41
-     [sftp-server.c]
-     fix cast; mouring@pconline.com
-   - itojun@cvs.openbsd.org  2000/09/03 09:23:28
-     [ssh-add.1 ssh.1]
-     add missing .El against .Bl.
-   - markus@cvs.openbsd.org  2000/09/04 13:03:41
-     [session.c]
-     missing close; ok theo
-   - markus@cvs.openbsd.org  2000/09/04 13:07:21
-     [session.c]
-     fix get_last_login_time order; from andre@van-veen.de
-   - markus@cvs.openbsd.org  2000/09/04 13:10:09
-     [sftp-server.c]
-     more cast fixes; from mouring@pconline.com
-   - markus@cvs.openbsd.org  2000/09/04 13:06:04
-     [session.c]
-     set SSH_ORIGINAL_COMMAND; from Leakin@dfw.nostrum.com, bet@rahul.net
- - (djm) Cleanup after import. Fix sftp-server compilation, Makefile
- - (djm) Merge cygwin support from Corinna Vinschen <vinschen@cygnus.com>
-
-20000903
- - (djm) Fix Redhat init script
-
-20000901
- - (djm) Pick up Jim's new X11-askpass
- - (djm) Release 2.2.0p1
-
-20000831
- - (djm) Workaround SIGPIPE problems on SCO. Fix from Aran Cox
-   <acox@cv.telegroup.com>
- - (djm) Pick up new version (2.2.0) from OpenBSD CVS
-
-20000830
- - (djm) Compile warning fixes from Mark Miller <markm@swoon.net>
- - (djm) Periodically rekey arc4random
- - (djm) Clean up diff against OpenBSD.
- - (djm) HPUX 11 needs USE_PIPES as well: Kevin Steves
-   <stevesk@sweden.hp.com>
- - (djm) Quieten the pam delete credentials error message
- - (djm) Fix printing of $DISPLAY hack if set by system type. Report from
-   Kevin Steves <stevesk@sweden.hp.com>
- - (djm) NeXT patch from Ben Lindstrom <mouring@pconline.com>
- - (djm) Fix doh in bsd-arc4random.c
-
-20000829
- - (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert
-   Doering <gert@greenie.muc.de>, John Horne <J.Horne@plymouth.ac.uk> and
-   Garrick James <garrick@james.net>
- - (djm) Check for SCO pty naming style (ptyp%d/ttyp%d). Based on fix from
-   Bastian Trompetter <btrompetter@firemail.de>
- - (djm) NeXT tweaks from Ben Lindstrom <mouring@pconline.com>
- - More OpenBSD updates:
-   - deraadt@cvs.openbsd.org 2000/08/24 15:46:59
-     [scp.c]
-     off_t in sink, to fix files > 2GB, i think, test is still running ;-)
-   - deraadt@cvs.openbsd.org 2000/08/25 10:10:06
-     [session.c]
-     Wall
-   - markus@cvs.openbsd.org  2000/08/26 04:33:43
-     [compat.c]
-     ssh.com-2.3.0
-   - markus@cvs.openbsd.org  2000/08/27 12:18:05
-     [compat.c]
-     compatibility with future ssh.com versions
-   - deraadt@cvs.openbsd.org 2000/08/27 21:50:55
-     [auth-krb4.c session.c ssh-add.c sshconnect.c uidswap.c]
-     print uid/gid as unsigned
-   - markus@cvs.openbsd.org  2000/08/28 13:51:00
-     [ssh.c]
-     enable -n and -f for ssh2
-   - markus@cvs.openbsd.org  2000/08/28 14:19:53
-     [ssh.c]
-     allow combination of -N and -f
-   - markus@cvs.openbsd.org  2000/08/28 14:20:56
-     [util.c]
-     util.c
-   - markus@cvs.openbsd.org  2000/08/28 14:22:02
-     [util.c]
-     undo
-   - markus@cvs.openbsd.org  2000/08/28 14:23:38
-     [util.c]
-     don't complain if setting NONBLOCK fails with ENODEV
-
-20000823
- - (djm) Define USE_PIPES to avoid socketpair problems on HPUX 10 and SunOS 4
-   Avoids "scp never exits" problem. Reports from Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE> and Tamito KAJIYAMA
-   <kajiyama@grad.sccs.chukyo-u.ac.jp>
- - (djm) Pick up LOGIN_PROGRAM from environment or PATH if not set by headers
- - (djm) Add local version to version.h
- - (djm) Don't reseed arc4random everytime it is used
- - (djm) OpenBSD CVS updates:
-   - deraadt@cvs.openbsd.org 2000/08/18 20:07:23
-     [ssh.c]
-     accept remsh as a valid name as well; roman@buildpoint.com
-   - deraadt@cvs.openbsd.org 2000/08/18 20:17:13
-     [deattack.c crc32.c packet.c]
-     rename crc32() to ssh_crc32() to avoid zlib name clash.  do not move to
-     libz crc32 function yet, because it has ugly "long"'s in it;
-     oneill@cs.sfu.ca
-   - deraadt@cvs.openbsd.org 2000/08/18 20:26:08
-     [scp.1 scp.c]
-     -S prog support; tv@debian.org
-   - deraadt@cvs.openbsd.org 2000/08/18 20:50:07
-     [scp.c]
-     knf
-   - deraadt@cvs.openbsd.org 2000/08/18 20:57:33
-     [log-client.c]
-     shorten
-   - markus@cvs.openbsd.org  2000/08/19 12:48:11
-     [channels.c channels.h clientloop.c ssh.c ssh.h]
-     support for ~. in ssh2
-   - deraadt@cvs.openbsd.org 2000/08/19 15:29:40
-     [crc32.h]
-     proper prototype
-   - markus@cvs.openbsd.org  2000/08/19 15:34:44
-     [authfd.c authfd.h key.c key.h ssh-add.1 ssh-add.c ssh-agent.1]
-     [ssh-agent.c ssh-keygen.c sshconnect1.c sshconnect2.c Makefile]
-     [fingerprint.c fingerprint.h]
-     add SSH2/DSA support to the agent and some other DSA related cleanups.
-     (note that we cannot talk to ssh.com's ssh2 agents)
-   - markus@cvs.openbsd.org  2000/08/19 15:55:52
-     [channels.c channels.h clientloop.c]
-     more ~ support for ssh2
-   - markus@cvs.openbsd.org  2000/08/19 16:21:19
-     [clientloop.c]
-     oops
-   - millert@cvs.openbsd.org 2000/08/20 12:25:53
-     [session.c]
-     We have to stash the result of get_remote_name_or_ip() before we
-     close our socket or getpeername() will get EBADF and the process
-     will exit.  Only a problem for "UseLogin yes".
-   - millert@cvs.openbsd.org 2000/08/20 12:30:59
-     [session.c]
-     Only check /etc/nologin if "UseLogin no" since login(1) may have its
-     own policy on determining who is allowed to login when /etc/nologin
-     is present.  Also use the _PATH_NOLOGIN define.
-   - millert@cvs.openbsd.org 2000/08/20 12:42:43
-     [auth1.c auth2.c session.c ssh.c]
-     Add calls to setusercontext() and login_get*().  We basically call
-     setusercontext() in most places where previously we did a setlogin().
-     Add default login.conf file and put root in the "daemon" login class.
-   - millert@cvs.openbsd.org 2000/08/21 10:23:31
-     [session.c]
-     Fix incorrect PATH setting; noted by Markus.
-
-20000818
- - (djm) OpenBSD CVS changes:
-   - markus@cvs.openbsd.org  2000/07/22 03:14:37
-     [servconf.c servconf.h sshd.8 sshd.c sshd_config]
-     random early drop; ok theo, niels
-   - deraadt@cvs.openbsd.org 2000/07/26 11:46:51
-     [ssh.1]
-     typo
-   - deraadt@cvs.openbsd.org 2000/08/01 11:46:11
-     [sshd.8]
-     many fixes from pepper@mail.reppep.com
-   - provos@cvs.openbsd.org  2000/08/01 13:01:42
-     [Makefile.in util.c aux.c]
-     rename aux.c to util.c to help with cygwin port
-   - deraadt@cvs.openbsd.org 2000/08/02 00:23:31
-     [authfd.c]
-     correct sun_len; Alexander@Leidinger.net
-   - provos@cvs.openbsd.org  2000/08/02 10:27:17
-     [readconf.c sshd.8]
-     disable kerberos authentication by default
-   - provos@cvs.openbsd.org  2000/08/02 11:27:05
-     [sshd.8 readconf.c auth-krb4.c]
-     disallow kerberos authentication if we can't verify the TGT; from
-     dugsong@
-     kerberos authentication is on by default only if you have a srvtab.
-   - markus@cvs.openbsd.org  2000/08/04 14:30:07
-     [auth.c]
-     unused
-   - markus@cvs.openbsd.org  2000/08/04 14:30:35
+     In sc_put_key(), sc_reader_id should be id.
+   - markus@cvs.openbsd.org 2002/03/21 20:51:12
      [sshd_config]
-     MaxStartups
-   - markus@cvs.openbsd.org  2000/08/15 13:20:46
-     [authfd.c]
-     cleanup; ok niels@
-   - markus@cvs.openbsd.org  2000/08/17 14:05:10
-     [session.c]
-     cleanup login(1)-like jobs, no duplicate utmp entries
-   - markus@cvs.openbsd.org  2000/08/17 14:06:34
-     [session.c sshd.8 sshd.c]
-      sshd -u len, similar to telnetd
- - (djm) Lastlog was not getting closed after writing login entry
- - (djm) Add Solaris package support from Rip Loomis <loomisg@cist.saic.com>
-
-20000816
- - (djm) Replacement for inet_ntoa for Irix (which breaks on gcc)
- - (djm) Fix strerror replacement for old SunOS. Based on patch from
-   Charles Levert <charles@comm.polymtl.ca>
- - (djm) Seperate arc4random into seperate file and use OpenSSL's RC4
-   implementation.
- - (djm) SUN_LEN macro for systems which lack it
-
-20000815
- - (djm) More SunOS 4.1.x fixes from Nate Itkin <nitkin@europa.com>
- - (djm) Avoid failures on Irix when ssh is not setuid. Fix from
-   Michael Stone <mstone@cs.loyola.edu>
- - (djm) Don't seek in directory based lastlogs
- - (djm) Fix --with-ipaddr-display configure option test. Patch from
-   Jarno Huuskonen <jhuuskon@messi.uku.fi>
- - (djm) Fix AIX limits from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
-20000813
- - (djm) Add $(srcdir) to includes when compiling (for VPATH). Report from
-   Fabrice bacchella <fabrice.bacchella@marchfirst.fr>
-
-20000809
- - (djm) Define AIX hard limits if headers don't. Report from
-   Bill Painter <william.t.painter@lmco.com>
- - (djm) utmp direct write & SunOS 4 patch from Charles Levert
-   <charles@comm.polymtl.ca>
-
-20000808
- - (djm) Cleanup Redhat RPMs. Generate keys at runtime rather than install
-   time, spec file cleanup.
-
-20000807
- - (djm) Set 0755 on binaries during install. Report from Lutz Jaenicke
- - (djm) Suppress error messages on channel close shutdown() failurs
-   works around Linux bug. Patch from Zack Weinberg <zack@wolery.cumb.org>
- - (djm) Add some more entropy collection commands from Lutz Jaenicke
-
-20000725
- - (djm) Fix autoconf typo: HAVE_BINRESVPORT_AF -> HAVE_BINDRESVPORT_AF
-
-20000721
- - (djm) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org  2000/07/16 02:27:22
-     [authfd.c authfd.h channels.c clientloop.c ssh-add.c ssh-agent.c ssh.c]
-     [sshconnect1.c sshconnect2.c]
-     make ssh-add accept dsa keys (the agent does not)
-   - djm@cvs.openbsd.org     2000/07/17 19:25:02
-     [sshd.c]
-     Another closing of stdin; ok deraadt
-   - markus@cvs.openbsd.org  2000/07/19 18:33:12
-     [dsa.c]
-     missing free, reorder
-   - markus@cvs.openbsd.org  2000/07/20 16:23:14
-     [ssh-keygen.1]
-     document input and output files
-
-20000720
- - (djm) Spec file fix from Petr Novotny <Petr.Novotny@antek.cz>
-
-20000716
- - (djm) Release 2.1.1p4
-
-20000715
- - (djm) OpenBSD CVS updates
-   - provos@cvs.openbsd.org  2000/07/13 16:53:22
-     [aux.c readconf.c servconf.c ssh.h]
-     allow multiple whitespace but only one '=' between tokens, bug report from
-     Ralf S. Engelschall <rse@engelschall.com> but different fix. okay deraadt@
-   - provos@cvs.openbsd.org  2000/07/13 17:14:09
+     add privsep (off)
+   - markus@cvs.openbsd.org 2002/03/21 21:23:34
+     [sshd.c]
+     add privsep_preauth() and remove 1 goto; ok provos@
+   - rees@cvs.openbsd.org 2002/03/21 21:54:34
+     [scard.c scard.h ssh-keygen.c]
+     Add PIN-protection for secret key.
+   - rees@cvs.openbsd.org 2002/03/21 22:44:05
+     [authfd.c authfd.h ssh-add.c ssh-agent.c ssh.c]
+     Add PIN-protection for secret key.
+   - markus@cvs.openbsd.org 2002/03/21 23:07:37
      [clientloop.c]
-     typo; todd@fries.net
-   - provos@cvs.openbsd.org  2000/07/13 17:19:31
-     [scp.c]
-     close can fail on AFS, report error; from Greg Hudson <ghudson@mit.edu>
-   - markus@cvs.openbsd.org  2000/07/14 16:59:46
-     [readconf.c servconf.c]
-     allow leading whitespace. ok niels
-   - djm@cvs.openbsd.org     2000/07/14 22:01:38
-     [ssh-keygen.c ssh.c]
-     Always create ~/.ssh with mode 700; ok Markus
- - Fixes for SunOS 4.1.4 from Gordon Atwood <gordon@cs.ualberta.ca>
-   - Include floatingpoint.h for entropy.c
-   - strerror replacement
-
-20000712
- - (djm) Remove -lresolve for Reliant Unix
- - (djm) OpenBSD CVS Updates:
-   - deraadt@cvs.openbsd.org 2000/07/11 02:11:34
-     [session.c sshd.c ]
-     make MaxStartups code still work with -d; djm
-   - deraadt@cvs.openbsd.org 2000/07/11 13:17:45
-     [readconf.c ssh_config]
-     disable FallBackToRsh by default
- - (djm) Replace in_addr_t with u_int32_t in bsd-inet_aton.c. Report from
-   Ben Lindstrom <mouring@pconline.com>
- - (djm) Make building of X11-Askpass and GNOME-Askpass optional in RPM
-   spec file.
- - (djm) Released 2.1.1p3
-
-20000711
- - (djm) Fixup for AIX getuserattr() support from Tom Bertelson
-   <tbert@abac.com>
- - (djm) ReliantUNIX support from Udo Schweigert <ust@cert.siemens.de>
- - (djm) NeXT: dirent structures to get scp working from Ben Lindstrom
-   <mouring@pconline.com>
- - (djm) Fix broken inet_ntoa check and ut_user/ut_name confusion, report
-   from Jim Watt <jimw@peisj.pebio.com>
- - (djm) Replaced bsd-snprintf.c with one from Mutt source tree, it is known
-   to compile on more platforms (incl NeXT).
- - (djm) Added bsd-inet_aton and configure support for NeXT
- - (djm) Misc NeXT fixes from Ben Lindstrom <mouring@pconline.com>
- - (djm) OpenBSD CVS updates:
-   - markus@cvs.openbsd.org  2000/06/26 03:22:29
-     [authfd.c]
-     cleanup, less cut&paste
-   - markus@cvs.openbsd.org  2000/06/26 15:59:19
-     [servconf.c servconf.h session.c sshd.8 sshd.c]
-     MaxStartups: limit number of unauthenticated connections, work by
-     theo and me
-   - deraadt@cvs.openbsd.org 2000/07/05 14:18:07
-     [session.c]
-     use no_x11_forwarding_flag correctly; provos ok
-   - provos@cvs.openbsd.org  2000/07/05 15:35:57
-     [sshd.c]
-     typo
-   - aaron@cvs.openbsd.org   2000/07/05 22:06:58
-     [scp.1 ssh-agent.1 ssh-keygen.1 sshd.8]
-     Insert more missing .El directives. Our troff really should identify
-     these and spit out a warning.
-   - todd@cvs.openbsd.org    2000/07/06 21:55:04
-     [auth-rsa.c auth2.c ssh-keygen.c]
-     clean code is good code
-   - deraadt@cvs.openbsd.org 2000/07/07 02:14:29
-     [serverloop.c]
-     sense of port forwarding flag test was backwards
-   - provos@cvs.openbsd.org  2000/07/08 17:17:31
-     [compat.c readconf.c]
-     replace strtok with strsep; from David Young <dyoung@onthejob.net>
-   - deraadt@cvs.openbsd.org 2000/07/08 19:21:15
-     [auth.h]
-     KNF
-   - ho@cvs.openbsd.org      2000/07/08 19:27:33
-     [compat.c readconf.c]
-     Better conditions for strsep() ending.
-   - ho@cvs.openbsd.org      2000/07/10 10:27:05
-     [readconf.c]
-     Get the correct message on errors. (niels@ ok)
-   - ho@cvs.openbsd.org      2000/07/10 10:30:25
-     [cipher.c kex.c servconf.c]
-     strtok() --> strsep(). (niels@ ok)
- - (djm) Fix problem with debug mode and MaxStartups
- - (djm) Don't generate host keys when $(DESTDIR) is set (e.g. during RPM
-   builds)
- - (djm) Add strsep function from OpenBSD libc for systems that lack it
-
-20000709
- - (djm) Only enable PAM_TTY kludge for Linux. Problem report from
-   Kevin Steves <stevesk@sweden.hp.com>
- - (djm) Match prototype and function declaration for rresvport_af.
-   Problem report from Niklas Edmundsson <nikke@ing.umu.se>
- - (djm) Missing $(DESTDIR) on host-key target causing problems with RPM
-   builds. Problem report from Gregory Leblanc <GLeblanc@cu-portland.edu>
- - (djm) Replace ut_name with ut_user. Patch from Jim Watt
-   <jimw@peisj.pebio.com>
- - (djm) Fix pam sprintf fix
- - (djm) Cleanup entropy collection code a little more. Split initialisation
-   from seeding, perform intialisation immediatly at start, be careful with
-   uids. Based on problem report from Jim Watt <jimw@peisj.pebio.com>
- - (djm) More NeXT compatibility from Ben Lindstrom <mouring@pconline.com>
-   Including sigaction() et al. replacements
- - (djm) AIX getuserattr() session initialisation from Tom Bertelson
-   <tbert@abac.com>
-
-20000708
- - (djm) Fix bad fprintf format handling in auth-pam.c. Patch from
-   Aaron Hopkins <aaron@die.net>
- - (djm) Fix incorrect configure handling of --with-rsh-path option. Fix from
-   Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - (djm) Fixed undefined variables for OSF SIA. Report from
-   Baars, Henk <Hendrik.Baars@nl.origin-it.com>
- - (djm) Handle EWOULDBLOCK returns from read() and write() in atomicio.c
-   Fix from Marquess, Steve Mr JMLFDC <Steve.Marquess@DET.AMEDD.ARMY.MIL>
- - (djm) Don't use inet_addr.
-
-20000702
- - (djm) Fix brace mismatch from Corinna Vinschen <vinschen@cygnus.com>
- - (djm) Stop shadow expiry checking from preventing logins with NIS. Based
-   on fix from HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
- - (djm) Use standard OpenSSL functions in auth-skey.c. Patch from
-   Chris, the Young One <cky@pobox.com>
- - (djm) Fix scp progress meter on really wide terminals. Based on patch
-   from James H. Cloos Jr. <cloos@jhcloos.com>
-
-20000701
- - (djm) Fix Tru64 SIA problems reported by John P Speno <speno@isc.upenn.edu>
- - (djm) Login fixes from Tom Bertelson <tbert@abac.com>
- - (djm) Replace "/bin/sh" with _PATH_BSHELL. Report from Corinna Vinschen
-   <vinschen@cygnus.com>
- - (djm) Replace "/usr/bin/login" with LOGIN_PROGRAM
- - (djm) Added check for broken snprintf() functions which do not correctly
-   terminate output string and attempt to use replacement.
- - (djm) Released 2.1.1p2
-
-20000628
- - (djm) Fixes to lastlog code for Irix
- - (djm) Use atomicio in loginrec
- - (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for
-   Irix 6.x array sessions, project id's, and system audit trail id.
- - (djm) Added 'distprep' make target to simplify packaging
- - (djm) Added patch from Chris Adams <cmadams@hiwaay.net> to add OSF SIA
-   support. Enable using "USE_SIA=1 ./configure [options]"
-
-20000627
- - (djm) Fixes to login code - not setting li->uid, cleanups
- - (djm) Formatting
-
-20000626
- - (djm) Better fix to aclocal tests from Garrick James <garrick@james.net>
- - (djm) Account expiry support from Andreas Steinmetz <ast@domdv.de>
- - (djm) Added password expiry checking (no password change support)
- - (djm) Make EGD failures non-fatal if OpenSSL's entropy pool is still OK
-   based on patch from Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - (djm) Fix fixed EGD code.
- - OpenBSD CVS update
-   - provos@cvs.openbsd.org  2000/06/25 14:17:58
-     [channels.c]
-     correct check for bad channel ids; from Wei Dai <weidai@eskimo.com>
-
-20000623
- - (djm) Use sa_family_t in prototype for rresvport_af. Patch from
-   Svante Signell <svante.signell@telia.com>
- - (djm) Autoconf logic to define sa_family_t if it is missing
- - OpenBSD CVS Updates:
-   - markus@cvs.openbsd.org  2000/06/22 10:32:27
-     [sshd.c]
-     missing atomicio; report from Steve.Marquess@DET.AMEDD.ARMY.MIL
-   - djm@cvs.openbsd.org     2000/06/22 17:55:00
-     [auth-krb4.c key.c radix.c uuencode.c]
-     Missing CVS idents; ok markus
-
-20000622
- - (djm) Automatically generate host key during "make install". Suggested
-   by Gary E. Miller <gem@rellim.com>
- - (djm) Paranoia before kill() system call
- - OpenBSD CVS Updates:
-   - markus@cvs.openbsd.org  2000/06/18 18:50:11
-     [auth2.c compat.c compat.h sshconnect2.c]
-     make userauth+pubkey interop with ssh.com-2.2.0
-   - markus@cvs.openbsd.org  2000/06/18 20:56:17
-     [dsa.c]
-     mem leak + be more paranoid in dsa_verify.
-   - markus@cvs.openbsd.org  2000/06/18 21:29:50
-     [key.c]
-     cleanup fingerprinting, less hardcoded sizes
-   - markus@cvs.openbsd.org  2000/06/19 19:39:45
-     [atomicio.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
-     [auth-rsa.c auth-skey.c authfd.c authfd.h authfile.c bufaux.c bufaux.h]
-     [buffer.c buffer.h canohost.c channels.c channels.h cipher.c cipher.h]
-     [clientloop.c compat.c compat.h compress.c compress.h crc32.c crc32.h]
-     [deattack.c dispatch.c dsa.c fingerprint.c fingerprint.h getput.h hmac.c]
-     [kex.c log-client.c log-server.c login.c match.c mpaux.c mpaux.h nchan.c]
-     [nchan.h packet.c packet.h pty.c pty.h readconf.c readconf.h readpass.c]
-     [rsa.c rsa.h scp.c servconf.c servconf.h ssh-add.c ssh-keygen.c ssh.c]
-     [ssh.h tildexpand.c ttymodes.c ttymodes.h uidswap.c xmalloc.c xmalloc.h]
-     OpenBSD tag
-   - markus@cvs.openbsd.org  2000/06/21 10:46:10
-     sshconnect2.c missing free; nuke old comment
-
-20000620
- - (djm) Replace use of '-o' and '-a' logical operators in configure tests
-   with '||' and '&&'. As suggested by Jim Knoble <jmknoble@jmknoble.cx>
-   to fix SCO Unixware problem reported by Gary E. Miller <gem@rellim.com>
- - (djm) Typo in loginrec.c
-
-20000618
- - (djm) Add summary of configure options to end of ./configure run
- - (djm) Not all systems define RUSAGE_SELF & RUSAGE_CHILDREN. Report from
-   Michael Stone <mstone@cs.loyola.edu>
- - (djm) rusage is a privileged operation on some Unices (incl.
-   Solaris 2.5.1). Report from Paul D. Smith <pausmith@nortelnetworks.com>
- - (djm) Avoid PAM failures when running without a TTY. Report from
-   Martin Petrak <petrak@spsknm.schools.sk>
- - (djm) Include sys/types.h when including netinet/in.h in configure tests.
-   Patch from Jun-ichiro itojun Hagino <itojun@iijlab.net>
- - (djm) Started merge of Ben Lindstrom's <mouring@pconline.com> NeXT support
- - OpenBSD CVS updates:
-   - deraadt@cvs.openbsd.org 2000/06/17 09:58:46
-     [channels.c]
-     everyone says "nix it" (remove protocol 2 debugging message)
-   - markus@cvs.openbsd.org  2000/06/17 13:24:34
-     [sshconnect.c]
-     allow extended server banners
-   - markus@cvs.openbsd.org  2000/06/17 14:30:10
-     [sshconnect.c]
-     missing atomicio, typo
-   - jakob@cvs.openbsd.org   2000/06/17 16:52:34
-     [servconf.c servconf.h session.c sshd.8 sshd_config]
-     add support for ssh v2 subsystems. ok markus@.
-   - deraadt@cvs.openbsd.org 2000/06/17 18:57:48
-     [readconf.c servconf.c]
-     include = in WHITESPACE; markus ok
-   - markus@cvs.openbsd.org  2000/06/17 19:09:10
-     [auth2.c]
-     implement bug compatibility with ssh-2.0.13 pubkey, server side
-   - markus@cvs.openbsd.org  2000/06/17 21:00:28
-     [compat.c]
-     initial support for ssh.com's 2.2.0
-   - markus@cvs.openbsd.org  2000/06/17 21:16:09
-     [scp.c]
-     typo
-   - markus@cvs.openbsd.org  2000/06/17 22:05:02
-     [auth-rsa.c auth2.c serverloop.c session.c auth-options.c auth-options.h]
-     split auth-rsa option parsing into auth-options
-     add options support to authorized_keys2
-   - markus@cvs.openbsd.org  2000/06/17 22:42:54
-     [session.c]
-     typo
-
-20000613
- - (djm) Fixes from Andrew McGill <andrewm@datrix.co.za>:
-  - Platform define for SCO 3.x which breaks on /dev/ptmx
-  - Detect and try to fix missing MAXPATHLEN
- - (djm) Fix short copy in loginrec.c (based on patch from Phill Camp
-   <P.S.S.Camp@ukc.ac.uk>
-
-20000612
- - (djm) Glob manpages in RPM spec files to catch compressed files
- - (djm) Full license in auth-pam.c
- - (djm) Configure fixes from SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
- - (andre) AIX, lastlog, configure fixes from Tom Bertelson <tbert@abac.com>:
-  - Don't try to retrieve lastlog from wtmp/wtmpx if DISABLE_LASTLOG is
-     def'd
-  - Set AIX to use preformatted manpages
-
-20000610
- - (djm) Minor doc tweaks
- - (djm) Fix for configure on bash2 from Jim Knoble <jmknoble@jmknoble.cx>
-
-20000609
- - (djm) Patch from Kenji Miyake <kenji@miyake.org> to disable utmp usage
-   (in favour of utmpx) on Solaris 8
-
-20000606
- - (djm) Cleanup of entropy.c. Reorganised code, removed second pass through
-   list of commands (by default). Removed verbose debugging (by default).
- - (djm) Increased command entropy estimates and default entropy collection
-   timeout
- - (djm) Remove duplicate headers from loginrec.c
- - (djm) Don't add /usr/local/lib to library search path on Irix
- - (djm) Fix rsh path in RPMs. Report from Jason L Tibbitts III
-   <tibbs@math.uh.edu>
- - (djm) Warn user if grabs fail in GNOME askpass. Patch from Zack Weinberg
-   <zack@wolery.cumb.org>
- - (djm) OpenBSD CVS updates:
-  - todd@cvs.openbsd.org
-    [sshconnect2.c]
-    teach protocol v2 to count login failures properly and also enable an
-    explanation of why the password prompt comes up again like v1; this is NOT
-    crypto
-  - markus@cvs.openbsd.org
-    [readconf.c readconf.h servconf.c servconf.h session.c ssh.1 ssh.c sshd.8]
-    xauth_location support; pr 1234
-    [readconf.c sshconnect2.c]
-    typo, unused
-    [session.c]
-    allow use_login only for login sessions, otherwise remote commands are
-    execed with uid==0
-    [sshd.8]
-    document UseLogin better
-    [version.h]
-    OpenSSH 2.1.1
-    [auth-rsa.c]
-    fix match_hostname() logic for auth-rsa: deny access if we have a
-    negative match or no match at all
-    [channels.c hostfile.c match.c]
-    don't panic if mkdtemp fails for authfwd; jkb@yahoo-inc.com via
-    kris@FreeBSD.org
-
-20000606
- - (djm) Added --with-cflags, --with-ldflags and --with-libs options to
-   configure.
-
-20000604
- - Configure tweaking for new login code on Irix 5.3
- - (andre) login code changes based on djm feedback
-
-20000603
- - (andre) New login code
-    - Remove bsd-login.[ch] and all the OpenBSD-derived code in login.c
-    - Add loginrec.[ch], logintest.c and autoconf code
-
-20000531
- - Cleanup of auth.c, login.c and fake-*
- - Cleanup of auth-pam.c, save and print "account expired" error messages
- - Fix EGD read bug by IWAMURO Motonori <iwa@mmp.fujitsu.co.jp>
- - Rewrote bsd-login to use proper utmp API if available. Major cleanup
-   of fallback DIY code.
-
-20000530
- - Define atexit for old Solaris
- - Fix buffer overrun in login.c for systems which use syslen in utmpx.
-   patch from YOSHIFUJI Hideaki <yoshfuji@cerberus.nemoto.ecei.tohoku.ac.jp>
- - OpenBSD CVS updates:
-  - markus@cvs.openbsd.org
-    [session.c]
-    make x11-fwd work w/ localhost (xauth add host/unix:11)
-    [cipher.c compat.c readconf.c servconf.c]
-    check strtok() != NULL; ok niels@
-    [key.c]
-    fix key_read() for uuencoded keys w/o '='
-    [serverloop.c]
-    group ssh1 vs. ssh2 in serverloop
-    [kex.c kex.h myproposal.h sshconnect2.c sshd.c]
-    split kexinit/kexdh, factor out common code
-    [readconf.c ssh.1 ssh.c]
-    forwardagent defaults to no, add ssh -A
-  - theo@cvs.openbsd.org
-    [session.c]
-    just some line shortening
- - Released 2.1.0p3
-
-20000520
- - Xauth fix from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
- - Don't touch utmp if USE_UTMPX defined
- - SunOS 4.x support from Todd C. Miller <Todd.Miller@courtesan.com>
- - SIGCHLD fix for AIX and HPUX from Tom Bertelson <tbert@abac.com>
- - HPUX and Configure fixes from Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - Use mkinstalldirs script to make directories instead of non-portable
-   "install -d". Suggested by Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - Doc cleanup
-
-20000518
- - Include Andre Lucas' fixprogs script. Forgot to "cvs add" it yesterday
- - OpenBSD CVS updates:
-  - markus@cvs.openbsd.org
-    [sshconnect.c]
-    copy only ai_addrlen bytes; misiek@pld.org.pl
-    [auth.c]
-    accept an empty shell in authentication; bug reported by
-    chris@tinker.ucr.edu
-    [serverloop.c]
-    we don't have stderr for interactive terminal sessions (fcntl errors)
-
-20000517
- - Fix from Andre Lucas <andre.lucas@dial.pipex.com>
-  - Fixes command line printing segfaults (spotter: Bladt Norbert)
-  - Fixes erroneous printing of debug messages to syslog
-  - Fixes utmp for MacOS X (spotter: Aristedes Maniatis)
-  - Gives useful error message if PRNG initialisation fails
-  - Reduced ssh startup delay
-  - Measures cumulative command time rather than the time between reads
-    after select()
-  - 'fixprogs' perl script to eliminate non-working entropy commands, and
-    optionally run 'ent' to measure command entropy
- - Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
- - Avoid WCOREDUMP complation errors for systems that lack it
- - Avoid SIGCHLD warnings from entropy commands
- - Fix HAVE_PAM_GETENVLIST setting from Simon Wilkinson <sxw@dcs.ed.ac.uk>
- - OpenBSD CVS update:
-  - markus@cvs.openbsd.org
-    [ssh.c]
-    fix usage()
-    [ssh2.h]
-    draft-ietf-secsh-architecture-05.txt
-    [ssh.1]
-    document ssh -T -N (ssh2 only)
-    [channels.c serverloop.c ssh.h sshconnect.c sshd.c aux.c]
-    enable nonblocking IO for sshd w/ proto 1, too; split out common code
-    [aux.c]
-    missing include
- - Several patches from SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
-  - INSTALL typo and URL fix
-  - Makefile fix
-  - Solaris fixes
- - Checking for ssize_t and memmove. Based on patch from SAKAI Kiyotaka
-   <ksakai@kso.netwk.ntt-at.co.jp>
- - RSAless operation patch from kevin_oconnor@standardandpoors.com
- - Detect OpenSSL seperatly from RSA
- - Better test for RSA (more compatible with RSAref). Based on work by
-   Ed Eden <ede370@stl.rural.usda.gov>
-
-20000513
- - Fix for non-recognised DSA keys from Arkadiusz Miskiewicz
-   <misiek@pld.org.pl>
-
-20000511
- - Fix for prng_seed permissions checking from Lutz Jaenicke
-   <Lutz.Jaenicke@aet.TU-Cottbus.DE>
- - "make host-key" fix for Irix
-
-20000509
- - OpenBSD CVS update
-  - markus@cvs.openbsd.org
-    [cipher.h myproposal.h readconf.c readconf.h servconf.c ssh.1 ssh.c]
-    [ssh.h sshconnect1.c sshconnect2.c sshd.8]
-    - complain about invalid ciphers in SSH1 (e.g. arcfour is SSH2 only)
-  - hugh@cvs.openbsd.org
-    [ssh.1]
-    - zap typo
-    [ssh-keygen.1]
-    - One last nit fix. (markus approved)
-    [sshd.8]
-    - some markus certified spelling adjustments
-  - markus@cvs.openbsd.org
-    [auth2.c channels.c clientloop.c compat compat.h dsa.c kex.c]
-    [sshconnect2.c ]
-    - bug compat w/ ssh-2.0.13 x11, split out bugs
-    [nchan.c]
-    - no drain if ibuf_empty, fixes x11fwd problems; tests by fries@
-    [ssh-keygen.c]
-    - handle escapes in real and original key format, ok millert@
-    [version.h]
-    - OpenSSH-2.1
- - Moved all the bsd-* and fake-* stuff into new libopenbsd-compat.a
- - Doc updates
- - Cleanup of bsd-base64 headers, bugfix definitions of __b64_*. Reported
-   by Andre Lucas <andre.lucas@dial.pipex.com>
-
-20000508
- - Makefile and RPM spec fixes
- - Generate DSA host keys during "make key" or RPM installs
- - OpenBSD CVS update
-  - markus@cvs.openbsd.org
-    [clientloop.c sshconnect2.c]
-    - make x11-fwd interop w/ ssh-2.0.13
-    [README.openssh2]
-    - interop w/ SecureFX
- - Release 2.0.0beta2
-
- - Configure caching and cleanup patch from Andre Lucas'
-   <andre.lucas@dial.pipex.com>
-
-20000507
- - Remove references to SSLeay.
- - Big OpenBSD CVS update
-  - markus@cvs.openbsd.org
-    [clientloop.c]
-    - typo
-    [session.c]
-    - update proctitle on pty alloc/dealloc, e.g. w/ windows client
-    [session.c]
-    - update proctitle for proto 1, too
-    [channels.h nchan.c serverloop.c session.c sshd.c]
-    - use c-style comments
-  - deraadt@cvs.openbsd.org
-    [scp.c]
-    - more atomicio
-  - markus@cvs.openbsd.org
-    [channels.c]
-    - set O_NONBLOCK
-    [ssh.1]
-    - update AUTHOR
-    [readconf.c ssh-keygen.c ssh.h]
-    - default DSA key file ~/.ssh/id_dsa
-    [clientloop.c]
-    - typo, rm verbose debug
-  - deraadt@cvs.openbsd.org
-    [ssh-keygen.1]
-    - document DSA use of ssh-keygen
-    [sshd.8]
-    - a start at describing what i understand of the DSA side
-    [ssh-keygen.1]
-    - document -X and -x
-    [ssh-keygen.c]
-    - simplify usage
-  - markus@cvs.openbsd.org
-    [sshd.8]
-    - there is no rhosts_dsa
-    [ssh-keygen.1]
-    - document -y, update -X,-x
-    [nchan.c]
-    - fix close for non-open ssh1 channels
-    [servconf.c servconf.h ssh.h sshd.8 sshd.c ]
-    - s/DsaKey/HostDSAKey/, document option
-    [sshconnect2.c]
-    - respect number_of_password_prompts
-    [channels.c channels.h servconf.c servconf.h session.c sshd.8]
-    - GatewayPorts for sshd, ok deraadt@
-    [ssh-add.1 ssh-agent.1 ssh.1]
-    - more doc on: DSA, id_dsa, known_hosts2, authorized_keys2
-    [ssh.1]
-    - more info on proto 2
-    [sshd.8]
-    - sync AUTHOR w/ ssh.1
-    [key.c key.h sshconnect.c]
-    - print key type when talking about host keys
-    [packet.c]
-    - clear padding in ssh2
-    [dsa.c key.c radix.c ssh.h sshconnect1.c uuencode.c uuencode.h]
-    - replace broken uuencode w/ libc b64_ntop
-    [auth2.c]
-    - log failure before sending the reply
-    [key.c radix.c uuencode.c]
-    - remote trailing comments before calling __b64_pton
-    [auth2.c readconf.c readconf.h servconf.c servconf.h ssh.1]
-    [sshconnect2.c sshd.8]
-    - add DSAAuthetication option to ssh/sshd, document SSH2 in sshd.8
- - Bring in b64_ntop and b64_pton from OpenBSD libc (bsd-base64.[ch])
-
-20000502
- - OpenBSD CVS update
-   [channels.c]
-   - init all fds, close all fds.
-   [sshconnect2.c]
-   - check whether file exists before asking for passphrase
-   [servconf.c servconf.h sshd.8 sshd.c]
-   - PidFile, pr 1210
-   [channels.c]
-   - EINTR
-   [channels.c]
-   - unbreak, ok niels@
-   [sshd.c]
-   - unlink pid file, ok niels@
-   [auth2.c]
-   - Add missing #ifdefs; ok - markus
- - Add Andre Lucas' <andre.lucas@dial.pipex.com> patch to read entropy
-   gathering commands from a text file
- - Release 2.0.0beta1
-
-20000501
- - OpenBSD CVS update
-   [packet.c]
-   - send debug messages in SSH2 format
-   [scp.c]
-   - fix very rare EAGAIN/EINTR issues; based on work by djm
-   [packet.c]
-   - less debug, rm unused
-   [auth2.c]
-   - disable kerb,s/key in ssh2
-   [sshd.8]
-   - Minor tweaks and typo fixes.
-   [ssh-keygen.c]
-   - Put -d into usage and reorder. markus ok.
- - Include missing headers for OpenSSL tests. Fix from Phil Karn
-   <karn@ka9q.ampr.org>
- - Fixed __progname symbol collisions reported by Andre Lucas
-   <andre.lucas@dial.pipex.com>
- - Merged bsd-login ttyslot and AIX utmp patch from Gert Doering
-   <gd@hilb1.medat.de>
- - Add some missing ifdefs to auth2.c
- - Deprecate perl-tk askpass.
- - Irix portability fixes - don't include netinet headers more than once
- - Make sure we don't save PRNG seed more than once
-
-20000430
- - Merge HP-UX fixes and TCB support from Ged Lodder <lodder@yacc.com.au>
- - Integrate Andre Lucas' <andre.lucas@dial.pipex.com> entropy collection
-   patch.
-   - Adds timeout to entropy collection
-   - Disables slow entropy sources
-   - Load and save seed file
- - Changed entropy seed code to user per-user seeds only (server seed is
-   saved in root's .ssh directory)
- - Use atexit() and fatal cleanups to save seed on exit
- - More OpenBSD updates:
-   [session.c]
-   - don't call chan_write_failed() if we are not writing
-   [auth-rsa.c auth1.c authfd.c hostfile.c ssh-agent.c]
-   - keysize warnings error() -> log()
-
-20000429
- - Merge big update to OpenSSH-2.0 from OpenBSD CVS
-   [README.openssh2]
-   - interop w/ F-secure windows client
-   - sync documentation
-   - ssh_host_dsa_key not ssh_dsa_key
-   [auth-rsa.c]
-   - missing fclose
-   [auth.c authfile.c compat.c dsa.c dsa.h hostfile.c key.c key.h radix.c]
-   [readconf.c readconf.h ssh-add.c ssh-keygen.c ssh.c ssh.h sshconnect.c]
-   [sshd.c uuencode.c uuencode.h authfile.h]
-   - add DSA pubkey auth and other SSH2 fixes.  use ssh-keygen -[xX]
-     for trading keys with the real and the original SSH, directly from the
-     people who invented the SSH protocol.
-   [auth.c auth.h authfile.c sshconnect.c auth1.c auth2.c sshconnect.h]
-   [sshconnect1.c sshconnect2.c]
-   - split auth/sshconnect in one file per protocol version
-   [sshconnect2.c]
-   - remove debug
-   [uuencode.c]
-   - add trailing =
-   [version.h]
-   - OpenSSH-2.0
-   [ssh-keygen.1 ssh-keygen.c]
-   - add -R flag: exit code indicates if RSA is alive
-   [sshd.c]
-   - remove unused
-     silent if -Q is specified
-   [ssh.h]
-   - host key becomes /etc/ssh_host_dsa_key
-   [readconf.c servconf.c ]
-   - ssh/sshd default to proto 1 and 2
-   [uuencode.c]
-   - remove debug
-   [auth2.c ssh-keygen.c sshconnect2.c sshd.c]
-   - xfree DSA blobs
-   [auth2.c serverloop.c session.c]
-   - cleanup logging for sshd/2, respect PasswordAuth no
-   [sshconnect2.c]
-   - less debug, respect .ssh/config
-   [README.openssh2 channels.c channels.h]
-   - clientloop.c session.c ssh.c
-   - support for x11-fwding, client+server
-
-20000421
- - Merge fix from OpenBSD CVS
-  [ssh-agent.c]
-  - Fix memory leak per connection. Report from Andy Spiegl <Andy@Spiegl.de>
-    via Debian bug #59926
- - Define __progname in session.c if libc doesn't
- - Remove indentation on autoconf #include statements to avoid bug in
-   DEC Tru64 compiler. Report and fix from David Del Piero
-   <David.DelPiero@qed.qld.gov.au>
-
-20000420
- - Make fixpaths work with perl4, patch from Andre Lucas
-   <andre.lucas@dial.pipex.com>
- - Sync with OpenBSD CVS:
-  [clientloop.c login.c serverloop.c ssh-agent.c ssh.h sshconnect.c sshd.c]
-  - pid_t
-  [session.c]
-  - remove bogus chan_read_failed. this could cause data
-    corruption (missing data) at end of a SSH2 session.
- - Merge fixes from Debian patch from Phil Hands <phil@hands.com>
-  - Allow setting of PAM service name through CFLAGS (SSHD_PAM_SERVICE)
-  - Use vhangup to clean up Linux ttys
-  - Force posix getopt processing on GNU libc systems
- - Debian bug #55910 - remove references to ssl(8) manpages
- - Debian bug #58031 - ssh_config lies about default cipher
-
-20000419
- - OpenBSD CVS updates
-   [channels.c]
-   - fix pr 1196, listen_port and port_to_connect interchanged
-   [scp.c]
-   - after completion, replace the progress bar ETA counter with a final
-     elapsed time; my idea, aaron wrote the patch
-   [ssh_config sshd_config]
-   - show 'Protocol' as an example, ok markus@
-   [sshd.c]
-   - missing xfree()
- - Add missing header to bsd-misc.c
-
-20000416
- - Reduce diff against OpenBSD source
-   - All OpenSSL includes are now unconditionally referenced as
-     openssl/foo.h
-   - Pick up formatting changes
-   - Other minor changed (typecasts, etc) that I missed
-
-20000415
- - OpenBSD CVS updates.
-   [ssh.1 ssh.c]
-   - ssh -2
-   [auth.c channels.c clientloop.c packet.c packet.h serverloop.c]
-   [session.c sshconnect.c]
-   - check payload for (illegal) extra data
-   [ALL]
-   whitespace cleanup
-
-20000413
- - INSTALL doc updates
- - Merged OpenBSD updates to include paths.
-
-20000412
- - OpenBSD CVS updates:
-   - [channels.c]
-     repair x11-fwd
-   - [sshconnect.c]
-     fix passwd prompt for ssh2, less debugging output.
-   - [clientloop.c compat.c dsa.c kex.c sshd.c]
-     less debugging output
-   - [kex.c kex.h sshconnect.c sshd.c]
-     check for reasonable public DH values
-   - [README.openssh2 cipher.c cipher.h compat.c compat.h readconf.c]
-     [readconf.h servconf.c servconf.h ssh.c ssh.h sshconnect.c sshd.c]
-     add Cipher and Protocol options to ssh/sshd, e.g.:
-     ssh -o 'Protocol 1,2' if you prefer proto 1, ssh -o 'Ciphers
-     arcfour,3des-cbc'
-   - [sshd.c]
-     print 1.99 only if server supports both
-
-20000408
- - Avoid some compiler warnings in fake-get*.c
- - Add IPTOS macros for systems which lack them
- - Only set define entropy collection macros if they are found
- - More large OpenBSD CVS updates:
-   - [auth.c auth.h servconf.c servconf.h serverloop.c session.c]
-     [session.h ssh.h sshd.c README.openssh2]
-     ssh2 server side, see README.openssh2; enable with 'sshd -2'
-   - [channels.c]
-     no adjust after close
-   - [sshd.c compat.c ]
-     interop w/ latest ssh.com windows client.
-
-20000406
- - OpenBSD CVS update:
-   - [channels.c]
-     close efd on eof
-   - [clientloop.c compat.c ssh.c sshconnect.c myproposal.h]
-     ssh2 client implementation, interops w/ ssh.com and lsh servers.
-   - [sshconnect.c]
-     missing free.
-   - [authfile.c cipher.c cipher.h packet.c sshconnect.c sshd.c]
-     remove unused argument, split cipher_mask()
-   - [clientloop.c]
-     re-order: group ssh1 vs. ssh2
- - Make Redhat spec require openssl >= 0.9.5a
-
-20000404
- - Add tests for RAND_add function when searching for OpenSSL
- - OpenBSD CVS update:
-   - [packet.h packet.c]
-     ssh2 packet format
-   - [packet.h packet.c nchan2.ms nchan.h compat.h compat.c]
-     [channels.h channels.c]
-     channel layer support for ssh2
-   - [kex.h kex.c hmac.h hmac.c dsa.c dsa.h]
-     DSA, keyexchange, algorithm agreement for ssh2
- - Generate manpages before make install not at the end of make all
- - Don't seed the rng quite so often
- - Always reseed rng when requested
-
-20000403
- - Wrote entropy collection routines for systems that lack /dev/random
-   and EGD
- - Disable tests and typedefs for 64 bit types. They are currently unused.
-
-20000401
- - Big OpenBSD CVS update (mainly beginnings of SSH2 infrastructure)
-   - [auth.c session.c sshd.c auth.h]
-     split sshd.c -> auth.c session.c sshd.c plus cleanup and goto-removal
-   - [bufaux.c bufaux.h]
-     support ssh2 bignums
-   - [channels.c channels.h clientloop.c sshd.c nchan.c nchan.h packet.c]
-     [readconf.c ssh.c ssh.h serverloop.c]
-     replace big switch() with function tables (prepare for ssh2)
-   - [ssh2.h]
-     ssh2 message type codes
-   - [sshd.8]
-     reorder Xr to avoid cutting
-   - [serverloop.c]
-     close(fdin) if fdin != fdout, shutdown otherwise, ok theo@
-   - [channels.c]
-     missing close
-     allow bigger packets
-   - [cipher.c cipher.h]
-     support ssh2 ciphers
-   - [compress.c]
-     cleanup, less code
-   - [dispatch.c dispatch.h]
-     function tables for different message types
-   - [log-server.c]
-     do not log() if debuggin to stderr
-     rename a cpp symbol, to avoid param.h collision
-   - [mpaux.c]
-     KNF
-   - [nchan.c]
-     sync w/ channels.c
-
-20000326
- - Better tests for OpenSSL w/ RSAref
- - Added replacement setenv() function from OpenBSD libc. Suggested by
-   Ben Lindstrom <mouring@pconline.com>
- - OpenBSD CVS update
-   - [auth-krb4.c]
-     -Wall
-   - [auth-rh-rsa.c auth-rsa.c hostfile.c hostfile.h key.c key.h match.c]
-     [match.h ssh.c ssh.h sshconnect.c sshd.c]
-     initial support for DSA keys. ok deraadt@, niels@
-   - [cipher.c cipher.h]
-     remove unused cipher_attack_detected code
-   - [scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8]
-     Fix some formatting problems I missed before.
-   - [ssh.1 sshd.8]
-     fix spelling errors, From: FreeBSD
-   - [ssh.c]
-     switch to raw mode only if he _get_ a pty (not if we _want_ a pty).
-
-20000324
- - Released 1.2.3
-
-20000317
- - Clarified --with-default-path option.
- - Added -blibpath handling for AIX to work around stupid runtime linking.
-   Problem elucidated by gshapiro@SENDMAIL.ORG by way of Jim Knoble
-   <jmknoble@jmknoble.cx>
- - Checks for 64 bit int types. Problem report from Mats Fredholm
-   <matsf@init.se>
- - OpenBSD CVS updates:
-   - [atomicio.c auth-krb4.c bufaux.c channels.c compress.c fingerprint.c]
-     [packet.h radix.c rsa.c scp.c ssh-agent.c ssh-keygen.c sshconnect.c]
-     [sshd.c]
-     pedantic: signed vs. unsigned, void*-arithm, etc
-   - [ssh.1 sshd.8]
-     Various cleanups and standardizations.
- - Runtime error fix for HPUX from Otmar Stahl
-   <O.Stahl@lsw.uni-heidelberg.de>
-
-20000316
- - Fixed configure not passing LDFLAGS to Solaris. Report from David G.
-   Hesprich <dghespri@sprintparanet.com>
- - Propogate LD through to Makefile
- - Doc cleanups
- - Added blurb about "scp: command not found" errors to UPGRADING
-
-20000315
- - Fix broken CFLAGS handling during search for OpenSSL. Fixes va_list
-   problems with gcc/Solaris.
- - Don't free argument to putenv() after use (in setenv() replacement).
-   Report from Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
- - Created contrib/ subdirectory. Included helpers from Phil Hands'
-   Debian package, README file and chroot patch from Ricardo Cerqueira
-   <rmcc@clix.pt>
- - Moved gnome-ssh-askpass.c to contrib directory and removed config
-   option.
- - Slight cleanup to doc files
- - Configure fix from Bratislav ILICH <bilic@zepter.ru>
-
-20000314
- - Include macro for IN6_IS_ADDR_V4MAPPED. Report from
-   peter@frontierflying.com
- - Include /usr/local/include and /usr/local/lib for systems that don't
-   do it themselves
- - -R/usr/local/lib for Solaris
- - Fix RSAref detection
- - Fix IN6_IS_ADDR_V4MAPPED macro
-
-20000311
- - Detect RSAref
- - OpenBSD CVS change
-   [sshd.c]
-    - disallow guessing of root password
- - More configure fixes
- - IPv6 workarounds from Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>
-
-20000309
- - OpenBSD CVS updates to v1.2.3
-   [ssh.h atomicio.c]
-    - int atomicio -> ssize_t (for alpha). ok deraadt@
-   [auth-rsa.c]
-    - delay MD5 computation until client sends response, free() early, cleanup.
-   [cipher.c]
-    - void* -> unsigned char*, ok niels@
-   [hostfile.c]
-    - remove unused variable 'len'. fix comments.
-    - remove unused variable
-   [log-client.c log-server.c]
-    - rename a cpp symbol, to avoid param.h collision
-   [packet.c]
-    - missing xfree()
-    - getsockname() requires initialized tolen; andy@guildsoftware.com
-    - use getpeername() in packet_connection_is_on_socket(), fixes sshd -i;
-   from Holger.Trapp@Informatik.TU-Chemnitz.DE
-   [pty.c pty.h]
-    - register cleanup for pty earlier. move code for pty-owner handling to
-      pty.c ok provos@, dugsong@
-   [readconf.c]
-    - turn off x11-fwd for the client, too.
-   [rsa.c]
-    - PKCS#1 padding
-   [scp.c]
-    - allow '.' in usernames; from jedgar@fxp.org
-   [servconf.c]
-    - typo: ignore_user_known_hosts int->flag; naddy@mips.rhein-neckar.de
-    - sync with sshd_config
-   [ssh-keygen.c]
-    - enable ssh-keygen -l -f ~/.ssh/known_hosts, ok deraadt@
-   [ssh.1]
-    - Change invalid 'CHAT' loglevel to 'VERBOSE'
-   [ssh.c]
-    - suppress AAAA query host when '-4' is used; from shin@nd.net.fujitsu.co.jp
-    - turn off x11-fwd for the client, too.
-   [sshconnect.c]
-    - missing xfree()
-    - retry rresvport_af(), too. from sumikawa@ebina.hitachi.co.jp.
-    - read error vs. "Connection closed by remote host"
-   [sshd.8]
-    - ie. -> i.e.,
-    - do not link to a commercial page..
-    - sync with sshd_config
-   [sshd.c]
-    - no need for poll.h; from bright@wintelcom.net
-    - log with level log() not fatal() if peer behaves badly.
-    - don't panic if client behaves strange. ok deraadt@
-    - make no-port-forwarding for RSA keys deny both -L and -R style fwding
-    - delay close() of pty until the pty has been chowned back to root
-    - oops, fix comment, too.
-    - missing xfree()
-    - move XAUTHORITY to subdir. ok dugsong@. fixes debian bug #57907, too.
-      (http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=57907)
-    - register cleanup for pty earlier. move code for pty-owner handling to
-      pty.c ok provos@, dugsong@
-    - create x11 cookie file
-    - fix pr 1113, fclose() -> pclose(), todo: remote popen()
-    - version 1.2.3
- - Cleaned up
- - Removed warning workaround for Linux and devpts filesystems (no longer
-   required after OpenBSD updates)
-
-20000308
- - Configure fix from Hiroshi Takekawa <takekawa@sr3.t.u-tokyo.ac.jp>
-
-20000307
- - Released 1.2.2p1
-
-20000305
- - Fix DEC compile fix
- - Explicitly seed OpenSSL's PRNG before checking rsa_alive()
- - Check for getpagesize in libucb.a if not found in libc. Fix for old
-   Solaris from Andre Lucas <andre.lucas@dial.pipex.com>
- - Check for libwrap if --with-tcp-wrappers option specified. Suggestion
-   Mate Wierdl <mw@moni.msci.memphis.edu>
-
-20000303
- - Added "make host-key" target, Suggestion from Dominik Brettnacher
- <domi@saargate.de>
- - Don't permanently fail on bind() if getaddrinfo has more choices left for
-   us. Needed to work around messy IPv6 on Linux. Patch from Arkadiusz
-   Miskiewicz <misiek@pld.org.pl>
- - DEC Unix compile fix from David Del Piero <David.DelPiero@qed.qld.gov.au>
- - Manpage fix from David Del Piero <David.DelPiero@qed.qld.gov.au>
-
-20000302
- - Big cleanup of autoconf code
-   - Rearranged to be a little more logical
-   - Added -R option for Solaris
-   - Rewrote OpenSSL detection code. Now uses AC_TRY_RUN with a test program
-     to detect library and header location _and_ ensure library has proper
-     RSA support built in (this is a problem with OpenSSL 0.9.5).
- - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de
- - Avoid warning message with Unix98 ptys
- - Warning was valid - possible race condition on PTYs. Avoided using
-   platform-specific code.
- - Document some common problems
- - Allow root access to any key. Patch from
-   markus.friedl@informatik.uni-erlangen.de
-
-20000207
- - Removed SOCKS code. Will support through a ProxyCommand.
-
-20000203
- - Fixed SEGVs in authloop, fix from vbzoli@hbrt.hu
- - Add --with-ssl-dir option
-
-20000202
- - Fix lastlog code for directory based lastlogs. Fix from Josh Durham
-   <jmd@aoe.vt.edu>
- - Documentation fixes from HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
- - Added URLs to Japanese translations of documents by HARUYAMA Seigo
-   <haruyama@nt.phys.s.u-tokyo.ac.jp>
-
-20000201
- - Use socket pairs by default (instead of pipes). Prevents race condition
-   on several (buggy) OSs. Report and fix from tridge@linuxcare.com
-
-20000127
- - Seed OpenSSL's random number generator before generating RSA keypairs
- - Split random collector into seperate file
- - Compile fix from Andre Lucas <andre.lucas@dial.pipex.com>
-
-20000126
- - Released 1.2.2 stable
-
- - NeXT keeps it lastlog in /usr/adm. Report from
-   mouring@newton.pconline.com
- - Added note in UPGRADING re interop with commercial SSH using idea.
-   Report from Jim Knoble <jmknoble@jmknoble.cx>
- - Fix linking order for Kerberos/AFS. Fix from Holget Trapp
-   <Holger.Trapp@Informatik.TU-Chemnitz.DE>
-
-20000125
- - Fix NULL pointer dereference in login.c. Fix from Andre Lucas
-   <andre.lucas@dial.pipex.com>
- - Reorder PAM initialisation so it does not mess up lastlog. Reported
-   by Andre Lucas <andre.lucas@dial.pipex.com>
- - Use preformatted manpages on SCO, report from Gary E. Miller
-   <gem@rellim.com>
- - New URL for x11-ssh-askpass.
- - Fixpaths was missing /etc/ssh_known_hosts. Report from Jim Knoble
-   <jmknoble@jmknoble.cx>
- - Added 'DESTDIR' option to Makefile to ease package building. Patch from
-   Jim Knoble <jmknoble@jmknoble.cx>
- - Updated RPM spec files to use DESTDIR
-
-20000124
- - Pick up version 1.2.2 from OpenBSD CVS (no changes, just version number
-   increment)
-
-20000123
- - OpenBSD CVS:
-   - [packet.c]
-     getsockname() requires initialized tolen; andy@guildsoftware.com
- - AIX patch from Matt Richards <v2matt@btv.ibm.com> and David Rankin
-   <drankin@bohemians.lexington.ky.us>
- - Fix lastlog support, patch from Andre Lucas <andre.lucas@dial.pipex.com>
-
-20000122
- - Fix compilation of bsd-snprintf.c on Solaris, fix from Ben Taylor
-   <bent@clark.net>
- - Merge preformatted manpage patch from Andre Lucas
-   <andre.lucas@dial.pipex.com>
- - Make IPv4 use the default in RPM packages
- - Irix uses preformatted manpages
- - Missing htons() in bsd-bindresvport.c, fix from Holger Trapp
-   <Holger.Trapp@Informatik.TU-Chemnitz.DE>
- - OpenBSD CVS updates:
-   - [packet.c]
-     use getpeername() in packet_connection_is_on_socket(), fixes sshd -i;
-     from Holger.Trapp@Informatik.TU-Chemnitz.DE
-   - [sshd.c]
-     log with level log() not fatal() if peer behaves badly.
-   - [readpass.c]
-     instead of blocking SIGINT, catch it ourselves, so that we can clean
-     the tty modes up and kill ourselves -- instead of our process group
-     leader (scp, cvs, ...) going away and leaving us in noecho mode.
-     people with cbreak shells never even noticed..
-   - [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8]
-     ie. -> i.e.,
-
-20000120
- - Don't use getaddrinfo on AIX
- - Update to latest OpenBSD CVS:
-   - [auth-rsa.c]
-     - fix user/1056, sshd keeps restrictions; dbt@meat.net
-   - [sshconnect.c]
-     - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags.
-     - destroy keys earlier
-     - split key exchange (kex) and user authentication (user-auth),
-       ok: provos@
-   - [sshd.c]
-     - no need for poll.h; from bright@wintelcom.net
-     - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags.
-     - split key exchange (kex) and user authentication (user-auth),
-       ok: provos@
- - Big manpage and config file cleanup from Andre Lucas
-   <andre.lucas@dial.pipex.com>
-   - Re-added latest (unmodified) OpenBSD manpages
- - Doc updates
- - NetBSD patch from David Rankin <drankin@bohemians.lexington.ky.us> and
-   Christos Zoulas <christos@netbsd.org>
-
-20000119
- - SCO compile fixes from Gary E. Miller <gem@rellim.com>
- - Compile fix from Darren_Hall@progressive.com
- - Linux/glibc-2.1.2 takes a *long* time to look up names for AF_UNSPEC
-   addresses using getaddrinfo(). Added a configure switch to make the
-   default lookup mode AF_INET
-
-20000118
- - Fixed --with-pid-dir option
- - Makefile fix from Gary E. Miller <gem@rellim.com>
- - Compile fix for HPUX and Solaris from Andre Lucas
-   <andre.lucas@dial.pipex.com>
-
-20000117
- - Clean up bsd-bindresvport.c. Use arc4random() for picking initial
-   port, ignore EINVAL errors (Linux) when searching for free port.
- - Revert __snprintf -> snprintf aliasing. Apparently Solaris
-   __snprintf isn't. Report from Theo de Raadt <theo@cvs.openbsd.org>
- - Document location of Redhat PAM file in INSTALL.
- - Fixed X11 forwarding bug on Linux. libc advertises AF_INET6
-   INADDR_ANY_INIT addresses via getaddrinfo, but may not be able to
-   deliver (no IPv6 kernel support)
- - Released 1.2.1pre27
-
- - Fix rresvport_af failure errors (logic error in bsd-bindresvport.c)
- - Fix --with-ipaddr-display option test. Fix from Jarno Huuskonen
-   <jhuuskon@hytti.uku.fi>
- - Fix hang on logout if processes are still using the pty. Needs
-   further testing.
- - Patch from Christos Zoulas <christos@zoulas.com>
-   - Try $prefix first when looking for OpenSSL.
-   - Include sys/types.h when including sys/socket.h in test programs
- - Substitute PID directory in sshd.8. Suggestion from Andrew
-   Stribblehill <a.d.stribblehill@durham.ac.uk>
-
-20000116
- - Renamed --with-xauth-path to --with-xauth
- - Added --with-pid-dir option
- - Released 1.2.1pre26
-
- - Compilation fix from Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
- - Fixed broken bugfix for /dev/ptmx on Linux systems which lack
-   openpty(). Report from Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
-
-20000115
- - Add --with-xauth-path configure directive and explicit test for
-   /usr/openwin/bin/xauth for Solaris systems. Report from Anders
-   Nordby <anders@fix.no>
- - Fix incorrect detection of /dev/ptmx on Linux systems that lack
-   openpty. Report from John Seifarth <john@waw.be>
- - Look for intXX_t and u_intXX_t in sys/bitypes.h if they are not in
-   sys/types.h. Fixes problems on SCO, report from Gary E. Miller
-   <gem@rellim.com>
- - Use __snprintf and __vnsprintf if they are found where snprintf and
-   vnsprintf are lacking. Suggested by Ben Taylor <bent@shell.clark.net>
-   and others.
-
-20000114
- - Merged OpenBSD IPv6 patch:
-   - [sshd.c sshd.8 sshconnect.c ssh.h ssh.c servconf.h servconf.c scp.1]
-     [scp.c packet.h packet.c login.c log.c canohost.c channels.c]
-     [hostfile.c sshd_config]
-     ipv6 support: mostly gethostbyname->getaddrinfo/getnameinfo, new
-     features: sshd allows multiple ListenAddress and Port options. note
-     that libwrap is not IPv6-ready. (based on patches from
-     fujiwara@rcac.tdi.co.jp)
-   - [ssh.c canohost.c]
-     more hints (hints.ai_socktype=SOCK_STREAM) for getaddrinfo,
-     from itojun@
-   - [channels.c]
-     listen on _all_ interfaces for X11-Fwd (hints.ai_flags = AI_PASSIVE)
-   - [packet.h]
-     allow auth-kerberos for IPv4 only
-   - [scp.1 sshd.8 servconf.h scp.c]
-     document -4, -6, and 'ssh -L 2022/::1/22'
-   - [ssh.c]
-     'ssh @host' is illegal (null user name), from
-     karsten@gedankenpolizei.de
-   - [sshconnect.c]
-     better error message
-   - [sshd.c]
-     allow auth-kerberos for IPv4 only
- - Big IPv6 merge:
-   - Cleanup overrun in sockaddr copying on RHL 6.1
-   - Replacements for getaddrinfo, getnameinfo, etc based on versions
-     from patch from KIKUCHI Takahiro <kick@kyoto.wide.ad.jp>
-   - Replacement for missing structures on systems that lack IPv6
-   - record_login needed to know about AF_INET6 addresses
-   - Borrowed more code from OpenBSD: rresvport_af and requisites
-
-20000110
- - Fixes to auth-skey to enable it to use the standard OpenSSL libraries
-
-20000107
- - New config.sub and config.guess to fix problems on SCO. Supplied
-   by Gary E. Miller <gem@rellim.com>
- - SCO build fix from Gary E. Miller <gem@rellim.com>
- - Released 1.2.1pre25
-
-20000106
- - Documentation update & cleanup
- - Better KrbIV / AFS detection, based on patch from:
-   Holger Trapp <Holger.Trapp@Informatik.TU-Chemnitz.DE>
-
-20000105
- - Fixed annoying DES corruption problem. libcrypt has been
-   overriding symbols in libcrypto. Removed libcrypt and crypt.h
-   altogether (libcrypto includes its own crypt(1) replacement)
- - Added platform-specific rules for Irix 6.x. Included warning that
-   they are untested.
-
-20000103
- - Add explicit make rules for files proccessed by fixpaths.
- - Fix "make install" in RPM spec files. Report from Tenkou N. Hattori
-   <tnh@kondara.org>
- - Removed "nullok" directive from default PAM configuration files.
-   Added information on enabling EmptyPasswords on openssh+PAM in
-   UPGRADING file.
- - OpenBSD CVS updates
-   - [ssh-agent.c]
-     cleanup_exit() for SIGTERM/SIGHUP, too. from fgsch@ and
-     dgaudet@arctic.org
-   - [sshconnect.c]
-     compare correct version for 1.3 compat mode
-
-20000102
- - Prevent multiple inclusion of config.h and defines.h. Suggested
-   by Andre Lucas <andre.lucas@dial.pipex.com>
- - Properly clean up on exit of ssh-agent. Patch from Dean Gaudet
-   <dgaudet@arctic.org>
-
-19991231
- - Fix password support on systems with a mixture of shadowed and
-   non-shadowed passwords (e.g. NIS). Report and fix from
-   HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
- - Fix broken autoconf typedef detection. Report from Marc G.
-   Fournier <marc.fournier@acadiau.ca>
- - Fix occasional crash on LinuxPPC. Patch from Franz Sirl
-   <Franz.Sirl-kernel@lauterbach.com>
- - Prevent typedefs from being compiled more than once. Report from
-   Marc G. Fournier <marc.fournier@acadiau.ca>
- - Fill in ut_utaddr utmp field. Report from Benjamin Charron
-   <iretd@bigfoot.com>
- - Really fix broken default path. Fix from Jim Knoble
-   <jmknoble@jmknoble.cx>
- - Remove test for quad_t. No longer needed.
- - Released 1.2.1pre24
-
- - Added support for directory-based lastlogs
- - Really fix typedefs, patch from Ben Taylor <bent@clark.net>
-
-19991230
- - OpenBSD CVS updates:
-   - [auth-passwd.c]
-     check for NULL 1st
- - Removed most of the pam code into its own file auth-pam.[ch]. This
-   cleaned up sshd.c up significantly.
- - PAM authentication was incorrectly interpreting
-   "PermitRootLogin without-password". Report from Matthias Andree
-   <ma@dt.e-technik.uni-dortmund.de
- - Several other cleanups
- - Merged Dante SOCKS support patch from David Rankin
-  <drankin@bohemians.lexington.ky.us>
- - Updated documentation with ./configure options
- - Released 1.2.1pre23
-
-19991229
- - Applied another NetBSD portability patch from David Rankin
-   <drankin@bohemians.lexington.ky.us>
- - Fix --with-default-path option.
- - Autodetect perl, patch from David Rankin
-   <drankin@bohemians.lexington.ky.us>
- - Print whether OpenSSH was compiled with RSARef, patch from
-   Nalin Dahyabhai <nalin@thermo.stat.ncsu.edu>
- - Calls to pam_setcred, patch from Nalin Dahyabhai
-   <nalin@thermo.stat.ncsu.edu>
- - Detect missing size_t and typedef it.
- - Rename helper.[ch] to (more appropriate) bsd-misc.[ch]
- - Minor Makefile cleaning
-
-19991228
- - Replacement for getpagesize() for systems which lack it
- - NetBSD login.c compile fix from David Rankin
-  <drankin@bohemians.lexington.ky.us>
- - Fully set ut_tv if present in utmp or utmpx
- - Portability fixes for Irix 5.3 (now compiles OK!)
- - autoconf and other misc cleanups
- - Merged AIX patch from Darren Hall <dhall@virage.org>
- - Cleaned up defines.h
- - Released 1.2.1pre22
-
-19991227
- - Automatically correct paths in manpages and configuration files. Patch
-   and script from Andre Lucas <andre.lucas@dial.pipex.com>
- - Removed credits from README to CREDITS file, updated.
- - Added --with-default-path to specify custom path for server
- - Removed #ifdef trickery from acconfig.h into defines.h
- - PAM bugfix. PermitEmptyPassword was being ignored.
- - Fixed PAM config files to allow empty passwords if server does.
- - Explained spurious PAM auth warning workaround in UPGRADING
- - Use last few chars of tty line as ut_id
- - New SuSE RPM spec file from Chris Saia <csaia@wtower.com>
- - OpenBSD CVS updates:
-   - [packet.h auth-rhosts.c]
-     check format string for packet_disconnect and packet_send_debug, too
-   - [channels.c]
-     use packet_get_maxsize for channels. consistence.
-
-19991226
- - Enabled utmpx support by default for Solaris
- - Cleanup sshd.c PAM a little more
- - Revised RPM package to include Jim Knoble's <jmknoble@jmknoble.cx>
-   X11 ssh-askpass program.
- - Disable logging of PAM success and failures, PAM is verbose enough.
-   Unfortunatly there is currently no way to disable auth failure
-   messages. Mention this in UPGRADING file and sent message to PAM
-   developers
- - OpenBSD CVS update:
-   - [ssh-keygen.1 ssh.1]
-     remove ref to .ssh/random_seed, mention .ssh/environment in
-     .Sh FILES, too
- - Released 1.2.1pre21
- - Fixed implicit '.' in default path, report from Jim Knoble
-   <jmknoble@jmknoble.cx>
- - Redhat RPM spec fixes from Jim Knoble <jmknoble@jmknoble.cx>
-
-19991225
- - More fixes from Andre Lucas <andre.lucas@dial.pipex.com>
- - Cleanup of auth-passwd.c for shadow and MD5 passwords
- - Cleanup and bugfix of PAM authentication code
- - Released 1.2.1pre20
-
- - Merged fixes from Ben Taylor <bent@clark.net>
- - Fixed configure support for PAM. Reported by Naz <96na@eng.cam.ac.uk>
- - Disabled logging of PAM password authentication failures when password
-   is empty. (e.g start of authentication loop). Reported by Naz
-   <96na@eng.cam.ac.uk>)
-
-19991223
- - Merged later HPUX patch from Andre Lucas
-   <andre.lucas@dial.pipex.com>
- - Above patch included better utmpx support from Ben Taylor
-   <bent@clark.net>
-
-19991222
- - Fix undefined fd_set type in ssh.h from Povl H. Pedersen
-   <pope@netguide.dk>
- - Fix login.c breakage on systems which lack ut_host in struct
-   utmp. Reported by Willard Dawson <willard.dawson@sbs.siemens.com>
-
-19991221
- - Integration of large HPUX patch from Andre Lucas
-   <andre.lucas@dial.pipex.com>. Integrating it had a few other
-   benefits:
-   - Ability to disable shadow passwords at configure time
-   - Ability to disable lastlog support at configure time
-   - Support for IP address in $DISPLAY
- - OpenBSD CVS update:
-   - [sshconnect.c]
-   say "REMOTE HOST IDENTIFICATION HAS CHANGED"
- - Fix DISABLE_SHADOW support
- - Allow MD5 passwords even if shadow passwords are disabled
- - Release 1.2.1pre19
-
-19991218
- - Redhat init script patch from Chun-Chung Chen
-   <cjj@u.washington.edu>
- - Avoid breakage on systems without IPv6 headers
-
-19991216
- - Makefile changes for Solaris from Peter Kocks
-   <peter.kocks@baygate.com>
- - Minor updates to docs
- - Merged OpenBSD CVS changes:
-   - [authfd.c ssh-agent.c]
-     keysize warnings talk about identity files
-   - [packet.c]
-     "Connection closed by x.x.x.x": fatal() -> log()
- - Correctly handle empty passwords in shadow file. Patch from:
-   "Chris, the Young One" <cky@pobox.com>
- - Released 1.2.1pre18
-
-19991215
- - Integrated patchs from Juergen Keil <jk@tools.de>
-   - Avoid void* pointer arithmatic
-   - Use LDFLAGS correctly
-   - Fix SIGIO error in scp
-   - Simplify status line printing in scp
- - Added better test for inline functions compiler support from
-   Darren_Hall@progressive.com
-
-19991214
- - OpenBSD CVS Changes
-   - [canohost.c]
-     fix get_remote_port() and friends for sshd -i;
-     Holger.Trapp@Informatik.TU-Chemnitz.DE
-   - [mpaux.c]
-     make code simpler. no need for memcpy. niels@ ok
-   - [pty.c]
-     namebuflen not sizeof namebuflen; bnd@ep-ag.com via djm@mindrot.org
-     fix proto; markus
-   - [ssh.1]
-      typo; mark.baushke@solipsa.com
-   - [channels.c ssh.c ssh.h sshd.c]
-     type conflict for 'extern Type *options' in channels.c; dot@dotat.at
-   - [sshconnect.c]
-     move checking of hostkey into own function.
-   - [version.h]
-     OpenSSH-1.2.1
- - Clean up broken includes in pty.c
- - Some older systems don't have poll.h, they use sys/poll.h instead
- - Doc updates
-
-19991211
- - Fix compilation on systems with AFS. Reported by
-   aloomis@glue.umd.edu
- - Fix installation on Solaris. Reported by
-   Gordon Rowell <gordonr@gormand.com.au>
- - Fix gccisms (__attribute__ and inline). Report by edgy@us.ibm.com,
-   patch from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
- - Auto-locate xauth. Patch from David Agraz <dagraz@jahoopa.com>
- - Compile fix from David Agraz <dagraz@jahoopa.com>
- - Avoid compiler warning in bsd-snprintf.c
- - Added pam_limits.so to default PAM config. Suggested by
-   Jim Knoble <jmknoble@jmknoble.cx>
-
-19991209
- - Import of patch from Ben Taylor <bent@clark.net>:
-   - Improved PAM support
-   - "uninstall" rule for Makefile
-   - utmpx support
-   - Should fix PAM problems on Solaris
- - OpenBSD CVS updates:
-   - [readpass.c]
-     avoid stdio; based on work by markus, millert, and I
-   - [sshd.c]
-     make sure the client selects a supported cipher
-   - [sshd.c]
-     fix sighup handling.  accept would just restart and daemon handled
-     sighup only after the next connection was accepted. use poll on
-     listen sock now.
-   - [sshd.c]
-     make that a fatal
- - Applied patch from David Rankin <drankin@bohemians.lexington.ky.us>
-   to fix libwrap support on NetBSD
- - Released 1.2pre17
-
-19991208
- - Compile fix for Solaris with /dev/ptmx from
-   David Agraz <dagraz@jahoopa.com>
-
-19991207
- - sshd Redhat init script patch from Jim Knoble <jmknoble@jmknoble.cx>
-   fixes compatability with 4.x and 5.x
- - Fixed default SSH_ASKPASS
- - Fix PAM account and session being called multiple times. Problem
-   reported by Adrian Baugh <adrian@merlin.keble.ox.ac.uk>
- - Merged more OpenBSD changes:
-   - [atomicio.c authfd.c scp.c serverloop.c ssh.h sshconnect.c sshd.c]
-     move atomicio into it's own file.  wrap all socket write()s which
-     were doing write(sock, buf, len) != len, with atomicio() calls.
-   - [auth-skey.c]
-     fd leak
-   - [authfile.c]
-     properly name fd variable
-   - [channels.c]
-     display great hatred towards strcpy
-   - [pty.c pty.h sshd.c]
-     use openpty() if it exists (it does on BSD4_4)
-   - [tildexpand.c]
-     check for ~ expansion past MAXPATHLEN
- - Modified helper.c to use new atomicio function.
- - Reformat Makefile a little
- - Moved RC4 routines from rc4.[ch] into helper.c
- - Added autoconf code to detect /dev/ptmx (Solaris) and /dev/ptc (AIX)
- - Updated SuSE spec from Chris Saia <csaia@wtower.com>
- - Tweaked Redhat spec
- - Clean up bad imports of a few files (forgot -kb)
- - Released 1.2pre16
-
-19991204
- - Small cleanup of PAM code in sshd.c
- - Merged OpenBSD CVS changes:
-   - [auth-krb4.c auth-passwd.c auth-skey.c ssh.h]
-     move skey-auth from auth-passwd.c to auth-skey.c, same for krb4
-   - [auth-rsa.c]
-     warn only about mismatch if key is _used_
-     warn about keysize-mismatch with log() not error()
-     channels.c readconf.c readconf.h ssh.c ssh.h sshconnect.c
-     ports are u_short
-   - [hostfile.c]
-     indent, shorter warning
-   - [nchan.c]
-     use error() for internal errors
-   - [packet.c]
-     set loglevel for SSH_MSG_DISCONNECT to log(), not fatal()
-     serverloop.c
-     indent
-   - [ssh-add.1 ssh-add.c ssh.h]
-     document $SSH_ASKPASS, reasonable default
-   - [ssh.1]
-     CheckHostIP is not available for connects via proxy command
-   - [sshconnect.c]
-     typo
-     easier to read client code for passwd and skey auth
-     turn of checkhostip for proxy connects, since we don't know the remote ip
-
-19991126
- - Add definition for __P()
- - Added [v]snprintf() replacement for systems that lack it
-
-19991125
- - More reformatting merged from OpenBSD CVS
- - Merged OpenBSD CVS changes:
-   - [channels.c]
-     fix packet_integrity_check() for !have_hostname_in_open.
-     report from mrwizard@psu.edu via djm@ibs.com.au
-   - [channels.c]
-     set SO_REUSEADDR and SO_LINGER for forwarded ports.
-     chip@valinux.com via damien@ibs.com.au
-   - [nchan.c]
-     it's not an error() if shutdown_write failes in nchan.
-   - [readconf.c]
-     remove dead #ifdef-0-code
-   - [readconf.c servconf.c]
-     strcasecmp instead of tolower
-   - [scp.c]
-     progress meter overflow fix from damien@ibs.com.au
-   - [ssh-add.1 ssh-add.c]
-     SSH_ASKPASS support
-   - [ssh.1 ssh.c]
-     postpone fork_after_authentication until command execution,
-     request/patch from jahakala@cc.jyu.fi via damien@ibs.com.au
-     plus: use daemon() for backgrounding
- - Added BSD compatible install program and autoconf test, thanks to
-   Niels Kristian Bech Jensen <nkbj@image.dk>
- - Solaris fixing, thanks to Ben Taylor <bent@clark.net>
- - Merged beginnings of AIX support from Tor-Ake Fransson <torake@hotmail.com>
- - Release 1.2pre15
-
-19991124
- - Merged very large OpenBSD source code reformat
- - OpenBSD CVS updates
-   - [channels.c cipher.c compat.c log-client.c scp.c serverloop.c]
-     [ssh.h sshd.8 sshd.c]
-     syslog changes:
-     * Unified Logmessage for all auth-types, for success and for failed
-     * Standard connections get only ONE line in the LOG when level==LOG:
-       Auth-attempts are logged only, if authentication is:
-          a) successfull or
-          b) with passwd or
-          c) we had more than AUTH_FAIL_LOG failues
-     * many log() became verbose()
-     * old behaviour with level=VERBOSE
-   - [readconf.c readconf.h ssh.1 ssh.h sshconnect.c sshd.c]
-     tranfer s/key challenge/response data in SSH_SMSG_AUTH_TIS_CHALLENGE
-     messages. allows use of s/key in windows (ttssh, securecrt) and
-     ssh-1.2.27 clients without 'ssh -v', ok: niels@
-   - [sshd.8]
-     -V, for fallback to openssh in SSH2 compatibility mode
-   - [sshd.c]
-     fix sigchld race; cjc5@po.cwru.edu
-
-19991123
- - Added SuSE package files from Chris Saia <csaia@wtower.com>
- - Restructured package-related files under packages/*
- - Added generic PAM config
- - Numerous little Solaris fixes
- - Add recommendation to use GNU make to INSTALL document
-
-19991122
- - Make <enter> close gnome-ssh-askpass (Debian bug #50299)
- - OpenBSD CVS Changes
-   - [ssh-keygen.c]
-     don't create ~/.ssh only if the user wants to store the private
-     key there. show fingerprint instead of public-key after
-     keygeneration. ok niels@
- - Added OpenBSD bsd-strlcat.c, created bsd-strlcat.h
- - Added timersub() macro
- - Tidy RCSIDs of bsd-*.c
- - Added autoconf test and macro to deal with old PAM libraries
-   pam_strerror definition (one arg vs two).
- - Fix EGD problems (Thanks to Ben Taylor <bent@clark.net>)
- - Retry /dev/urandom reads interrupted by signal (report from
-   Robert Hardy <rhardy@webcon.net>)
- - Added a setenv replacement for systems which lack it
- - Only display public key comment when presenting ssh-askpass dialog
- - Released 1.2pre14
-
- - Configure, Make and changelog corrections from Tudor Bosman
-   <tudorb@jm.nu> and Niels Kristian Bech Jensen <nkbj@image.dk>
-
-19991121
- - OpenBSD CVS Changes:
-   - [channels.c]
-     make this compile, bad markus
-   - [log.c readconf.c servconf.c ssh.h]
-     bugfix: loglevels are per host in clientconfig,
-     factor out common log-level parsing code.
-   - [servconf.c]
-     remove unused index (-Wall)
-   - [ssh-agent.c]
-     only one 'extern char *__progname'
-   - [sshd.8]
-     document SIGHUP, -Q to synopsis
-   - [sshconnect.c serverloop.c sshd.c packet.c packet.h]
-     [channels.c clientloop.c]
-     SSH_CMSG_MAX_PACKET_SIZE, some clients use this, some need this, niels@
-     [hope this time my ISP stays alive during commit]
-   - [OVERVIEW README] typos; green@freebsd
-   - [ssh-keygen.c]
-     replace xstrdup+strcat with strlcat+fixed buffer, fixes OF (bad me)
-     exit if writing the key fails (no infinit loop)
-     print usage() everytime we get bad options
-   - [ssh-keygen.c] overflow, djm@mindrot.org
-   - [sshd.c] fix sigchld race; cjc5@po.cwru.edu
-
-19991120
- - Merged more Solaris support from Marc G. Fournier
-   <marc.fournier@acadiau.ca>
- - Wrote autoconf tests for integer bit-types
- - Fixed enabling kerberos support
- - Fix segfault in ssh-keygen caused by buffer overrun in filename
-   handling.
-
-19991119
- - Merged PAM buffer overrun patch from Chip Salzenberg <chip@valinux.com>
- - Merged OpenBSD CVS changes
-   - [auth-rhosts.c auth-rsa.c ssh-agent.c sshconnect.c sshd.c]
-     more %d vs. %s in fmt-strings
-   - [authfd.c]
-     Integers should not be printed with %s
- - EGD uses a socket, not a named pipe. Duh.
- - Fix includes in fingerprint.c
- - Fix scp progress bar bug again.
- - Move ssh-askpass from ${libdir}/ssh to ${libexecdir}/ssh at request of
-   David Rankin <drankin@bohemians.lexington.ky.us>
- - Added autoconf option to enable Kerberos 4 support (untested)
- - Added autoconf option to enable AFS support (untested)
- - Added autoconf option to enable S/Key support (untested)
- - Added autoconf option to enable TCP wrappers support (compiles OK)
- - Renamed BSD helper function files to bsd-*
- - Added tests for login and daemon and enable OpenBSD replacements for
-   when they are absent.
- - Added non-PAM MD5 password support patch from Tudor Bosman <tudorb@jm.nu>
-
-19991118
- - Merged OpenBSD CVS changes
-   - [scp.c] foregroundproc() in scp
-   - [sshconnect.h] include fingerprint.h
-   - [sshd.c] bugfix: the log() for passwd-auth escaped during logging
-     changes.
-   - [ssh.1] Spell my name right.
- - Added openssh.com info to README
-
-19991117
- - Merged OpenBSD CVS changes
-   - [ChangeLog.Ylonen] noone needs this anymore
-   - [authfd.c] close-on-exec for auth-socket, ok deraadt
-   - [hostfile.c]
-     in known_hosts key lookup the entry for the bits does not need
-     to match, all the information is contained in n and e. This
-     solves the problem with buggy servers announcing the wrong
-     modulus length.  markus and me.
-   - [serverloop.c]
-     bugfix: check for space if child has terminated, from:
-     iedowse@maths.tcd.ie
-   - [ssh-add.1 ssh-add.c ssh-keygen.1 ssh-keygen.c sshconnect.c]
-     [fingerprint.c fingerprint.h]
-     rsa key fingerprints, idea from Bjoern Groenvall <bg@sics.se>
-   - [ssh-agent.1] typo
-   - [ssh.1] add OpenSSH information to AUTHOR section. okay markus@
-   - [sshd.c]
-     force logging to stderr while loading private key file
-     (lost while converting to new log-levels)
-
-19991116
- - Fix some Linux libc5 problems reported by Miles Wilson <mw@mctitle.com>
- - Merged OpenBSD CVS changes:
-   - [auth-rh-rsa.c auth-rsa.c authfd.c authfd.h hostfile.c mpaux.c]
-     [mpaux.h ssh-add.c ssh-agent.c ssh.h ssh.c sshd.c]
-     the keysize of rsa-parameter 'n' is passed implizit,
-     a few more checks and warnings about 'pretended' keysizes.
-   - [cipher.c cipher.h packet.c packet.h sshd.c]
-     remove support for cipher RC4
-   - [ssh.c]
-     a note for legay systems about secuity issues with permanently_set_uid(),
-     the private hostkey and ptrace()
-   - [sshconnect.c]
-     more detailed messages about adding and checking hostkeys
-
-19991115
- - Merged OpenBSD CVS changes:
-   - [ssh-add.c] change passphrase loop logic and remove ref to
-     $DISPLAY, ok niels
- - Changed to ssh-add.c broke askpass support. Revised it to be a little more
-   modular.
- - Revised autoconf support for enabling/disabling askpass support.
- - Merged more OpenBSD CVS changes:
-   [auth-krb4.c]
-     - disconnect if getpeername() fails
-     - missing xfree(*client)
-   [canohost.c]
-     - disconnect if getpeername() fails
-     - fix comment: we _do_ disconnect if ip-options are set
-   [sshd.c]
-     - disconnect if getpeername() fails
-     - move checking of remote port to central place
-   [auth-rhosts.c] move checking of remote port to central place
-   [log-server.c] avoid extra fd per sshd, from millert@
-   [readconf.c] print _all_ bad config-options in ssh(1), too
-   [readconf.h] print _all_ bad config-options in ssh(1), too
-   [ssh.c] print _all_ bad config-options in ssh(1), too
-   [sshconnect.c] disconnect if getpeername() fails
- - OpenBSD's changes to sshd.c broke the PAM stuff, re-merged it.
- - Various small cleanups to bring diff (against OpenBSD) size down.
- - Merged more Solaris compability from Marc G. Fournier
-   <marc.fournier@acadiau.ca>
- - Wrote autoconf tests for __progname symbol
- - RPM spec file fixes from Jim Knoble <jmknoble@jmknoble.cx>
- - Released 1.2pre12
-
- - Another OpenBSD CVS update:
-   - [ssh-keygen.1] fix .Xr
-
-19991114
- - Solaris compilation fixes (still imcomplete)
-
-19991113
- - Build patch from Niels Kristian Bech Jensen <nkbj@image.dk>
-   - Don't install config files if they already exist
-   - Fix inclusion of additional preprocessor directives from acconfig.h
- - Removed redundant inclusions of config.h
- - Added 'Obsoletes' lines to RPM spec file
- - Merged OpenBSD CVS changes:
-   - [bufaux.c] save a view malloc/memcpy/memset/free's, ok niels
-   - [scp.c] fix overflow reported by damien@ibs.com.au: off_t
-     totalsize, ok niels,aaron
- - Delay fork (-f option) in ssh until after port forwarded connections
-   have been initialised. Patch from Jani Hakala <jahakala@cc.jyu.fi>
- - Added shadow password patch from Thomas Neumann <tom@smart.ruhr.de>
- - Added ifdefs to auth-passwd.c to exclude it when PAM is enabled
- - Tidied default config file some more
- - Revised Redhat initscript to fix bug: sshd (re)start would fail
-   if executed from inside a ssh login.
-
-19991112
- - Merged changes from OpenBSD CVS
-   - [sshd.c] session_key_int may be zero
-   - [auth-rh-rsa.c servconf.c servconf.h ssh.h sshd.8 sshd.c sshd_config]
-     IgnoreUserKnownHosts(default=no), used for RhostRSAAuth, ok
-     deraadt,millert
- - Brought default sshd_config more in line with OpenBSD's
- - Grab server in gnome-ssh-askpass (Debian bug #49872)
- - Released 1.2pre10
-
- - Added INSTALL documentation
- - Merged yet more changes from OpenBSD CVS
-   - [auth-rh-rsa.c auth-rhosts.c auth-rsa.c channels.c clientloop.c]
-     [ssh.c ssh.h sshconnect.c sshd.c]
-     make all access to options via 'extern Options options'
-     and 'extern ServerOptions options' respectively;
-     options are no longer passed as arguments:
-      * make options handling more consistent
-      * remove #include "readconf.h" from ssh.h
-      * readconf.h is only included if necessary
-   - [mpaux.c] clear temp buffer
-   - [servconf.c] print _all_ bad options found in configfile
- - Make ssh-askpass support optional through autoconf
- - Fix nasty division-by-zero error in scp.c
- - Released 1.2pre11
-
-19991111
- - Added (untested) Entropy Gathering Daemon (EGD) support
- - Fixed /dev/urandom fd leak (Debian bug #49722)
- - Merged OpenBSD CVS changes:
-   - [auth-rh-rsa.c] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too
-   - [ssh.1] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too
-   - [sshd.8] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too
- - Fix integer overflow which was messing up scp's progress bar for large
-   file transfers. Fix submitted to OpenBSD developers. Report and fix
-   from Kees Cook <cook@cpoint.net>
- - Merged more OpenBSD CVS changes:
-   - [auth-krb4.c auth-passwd.c] remove x11- and krb-cleanup from fatal()
-     + krb-cleanup cleanup
-   - [clientloop.c log-client.c log-server.c ]
-     [readconf.c readconf.h servconf.c servconf.h ]
-     [ssh.1 ssh.c ssh.h sshd.8]
-     add LogLevel {QUIET, FATAL, ERROR, INFO, CHAT, DEBUG} to ssh/sshd,
-     obsoletes QuietMode and FascistLogging in sshd.
-   - [sshd.c] fix fatal/assert() bug reported by damien@ibs.com.au:
-     allow session_key_int != sizeof(session_key)
-     [this should fix the pre-assert-removal-core-files]
- - Updated default config file to use new LogLevel option and to improve
-   readability
-
-19991110
- - Merged several minor fixes:
-   - ssh-agent commandline parsing
-   - RPM spec file now installs ssh setuid root
-   - Makefile creates libdir
-   - Merged beginnings of Solaris compability from Marc G. Fournier
-     <marc.fournier@acadiau.ca>
-
-19991109
- - Autodetection of SSL/Crypto library location via autoconf
- - Fixed location of ssh-askpass to follow autoconf
- - Integrated Makefile patch from Niels Kristian Bech Jensen <nkbj@image.dk>
- - Autodetection of RSAref library for US users
- - Minor doc updates
- - Merged OpenBSD CVS changes:
-   - [rsa.c] bugfix: use correct size for memset()
-   - [sshconnect.c] warn if announced size of modulus 'n' != real size
- - Added GNOME passphrase requestor (use --with-gnome-askpass)
- - RPM build now creates subpackages
- - Released 1.2pre9
-
-19991108
- - Removed debian/ directory. This is now being maintained separately.
- - Added symlinks for slogin in RPM spec file
- - Fixed permissions on manpages in RPM spec file
- - Added references to required libraries in README file
- - Removed config.h.in from CVS
- - Removed pwdb support (better pluggable auth is provided by glibc)
- - Made PAM and requisite libdl optional
- - Removed lots of unnecessary checks from autoconf
- - Added support and autoconf test for openpty() function (Unix98 pty support)
- - Fix for scp not finding ssh if not installed as /usr/bin/ssh
- - Added TODO file
- - Merged parts of Debian patch From Phil Hands <phil@hands.com>:
-   - Added ssh-askpass program
-   - Added ssh-askpass support to ssh-add.c
-   - Create symlinks for slogin on install
-   - Fix "distclean" target in makefile
-   - Added example for ssh-agent to manpage
-   - Added support for PAM_TEXT_INFO messages
-   - Disable internal /etc/nologin support if PAM enabled
- - Merged latest OpenBSD CVS changes:
-   - [all] replace assert() with error, fatal or packet_disconnect
-   - [sshd.c] don't send fail-msg but disconnect if too many authentication
-     failures
-   - [sshd.c] remove unused argument. ok dugsong
-   - [sshd.c] typo
-   - [rsa.c] clear buffers used for encryption. ok: niels
-   - [rsa.c] replace assert() with error, fatal or packet_disconnect
-   - [auth-krb4.c] remove unused argument. ok dugsong
- - Fixed coredump after merge of OpenBSD rsa.c patch
- - Released 1.2pre8
-
-19991102
- - Merged change from OpenBSD CVS
-  - One-line cleanup in sshd.c
-
-19991030
- - Integrated debian package support from Dan Brosemer <odin@linuxfreak.com>
- - Merged latest updates for OpenBSD CVS:
-   - channels.[ch] - remove broken x11 fix and document istate/ostate
-   - ssh-agent.c - call setsid() regardless of argv[]
-   - ssh.c - save a few lines when disabling rhosts-{rsa-}auth
- - Documentation cleanups
- - Renamed README -> README.Ylonen
- - Renamed README.openssh ->README
-
-19991029
- - Renamed openssh* back to ssh* at request of Theo de Raadt
- - Incorporated latest changes from OpenBSD's CVS
- - Integrated Makefile patch from  Niels Kristian Bech Jensen <nkbj@image.dk>
- - Integrated PAM env patch from Nalin Dahyabhai <nalin.dahyabhai@pobox.com>
- - Make distclean now removed configure script
- - Improved PAM logging
- - Added some debug() calls for PAM
- - Removed redundant subdirectories
- - Integrated part of a patch from Dan Brosemer <odin@linuxfreak.com> for
-   building on Debian.
- - Fixed off-by-one error in PAM env patch
- - Released 1.2pre6
-
-19991028
- - Further PAM enhancements.
-   - Much cleaner
-   - Now uses account and session modules for all logins.
- - Integrated patch from Dan Brosemer <odin@linuxfreak.com>
-   - Build fixes
-   - Autoconf
-   - Change binary names to open*
- - Fixed autoconf script to detect PAM on RH6.1
- - Added tests for libpwdb, and OpenBSD functions to autoconf
- - Released 1.2pre4
-
- - Imported latest OpenBSD CVS code
- - Updated README.openssh
- - Released 1.2pre5
-
-19991027
- - Adapted PAM patch.
- - Released 1.0pre2
-
- - Excised my buggy replacements for strlcpy and mkdtemp
- - Imported correct OpenBSD strlcpy and mkdtemp routines.
- - Reduced arc4random_stir entropy read to 32 bytes (256 bits)
- - Picked up correct version number from OpenBSD
- - Added sshd.pam PAM configuration file
- - Added sshd.init Redhat init script
- - Added openssh.spec RPM spec file
- - Released 1.2pre3
-
-19991026
- - Fixed include paths of OpenSSL functions
- - Use OpenSSL MD5 routines
- - Imported RC4 code from nanocrypt
- - Wrote replacements for OpenBSD arc4random* functions
- - Wrote replacements for strlcpy and mkdtemp
- - Released 1.0pre1
+     remove unused, sync w/ cmdline patch in my tree.
+
+20020317
+ - (tim) [configure.ac] Assume path given with --with-pid-dir=PATH is 
+   wanted, warn if directory does not exist. Put system directories in 
+   front of PATH for finding entorpy commands.
+ - (tim) [contrib/aix/buildbff.sh contrib/aix/inventory.sh] AIX package
+   build fixes.  Patch by Darren Tucker <dtucker@zip.com.au>
+   [contrib/solaris/buildpkg.sh] add missing dirs to SYSTEM_DIR. Have
+   postinstall check for $piddir and add if necessary.
+
+20020311
+ - (tim) [contrib/solaris/buildpkg.sh, contrib/solaris/README] Updated to
+   build on all platforms that support SVR4 style package tools. Now runs
+   from build dir. Parts are based on patches from Antonio Navarro, and
+   Darren Tucker.
+
+20020308
+ - (djm) Revert bits of Markus' OpenSSL compat patch which was 
+   accidentally committed.
+ - (djm) Add Markus' patch for compat wih OpenSSL < 0.9.6. 
+   Known issue: Blowfish for SSH1 does not work
+ - (stevesk) entropy.c: typo in debug message
+ - (djm) ssh-keygen -i needs seeded RNG; report from markus@
 
 $Id$
index c6ee3c89063816be2df7b26aba09464c9d3c0bf8..84e7b47d2e241026ce686815d106f6daf5545b68 100644 (file)
@@ -6,9 +6,12 @@ You will need working installations of Zlib and OpenSSL.
 Zlib:
 http://www.gzip.org/zlib/ 
 
-OpenSSL 0.9.5a or greater:
+OpenSSL 0.9.6 or greater:
 http://www.openssl.org/
 
+(OpenSSL 0.9.5a is partially supported, but some ciphers (SSH protocol 1 
+Blowfish included) do not work correctly.)
+
 RPMs of OpenSSL are available at http://violet.ibs.com.au/openssh/files/support.
 For Red Hat Linux 6.2, they have been released as errata.  RHL7 includes
 these.
@@ -17,6 +20,11 @@ OpenSSH can utilise Pluggable Authentication Modules (PAM) if your system
 supports it. PAM is standard on Redhat and Debian Linux, Solaris and
 HP-UX 11.
 
+NB. If you operating system supports /dev/random, you should configure 
+OpenSSL to use it. OpenSSH relies on OpenSSL's direct support of 
+/dev/random. If you don't you will have to rely on ssh-rand-helper, which 
+is inferior to a good kernel-based solution.
+
 PAM:
 http://www.kernel.org/pub/linux/libs/pam/
 
@@ -108,10 +116,6 @@ different name.
 need a working installation of GNOME, including the development
 headers, for this to work.
 
---with-random=/some/file allows you to specify an alternate source of
-random numbers (the default is /dev/urandom). Unless you are absolutely
-sure of what you are doing, it is best to leave this alone.
-
 --with-prngd-socket=/some/file allows you to enable EGD or PRNGD 
 support and to specify a PRNGd socket. Use this if your Unix lacks 
 /dev/random and you don't want to use OpenSSH's builtin entropy 
@@ -178,6 +182,10 @@ are installed.
 --with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
 real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
 
+--with-opensc=DIR
+--with-sectok=DIR allows for OpenSC or sectok smartcard libraries to
+be used with OpenSSH.  See 'README.smartcard' for more details.
+
 If you need to pass special options to the compiler or linker, you
 can specify these as environment variables before running ./configure.
 For example:
index 1c98a1d621b7952847a36edd6832bbdefad5eed2..2824c09c6a9827a7eed21d8a9b73ecfb1699459b 100644 (file)
@@ -190,6 +190,7 @@ OpenSSH contains no GPL code.
        Aaron Campbell
        Damien Miller
        Kevin Steves
+       Daniel Kouril
 
      * Redistribution and use in source and binary forms, with or without
      * modification, are permitted provided that the following conditions
index 5bc3cb0fd31d9a6efcae08ea88e2428b6e7950ba..f69561eead5750f01aacb51376fed3fc1265e161 100644 (file)
@@ -1,5 +1,10 @@
 # $Id$
 
+# uncomment if you run a non bourne compatable shell. Ie. csh
+#SHELL = @SH@
+
+AUTORECONF=autoreconf
+
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 bindir=@bindir@
@@ -18,12 +23,14 @@ VPATH=@srcdir@
 SSH_PROGRAM=@bindir@/ssh
 ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
 SFTP_SERVER=$(libexecdir)/sftp-server
+PRIVSEP_PATH=@PRIVSEP_PATH@
 
 PATHS= -DSSHDIR=\"$(sysconfdir)\" \
        -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
        -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
        -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
        -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
+       -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
        -DSSH_RAND_HELPER=\"$(libexecdir)/ssh-rand-helper\"
 
 CC=@CC@
@@ -50,20 +57,21 @@ INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
 
 TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} $(SFTP_PROGS)
 
-LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o fatal.o mac.o hostfile.o key.o kex.o kexdh.o kexgex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o scard.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o 
+LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o fatal.o mac.o hostfile.o key.o kex.o kexdh.o kexgex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o scard.o scard-opensc.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o monitor_wrap.o monitor_fdpass.o
 
 SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o
 
-SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o
+SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-krb5.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o monitor_mm.o monitor.o
 
-MANPAGES       = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out
-MANPAGES_IN    = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1
+MANPAGES       = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out
+MANPAGES_IN    = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8
 MANTYPE                = @MANTYPE@
 
 CONFIGFILES=sshd_config.out ssh_config.out moduli.out
 CONFIGFILES_IN=sshd_config ssh_config moduli
 
 PATHSUBS       = \
+       -D/etc/ssh/ssh_prng_cmds=$(sysconfdir)/ssh_prng_cmds \
        -D/etc/ssh/ssh_config=$(sysconfdir)/ssh_config \
        -D/etc/ssh/ssh_known_hosts=$(sysconfdir)/ssh_known_hosts \
        -D/etc/ssh/sshd_config=$(sysconfdir)/sshd_config \
@@ -76,6 +84,7 @@ PATHSUBS      = \
        -D/etc/ssh/moduli=$(sysconfdir)/moduli \
        -D/etc/ssh/sshrc=$(sysconfdir)/sshrc \
        -D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \
+       -D/var/empty=$(PRIVSEP_PATH) \
        -D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@
 
 FIXPATHSCMD    = $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
@@ -180,7 +189,7 @@ catman-do:
        done
 
 distprep: catman-do
-       autoreconf
+       $(AUTORECONF)
        (cd scard && $(MAKE) -f Makefile.in distprep)
 
 install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files host-key
@@ -216,6 +225,9 @@ install-files: scard-install
        $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
        $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
        $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
+       if [ ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
+               $(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \
+       fi
        @NO_SFTP@$(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
        @NO_SFTP@$(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
        -rm -f $(DESTDIR)$(bindir)/slogin
@@ -309,5 +321,6 @@ uninstall:
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
+       -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
        -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
diff --git a/openssh/README.privsep b/openssh/README.privsep
new file mode 100644 (file)
index 0000000..4b6efd2
--- /dev/null
@@ -0,0 +1,57 @@
+Privilege separation, or privsep, is an experimental feature in
+OpenSSH in which operations that require root privilege are performed
+by a separate privileged monitor process.  Its purpose is to prevent
+privilege escalation by containing corruption to an unprivileged
+process.  More information is available at:
+       http://www.citi.umich.edu/u/provos/ssh/privsep.html
+
+Privilege separation is not enabled by default, and may be enabled by
+specifying "UsePrivilegeSeparation yes" in sshd_config; see the
+UsePrivilegeSeparation option in sshd(8).
+
+When privsep is enabled, the pre-authentication sshd process will
+chroot(2) to "/var/empty" and change its privileges to the "sshd" user
+and its primary group.  You should do something like the following to
+prepare the privsep preauth environment:
+
+       # mkdir /var/empty
+       # chown root:sys /var/empty
+       # chmod 755 /var/empty
+       # groupadd sshd
+       # useradd -g sshd sshd
+
+If you are on UnixWare 7 or OpenUNIX 8 do this additional step.
+       # ln /usr/lib/.ns.so /usr/lib/ns.so.1
+
+/var/empty should not contain any files.
+
+configure supports the following options to change the default
+privsep user and chroot directory:
+
+  --with-privsep-path=xxx Path for privilege seperation chroot
+  --with-privsep-user=user Specify non-privileged user for privilege separation
+
+Privsep requires operating system support for file descriptor passing
+and mmap(MAP_ANON).
+
+PAM-enabled OpenSSH is known to function with privsep on Linux and
+Solaris 8.  It does not function on HP-UX with a trusted system
+configuration.  PAMAuthenticationViaKbdInt does not function with
+privsep.
+
+Note that for a normal interactive login with a shell, enabling privsep
+will require 1 additional process per login session.
+
+Given the following process listing (from HP-UX):
+
+     UID   PID  PPID  C    STIME TTY       TIME COMMAND
+    root  1005     1  0 10:45:17 ?         0:08 /opt/openssh/sbin/sshd -u0
+    root  6917  1005  0 15:19:16 ?         0:00 sshd: stevesk [priv]
+ stevesk  6919  6917  0 15:19:17 ?         0:03 sshd: stevesk@2
+ stevesk  6921  6919  0 15:19:17 pts/2     0:00 -bash
+
+process 1005 is the sshd process listening for new connections.
+process 6917 is the privileged monitor process, 6919 is the user owned
+sshd process and 6921 is the shell process.
+
+$Id$
index 69dca15b5fe9ed7b1a8140705451be8a55a8ab3c..29bec8dc64e90cc972641a69980bb507caec2621 100644 (file)
@@ -1,25 +1,22 @@
 How to use smartcards with OpenSSH?
 
-OpenSSH contains experimental support for authentication using
-Cyberflex smartcards and TODOS card readers. 
+OpenSSH contains experimental support for authentication using Cyberflex
+smartcards and TODOS card readers, in addition to the cards with PKCS#15
+structure supported by OpenSC.
 
-WARNING: Smartcard support is still in development. Keyfile formats, etc
-are still subject to change.
+WARNING: Smartcard support is still in development.
+Keyfile formats, etc are still subject to change.
 
-To enable this you need to:
+To enable sectok support:
 
-(1) install sectok
+(1) install sectok:
 
-       Sources are instructions are available from
+       Sources and instructions are available from
        http://www.citi.umich.edu/projects/smartcard/sectok.html
 
-(2) enable SMARTCARD support in OpenSSH:
+(2) enable sectok support in OpenSSH:
 
-       $ ./configure --with-smartcard [options]
-
-       You can also specify a path to libsectok:
-
-       $ ./configure --with-smartcard=/path/to/libsectok [options]
+       $ ./configure --with-sectok[=/path/to/libsectok] [options]
 
 (3) load the Java Cardlet to the Cyberflex card:
 
@@ -30,12 +27,11 @@ To enable this you need to:
 
 (4) load a RSA key to the card:
 
-       please don't use your production RSA keys, since
+       Please don't use your production RSA keys, since
        with the current version of sectok/ssh-keygen
-       the private key file is still readable
+       the private key file is still readable.
 
-       $ ssh-keygen -f /path/to/rsakey -U 1
-       (where 1 is the reader number, you can also try 0)
+       $ ssh-keygen -f /path/to/rsakey -U <readernum, eg. 0>
 
        In spite of the name, this does not generate a key.
        It just loads an already existing key on to the card.
@@ -60,13 +56,30 @@ To enable this you need to:
        wrong passphrase three times in a row, you will
        destroy your card.
 
-(6) tell the ssh client to use the card reader:
+To enable OpenSC support:
+
+(1) install OpenSC:
+
+       Sources and instructions are available from
+       http://www.opensc.org/
+
+(2) enable OpenSC support in OpenSSH:
+
+       $ ./configure --with-opensc[=/path/to/opensc] [options]
+
+(3) load a RSA key to the card:
+
+       Not supported yet.
+
+Common smartcard options:
+
+(1) tell the ssh client to use the card reader:
 
-       $ ssh -I 1 otherhost
+       $ ssh -I <readernum, eg. 0> otherhost
 
-(7) or tell the agent (don't forget to restart) to use the smartcard:
+(2) or tell the agent (don't forget to restart) to use the smartcard:
 
-       $ ssh-add -s 1
+       $ ssh-add -s <readernum, eg. 0>
 
 -markus,
-Tue Jul 17 23:54:51 CEST 2001
+Sat Apr 13 13:48:10 EEST 2002
index 1b9137edf7925fd2286c299d765f764893cb6b63..e5fd1aceccec69c4a9016ac0b3b84aedb32cc5e1 100644 (file)
@@ -28,8 +28,12 @@ On to the description...
 The portable OpenSSH contains random number collection support for
 systems which lack a kernel entropy pool (/dev/random).
 
-This collector operates by executing the programs listed in
-($etcdir)/ssh_prng_cmds, reading their output and adding it to the
+This collector (as of 3.1 and beyond) comes as an external application
+that allows the local admin to decide on how to implement entropy
+collection.
+
+The default entropy collector operates by executing the programs listed
+in ($etcdir)/ssh_prng_cmds, reading their output and adding it to the
 PRNG supplied by OpenSSL (which is hash-based). It also stirs in the
 output of several system calls and timings from the execution of the
 programs that it runs.
@@ -43,7 +47,7 @@ The random number code will also read and save a seed file to
 number generator at startup. The goal here is to maintain as much 
 randomness between sessions as possible.
 
-The entropy collection code has two main problems:
+The default entropy collection code has two main problems:
 
 1. It is slow.
 
@@ -51,14 +55,13 @@ Executing each program in the list can take a large amount of time,
 especially on slower machines. Additionally some program can take a   
 disproportionate time to execute.                                     
 
-This can be tuned by the administrator. To debug the entropy
-collection is great detail, turn on full debugging ("ssh -v -v -v" or
-"sshd -d -d -d"). This will list each program as it is executed, how
-long it took to execute, its exit status and whether and how much data
-it generated. You can the find the culprit programs which are causing
-the real slow-downs.
+Tuning the default entropy collection code is difficult at this point.
+It requires doing 'times ./ssh-rand-helper'  and modifying the
+($etcdir)/ssh_prng_cmds until you have found the issue.  In the next
+release we will be looking at support '-v' for verbose output to allow
+easier debugging.
 
-The entropy collector will timeout programs which take too long
+The default entropy collector will timeout programs which take too long
 to execute, the actual timeout used can be adjusted with the
 --with-entropy-timeout configure option. OpenSSH will not try to
 re-execute programs which have not been found, have had a non-zero
@@ -79,5 +82,15 @@ up and various other factors.
 To make matters even more complex, some of the commands are reporting
 largely the same data as other commands (eg. the various "ps" calls).
 
-$Id$
 
+How to avoid the default entropy code?
+
+The best way is to read the OpenSSL documentation and recompile OpenSSL
+to use prngd or egd.  Some platforms (like earily solaris) have 3rd
+party /dev/random devices that can be also used for this task.
+
+If you are forced to use ssh-rand-helper consider still downloading
+prngd/egd and configure OpenSSH using --with-prngd-port=xx or
+--with-prngd-socket=xx (refer to INSTALL for more information).
+
+$Id$
index 8382c85489ad7a0b4861285dd652d91c461a2b1d..afc3db91b7cd287d8ccbf6d4e96de1a45586bf18 100644 (file)
 
 /* SCO workaround */
 #undef BROKEN_SYS_TERMIO_H
-#undef HAVE_BOGUS_SYS_QUEUE_H
 
-/* Define if you have SCO protected password database */
-#undef HAVE_SCO_PROTECTED_PW
+/* Define if you have SecureWare-based protected password database */
+#undef HAVE_SECUREWARE
 
 /* If your header files don't define LOGIN_PROGRAM, then use this (detected) */
 /* from environment and PATH */
 /* Define if your password has a pw_change field */
 #undef HAVE_PW_CHANGE_IN_PASSWD
 
+/* Define if your system uses access rights style file descriptor passing */
+#undef HAVE_ACCRIGHTS_IN_MSGHDR
+
+/* Define if your system uses ancillary data style file descriptor passing */
+#undef HAVE_CONTROL_IN_MSGHDR
+
 /* Define if you system's inet_ntoa is busted (e.g. Irix gcc issue) */
 #undef BROKEN_INET_NTOA
 
 /* Builtin PRNG command timeout */
 #undef ENTROPY_TIMEOUT_MSEC
 
+/* non-privileged user for privilege separation */
+#undef SSH_PRIVSEP_USER
+
 /* Define if you want to install preformatted manpages.*/
 #undef MANTYPE
 
 /* Some versions of /bin/login need the TERM supplied on the commandline */
 #undef LOGIN_NEEDS_TERM
 
+/* Define if your login program cannot handle end of options ("--") */
+#undef LOGIN_NO_ENDOPT
+
 /* Define if you want to specify the path to your lastlog file */
 #undef CONF_LASTLOG_FILE
 
 /* Define if libc defines __progname */
 #undef HAVE___PROGNAME
 
+/* Define if compiler implements __FUNCTION__ */
+#undef HAVE___FUNCTION__
+
+/* Define if compiler implements __func__ */
+#undef HAVE___func__
+
+/* Define if you want Kerberos 5 support */
+#undef KRB5
+
+/* Define this if you are using the Heimdal version of Kerberos V5 */
+#undef HEIMDAL
+
 /* Define if you want Kerberos 4 support */
 #undef KRB4
 
 /* Define if you have getpwanam(3) [SunOS 4.x] */
 #undef HAVE_GETPWANAM
 
-/* Defined if in_systm.h needs to be included with netinet/ip.h (HPUX - <sigh/>) */
-#undef NEED_IN_SYSTM_H
-
 /* Define if you have an old version of PAM which takes only one argument */
 /* to pam_strerror */
 #undef HAVE_OLD_PAM
 /* Use IPv4 for connection by default, IPv6 can still if explicity asked */
 #undef IPV4_DEFAULT
 
-/* If you have no atexit() but xatexit(), and want to use xatexit() */
-#undef HAVE_XATEXIT
-
 /* getaddrinfo is broken (if present) */
 #undef BROKEN_GETADDRINFO
 
 /* Define if you want smartcard support */
 #undef SMARTCARD
 
+/* Define if you want smartcard support using sectok */
+#undef USE_SECTOK
+
+/* Define if you want smartcard support using OpenSC */
+#undef USE_OPENSC
+
 /* Define if you want to use OpenSSL's internally seeded PRNG only */
 #undef OPENSSL_PRNG_ONLY
 
+/* Define if you shouldn't strip 'tty' from your ttyname in [uw]tmp */
+#undef WITH_ABBREV_NO_TTY
+
+/* Define if you want a different $PATH for the superuser */
+#undef SUPERUSER_PATH
+
+/* Path that unprivileged child will chroot() to in privep mode */
+#undef PRIVSEP_PATH
+
 @BOTTOM@
 
 /* ******************* Shouldn't need to edit below this line ************** */
 
-#include "defines.h"
-
 #endif /* _CONFIG_H */
index b70d48f20e02f1024ae93e2c94691d7f03d9b7b2..fa06732cc2e63eda04e0a669ba16f7537271ab4d 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: auth-bsdauth.c,v 1.2 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: auth-bsdauth.c,v 1.3 2002/03/18 17:50:31 provos Exp $");
 
 #ifdef BSD_AUTH
 #include "xmalloc.h"
 #include "auth.h"
 #include "log.h"
+#include "monitor_wrap.h"
 
 static void *
 bsdauth_init_ctx(Authctxt *authctxt)
@@ -35,7 +36,7 @@ bsdauth_init_ctx(Authctxt *authctxt)
        return authctxt;
 }
 
-static int
+int
 bsdauth_query(void *ctx, char **name, char **infotxt,
    u_int *numprompts, char ***prompts, u_int **echo_on)
 {
@@ -76,7 +77,7 @@ bsdauth_query(void *ctx, char **name, char **infotxt,
        return 0;
 }
 
-static int
+int
 bsdauth_respond(void *ctx, u_int numresponses, char **responses)
 {
        Authctxt *authctxt = ctx;
@@ -113,4 +114,12 @@ KbdintDevice bsdauth_device = {
        bsdauth_respond,
        bsdauth_free_ctx
 };
+
+KbdintDevice mm_bsdauth_device = {
+       "bsdauth",
+       bsdauth_init_ctx,
+       mm_bsdauth_query,
+       mm_bsdauth_respond,
+       bsdauth_free_ctx
+};
 #endif
index f7a144f9d6e7c111f8f06a1e4b243e96b491710a..2a3cf53146e6d99c7a382a964037376293b297e8 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-krb4.c,v 1.25 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: auth-krb4.c,v 1.26 2002/03/18 01:30:10 dugsong Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -253,6 +253,7 @@ auth_krb4(Authctxt *authctxt, KTEXT auth, char **client)
                log("Kerberos v4 .klogin authorization failed for %s to "
                    "account %s", *client, authctxt->user);
                xfree(*client);
+               *client = NULL;
                return (0);
        }
        /* Increment the checksum, and return it encrypted with the
index 2da0669ae629f7e1153a970f03447e0853960c7c..76c2419aa1f2f120ee98d8c2723593649abd95be 100644 (file)
@@ -1,11 +1,34 @@
 /*
  *    Kerberos v5 authentication and ticket-passing routines.
- * 
+ *
  * $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $
  */
+/*
+ * Copyright (c) 2002 Daniel Kouril.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-krb5.c,v 1.6 2002/03/04 17:27:39 stevesk Exp $");
+RCSID("$OpenBSD: auth-krb5.c,v 1.8 2002/03/19 10:49:35 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -18,6 +41,9 @@ RCSID("$OpenBSD: auth-krb5.c,v 1.6 2002/03/04 17:27:39 stevesk Exp $");
 
 #ifdef KRB5
 #include <krb5.h>
+#ifndef HEIMDAL
+#define krb5_get_err_text(context,code) error_message(code)
+#endif /* !HEIMDAL */
 
 extern ServerOptions    options;
 
@@ -70,8 +96,15 @@ auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client)
                goto err;
 
        fd = packet_get_connection_in();
+#ifdef HEIMDAL
        problem = krb5_auth_con_setaddrs_from_fd(authctxt->krb5_ctx,
            authctxt->krb5_auth_ctx, &fd);
+#else
+       problem = krb5_auth_con_genaddrs(authctxt->krb5_ctx, 
+           authctxt->krb5_auth_ctx,fd,
+           KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR |
+           KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR);
+#endif
        if (problem)
                goto err;
 
@@ -85,8 +118,14 @@ auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client)
        if (problem)
                goto err;
 
+#ifdef HEIMDAL
        problem = krb5_copy_principal(authctxt->krb5_ctx, ticket->client,
            &authctxt->krb5_user);
+#else
+       problem = krb5_copy_principal(authctxt->krb5_ctx, 
+                                     ticket->enc_part2->client,
+                                     &authctxt->krb5_user);
+#endif
        if (problem)
                goto err;
 
@@ -137,13 +176,37 @@ auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt)
        krb5_error_code problem;
        krb5_ccache ccache = NULL;
        char *pname;
+       krb5_creds **creds;
 
        if (authctxt->pw == NULL || authctxt->krb5_user == NULL)
                return (0);
 
        temporarily_use_uid(authctxt->pw);
 
+#ifdef HEIMDAL
        problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, &ccache);
+#else
+{
+       char ccname[40];
+       int tmpfd;
+       
+       snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
+       
+       if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
+               log("mkstemp(): %.100s", strerror(errno));
+               problem = errno;
+               goto fail;
+       }
+       if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) {
+               log("fchmod(): %.100s", strerror(errno));
+               close(tmpfd);
+               problem = errno;
+               goto fail;
+       }
+       close(tmpfd);
+       problem = krb5_cc_resolve(authctxt->krb5_ctx, ccname, &ccache);
+}
+#endif
        if (problem)
                goto fail;
 
@@ -152,10 +215,20 @@ auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt)
        if (problem)
                goto fail;
 
+#ifdef HEIMDAL
        problem = krb5_rd_cred2(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
            ccache, tgt);
        if (problem)
                goto fail;
+#else
+       problem = krb5_rd_cred(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
+           tgt, &creds, NULL);
+       if (problem)
+               goto fail;
+       problem = krb5_cc_store_cred(authctxt->krb5_ctx, ccache, *creds);
+       if (problem)
+               goto fail;
+#endif
 
        authctxt->krb5_fwd_ccache = ccache;
        ccache = NULL;
@@ -188,6 +261,12 @@ auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt)
 int
 auth_krb5_password(Authctxt *authctxt, const char *password)
 {
+#ifndef HEIMDAL
+       krb5_creds creds;
+       krb5_principal server;
+       char ccname[40];
+       int tmpfd;
+#endif 
        krb5_error_code problem;
 
        if (authctxt->pw == NULL)
@@ -204,6 +283,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
        if (problem)
                goto out;
 
+#ifdef HEIMDAL
        problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops,
            &authctxt->krb5_fwd_ccache);
        if (problem)
@@ -222,13 +302,69 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
        if (problem)
                goto out;
 
+#else
+       problem = krb5_get_init_creds_password(authctxt->krb5_ctx, &creds,
+           authctxt->krb5_user, (char *)password, NULL, NULL, 0, NULL, NULL);
+       if (problem)
+               goto out;
+
+       problem = krb5_sname_to_principal(authctxt->krb5_ctx, NULL, NULL,
+           KRB5_NT_SRV_HST, &server);
+       if (problem)
+               goto out;
+
+       restore_uid();
+       problem = krb5_verify_init_creds(authctxt->krb5_ctx, &creds, server,
+           NULL, NULL, NULL);
+       krb5_free_principal(authctxt->krb5_ctx, server);
+       temporarily_use_uid(authctxt->pw);
+       if (problem)
+               goto out;
+       
+       if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user, 
+                         authctxt->pw->pw_name)) {
+               problem = -1;
+               goto out;
+       } 
+
+       snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
+       
+       if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
+               log("mkstemp(): %.100s", strerror(errno));
+               problem = errno;
+               goto out;
+       }
+       
+       if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) {
+               log("fchmod(): %.100s", strerror(errno));
+               close(tmpfd);
+               problem = errno;
+               goto out;
+       }
+       close(tmpfd);
+
+       problem = krb5_cc_resolve(authctxt->krb5_ctx, ccname, &authctxt->krb5_fwd_ccache);
+       if (problem)
+               goto out;
+
+       problem = krb5_cc_initialize(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache,
+                                    authctxt->krb5_user);
+       if (problem)
+               goto out;
+                               
+       problem= krb5_cc_store_cred(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache,
+                                &creds);
+       if (problem)
+               goto out;
+#endif         
+
        authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
 
  out:
        restore_uid();
 
        if (problem) {
-               if (authctxt->krb5_ctx != NULL)
+               if (authctxt->krb5_ctx != NULL && problem!=-1)
                        debug("Kerberos password authentication failed: %s",
                            krb5_get_err_text(authctxt->krb5_ctx, problem));
                else
index 8df6a6dfcabbd910313e620f770503c02432b2ed..2787d2948b5062e5c0dac0bf1742d9ca3451a8da 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-options.c,v 1.21 2002/01/29 14:32:03 markus Exp $");
+RCSID("$OpenBSD: auth-options.c,v 1.24 2002/05/13 20:44:58 markus Exp $");
 
 #include "packet.h"
 #include "xmalloc.h"
@@ -20,7 +20,10 @@ RCSID("$OpenBSD: auth-options.c,v 1.21 2002/01/29 14:32:03 markus Exp $");
 #include "channels.h"
 #include "auth-options.h"
 #include "servconf.h"
+#include "bufaux.h"
 #include "misc.h"
+#include "monitor_wrap.h"
+#include "auth.h"
 
 /* Flags set authorized_keys flags */
 int no_port_forwarding_flag = 0;
@@ -54,6 +57,7 @@ auth_clear_options(void)
                forced_command = NULL;
        }
        channel_clear_permitted_opens();
+       auth_debug_reset();
 }
 
 /*
@@ -75,28 +79,28 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
        while (*opts && *opts != ' ' && *opts != '\t') {
                cp = "no-port-forwarding";
                if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       packet_send_debug("Port forwarding disabled.");
+                       auth_debug_add("Port forwarding disabled.");
                        no_port_forwarding_flag = 1;
                        opts += strlen(cp);
                        goto next_option;
                }
                cp = "no-agent-forwarding";
                if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       packet_send_debug("Agent forwarding disabled.");
+                       auth_debug_add("Agent forwarding disabled.");
                        no_agent_forwarding_flag = 1;
                        opts += strlen(cp);
                        goto next_option;
                }
                cp = "no-X11-forwarding";
                if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       packet_send_debug("X11 forwarding disabled.");
+                       auth_debug_add("X11 forwarding disabled.");
                        no_x11_forwarding_flag = 1;
                        opts += strlen(cp);
                        goto next_option;
                }
                cp = "no-pty";
                if (strncasecmp(opts, cp, strlen(cp)) == 0) {
-                       packet_send_debug("Pty allocation disabled.");
+                       auth_debug_add("Pty allocation disabled.");
                        no_pty_flag = 1;
                        opts += strlen(cp);
                        goto next_option;
@@ -119,14 +123,14 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                        if (!*opts) {
                                debug("%.100s, line %lu: missing end quote",
                                    file, linenum);
-                               packet_send_debug("%.100s, line %lu: missing end quote",
+                               auth_debug_add("%.100s, line %lu: missing end quote",
                                    file, linenum);
                                xfree(forced_command);
                                forced_command = NULL;
                                goto bad_option;
                        }
                        forced_command[i] = 0;
-                       packet_send_debug("Forced command: %.900s", forced_command);
+                       auth_debug_add("Forced command: %.900s", forced_command);
                        opts++;
                        goto next_option;
                }
@@ -151,13 +155,13 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                        if (!*opts) {
                                debug("%.100s, line %lu: missing end quote",
                                    file, linenum);
-                               packet_send_debug("%.100s, line %lu: missing end quote",
+                               auth_debug_add("%.100s, line %lu: missing end quote",
                                    file, linenum);
                                xfree(s);
                                goto bad_option;
                        }
                        s[i] = 0;
-                       packet_send_debug("Adding to environment: %.900s", s);
+                       auth_debug_add("Adding to environment: %.900s", s);
                        debug("Adding to environment: %.900s", s);
                        opts++;
                        new_envstring = xmalloc(sizeof(struct envstring));
@@ -188,7 +192,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                        if (!*opts) {
                                debug("%.100s, line %lu: missing end quote",
                                    file, linenum);
-                               packet_send_debug("%.100s, line %lu: missing end quote",
+                               auth_debug_add("%.100s, line %lu: missing end quote",
                                    file, linenum);
                                xfree(patterns);
                                goto bad_option;
@@ -202,7 +206,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                                    "correct key but not from a permitted "
                                    "host (host=%.200s, ip=%.200s).",
                                    pw->pw_name, remote_host, remote_ip);
-                               packet_send_debug("Your host '%.200s' is not "
+                               auth_debug_add("Your host '%.200s' is not "
                                    "permitted to use this key for login.",
                                    remote_host);
                                /* deny access */
@@ -233,7 +237,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                        if (!*opts) {
                                debug("%.100s, line %lu: missing end quote",
                                    file, linenum);
-                               packet_send_debug("%.100s, line %lu: missing end quote",
+                               auth_debug_add("%.100s, line %lu: missing end quote",
                                    file, linenum);
                                xfree(patterns);
                                goto bad_option;
@@ -244,7 +248,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                            sscanf(patterns, "%255[^/]/%5[0-9]", host, sport) != 2) {
                                debug("%.100s, line %lu: Bad permitopen specification "
                                    "<%.100s>", file, linenum, patterns);
-                               packet_send_debug("%.100s, line %lu: "
+                               auth_debug_add("%.100s, line %lu: "
                                    "Bad permitopen specification", file, linenum);
                                xfree(patterns);
                                goto bad_option;
@@ -252,7 +256,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
                        if ((port = a2port(sport)) == 0) {
                                debug("%.100s, line %lu: Bad permitopen port <%.100s>",
                                    file, linenum, sport);
-                               packet_send_debug("%.100s, line %lu: "
+                               auth_debug_add("%.100s, line %lu: "
                                    "Bad permitopen port", file, linenum);
                                xfree(patterns);
                                goto bad_option;
@@ -276,14 +280,22 @@ next_option:
                opts++;
                /* Process the next option. */
        }
+
+       if (!use_privsep)
+               auth_debug_send();
+
        /* grant access */
        return 1;
 
 bad_option:
        log("Bad options in %.100s file, line %lu: %.50s",
            file, linenum, opts);
-       packet_send_debug("Bad options in %.100s file, line %lu: %.50s",
+       auth_debug_add("Bad options in %.100s file, line %lu: %.50s",
            file, linenum, opts);
+
+       if (!use_privsep)
+               auth_debug_send();
+
        /* deny access */
        return 0;
 }
index 687c95ccd0cbfea5e484159e9829e1046adf46fb..4b4c2f9d795372a3ebd1de46cdcfe58d22f7f754 100644 (file)
@@ -28,6 +28,7 @@
 #include "ssh.h"
 #include "xmalloc.h"
 #include "log.h"
+#include "auth.h"
 #include "auth-pam.h"
 #include "servconf.h"
 #include "canohost.h"
@@ -199,10 +200,11 @@ void do_pam_cleanup_proc(void *context)
 }
 
 /* Attempt password authentation using PAM */
-int auth_pam_password(struct passwd *pw, const char *password)
+int auth_pam_password(Authctxt *authctxt, const char *password)
 {
        extern ServerOptions options;
        int pam_retval;
+       struct passwd *pw = authctxt->pw;
 
        do_pam_set_conv(&conv);
 
@@ -247,15 +249,18 @@ int do_pam_account(char *username, char *remote_user)
        }
 
        pam_retval = pam_acct_mgmt(__pamh, 0);
+       debug2("pam_acct_mgmt() = %d", pam_retval);
        switch (pam_retval) {
                case PAM_SUCCESS:
                        /* This is what we want */
                        break;
+#if 0
                case PAM_NEW_AUTHTOK_REQD:
                        message_cat(&__pam_msg, NEW_AUTHTOK_MSG);
                        /* flag that password change is necessary */
                        password_change_required = 1;
                        break;
+#endif
                default:
                        log("PAM rejected by account configuration[%d]: "
                            "%.200s", pam_retval, PAM_STRERROR(__pamh, 
@@ -294,6 +299,9 @@ void do_pam_setcred(int init)
 {
        int pam_retval;
 
+       if (__pamh == NULL)
+               return;
+
        do_pam_set_conv(&conv);
 
        debug("PAM establishing creds");
index 30e4df51081077b7ae1a30827589a054981e8a7d..fabd3d04288f2e8c9b8ef74549aa8eff42ea0a2a 100644 (file)
@@ -7,7 +7,7 @@
 
 void start_pam(const char *user);
 void finish_pam(void);
-int auth_pam_password(struct passwd *pw, const char *password);
+int auth_pam_password(Authctxt *authctxt, const char *password);
 char **fetch_pam_environment(void);
 int do_pam_authenticate(int flags);
 int do_pam_account(char *username, char *remote_user);
index 095b9ba27c9b43e7eba6c5bd2c9de28cbb10b704..ad3bd3552209b83d43f5d8f6eda58bc4227d0613 100644 (file)
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-passwd.c,v 1.24 2002/03/04 12:43:06 markus Exp $");
-
-#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
+RCSID("$OpenBSD: auth-passwd.c,v 1.26 2002/05/10 02:30:12 mouring Exp $");
 
 #include "packet.h"
 #include "log.h"
 #include "servconf.h"
 #include "auth.h"
 
-#ifdef HAVE_CRYPT_H
-# include <crypt.h>
-#endif
-#ifdef WITH_AIXAUTHENTICATE
-# include <login.h>
-#endif
-#ifdef __hpux
-# include <hpsecurity.h>
-# include <prot.h>
-#endif
-#ifdef HAVE_SCO_PROTECTED_PW
-# include <sys/security.h>
-# include <sys/audit.h>
-# include <prot.h>
-#endif /* HAVE_SCO_PROTECTED_PW */
-#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
-# include <shadow.h>
-#endif
-#if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
-# include <sys/label.h>
-# include <sys/audit.h>
-# include <pwdadj.h>
-#endif
-#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
-# include "md5crypt.h"
-#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
-
-#ifdef HAVE_CYGWIN
-#undef ERROR
-#include <windows.h>
-#include <sys/cygwin.h>
-#define is_winnt       (GetVersion() < 0x80000000)
-#endif
-
+#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
+/* Don't need any of these headers for the PAM or SIA cases */
+# ifdef HAVE_CRYPT_H
+#  include <crypt.h>
+# endif
+# ifdef WITH_AIXAUTHENTICATE
+#  include <login.h>
+# endif
+# ifdef __hpux
+#  include <hpsecurity.h>
+#  include <prot.h>
+# endif
+# ifdef HAVE_SECUREWARE
+#  include <sys/security.h>
+#  include <sys/audit.h>
+#  include <prot.h>
+# endif /* HAVE_SECUREWARE */
+# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
+#  include <shadow.h>
+# endif
+# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
+#  include <sys/label.h>
+#  include <sys/audit.h>
+#  include <pwdadj.h>
+# endif
+# if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
+#  include "md5crypt.h"
+# endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
+
+# ifdef HAVE_CYGWIN
+#  undef ERROR
+#  include <windows.h>
+#  include <sys/cygwin.h>
+#  define is_winnt       (GetVersion() < 0x80000000)
+# endif
+#endif /* !USE_PAM && !HAVE_OSF_SIA */
 
 extern ServerOptions options;
 
@@ -89,16 +89,22 @@ extern ServerOptions options;
 int
 auth_password(Authctxt *authctxt, const char *password)
 {
+#if defined(USE_PAM)
+       if (*password == '\0' && options.permit_empty_passwd == 0)
+               return 0;
+       return auth_pam_password(authctxt, password);
+#elif defined(HAVE_OSF_SIA)
+       if (*password == '\0' && options.permit_empty_passwd == 0)
+               return 0;
+       return auth_sia_password(authctxt, password);
+#else
        struct passwd * pw = authctxt->pw;
        char *encrypted_password;
        char *pw_password;
        char *salt;
-#ifdef __hpux
-       struct pr_passwd *spw;
-#endif
-#ifdef HAVE_SCO_PROTECTED_PW
+#if defined(__hpux) || defined(HAVE_SECUREWARE)
        struct pr_passwd *spw;
-#endif /* HAVE_SCO_PROTECTED_PW */
+#endif /* __hpux || HAVE_SECUREWARE */
 #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
        struct spwd *spw;
 #endif
@@ -174,21 +180,20 @@ auth_password(Authctxt *authctxt, const char *password)
                pw_password = spw->sp_pwdp;
 #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
 
-#ifdef HAVE_SCO_PROTECTED_PW
-       spw = getprpwnam(pw->pw_name);
-       if (spw != NULL)
-               pw_password = spw->ufld.fd_encrypt;
-#endif /* HAVE_SCO_PROTECTED_PW */
-
 #if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
        if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
                pw_password = spw->pwa_passwd;
 #endif /* defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) */
 
-#if defined(__hpux)
+#ifdef HAVE_SECUREWARE
+       if ((spw = getprpwnam(pw->pw_name)) != NULL)
+               pw_password = spw->ufld.fd_encrypt;
+#endif /* HAVE_SECUREWARE */
+
+#if defined(__hpux) && !defined(HAVE_SECUREWARE)
        if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
                pw_password = spw->ufld.fd_encrypt;
-#endif /* defined(__hpux) */
+#endif /* defined(__hpux) && !defined(HAVE_SECUREWARE) */
 
        /* Check for users with no password. */
        if ((password[0] == '\0') && (pw_password[0] == '\0'))
@@ -205,21 +210,21 @@ auth_password(Authctxt *authctxt, const char *password)
        else
                encrypted_password = crypt(password, salt);
 #else /* HAVE_MD5_PASSWORDS */
-# ifdef __hpux
+# if defined(__hpux) && !defined(HAVE_SECUREWARE)
        if (iscomsec())
                encrypted_password = bigcrypt(password, salt);
        else
                encrypted_password = crypt(password, salt);
 # else
-#  ifdef HAVE_SCO_PROTECTED_PW
+#  ifdef HAVE_SECUREWARE
        encrypted_password = bigcrypt(password, salt);
 #  else
        encrypted_password = crypt(password, salt);
-#  endif /* HAVE_SCO_PROTECTED_PW */
-# endif /* __hpux */
+#  endif /* HAVE_SECUREWARE */
+# endif /* __hpux && !defined(HAVE_SECUREWARE) */
 #endif /* HAVE_MD5_PASSWORDS */
 
        /* Authentication is accepted if the encrypted passwords are identical. */
        return (strcmp(encrypted_password, pw_password) == 0);
-}
 #endif /* !USE_PAM && !HAVE_OSF_SIA */
+}
index d1b7ae996d50947a5aa46b572ec8bd018b74541d..d7848d04c4dd6ba0fdb56efcb91ac9823d8c9f6c 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-rh-rsa.c,v 1.29 2002/03/04 12:43:06 markus Exp $");
+RCSID("$OpenBSD: auth-rh-rsa.c,v 1.34 2002/03/25 09:25:06 markus Exp $");
 
 #include "packet.h"
 #include "uidswap.h"
@@ -25,37 +25,48 @@ RCSID("$OpenBSD: auth-rh-rsa.c,v 1.29 2002/03/04 12:43:06 markus Exp $");
 #include "auth.h"
 #include "canohost.h"
 
-/*
- * Tries to authenticate the user using the .rhosts file and the host using
- * its host key.  Returns true if authentication succeeds.
- */
+#include "monitor_wrap.h"
+
+/* import */
+extern ServerOptions options;
 
 int
-auth_rhosts_rsa(struct passwd *pw, const char *client_user, Key *client_host_key)
+auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost,
+    Key *client_host_key)
 {
-       extern ServerOptions options;
-       const char *canonical_hostname;
        HostStatus host_status;
 
-       debug("Trying rhosts with RSA host authentication for client user %.100s", client_user);
-
-       if (pw == NULL || client_host_key == NULL || client_host_key->rsa == NULL)
-               return 0;
-
        /* Check if we would accept it using rhosts authentication. */
-       if (!auth_rhosts(pw, client_user))
+       if (!auth_rhosts(pw, cuser))
                return 0;
 
-       canonical_hostname = get_canonical_hostname(
-           options.verify_reverse_mapping);
-
-       debug("Rhosts RSA authentication: canonical host %.900s", canonical_hostname);
-
        host_status = check_key_in_hostfiles(pw, client_host_key,
-           canonical_hostname, _PATH_SSH_SYSTEM_HOSTFILE,
+           chost, _PATH_SSH_SYSTEM_HOSTFILE,
            options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE);
 
-       if (host_status != HOST_OK) {
+       return (host_status == HOST_OK);
+}
+
+/*
+ * Tries to authenticate the user using the .rhosts file and the host using
+ * its host key.  Returns true if authentication succeeds.
+ */
+int
+auth_rhosts_rsa(struct passwd *pw, char *cuser, Key *client_host_key)
+{
+       char *chost;
+
+       debug("Trying rhosts with RSA host authentication for client user %.100s",
+           cuser);
+
+       if (pw == NULL || client_host_key == NULL ||
+           client_host_key->rsa == NULL)
+               return 0;
+
+       chost = (char *)get_canonical_hostname(options.verify_reverse_mapping);
+       debug("Rhosts RSA authentication: canonical host %.900s", chost);
+
+       if (!PRIVSEP(auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key))) {
                debug("Rhosts with RSA host authentication denied: unknown or invalid host key");
                packet_send_debug("Your host key cannot be verified: unknown or invalid host key.");
                return 0;
@@ -63,9 +74,9 @@ auth_rhosts_rsa(struct passwd *pw, const char *client_user, Key *client_host_key
        /* A matching host key was found and is known. */
 
        /* Perform the challenge-response dialog with the client for the host key. */
-       if (!auth_rsa_challenge_dialog(client_host_key->rsa)) {
+       if (!auth_rsa_challenge_dialog(client_host_key)) {
                log("Client on %.800s failed to respond correctly to host authentication.",
-                   canonical_hostname);
+                   chost);
                return 0;
        }
        /*
@@ -74,7 +85,7 @@ auth_rhosts_rsa(struct passwd *pw, const char *client_user, Key *client_host_key
         */
 
        verbose("Rhosts with RSA host authentication accepted for %.100s, %.100s on %.700s.",
-          pw->pw_name, client_user, canonical_hostname);
+          pw->pw_name, cuser, chost);
        packet_send_debug("Rhosts with RSA host authentication accepted.");
        return 1;
 }
index bd15261f705946054ca1a9def56e1051792dc511..afca1f7c63c3acd2f379b378da0fa0ac38c25b52 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-rhosts.c,v 1.27 2002/03/04 12:43:06 markus Exp $");
+RCSID("$OpenBSD: auth-rhosts.c,v 1.28 2002/05/13 21:26:49 markus Exp $");
 
 #include "packet.h"
 #include "uidswap.h"
@@ -26,6 +26,7 @@ RCSID("$OpenBSD: auth-rhosts.c,v 1.27 2002/03/04 12:43:06 markus Exp $");
 
 /* import */
 extern ServerOptions options;
+extern int use_privsep;
 
 /*
  * This function processes an rhosts-style file (.rhosts, .shosts, or
@@ -69,7 +70,7 @@ check_rhosts_file(const char *filename, const char *hostname,
                 */
                switch (sscanf(buf, "%s %s %s", hostbuf, userbuf, dummy)) {
                case 0:
-                       packet_send_debug("Found empty line in %.100s.", filename);
+                       auth_debug_add("Found empty line in %.100s.", filename);
                        continue;
                case 1:
                        /* Host name only. */
@@ -79,7 +80,7 @@ check_rhosts_file(const char *filename, const char *hostname,
                        /* Got both host and user name. */
                        break;
                case 3:
-                       packet_send_debug("Found garbage in %.100s.", filename);
+                       auth_debug_add("Found garbage in %.100s.", filename);
                        continue;
                default:
                        /* Weird... */
@@ -106,8 +107,8 @@ check_rhosts_file(const char *filename, const char *hostname,
                /* Check for empty host/user names (particularly '+'). */
                if (!host[0] || !user[0]) {
                        /* We come here if either was '+' or '-'. */
-                       packet_send_debug("Ignoring wild host/user names in %.100s.",
-                                         filename);
+                       auth_debug_add("Ignoring wild host/user names in %.100s.",
+                           filename);
                        continue;
                }
                /* Verify that host name matches. */
@@ -130,8 +131,8 @@ check_rhosts_file(const char *filename, const char *hostname,
 
                /* If the entry was negated, deny access. */
                if (negated) {
-                       packet_send_debug("Matched negative entry in %.100s.",
-                                         filename);
+                       auth_debug_add("Matched negative entry in %.100s.",
+                            filename);
                        return 0;
                }
                /* Accept authentication. */
@@ -153,16 +154,14 @@ int
 auth_rhosts(struct passwd *pw, const char *client_user)
 {
        const char *hostname, *ipaddr;
-       int ret;
 
        hostname = get_canonical_hostname(options.verify_reverse_mapping);
        ipaddr = get_remote_ipaddr();
-       ret = auth_rhosts2(pw, client_user, hostname, ipaddr);
-       return ret;
+       return auth_rhosts2(pw, client_user, hostname, ipaddr);
 }
 
-int
-auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
+static int
+auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostname,
     const char *ipaddr)
 {
        char buf[1024];
@@ -205,13 +204,13 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
        if (pw->pw_uid != 0) {
                if (check_rhosts_file(_PATH_RHOSTS_EQUIV, hostname, ipaddr,
                    client_user, pw->pw_name)) {
-                       packet_send_debug("Accepted for %.100s [%.100s] by /etc/hosts.equiv.",
+                       auth_debug_add("Accepted for %.100s [%.100s] by /etc/hosts.equiv.",
                            hostname, ipaddr);
                        return 1;
                }
                if (check_rhosts_file(_PATH_SSH_HOSTS_EQUIV, hostname, ipaddr,
                    client_user, pw->pw_name)) {
-                       packet_send_debug("Accepted for %.100s [%.100s] by %.100s.",
+                       auth_debug_add("Accepted for %.100s [%.100s] by %.100s.",
                            hostname, ipaddr, _PATH_SSH_HOSTS_EQUIV);
                        return 1;
                }
@@ -221,19 +220,19 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
         * not group or world writable.
         */
        if (stat(pw->pw_dir, &st) < 0) {
-               log("Rhosts authentication refused for %.100s: no home directory %.200s",
-                   pw->pw_name, pw->pw_dir);
-               packet_send_debug("Rhosts authentication refused for %.100s: no home directory %.200s",
-                                 pw->pw_name, pw->pw_dir);
+               log("Rhosts authentication refused for %.100s: "
+                   "no home directory %.200s", pw->pw_name, pw->pw_dir);
+               auth_debug_add("Rhosts authentication refused for %.100s: "
+                   "no home directory %.200s", pw->pw_name, pw->pw_dir);
                return 0;
        }
        if (options.strict_modes &&
            ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
            (st.st_mode & 022) != 0)) {
-               log("Rhosts authentication refused for %.100s: bad ownership or modes for home directory.",
-                   pw->pw_name);
-               packet_send_debug("Rhosts authentication refused for %.100s: bad ownership or modes for home directory.",
-                                 pw->pw_name);
+               log("Rhosts authentication refused for %.100s: "
+                   "bad ownership or modes for home directory.", pw->pw_name);
+               auth_debug_add("Rhosts authentication refused for %.100s: "
+                   "bad ownership or modes for home directory.", pw->pw_name);
                return 0;
        }
        /* Temporarily use the user's uid. */
@@ -259,21 +258,23 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
                    (st.st_mode & 022) != 0)) {
                        log("Rhosts authentication refused for %.100s: bad modes for %.200s",
                            pw->pw_name, buf);
-                       packet_send_debug("Bad file modes for %.200s", buf);
+                       auth_debug_add("Bad file modes for %.200s", buf);
                        continue;
                }
                /* Check if we have been configured to ignore .rhosts and .shosts files. */
                if (options.ignore_rhosts) {
-                       packet_send_debug("Server has been configured to ignore %.100s.",
-                                         rhosts_files[rhosts_file_index]);
+                       auth_debug_add("Server has been configured to ignore %.100s.",
+                           rhosts_files[rhosts_file_index]);
                        continue;
                }
                /* Check if authentication is permitted by the file. */
                if (check_rhosts_file(buf, hostname, ipaddr, client_user, pw->pw_name)) {
-                       packet_send_debug("Accepted by %.100s.",
-                                         rhosts_files[rhosts_file_index]);
+                       auth_debug_add("Accepted by %.100s.",
+                           rhosts_files[rhosts_file_index]);
                        /* Restore the privileged uid. */
                        restore_uid();
+                       auth_debug_add("Accepted host %s ip %s client_user %s server_user %s",
+                               hostname, ipaddr, client_user, pw->pw_name);
                        return 1;
                }
        }
@@ -282,3 +283,16 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
        restore_uid();
        return 0;
 }
+
+int
+auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
+    const char *ipaddr)
+{
+       int ret;
+
+       auth_debug_reset();
+       ret = auth_rhosts2_raw(pw, client_user, hostname, ipaddr);
+       if (!use_privsep)
+               auth_debug_send();
+       return ret;
+}
index f7ae03cfdaf13009c5b28b2e5fc6d5dd92a86aa6..493f14b1147a6eb7b691ce56a246c8b57cc40162 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.50 2001/12/28 14:50:54 markus Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.55 2002/03/29 19:18:33 stevesk Exp $");
 
 #include <openssl/rsa.h>
 #include <openssl/md5.h>
@@ -32,6 +32,8 @@ RCSID("$OpenBSD: auth-rsa.c,v 1.50 2001/12/28 14:50:54 markus Exp $");
 #include "servconf.h"
 #include "auth.h"
 #include "hostfile.h"
+#include "monitor_wrap.h"
+#include "ssh.h"
 
 /* import */
 extern ServerOptions options;
@@ -52,6 +54,58 @@ extern u_char session_id[16];
  * description of the options.
  */
 
+BIGNUM *
+auth_rsa_generate_challenge(Key *key)
+{
+       BIGNUM *challenge;
+       BN_CTX *ctx;
+
+       if ((challenge = BN_new()) == NULL)
+               fatal("auth_rsa_generate_challenge: BN_new() failed");
+       /* Generate a random challenge. */
+       BN_rand(challenge, 256, 0, 0);
+       if ((ctx = BN_CTX_new()) == NULL)
+               fatal("auth_rsa_generate_challenge: BN_CTX_new() failed");
+       BN_mod(challenge, challenge, key->rsa->n, ctx);
+       BN_CTX_free(ctx);
+
+       return challenge;
+}
+
+int
+auth_rsa_verify_response(Key *key, BIGNUM *challenge, u_char response[16])
+{
+       u_char buf[32], mdbuf[16];
+       MD5_CTX md;
+       int len;
+
+       /* don't allow short keys */
+       if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
+               error("auth_rsa_verify_response: n too small: %d bits",
+                   BN_num_bits(key->rsa->n));
+               return (0);
+       }
+
+       /* The response is MD5 of decrypted challenge plus session id. */
+       len = BN_num_bytes(challenge);
+       if (len <= 0 || len > 32)
+               fatal("auth_rsa_verify_response: bad challenge length %d", len);
+       memset(buf, 0, 32);
+       BN_bn2bin(challenge, buf + 32 - len);
+       MD5_Init(&md);
+       MD5_Update(&md, buf, 32);
+       MD5_Update(&md, session_id, 16);
+       MD5_Final(mdbuf, &md);
+
+       /* Verify that the response is the original challenge. */
+       if (memcmp(response, mdbuf, 16) != 0) {
+               /* Wrong answer. */
+               return (0);
+       }
+       /* Correct answer. */
+       return (1);
+}
+
 /*
  * Performs the RSA authentication challenge-response dialog with the client,
  * and returns true (non-zero) if the client gave the correct answer to
@@ -59,29 +113,19 @@ extern u_char session_id[16];
  */
 
 int
-auth_rsa_challenge_dialog(RSA *pk)
+auth_rsa_challenge_dialog(Key *key)
 {
        BIGNUM *challenge, *encrypted_challenge;
-       BN_CTX *ctx;
-       u_char buf[32], mdbuf[16], response[16];
-       MD5_CTX md;
-       u_int i;
-       int len;
+       u_char response[16];
+       int i, success;
 
        if ((encrypted_challenge = BN_new()) == NULL)
                fatal("auth_rsa_challenge_dialog: BN_new() failed");
-       if ((challenge = BN_new()) == NULL)
-               fatal("auth_rsa_challenge_dialog: BN_new() failed");
 
-       /* Generate a random challenge. */
-       BN_rand(challenge, 256, 0, 0);
-       if ((ctx = BN_CTX_new()) == NULL)
-               fatal("auth_rsa_challenge_dialog: BN_CTX_new() failed");
-       BN_mod(challenge, challenge, pk->n, ctx);
-       BN_CTX_free(ctx);
+       challenge = PRIVSEP(auth_rsa_generate_challenge(key));
 
        /* Encrypt the challenge with the public key. */
-       rsa_public_encrypt(encrypted_challenge, challenge, pk);
+       rsa_public_encrypt(encrypted_challenge, challenge, key->rsa);
 
        /* Send the encrypted challenge to the client. */
        packet_start(SSH_SMSG_AUTH_RSA_CHALLENGE);
@@ -96,48 +140,26 @@ auth_rsa_challenge_dialog(RSA *pk)
                response[i] = packet_get_char();
        packet_check_eom();
 
-       /* The response is MD5 of decrypted challenge plus session id. */
-       len = BN_num_bytes(challenge);
-       if (len <= 0 || len > 32)
-               fatal("auth_rsa_challenge_dialog: bad challenge length %d", len);
-       memset(buf, 0, 32);
-       BN_bn2bin(challenge, buf + 32 - len);
-       MD5_Init(&md);
-       MD5_Update(&md, buf, 32);
-       MD5_Update(&md, session_id, 16);
-       MD5_Final(mdbuf, &md);
+       success = PRIVSEP(auth_rsa_verify_response(key, challenge, response));
        BN_clear_free(challenge);
-
-       /* Verify that the response is the original challenge. */
-       if (memcmp(response, mdbuf, 16) != 0) {
-               /* Wrong answer. */
-               return 0;
-       }
-       /* Correct answer. */
-       return 1;
+       return (success);
 }
 
 /*
- * Performs the RSA authentication dialog with the client.  This returns
- * 0 if the client could not be authenticated, and 1 if authentication was
- * successful.  This may exit if there is a serious protocol violation.
+ * check if there's user key matching client_n,
+ * return key if login is allowed, NULL otherwise
  */
 
 int
-auth_rsa(struct passwd *pw, BIGNUM *client_n)
+auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
 {
        char line[8192], *file;
-       int authenticated;
+       int allowed = 0;
        u_int bits;
        FILE *f;
        u_long linenum = 0;
        struct stat st;
        Key *key;
-       char *fp;
-
-       /* no user given */
-       if (pw == NULL)
-               return 0;
 
        /* Temporarily use the user's uid. */
        temporarily_use_uid(pw);
@@ -151,29 +173,27 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
                /* Restore the privileged uid. */
                restore_uid();
                xfree(file);
-               return 0;
+               return (0);
        }
        /* Open the file containing the authorized keys. */
        f = fopen(file, "r");
        if (!f) {
                /* Restore the privileged uid. */
                restore_uid();
-               packet_send_debug("Could not open %.900s for reading.", file);
-               packet_send_debug("If your home is on an NFS volume, it may need to be world-readable.");
                xfree(file);
-               return 0;
+               return (0);
        }
        if (options.strict_modes &&
            secure_filename(f, file, pw, line, sizeof(line)) != 0) {
                xfree(file);
                fclose(f);
                log("Authentication refused: %s", line);
-               packet_send_debug("Authentication refused: %s", line);
                restore_uid();
-               return 0;
+               return (0);
        }
-       /* Flag indicating whether authentication has succeeded. */
-       authenticated = 0;
+
+       /* Flag indicating whether the key is allowed. */
+       allowed = 0;
 
        key = key_new(KEY_RSA1);
 
@@ -238,32 +258,8 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
                if (!auth_parse_options(pw, options, file, linenum))
                        continue;
 
-               /* Perform the challenge-response dialog for this key. */
-               if (!auth_rsa_challenge_dialog(key->rsa)) {
-                       /* Wrong response. */
-                       verbose("Wrong response to RSA authentication challenge.");
-                       packet_send_debug("Wrong response to RSA authentication challenge.");
-                       /*
-                        * Break out of the loop. Otherwise we might send
-                        * another challenge and break the protocol.
-                        */
-                       break;
-               }
-               /*
-                * Correct response.  The client has been successfully
-                * authenticated. Note that we have not yet processed the
-                * options; this will be reset if the options cause the
-                * authentication to be rejected.
-                * Break out of the loop if authentication was successful;
-                * otherwise continue searching.
-                */
-               authenticated = 1;
-
-               fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
-               verbose("Found matching %s key: %s",
-                   key_type(key), fp);
-               xfree(fp);
-
+               /* break out, this key is allowed */
+               allowed = 1;
                break;
        }
 
@@ -274,13 +270,58 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
        xfree(file);
        fclose(f);
 
-       key_free(key);
-
-       if (authenticated)
-               packet_send_debug("RSA authentication accepted.");
+       /* return key if allowed */
+       if (allowed && rkey != NULL)
+               *rkey = key;
        else
+               key_free(key);
+       return (allowed);
+}
+
+/*
+ * Performs the RSA authentication dialog with the client.  This returns
+ * 0 if the client could not be authenticated, and 1 if authentication was
+ * successful.  This may exit if there is a serious protocol violation.
+ */
+int
+auth_rsa(struct passwd *pw, BIGNUM *client_n)
+{
+       Key *key;
+       char *fp;
+
+       /* no user given */
+       if (pw == NULL)
+               return 0;
+
+       if (!PRIVSEP(auth_rsa_key_allowed(pw, client_n, &key))) {
                auth_clear_options();
+               return (0);
+       }
+
+       /* Perform the challenge-response dialog for this key. */
+       if (!auth_rsa_challenge_dialog(key)) {
+               /* Wrong response. */
+               verbose("Wrong response to RSA authentication challenge.");
+               packet_send_debug("Wrong response to RSA authentication challenge.");
+               /*
+                * Break out of the loop. Otherwise we might send
+                * another challenge and break the protocol.
+                */
+               key_free(key);
+               return (0);
+       }
+       /*
+        * Correct response.  The client has been successfully
+        * authenticated. Note that we have not yet processed the
+        * options; this will be reset if the options cause the
+        * authentication to be rejected.
+        */
+       fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
+       verbose("Found matching %s key: %s",
+           key_type(key), fp);
+       xfree(fp);
+       key_free(key);
 
-       /* Return authentication result. */
-       return authenticated;
+       packet_send_debug("RSA authentication accepted.");
+       return (1);
 }
index 8585f5d6b6fb4ba541eda0a9d0f4d7a24326ea78..58b17c16f3f6142be71b632697456c06432b68fb 100644 (file)
@@ -1,7 +1,32 @@
+/*
+ * Copyright (c) 2002 Chris Adams.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "includes.h"
 
 #ifdef HAVE_OSF_SIA
 #include "ssh.h"
+#include "auth.h"
 #include "auth-sia.h"
 #include "log.h"
 #include "servconf.h"
@@ -23,15 +48,16 @@ extern char **saved_argv;
 extern int errno;
 
 int
-auth_sia_password(char *user, char *pass)
+auth_sia_password(Authctxt *authctxt, char *pass)
 {
        int ret;
        SIAENTITY *ent = NULL;
        const char *host;
+       char *user = authctxt->user;
 
        host = get_canonical_hostname(options.verify_reverse_mapping);
 
-       if (!user || !pass)
+       if (!user || !pass || pass[0] == '\0')
                return(0);
 
        if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, NULL, 0,
@@ -39,7 +65,7 @@ auth_sia_password(char *user, char *pass)
                return(0);
 
        if ((ret = sia_ses_authent(NULL, pass, ent)) != SIASUCCESS) {
-               error("couldn't authenticate %s from %s", user, host);
+               error("Couldn't authenticate %s from %s", user, host);
                if (ret & SIASTOP)
                        sia_ses_release(&ent);
                return(0);
@@ -53,7 +79,6 @@ auth_sia_password(char *user, char *pass)
 void
 session_setup_sia(char *user, char *tty)
 {
-       int ret;
        struct passwd *pw;
        SIAENTITY *ent = NULL;
        const char *host;
@@ -62,46 +87,38 @@ session_setup_sia(char *user, char *tty)
 
        if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, tty, 0,
            NULL) != SIASUCCESS) {
-               error("sia_ses_init failed");
-               exit(1);
+               fatal("sia_ses_init failed");
        }
 
        if ((pw = getpwnam(user)) == NULL) {
                sia_ses_release(&ent);
-               error("getpwnam(%s) failed: %s", user, strerror(errno));
-               exit(1);
+               fatal("getpwnam: no user: %s", user);
        }
        if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) {
                sia_ses_release(&ent);
-               error("sia_make_entity_pwd failed");
-               exit(1);
+               fatal("sia_make_entity_pwd failed");
        }
 
        ent->authtype = SIA_A_NONE;
        if (sia_ses_estab(sia_collect_trm, ent) != SIASUCCESS) {
-               error("couldn't establish session for %s from %s", user,
+               fatal("Couldn't establish session for %s from %s", user,
                    host);
-               exit(1);
        }
 
        if (setpriority(PRIO_PROCESS, 0, 0) == -1) {
                sia_ses_release(&ent);
-               error("setpriority failed: %s", strerror (errno));
-               exit(1);
+               fatal("setpriority: %s", strerror (errno));
        }
 
        if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) {
-               error("couldn't launch session for %s from %s", user, host);
-               exit(1);
+               fatal("Couldn't launch session for %s from %s", user, host);
        }
        
        sia_ses_release(&ent);
 
        if (setreuid(geteuid(), geteuid()) < 0) {
-               error("setreuid failed: %s", strerror (errno));
-               exit(1);
+               fatal("setreuid: %s", strerror(errno));
        }
 }
 
 #endif /* HAVE_OSF_SIA */
-
index eaa933322d494019831fd0e91f78b654f89d9781..caa584132d3133d6ba6f40758c6d6354663ca6a8 100644 (file)
@@ -1,8 +1,32 @@
+/*
+ * Copyright (c) 2002 Chris Adams.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "includes.h"
 
 #ifdef HAVE_OSF_SIA
 
-int    auth_sia_password(char *user, char *pass);
+int    auth_sia_password(Authctxt *authctxt, char *pass);
 void   session_setup_sia(char *user, char *tty);
 
 #endif /* HAVE_OSF_SIA */
index df19f75072d17190f078f22fc10de50a6406ad05..b64550443c7620067625a1466e158d7d154e57d5 100644 (file)
@@ -22,7 +22,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: auth-skey.c,v 1.16 2002/01/12 13:10:29 markus Exp $");
+RCSID("$OpenBSD: auth-skey.c,v 1.18 2002/05/13 02:37:39 itojun Exp $");
 
 #ifdef SKEY
 
@@ -30,6 +30,7 @@ RCSID("$OpenBSD: auth-skey.c,v 1.16 2002/01/12 13:10:29 markus Exp $");
 
 #include "xmalloc.h"
 #include "auth.h"
+#include "monitor_wrap.h"
 
 static void *
 skey_init_ctx(Authctxt *authctxt)
@@ -37,9 +38,7 @@ skey_init_ctx(Authctxt *authctxt)
        return authctxt;
 }
 
-#define PROMPT "\nS/Key Password: "
-
-static int
+int
 skey_query(void *ctx, char **name, char **infotxt,
     u_int* numprompts, char ***prompts, u_int **echo_on)
 {
@@ -58,16 +57,16 @@ skey_query(void *ctx, char **name, char **infotxt,
        *echo_on = xmalloc(*numprompts * sizeof(u_int));
        (*echo_on)[0] = 0;
 
-       len = strlen(challenge) + strlen(PROMPT) + 1;
+       len = strlen(challenge) + strlen(SKEY_PROMPT) + 1;
        p = xmalloc(len);
        strlcpy(p, challenge, len);
-       strlcat(p, PROMPT, len);
+       strlcat(p, SKEY_PROMPT, len);
        (*prompts)[0] = p;
 
        return 0;
 }
 
-static int
+int
 skey_respond(void *ctx, u_int numresponses, char **responses)
 {
        Authctxt *authctxt = ctx;
@@ -93,4 +92,12 @@ KbdintDevice skey_device = {
        skey_respond,
        skey_free_ctx
 };
+
+KbdintDevice mm_skey_device = {
+       "skey",
+       skey_init_ctx,
+       mm_skey_query,
+       mm_skey_respond,
+       skey_free_ctx
+};
 #endif /* SKEY */
index 26dce5b670ab3792e363d779285586a200a6c7ee..7c2faeed1ae94c5d6a350255cf9bb863da6164c5 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.35 2002/03/01 13:12:10 markus Exp $");
+RCSID("$OpenBSD: auth.c,v 1.42 2002/05/13 20:44:58 markus Exp $");
 
 #ifdef HAVE_LOGIN_H
 #include <login.h>
@@ -48,10 +48,17 @@ RCSID("$OpenBSD: auth.c,v 1.35 2002/03/01 13:12:10 markus Exp $");
 #include "bufaux.h"
 #include "uidswap.h"
 #include "tildexpand.h"
+#include "misc.h"
+#include "bufaux.h"
+#include "packet.h"
 
 /* import */
 extern ServerOptions options;
 
+/* Debugging messages */
+Buffer auth_debug;
+int auth_debug_init;
+
 /*
  * Check if the user is allowed to log in via ssh. If user is listed
  * in DenyUsers or one of user's groups is listed in DenyGroups, false
@@ -79,18 +86,35 @@ allowed_user(struct passwd * pw)
        if (!pw || !pw->pw_name)
                return 0;
 
+#define        DAY             (24L * 60 * 60) /* 1 day in seconds */
        spw = getspnam(pw->pw_name);
        if (spw != NULL) {
-               int days = time(NULL) / 86400;
+               time_t today = time(NULL) / DAY;
+               debug3("allowed_user: today %d sp_expire %d sp_lstchg %d"
+                   " sp_max %d", (int)today, (int)spw->sp_expire,
+                   (int)spw->sp_lstchg, (int)spw->sp_max);
+
+               /*
+                * We assume account and password expiration occurs the
+                * day after the day specified.
+                */
+               if (spw->sp_expire != -1 && today > spw->sp_expire) {
+                       log("Account %.100s has expired", pw->pw_name);
+                       return 0;
+               }
 
-               /* Check account expiry */
-               if ((spw->sp_expire >= 0) && (days > spw->sp_expire))
+               if (spw->sp_lstchg == 0) {
+                       log("User %.100s password has expired (root forced)",
+                           pw->pw_name);
                        return 0;
+               }
 
-               /* Check password expiry */
-               if ((spw->sp_lstchg >= 0) && (spw->sp_max >= 0) &&
-                   (days > (spw->sp_lstchg + spw->sp_max)))
+               if (spw->sp_max != -1 &&
+                   today > spw->sp_lstchg + spw->sp_max) {
+                       log("User %.100s password has expired (password aged)",
+                           pw->pw_name);
                        return 0;
+               }
        }
 #else
        /* Shouldn't be called if pw is NULL, but better safe than sorry... */
@@ -110,7 +134,8 @@ allowed_user(struct passwd * pw)
                    pw->pw_name, shell);
                return 0;
        }
-       if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) {
+       if (S_ISREG(st.st_mode) == 0 ||
+           (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) {
                log("User %.100s not allowed because shell %.100s is not executable",
                    pw->pw_name, shell);
                return 0;
@@ -124,17 +149,17 @@ allowed_user(struct passwd * pw)
        /* Return false if user is listed in DenyUsers */
        if (options.num_deny_users > 0) {
                for (i = 0; i < options.num_deny_users; i++)
-                       if (match_user(pw->pw_name, hostname, ipaddr,
+                       if (match_user(pw->pw_name, hostname, ipaddr,
                            options.deny_users[i])) {
-                               log("User %.100s not allowed because listed in DenyUsers",
-                                   pw->pw_name);
+                               log("User %.100s not allowed because listed in DenyUsers",
+                                   pw->pw_name);
                                return 0;
                        }
        }
        /* Return false if AllowUsers isn't empty and user isn't listed there */
        if (options.num_allow_users > 0) {
                for (i = 0; i < options.num_allow_users; i++)
-                       if (match_user(pw->pw_name, hostname, ipaddr,
+                       if (match_user(pw->pw_name, hostname, ipaddr,
                            options.allow_users[i]))
                                break;
                /* i < options.num_allow_users iff we break for loop */
@@ -438,3 +463,77 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
        }
        return 0;
 }
+
+struct passwd *
+getpwnamallow(const char *user)
+{
+#ifdef HAVE_LOGIN_CAP
+       extern login_cap_t *lc;
+#ifdef BSD_AUTH
+       auth_session_t *as;
+#endif
+#endif
+       struct passwd *pw;
+
+       pw = getpwnam(user);
+       if (pw == NULL || !allowed_user(pw))
+               return (NULL);
+#ifdef HAVE_LOGIN_CAP
+       if ((lc = login_getclass(pw->pw_class)) == NULL) {
+               debug("unable to get login class: %s", user);
+               return (NULL);
+       }
+#ifdef BSD_AUTH
+       if ((as = auth_open()) == NULL || auth_setpwd(as, pw) != 0 ||
+           auth_approval(NULL, lc, pw->pw_name, "ssh") <= 0) {
+               debug("Approval failure for %s", user);
+               pw = NULL;
+       }
+       if (as != NULL)
+               auth_close(as);
+#endif
+#endif
+       if (pw != NULL)
+               return (pwcopy(pw));
+       return (NULL);
+}
+
+void
+auth_debug_add(const char *fmt,...)
+{
+       char buf[1024];
+       va_list args;
+
+       if (!auth_debug_init)
+               return;
+
+       va_start(args, fmt);
+       vsnprintf(buf, sizeof(buf), fmt, args);
+       va_end(args);
+       buffer_put_cstring(&auth_debug, buf);
+}
+
+void
+auth_debug_send(void)
+{
+       char *msg;
+
+       if (!auth_debug_init)
+               return;
+       while (buffer_len(&auth_debug)) {
+               msg = buffer_get_string(&auth_debug, NULL);
+               packet_send_debug("%s", msg);
+               xfree(msg);
+       }
+}
+
+void
+auth_debug_reset(void)
+{
+       if (auth_debug_init)
+               buffer_clear(&auth_debug);
+       else {
+               buffer_init(&auth_debug);
+               auth_debug_init = 1;
+       }
+}
index c7175405d83d3e165c0ad95592575267f5ff4c85..2211c5b2adfa618ebf08ee6cb7c71a068156bd6d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: auth.h,v 1.29 2002/03/04 17:27:39 stevesk Exp $       */
+/*     $OpenBSD: auth.h,v 1.37 2002/05/13 20:44:58 markus Exp $        */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -88,14 +88,21 @@ struct KbdintDevice
        void    (*free_ctx)(void *ctx);
 };
 
-int     auth_rhosts(struct passwd *, const char *);
+int      auth_rhosts(struct passwd *, const char *);
 int
 auth_rhosts2(struct passwd *, const char *, const char *, const char *);
 
-int     auth_rhosts_rsa(struct passwd *, const char *, Key *);
+int     auth_rhosts_rsa(struct passwd *, char *, Key *);
 int      auth_password(Authctxt *, const char *);
 int      auth_rsa(struct passwd *, BIGNUM *);
-int      auth_rsa_challenge_dialog(RSA *);
+int      auth_rsa_challenge_dialog(Key *);
+BIGNUM *auth_rsa_generate_challenge(Key *);
+int     auth_rsa_verify_response(Key *, BIGNUM *, u_char[]);
+int     auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **);
+
+int     auth_rhosts_rsa_key_allowed(struct passwd *, char *, char *, Key *);
+int     hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
+int     user_key_allowed(struct passwd *, Key *);
 
 #ifdef KRB4
 #include <krb.h>
@@ -121,18 +128,27 @@ void      krb5_cleanup_proc(void *authctxt);
 #include "auth-pam.h"
 #include "auth2-pam.h"
 
-void   do_authentication(void);
-void   do_authentication2(void);
+Authctxt *do_authentication(void);
+Authctxt *do_authentication2(void);
 
 Authctxt *authctxt_new(void);
 void   auth_log(Authctxt *, int, char *, char *);
 void   userauth_finish(Authctxt *, int, char *);
 int    auth_root_allowed(char *);
 
+char   *auth2_read_banner(void);
+
+void   privsep_challenge_enable(void);
+
 int    auth2_challenge(Authctxt *, char *);
 void   auth2_challenge_stop(Authctxt *);
+int    bsdauth_query(void *, char **, char **, u_int *, char ***, u_int **);
+int    bsdauth_respond(void *, u_int, char **);
+int    skey_query(void *, char **, char **, u_int *, char ***, u_int **);
+int    skey_respond(void *, u_int, char **);
 
 int    allowed_user(struct passwd *);
+struct passwd * getpwnamallow(const char *user);
 
 char   *get_challenge(Authctxt *);
 int    verify_response(Authctxt *, const char *);
@@ -150,8 +166,20 @@ HostStatus
 check_key_in_hostfiles(struct passwd *, Key *, const char *,
     const char *, const char *);
 
+/* hostkey handling */
+Key    *get_hostkey_by_index(int);
+Key    *get_hostkey_by_type(int);
+int     get_hostkey_index(Key *);
+int     ssh1_session_key(BIGNUM *);
+
+/* debug messages during authentication */
+void    auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2)));
+void    auth_debug_send(void);
+void    auth_debug_reset(void);
+
 #define AUTH_FAIL_MAX 6
 #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2)
 #define AUTH_FAIL_MSG "Too many authentication failures for %.100s"
 
+#define SKEY_PROMPT "\nS/Key Password: "
 #endif
index c2d99895f430b563bf7d09af9d4bf58248049a45..1f6fcb29b9a921f134c257d6a0005b0be44c2274 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth1.c,v 1.35 2002/02/03 17:53:25 markus Exp $");
+RCSID("$OpenBSD: auth1.c,v 1.40 2002/04/10 08:21:47 markus Exp $");
 
 #include "xmalloc.h"
 #include "rsa.h"
@@ -24,8 +24,8 @@ RCSID("$OpenBSD: auth1.c,v 1.35 2002/02/03 17:53:25 markus Exp $");
 #include "auth.h"
 #include "channels.h"
 #include "session.h"
-#include "misc.h"
 #include "uidswap.h"
+#include "monitor_wrap.h"
 
 /* import */
 extern ServerOptions options;
@@ -84,13 +84,7 @@ do_authloop(Authctxt *authctxt)
 #if defined(KRB4) || defined(KRB5)
            (!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
 #endif
-#ifdef USE_PAM
-           auth_pam_password(pw, "")) {
-#elif defined(HAVE_OSF_SIA)
-           0) {
-#else
-           auth_password(authctxt, "")) {
-#endif
+           PRIVSEP(auth_password(authctxt, ""))) {
                auth_log(authctxt, 1, "without authentication", "");
                return;
        }
@@ -246,17 +240,8 @@ do_authloop(Authctxt *authctxt)
                        password = packet_get_string(&dlen);
                        packet_check_eom();
 
-#ifdef USE_PAM
-                       /* Do PAM auth with password */
-                       authenticated = auth_pam_password(pw, password);
-#elif defined(HAVE_OSF_SIA)
-                       /* Do SIA auth with password */
-                       authenticated = auth_sia_password(authctxt->user, 
-                           password);
-#else /* !USE_PAM && !HAVE_OSF_SIA */
                        /* Try authentication with the password. */
-                       authenticated = auth_password(authctxt, password);
-#endif /* USE_PAM */
+                       authenticated = PRIVSEP(auth_password(authctxt, password));
 
                        memset(password, 0, strlen(password));
                        xfree(password);
@@ -321,7 +306,8 @@ do_authloop(Authctxt *authctxt)
                        authenticated = 0;
 #endif
 #ifdef USE_PAM
-               if (authenticated && !do_pam_account(pw->pw_name, client_user))
+               if (!use_privsep && authenticated && 
+                   !do_pam_account(pw->pw_name, client_user))
                        authenticated = 0;
 #endif
 
@@ -355,13 +341,12 @@ do_authloop(Authctxt *authctxt)
  * Performs authentication of an incoming connection.  Session key has already
  * been exchanged and encryption is enabled.
  */
-void
+Authctxt *
 do_authentication(void)
 {
        Authctxt *authctxt;
-       struct passwd *pw;
        u_int ulen;
-       char *p, *user, *style = NULL;
+       char *user, *style = NULL;
 
        /* Get the name of the user that we wish to log in as. */
        packet_read_expect(SSH_CMSG_USER);
@@ -373,29 +358,31 @@ do_authentication(void)
        if ((style = strchr(user, ':')) != NULL)
                *style++ = '\0';
 
+#ifdef KRB5
        /* XXX - SSH.com Kerberos v5 braindeath. */
-       if ((p = strchr(user, '@')) != NULL)
-               *p = '\0';
+       if ((datafellows & SSH_BUG_K5USER) &&
+           options.kerberos_authentication) {
+               char *p;
+               if ((p = strchr(user, '@')) != NULL)
+                       *p = '\0';
+       }
+#endif
 
        authctxt = authctxt_new();
        authctxt->user = user;
        authctxt->style = style;
 
        /* Verify that the user is a valid user. */
-       pw = getpwnam(user);
-       if (pw && allowed_user(pw)) {
+       if ((authctxt->pw = PRIVSEP(getpwnamallow(user))) != NULL)
                authctxt->valid = 1;
-               pw = pwcopy(pw);
-       } else {
+       else
                debug("do_authentication: illegal user %s", user);
-               pw = NULL;
-       }
-       authctxt->pw = pw;
 
-       setproctitle("%s", pw ? user : "unknown");
+       setproctitle("%s%s", authctxt->pw ? user : "unknown",
+           use_privsep ? " [net]" : "");
 
 #ifdef USE_PAM
-       start_pam(pw == NULL ? "NOUSER" : user);
+       PRIVSEP(start_pam(authctxt->pw == NULL ? "NOUSER" : user));
 #endif
 
        /*
@@ -403,7 +390,8 @@ do_authentication(void)
         * the server. (Unless you are running Windows)
         */
 #ifndef HAVE_CYGWIN
-       if (getuid() != 0 && pw && pw->pw_uid != getuid())
+       if (!use_privsep && getuid() != 0 && authctxt->pw &&
+           authctxt->pw->pw_uid != getuid())
                packet_disconnect("Cannot change user when server not running as root.");
 #endif
 
@@ -418,6 +406,5 @@ do_authentication(void)
        packet_send();
        packet_write_wait();
 
-       /* Perform session preparation. */
-       do_authenticated(authctxt);
+       return (authctxt);
 }
index 9f1d932756b3283e6a59aa16949c12db438edc34..38f955a022cf562b4df26c8c12f02b01c2e701c9 100644 (file)
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: auth2-chall.c,v 1.16 2002/01/13 17:57:37 markus Exp $");
+RCSID("$OpenBSD: auth2-chall.c,v 1.17 2002/03/18 17:50:31 provos Exp $");
 
 #include "ssh2.h"
 #include "auth.h"
@@ -310,3 +310,22 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
        userauth_finish(authctxt, authenticated, method);
        xfree(method);
 }
+
+void
+privsep_challenge_enable(void)
+{
+#ifdef BSD_AUTH
+       extern KbdintDevice mm_bsdauth_device;
+#endif
+#ifdef SKEY
+       extern KbdintDevice mm_skey_device;
+#endif
+       /* As long as SSHv1 has devices[0] hard coded this is fine */
+#ifdef BSD_AUTH
+       devices[0] = &mm_bsdauth_device;
+#else
+#ifdef SKEY
+       devices[0] = &mm_skey_device;
+#endif
+#endif
+}
index f2a801ecc8207b4dbee68803c9f0cc62b9cfd7e4..6bcc5652787fbac9e67e5205bee4291bb3331d3a 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.85 2002/02/24 19:14:59 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.91 2002/05/13 02:37:39 itojun Exp $");
 
 #include <openssl/evp.h>
 
@@ -47,17 +47,18 @@ RCSID("$OpenBSD: auth2.c,v 1.85 2002/02/24 19:14:59 markus Exp $");
 #include "pathnames.h"
 #include "uidswap.h"
 #include "auth-options.h"
-#include "misc.h"
 #include "hostfile.h"
 #include "canohost.h"
 #include "match.h"
+#include "monitor_wrap.h"
+#include "atomicio.h"
 
 /* import */
 extern ServerOptions options;
 extern u_char *session_id2;
 extern int session_id2_len;
 
-static Authctxt        *x_authctxt = NULL;
+Authctxt *x_authctxt = NULL;
 static int one = 1;
 
 typedef struct Authmethod Authmethod;
@@ -75,8 +76,8 @@ static void input_userauth_request(int, u_int32_t, void *);
 /* helper */
 static Authmethod *authmethod_lookup(const char *);
 static char *authmethods_get(void);
-static int user_key_allowed(struct passwd *, Key *);
-static int hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
+int user_key_allowed(struct passwd *, Key *);
+int hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
 
 /* auth */
 static void userauth_banner(void);
@@ -109,7 +110,7 @@ Authmethod authmethods[] = {
  * loop until authctxt->success == TRUE
  */
 
-void
+Authctxt *
 do_authentication2(void)
 {
        Authctxt *authctxt = authctxt_new();
@@ -121,11 +122,14 @@ do_authentication2(void)
                options.kbd_interactive_authentication = 1;
        if (options.pam_authentication_via_kbd_int)
                options.kbd_interactive_authentication = 1;
+       if (use_privsep)
+               options.pam_authentication_via_kbd_int = 0;
 
        dispatch_init(&dispatch_protocol_error);
        dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
        dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt);
-       do_authenticated(authctxt);
+
+       return (authctxt);
 }
 
 static void
@@ -183,25 +187,26 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
 
        if (authctxt->attempt++ == 0) {
                /* setup auth context */
-               struct passwd *pw = NULL;
-               pw = getpwnam(user);
-               if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) {
-                       authctxt->pw = pwcopy(pw);
+               authctxt->pw = PRIVSEP(getpwnamallow(user));
+               if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
                        authctxt->valid = 1;
                        debug2("input_userauth_request: setting up authctxt for %s", user);
 #ifdef USE_PAM
-                       start_pam(pw->pw_name);
+                       PRIVSEP(start_pam(authctxt->pw->pw_name));
 #endif
                } else {
                        log("input_userauth_request: illegal user %s", user);
 #ifdef USE_PAM
-                       start_pam("NOUSER");
+                       PRIVSEP(start_pam("NOUSER"));
 #endif
                }
-               setproctitle("%s", pw ? user : "unknown");
+               setproctitle("%s%s", authctxt->pw ? user : "unknown",
+                   use_privsep ? " [net]" : "");
                authctxt->user = xstrdup(user);
                authctxt->service = xstrdup(service);
                authctxt->style = style ? xstrdup(style) : NULL;
+               if (use_privsep)
+                       mm_inform_authserv(service, style);
        } else if (strcmp(user, authctxt->user) != 0 ||
            strcmp(service, authctxt->service) != 0) {
                packet_disconnect("Change of username or service not allowed: "
@@ -240,8 +245,8 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
                authenticated = 0;
 
 #ifdef USE_PAM
-       if (authenticated && authctxt->user && !do_pam_account(authctxt->user,
-           NULL))
+       if (!use_privsep && authenticated && authctxt->user && 
+           !do_pam_account(authctxt->user, NULL))
                authenticated = 0;
 #endif /* USE_PAM */
 
@@ -279,25 +284,45 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
        }
 }
 
-static void
-userauth_banner(void)
+char *
+auth2_read_banner(void)
 {
        struct stat st;
        char *banner = NULL;
        off_t len, n;
        int fd;
 
-       if (options.banner == NULL || (datafellows & SSH_BUG_BANNER))
-               return;
-       if ((fd = open(options.banner, O_RDONLY)) < 0)
-               return;
-       if (fstat(fd, &st) < 0)
-               goto done;
+       if ((fd = open(options.banner, O_RDONLY)) == -1)
+               return (NULL);
+       if (fstat(fd, &st) == -1) {
+               close(fd);
+               return (NULL);
+       }
        len = st.st_size;
        banner = xmalloc(len + 1);
-       if ((n = read(fd, banner, len)) < 0)
-               goto done;
+       n = atomicio(read, fd, banner, len);
+       close(fd);
+
+       if (n != len) {
+               free(banner);
+               return (NULL);
+       }
        banner[n] = '\0';
+       
+       return (banner);
+}
+
+static void
+userauth_banner(void)
+{
+       char *banner = NULL;
+
+       if (options.banner == NULL || (datafellows & SSH_BUG_BANNER))
+               return;
+
+       if ((banner = PRIVSEP(auth2_read_banner())) == NULL)
+               goto done;
+
        packet_start(SSH2_MSG_USERAUTH_BANNER);
        packet_put_cstring(banner);
        packet_put_cstring("");         /* language, unused */
@@ -306,7 +331,6 @@ userauth_banner(void)
 done:
        if (banner)
                xfree(banner);
-       close(fd);
        return;
 }
 
@@ -327,13 +351,7 @@ userauth_none(Authctxt *authctxt)
        if (check_nt_auth(1, authctxt->pw) == 0)
                return(0);
 #endif
-#ifdef USE_PAM
-       return auth_pam_password(authctxt->pw, "");
-#elif defined(HAVE_OSF_SIA)
-       return 0;
-#else /* !HAVE_OSF_SIA && !USE_PAM */
-       return auth_password(authctxt, "");
-#endif /* USE_PAM */
+       return PRIVSEP(auth_password(authctxt, ""));
 }
 
 static int
@@ -352,13 +370,7 @@ userauth_passwd(Authctxt *authctxt)
 #ifdef HAVE_CYGWIN
            check_nt_auth(1, authctxt->pw) &&
 #endif
-#ifdef USE_PAM
-           auth_pam_password(authctxt->pw, password) == 1)
-#elif defined(HAVE_OSF_SIA)
-           auth_sia_password(authctxt->user, password) == 1)
-#else /* !USE_PAM && !HAVE_OSF_SIA */
-           auth_password(authctxt, password) == 1)
-#endif /* USE_PAM */
+           PRIVSEP(auth_password(authctxt, password)) == 1)
                authenticated = 1;
        memset(password, 0, len);
        xfree(password);
@@ -467,8 +479,10 @@ userauth_pubkey(Authctxt *authctxt)
                buffer_dump(&b);
 #endif
                /* test for correct signature */
-               if (user_key_allowed(authctxt->pw, key) &&
-                   key_verify(key, sig, slen, buffer_ptr(&b), buffer_len(&b)) == 1)
+               authenticated = 0;
+               if (PRIVSEP(user_key_allowed(authctxt->pw, key)) &&
+                   PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b),
+                               buffer_len(&b))) == 1)
                        authenticated = 1;
                buffer_clear(&b);
                xfree(sig);
@@ -484,7 +498,7 @@ userauth_pubkey(Authctxt *authctxt)
                 * if a user is not allowed to login. is this an
                 * issue? -markus
                 */
-               if (user_key_allowed(authctxt->pw, key)) {
+               if (PRIVSEP(user_key_allowed(authctxt->pw, key))) {
                        packet_start(SSH2_MSG_USERAUTH_PK_OK);
                        packet_put_string(pkalg, alen);
                        packet_put_string(pkblob, blen);
@@ -572,8 +586,10 @@ userauth_hostbased(Authctxt *authctxt)
        buffer_dump(&b);
 #endif
        /* test for allowed key and correct signature */
-       if (hostbased_key_allowed(authctxt->pw, cuser, chost, key) &&
-           key_verify(key, sig, slen, buffer_ptr(&b), buffer_len(&b)) == 1)
+       authenticated = 0;
+       if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) &&
+           PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b),
+                       buffer_len(&b))) == 1)
                authenticated = 1;
 
        buffer_clear(&b);
@@ -730,7 +746,7 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
 }
 
 /* check whether given key is in .ssh/authorized_keys* */
-static int
+int
 user_key_allowed(struct passwd *pw, Key *key)
 {
        int success;
@@ -750,7 +766,7 @@ user_key_allowed(struct passwd *pw, Key *key)
 }
 
 /* return 1 if given hostkey is allowed */
-static int
+int
 hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
     Key *key)
 {
index fa764358faccdb7045278552282f5f480e94254e..f3050d64db29e9bbed21f2d5c67fb258d09594eb 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: authfd.c,v 1.48 2002/02/24 19:14:59 markus Exp $");
+RCSID("$OpenBSD: authfd.c,v 1.49 2002/03/21 22:44:05 rees Exp $");
 
 #include <openssl/evp.h>
 
@@ -532,7 +532,7 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key)
 }
 
 int
-ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id)
+ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id, const char *pin)
 {
        Buffer msg;
        int type;
@@ -541,6 +541,7 @@ ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id)
        buffer_put_char(&msg, add ? SSH_AGENTC_ADD_SMARTCARD_KEY :
            SSH_AGENTC_REMOVE_SMARTCARD_KEY);
        buffer_put_cstring(&msg, reader_id);
+       buffer_put_cstring(&msg, pin);
        if (ssh_request_reply(auth, &msg, &msg) == 0) {
                buffer_free(&msg);
                return 0;
index 0f2ca7a2ecfff35c9e515bd6324a12c548b8f3e3..e8a0ec88f482a19448e49e85e2713b1e2c3a4541 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: authfd.h,v 1.23 2002/03/04 17:27:39 stevesk Exp $     */
+/*     $OpenBSD: authfd.h,v 1.24 2002/03/21 22:44:05 rees Exp $        */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -67,7 +67,7 @@ Key   *ssh_get_next_identity(AuthenticationConnection *, char **, int);
 int     ssh_add_identity(AuthenticationConnection *, Key *, const char *);
 int     ssh_remove_identity(AuthenticationConnection *, Key *);
 int     ssh_remove_all_identities(AuthenticationConnection *, int);
-int     ssh_update_card(AuthenticationConnection *, int, const char *);
+int     ssh_update_card(AuthenticationConnection *, int, const char *, const char *);
 
 int
 ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16],
diff --git a/openssh/autom4te-2.53.cache/output.0 b/openssh/autom4te-2.53.cache/output.0
new file mode 100644 (file)
index 0000000..0138c2a
--- /dev/null
@@ -0,0 +1,17707 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.53.
+@%:@ 
+@%:@ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+@%:@ Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+    { $as_unset LANG || test "${LANG+set}" != set; } ||
+      { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+      { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+      { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+      { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+      { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+      { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+      { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+      { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conftest.sh
+  echo  "exit 0"   >>conftest.sh
+  chmod +x conftest.sh
+  if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conftest.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="ssh.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+              localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$0" : 'X\(//\)[^/]' \| \
+         X"$0" : 'X\(//\)$' \| \
+         X"$0" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-largefile     omit support for large files
+  --enable-suid-ssh       Install ssh as suid root (default)
+  --disable-suid-ssh      Install ssh without suid bit
+  --disable-lastlog       disable use of lastlog even if detected no
+  --disable-utmp          disable use of utmp even if detected no
+  --disable-utmpx         disable use of utmpx even if detected no
+  --disable-wtmp          disable use of wtmp even if detected no
+  --disable-wtmpx         disable use of wtmpx even if detected no
+  --disable-libutil       disable use of libutil (login() etc.) no
+  --disable-pututline     disable use of pututline() etc. (uwtmp) no
+  --disable-pututxline    disable use of pututxline() etc. (uwtmpx) no
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-osfsia           Enable Digital Unix SIA
+  --with-cflags           Specify additional flags to pass to compiler
+  --with-cppflags         Specify additional flags to pass to preprocessor 
+  --with-ldflags          Specify additional flags to pass to linker
+  --with-libs             Specify additional libraries to link with
+  --without-rpath         Disable auto-added -R linker paths
+  --with-zlib=PATH        Use zlib in PATH
+  --with-skey[=PATH]      Enable S/Key support
+                            (optionally in PATH)
+  --with-tcp-wrappers[=PATH]      Enable tcpwrappers support
+                            (optionally in PATH)
+  --with-pam              Enable PAM support 
+  --with-ssl-dir=PATH     Specify path to OpenSSL installation 
+  --with-rand-helper      Use subprocess to gather strong randomness 
+  --with-prngd-port=PORT  read entropy from PRNGD/EGD TCP localhost:PORT
+  --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
+  --with-entropy-timeout  Specify entropy gathering command timeout (msec)
+  --with-privsep-user=user Specify non-privileged user for privilege separation
+  --with-sectok           Enable smartcard support using libsectok
+  --with-opensc=PFX       Enable smartcard support using OpenSC
+  --with-kerberos5=PATH   Enable Kerberos 5 support
+  --with-kerberos4=PATH   Enable Kerberos 4 support
+  --with-afs=PATH         Enable AFS support
+  --with-rsh=PATH         Specify path to remote shell program 
+  --with-privsep-path=xxx Path for privilege seperation chroot 
+  --with-xauth=PATH       Specify path to xauth program 
+  --with-mantype=man|cat|doc  Set man page type
+  --with-md5-passwords    Enable use of MD5 passwords
+  --without-shadow        Disable shadow password support
+  --with-ipaddr-display   Use ip address instead of hostname in \$DISPLAY
+  --with-default-path=    Specify default \$PATH environment for server
+  --with-superuser-path=  Specify different path for super-user
+  --with-ipv4-default     Use IPv4 by connections unless '-6' specified
+  --with-4in6             Check for and convert IPv4 in IPv6 mapped addresses
+  --with-bsd-auth         Enable BSD auth support
+  --with-pid-dir=PATH     Specify location of ssh.pid file
+  --with-lastlog=FILE|DIR specify lastlog location common locations
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+           test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.53.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+  case $ac_arg in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n ) continue ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    continue ;;
+  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  case " $ac_configure_args " in
+    *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+    *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+       ac_sep=" " ;;
+  esac
+  # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+    cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core core.* *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+        ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $@%:@ != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$as_dir/$ac_word" ${1+"$@"}
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
+                ls a.out conftest 2>/dev/null;
+                ls a.* conftest.* 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
+    a.out ) # We found the default executable, but exeext='' is most
+            # certainly right.
+            break;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+@%:@ifndef __cplusplus
+  choke me
+@%:@endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <stdlib.h>
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianess by grep'ing values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ _ascii (); _ebcdic (); 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+int
+main ()
+{
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+  yes)
+    
+cat >>confdefs.h <<\_ACEOF
+@%:@define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+  no)
+     ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianess
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianess
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <assert.h>
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+  
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <assert.h>
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+# Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $AR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AR="$AR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+AR=$ac_cv_path_AR
+
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+for ac_prog in perl5 perl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+
+if test -n "$PERL"; then
+  echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$PERL" && break
+done
+
+
+# Extract the first word of "ent", so it can be a program name with args.
+set dummy ent; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ENT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ENT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+ENT=$ac_cv_path_ENT
+
+if test -n "$ENT"; then
+  echo "$as_me:$LINENO: result: $ENT" >&5
+echo "${ECHO_T}$ENT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+for ac_prog in filepriv
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_FILEPRIV+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $FILEPRIV in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FILEPRIV="$FILEPRIV" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="/sbin:/usr/sbin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_FILEPRIV="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+FILEPRIV=$ac_cv_path_FILEPRIV
+
+if test -n "$FILEPRIV"; then
+  echo "$as_me:$LINENO: result: $FILEPRIV" >&5
+echo "${ECHO_T}$FILEPRIV" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$FILEPRIV" && break
+done
+test -n "$FILEPRIV" || FILEPRIV="true"
+
+# Extract the first word of "bash", so it can be a program name with args.
+set dummy bash; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEST_MINUS_S_SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
+
+if test -n "$TEST_MINUS_S_SH"; then
+  echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
+echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "ksh", so it can be a program name with args.
+set dummy ksh; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEST_MINUS_S_SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
+
+if test -n "$TEST_MINUS_S_SH"; then
+  echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
+echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEST_MINUS_S_SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
+
+if test -n "$TEST_MINUS_S_SH"; then
+  echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
+echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_SH+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $SH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SH="$SH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+SH=$ac_cv_path_SH
+
+if test -n "$SH"; then
+  echo "$as_me:$LINENO: result: $SH" >&5
+echo "${ECHO_T}$SH" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+# System features
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+  enableval="$enable_largefile"
+  
+fi; 
+if test "$enable_largefile" != no; then
+
+  echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+         cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+        rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext 
+        CC="$CC -n32"
+        rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sys_largefile_CC=' -n32'; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext 
+         break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
+
+  echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  while :; do
+  ac_cv_sys_file_offset_bits=no
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@define _FILE_OFFSET_BITS 64
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sys_file_offset_bits=64; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
+if test "$ac_cv_sys_file_offset_bits" != no; then
+  
+cat >>confdefs.h <<_ACEOF
+@%:@define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+
+fi
+rm -f conftest*
+  echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_large_files+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  while :; do
+  ac_cv_sys_large_files=no
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@define _LARGE_FILES 1
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sys_large_files=1; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
+if test "$ac_cv_sys_large_files" != no; then
+  
+cat >>confdefs.h <<_ACEOF
+@%:@define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+
+fi
+rm -f conftest*
+fi
+
+
+if test -z "$AR" ; then
+       { { echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
+echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Use LOGIN_PROGRAM from environment if possible
+if test ! -z "$LOGIN_PROGRAM" ; then
+       cat >>confdefs.h <<_ACEOF
+@%:@define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
+_ACEOF
+
+else
+       # Search for login
+       # Extract the first word of "login", so it can be a program name with args.
+set dummy login; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $LOGIN_PROGRAM_FALLBACK in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
+
+if test -n "$LOGIN_PROGRAM_FALLBACK"; then
+  echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5
+echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
+               cat >>confdefs.h <<_ACEOF
+@%:@define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
+_ACEOF
+
+       fi
+fi
+
+if test -z "$LD" ; then
+       LD=$CC
+fi
+
+       
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX                  -qlanglvl=ansi
+# Ultrix and OSF/1     -std1
+# HP-UX 10.20 and later        -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4                 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext 
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#ifndef __cplusplus
+static $ac_kw int static_foo () {return 0; }
+$ac_kw int foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  no) 
+cat >>confdefs.h <<\_ACEOF
+@%:@define inline 
+_ACEOF
+ ;;
+  *)  cat >>confdefs.h <<_ACEOF
+@%:@define inline $ac_cv_c_inline
+_ACEOF
+ ;;
+esac
+
+if test "$GCC" = "yes" || test "$GCC" = "egcs"; then 
+       CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
+fi
+
+# Check for some target-specific stuff
+case "$host" in
+*-*-aix*)
+       AFS_LIBS="-lld"
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+       if (test "$LD" != "gcc" && test -z "$blibpath"); then
+               echo "$as_me:$LINENO: checking if linkage editor ($LD) accepts -blibpath" >&5
+echo $ECHO_N "checking if linkage editor ($LD) accepts -blibpath... $ECHO_C" >&6
+               saved_LDFLAGS="$LDFLAGS"
+               LDFLAGS="$LDFLAGS -blibpath:/usr/lib:/lib:/usr/local/lib"
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                               blibpath="/usr/lib:/lib:/usr/local/lib"
+                       
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 
+               
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+               LDFLAGS="$saved_LDFLAGS"
+       fi
+       echo "$as_me:$LINENO: checking for authenticate" >&5
+echo $ECHO_N "checking for authenticate... $ECHO_C" >&6
+if test "${ac_cv_func_authenticate+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char authenticate (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char authenticate ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_authenticate) || defined (__stub___authenticate)
+choke me
+#else
+f = authenticate;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_authenticate=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_authenticate=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5
+echo "${ECHO_T}$ac_cv_func_authenticate" >&6
+if test $ac_cv_func_authenticate = yes; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_AIXAUTHENTICATE 1
+_ACEOF
+
+fi
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_GETADDRINFO 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_REALPATH 1
+_ACEOF
+
+               cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_LASTLOG 1
+_ACEOF
+
+       ;;
+*-*-cygwin*)
+       LIBS="$LIBS /usr/lib/textmode.o"
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_CYGWIN 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_SHADOW 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define IPV4_DEFAULT 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define IP_TOS_IS_BROKEN 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define NO_X11_UNIX_SOCKETS 1
+_ACEOF
+
+       ;;
+*-*-dgux*)
+       cat >>confdefs.h <<\_ACEOF
+@%:@define IP_TOS_IS_BROKEN 1
+_ACEOF
+
+       ;;
+*-*-darwin*)
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_GETADDRINFO 1
+_ACEOF
+
+       ;;
+*-*-hpux10.26)
+       if test -z "$GCC"; then
+               CFLAGS="$CFLAGS -Ae"
+       fi
+       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
+       IPADDR_IN_DISPLAY=yes
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SECUREWARE 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NO_ENDOPT 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NEEDS_UTMPX 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_SHADOW 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMP 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define SPT_TYPE SPT_PSTAT
+_ACEOF
+
+       LIBS="$LIBS -lxnet -lsec -lsecpw"
+       disable_ptmx_check=yes
+       ;;
+*-*-hpux10*)
+       if test -z "$GCC"; then
+               CFLAGS="$CFLAGS -Ae"
+       fi
+       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
+       IPADDR_IN_DISPLAY=yes
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NO_ENDOPT 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NEEDS_UTMPX 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_SHADOW 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMP 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define SPT_TYPE SPT_PSTAT
+_ACEOF
+
+       LIBS="$LIBS -lxnet -lsec"
+       ;;
+*-*-hpux11*)
+       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
+       IPADDR_IN_DISPLAY=yes
+       cat >>confdefs.h <<\_ACEOF
+@%:@define PAM_SUN_CODEBASE 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NO_ENDOPT 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NEEDS_UTMPX 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_SHADOW 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMP 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define SPT_TYPE SPT_PSTAT
+_ACEOF
+
+       LIBS="$LIBS -lxnet -lsec"
+       ;;
+*-*-irix5*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS"
+       PATH="$PATH:/usr/etc"
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_INET_NTOA 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_ABBREV_NO_TTY 1
+_ACEOF
+
+       ;;
+*-*-irix6*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS"
+       PATH="$PATH:/usr/etc"
+       cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_IRIX_ARRAY 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_IRIX_PROJECT 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_IRIX_AUDIT 1
+_ACEOF
+
+       echo "$as_me:$LINENO: checking for jlimit_startjob" >&5
+echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6
+if test "${ac_cv_func_jlimit_startjob+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char jlimit_startjob (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char jlimit_startjob ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_jlimit_startjob) || defined (__stub___jlimit_startjob)
+choke me
+#else
+f = jlimit_startjob;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_jlimit_startjob=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_jlimit_startjob=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5
+echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6
+if test $ac_cv_func_jlimit_startjob = yes; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_IRIX_JOBS 1
+_ACEOF
+
+fi
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_INET_NTOA 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define WITH_ABBREV_NO_TTY 1
+_ACEOF
+
+       ;;
+*-*-linux*)
+       no_dev_ptmx=1
+       check_for_libcrypt_later=1
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DONT_TRY_OTHER_AF 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define PAM_TTY_KLUDGE 1
+_ACEOF
+
+       inet6_default_4in6=yes
+       ;;
+mips-sony-bsd|mips-sony-newsos4)
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_NEWS4 1
+_ACEOF
+
+       SONY=1
+       ;;
+*-*-netbsd*)
+       need_dash_r=1
+       ;;
+*-*-freebsd*)
+       check_for_libcrypt_later=1
+       ;;
+*-next-*)
+       conf_lastlog_location="/usr/adm/lastlog"
+       conf_utmp_location=/etc/utmp
+       conf_wtmp_location=/usr/adm/wtmp
+       MAIL=/usr/spool/mail
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_NEXT 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_REALPATH 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_SAVED_UIDS 1
+_ACEOF
+
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       CFLAGS="$CFLAGS"
+       ;;
+*-*-solaris*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib" 
+       need_dash_r=1
+       cat >>confdefs.h <<\_ACEOF
+@%:@define PAM_SUN_CODEBASE 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NEEDS_UTMPX 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define LOGIN_NEEDS_TERM 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define PAM_TTY_KLUDGE 1
+_ACEOF
+
+       # hardwire lastlog location (can't detect it on some versions)
+       conf_lastlog_location="/var/adm/lastlog"
+       echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5
+echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6
+       sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
+       if test "$sol2ver" -ge 8; then
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMP 1
+_ACEOF
+
+               cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_WTMP 1
+_ACEOF
+
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+       ;;
+*-*-sunos4*)
+       CPPFLAGS="$CPPFLAGS -DSUNOS4"
+       
+for ac_func in getpwanam
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define PAM_SUN_CODEBASE 1
+_ACEOF
+
+       conf_utmp_location=/etc/utmp
+       conf_wtmp_location=/var/adm/wtmp
+       conf_lastlog_location=/var/adm/lastlog
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       ;;
+*-ncr-sysv*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+       LIBS="$LIBS -lc89"
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       ;;
+*-sni-sysv*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       # /usr/ucblib MUST NOT be searched on ReliantUNIX
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+       IPADDR_IN_DISPLAY=yes
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define IP_TOS_IS_BROKEN 1
+_ACEOF
+
+       # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
+       # Attention: always take care to bind libsocket and libnsl before libc,
+       # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
+       ;;
+*-*-sysv4.2*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+#      enable_suid_ssh=no
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       ;;
+*-*-sysv5*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+#      enable_suid_ssh=no
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       ;;
+*-*-sysv*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+       ;;
+*-*-sco3.2v4*)
+       CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+       LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
+       rsh_path="/usr/bin/rcmd"
+       RANLIB=true
+       no_dev_ptmx=1
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_SYS_TERMIO_H 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SECUREWARE 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_SHADOW 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_SAVED_UIDS 1
+_ACEOF
+
+       
+
+for ac_func in getluid setluid
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+       MANTYPE=man
+       do_sco3_extra_lib_check=yes
+       ;;
+*-*-sco3.2v5*)
+       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       LDFLAGS="$LDFLAGS -L/usr/local/lib"
+       LIBS="$LIBS -lprot -lx -ltinfo -lm"
+       no_dev_ptmx=1
+       rsh_path="/usr/bin/rcmd"
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SECUREWARE 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_SHADOW 1
+_ACEOF
+
+       
+
+for ac_func in getluid setluid
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+       MANTYPE=man
+       ;;
+*-*-unicos*)
+       no_libsocket=1
+       no_libnsl=1
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
+       LIBS="$LIBS -lgen -lrsc"
+       ;;
+*-dec-osf*)
+       echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5
+echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6
+       no_osfsia=""
+       
+# Check whether --with-osfsia or --without-osfsia was given.
+if test "${with_osfsia+set}" = set; then
+  withval="$with_osfsia"
+  
+                       if test "x$withval" = "xno" ; then
+                               echo "$as_me:$LINENO: result: disabled" >&5
+echo "${ECHO_T}disabled" >&6
+                               no_osfsia=1
+                       fi
+               
+fi; 
+       if test -z "$no_osfsia" ; then
+               if test -f /etc/sia/matrix.conf; then
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_OSF_SIA 1
+_ACEOF
+
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_LOGIN 1
+_ACEOF
+
+                       LIBS="$LIBS -lsecurity -ldb -lm -laud"
+               else
+                       echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               fi
+       fi
+       ;;
+
+*-*-nto-qnx)
+       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PIPES 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define NO_X11_UNIX_SOCKETS 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define MISSING_NFDBITS 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define MISSING_HOWMANY 1
+_ACEOF
+
+       cat >>confdefs.h <<\_ACEOF
+@%:@define MISSING_FD_MASK 1
+_ACEOF
+
+       ;;
+esac
+
+# Allow user to specify flags
+
+# Check whether --with-cflags or --without-cflags was given.
+if test "${with_cflags+set}" = set; then
+  withval="$with_cflags"
+  
+               if test "x$withval" != "xno" ; then
+                       CFLAGS="$CFLAGS $withval"
+               fi
+               
+
+fi; 
+
+# Check whether --with-cppflags or --without-cppflags was given.
+if test "${with_cppflags+set}" = set; then
+  withval="$with_cppflags"
+  
+               if test "x$withval" != "xno"; then
+                       CPPFLAGS="$CPPFLAGS $withval"
+               fi
+       
+
+fi; 
+
+# Check whether --with-ldflags or --without-ldflags was given.
+if test "${with_ldflags+set}" = set; then
+  withval="$with_ldflags"
+  
+               if test "x$withval" != "xno" ; then
+                       LDFLAGS="$LDFLAGS $withval"
+               fi
+               
+
+fi; 
+
+# Check whether --with-libs or --without-libs was given.
+if test "${with_libs+set}" = set; then
+  withval="$with_libs"
+  
+               if test "x$withval" != "xno" ; then
+                       LIBS="$LIBS $withval"
+               fi
+               
+
+fi; 
+
+# Checks for header files.
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+  
+cat >>confdefs.h <<\_ACEOF
+@%:@define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in bstring.h crypt.h endian.h floatingpoint.h \
+       getopt.h glob.h lastlog.h limits.h login.h \
+       login_cap.h maillock.h netdb.h netgroup.h \
+       netinet/in_systm.h paths.h pty.h readpassphrase.h \
+       rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
+       strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
+       sys/mman.h sys/select.h sys/stat.h \
+       sys/stropts.h sys/sysmacros.h sys/time.h \
+       sys/un.h time.h ttyent.h usersec.h \
+       util.h utime.h utmp.h utmpx.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+
+
+# Checks for libraries.
+echo "$as_me:$LINENO: checking for yp_match" >&5
+echo $ECHO_N "checking for yp_match... $ECHO_C" >&6
+if test "${ac_cv_func_yp_match+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char yp_match (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char yp_match ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_yp_match) || defined (__stub___yp_match)
+choke me
+#else
+f = yp_match;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_yp_match=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_yp_match=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5
+echo "${ECHO_T}$ac_cv_func_yp_match" >&6
+if test $ac_cv_func_yp_match = yes; then
+  :
+else
+  
+echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5
+echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char yp_match ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+yp_match ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_nsl_yp_match=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_yp_match=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6
+if test $ac_cv_lib_nsl_yp_match = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBNSL 1
+_ACEOF
+
+  LIBS="-lnsl $LIBS"
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for setsockopt" >&5
+echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
+if test "${ac_cv_func_setsockopt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char setsockopt (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char setsockopt ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
+choke me
+#else
+f = setsockopt;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_setsockopt=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_setsockopt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
+if test $ac_cv_func_setsockopt = yes; then
+  :
+else
+  
+echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
+echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char setsockopt ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+setsockopt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_socket_setsockopt=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_socket_setsockopt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
+if test $ac_cv_lib_socket_setsockopt = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBSOCKET 1
+_ACEOF
+
+  LIBS="-lsocket $LIBS"
+
+fi
+
+fi
+
+
+if test "x$with_tcp_wrappers" != "xno" ; then
+    if test "x$do_sco3_extra_lib_check" = "xyes" ; then
+       echo "$as_me:$LINENO: checking for innetgr in -lrpc" >&5
+echo $ECHO_N "checking for innetgr in -lrpc... $ECHO_C" >&6
+if test "${ac_cv_lib_rpc_innetgr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrpc -lyp -lrpc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char innetgr ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+innetgr ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_rpc_innetgr=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_rpc_innetgr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rpc_innetgr" >&5
+echo "${ECHO_T}$ac_cv_lib_rpc_innetgr" >&6
+if test $ac_cv_lib_rpc_innetgr = yes; then
+  LIBS="-lrpc -lyp -lrpc $LIBS" 
+fi
+
+    fi
+fi
+
+echo "$as_me:$LINENO: checking for getspnam" >&5
+echo $ECHO_N "checking for getspnam... $ECHO_C" >&6
+if test "${ac_cv_func_getspnam+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getspnam (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char getspnam ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getspnam) || defined (__stub___getspnam)
+choke me
+#else
+f = getspnam;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_getspnam=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
+echo "${ECHO_T}$ac_cv_func_getspnam" >&6
+if test $ac_cv_func_getspnam = yes; then
+  :
+else
+  echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
+echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
+if test "${ac_cv_lib_gen_getspnam+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char getspnam ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getspnam ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_gen_getspnam=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gen_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
+echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
+if test $ac_cv_lib_gen_getspnam = yes; then
+  LIBS="$LIBS -lgen"
+fi
+
+fi
+
+
+
+# Check whether --with-rpath or --without-rpath was given.
+if test "${with_rpath+set}" = set; then
+  withval="$with_rpath"
+  
+               if test "x$withval" = "xno" ; then      
+                       need_dash_r=""
+               fi
+               if test "x$withval" = "xyes" ; then
+                       need_dash_r=1
+               fi
+       
+
+fi; 
+
+
+# Check whether --with-zlib or --without-zlib was given.
+if test "${with_zlib+set}" = set; then
+  withval="$with_zlib"
+  
+               if test "x$withval" = "xno" ; then
+                       { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5
+echo "$as_me: error: *** zlib is required ***" >&2;}
+   { (exit 1); exit 1; }; }
+               fi
+               if test -d "$withval/lib"; then
+                       if test -n "${need_dash_r}"; then
+                               LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+                       else
+                               LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+                       fi
+               else
+                       if test -n "${need_dash_r}"; then
+                               LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
+                       else
+                               LDFLAGS="-L${withval} ${LDFLAGS}"
+                       fi
+               fi
+               if test -d "$withval/include"; then
+                       CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
+               else
+                       CPPFLAGS="-I${withval} ${CPPFLAGS}"
+               fi
+       
+
+fi; 
+
+
+echo "$as_me:$LINENO: checking for deflate in -lz" >&5
+echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_deflate+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char deflate ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+deflate ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_deflate=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_z_deflate=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
+echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
+if test $ac_cv_lib_z_deflate = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5
+echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+echo "$as_me:$LINENO: checking for strcasecmp" >&5
+echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6
+if test "${ac_cv_func_strcasecmp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char strcasecmp (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char strcasecmp ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
+choke me
+#else
+f = strcasecmp;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_strcasecmp=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_strcasecmp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
+echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6
+if test $ac_cv_func_strcasecmp = yes; then
+  :
+else
+   echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
+echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char strcasecmp ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+strcasecmp ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_resolv_strcasecmp=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_strcasecmp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
+if test $ac_cv_lib_resolv_strcasecmp = yes; then
+  LIBS="$LIBS -lresolv"
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for utimes" >&5
+echo $ECHO_N "checking for utimes... $ECHO_C" >&6
+if test "${ac_cv_func_utimes+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char utimes (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char utimes ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_utimes) || defined (__stub___utimes)
+choke me
+#else
+f = utimes;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_utimes=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_utimes=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_utimes" >&5
+echo "${ECHO_T}$ac_cv_func_utimes" >&6
+if test $ac_cv_func_utimes = yes; then
+  :
+else
+   echo "$as_me:$LINENO: checking for utimes in -lc89" >&5
+echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6
+if test "${ac_cv_lib_c89_utimes+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc89  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char utimes ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+utimes ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_c89_utimes=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_c89_utimes=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5
+echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6
+if test $ac_cv_lib_c89_utimes = yes; then
+  LIBS="$LIBS -lc89"
+fi
+
+fi
+
+
+
+for ac_header in libutil.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for library containing login" >&5
+echo $ECHO_N "checking for library containing login... $ECHO_C" >&6
+if test "${ac_cv_search_login+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_login=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char login ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+login ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_login="none required"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_login" = no; then
+  for ac_lib in util bsd; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char login ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+login ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_login="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5
+echo "${ECHO_T}$ac_cv_search_login" >&6
+if test "$ac_cv_search_login" != no; then
+  test "$ac_cv_search_login" = "none required" || LIBS="$ac_cv_search_login $LIBS"
+  cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_LOGIN 1
+_ACEOF
+
+fi
+
+
+
+
+for ac_func in logout updwtmp logwtmp
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+
+for ac_func in strftime
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+else
+  # strftime is in -lintl on SCO UNIX.
+echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
+echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_strftime+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char strftime ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+strftime ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_strftime=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_intl_strftime=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
+if test $ac_cv_lib_intl_strftime = yes; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRFTIME 1
+_ACEOF
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+
+# Check for ALTDIRFUNC glob() extension
+echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5
+echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+               #include <glob.h>
+               #ifdef GLOB_ALTDIRFUNC
+               FOUNDIT
+               #endif
+       
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "FOUNDIT" >/dev/null 2>&1; then
+  
+               cat >>confdefs.h <<\_ACEOF
+@%:@define GLOB_HAS_ALTDIRFUNC 1
+_ACEOF
+
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       
+else
+  
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       
+
+fi
+rm -f conftest*
+
+
+# Check for g.gl_matchc glob() extension
+echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5
+echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+                #include <glob.h>
+               int main(void){glob_t g; g.gl_matchc = 1;}
+        
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "FOUNDIT" >/dev/null 2>&1; then
+  
+                cat >>confdefs.h <<\_ACEOF
+@%:@define GLOB_HAS_GL_MATCHC 1
+_ACEOF
+
+                echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+        
+else
+  
+                echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+        
+
+fi
+rm -f conftest*
+
+
+echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5
+echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6
+if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <dirent.h>
+int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
+       
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
+_ACEOF
+
+       
+
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+# Check whether user wants S/Key support
+SKEY_MSG="no" 
+
+# Check whether --with-skey or --without-skey was given.
+if test "${with_skey+set}" = set; then
+  withval="$with_skey"
+  
+               if test "x$withval" != "xno" ; then
+
+                       if test "x$withval" != "xyes" ; then
+                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                               LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       fi
+
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define SKEY 1
+_ACEOF
+
+                       LIBS="-lskey $LIBS"
+                       SKEY_MSG="yes" 
+       
+                       echo "$as_me:$LINENO: checking for s/key support" >&5
+echo $ECHO_N "checking for s/key support... $ECHO_C" >&6
+                       if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <skey.h>
+int main() { char *ff = skey_keyinfo(""); ff=""; return 0; }
+                               
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+
+                                       echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+                                       { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5
+echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
+   { (exit 1); exit 1; }; }
+                               
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+               fi
+       
+
+fi; 
+
+# Check whether user wants TCP wrappers support
+TCPW_MSG="no"
+
+# Check whether --with-tcp-wrappers or --without-tcp-wrappers was given.
+if test "${with_tcp_wrappers+set}" = set; then
+  withval="$with_tcp_wrappers"
+  
+               if test "x$withval" != "xno" ; then
+                       saved_LIBS="$LIBS"
+                       saved_LDFLAGS="$LDFLAGS"
+                       saved_CPPFLAGS="$CPPFLAGS"
+                       if test -n "${withval}" -a "${withval}" != "yes"; then
+                               if test -d "${withval}/lib"; then
+                                       if test -n "${need_dash_r}"; then
+                                               LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+                                       else
+                                               LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+                                       fi
+                               else
+                                       if test -n "${need_dash_r}"; then
+                                               LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
+                                       else
+                                               LDFLAGS="-L${withval} ${LDFLAGS}"
+                                       fi
+                               fi
+                               if test -d "${withval}/include"; then
+                                       CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
+                               else
+                                       CPPFLAGS="-I${withval} ${CPPFLAGS}"
+                               fi
+                       fi
+                       LIBWRAP="-lwrap"
+                       LIBS="$LIBWRAP $LIBS"
+                       echo "$as_me:$LINENO: checking for libwrap" >&5
+echo $ECHO_N "checking for libwrap... $ECHO_C" >&6
+                       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <tcpd.h>
+                                       int deny_severity = 0, allow_severity = 0;
+                               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+hosts_access(0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                                       cat >>confdefs.h <<\_ACEOF
+@%:@define LIBWRAP 1
+_ACEOF
+
+                                       
+                                       TCPW_MSG="yes"
+                               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+                                       { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
+echo "$as_me: error: *** libwrap missing" >&2;}
+   { (exit 1); exit 1; }; }
+                               
+                       
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+                       LIBS="$saved_LIBS"
+               fi
+       
+
+fi; 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in arc4random b64_ntop bcopy bindresvport_sa \
+       clock fchmod fchown freeaddrinfo futimes gai_strerror \
+       getaddrinfo getcwd getgrouplist getnameinfo getopt \
+       getrlimit getrusage getttyent glob inet_aton inet_ntoa \
+       inet_ntop innetgr login_getcapbool md5_crypt memmove \
+       mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \
+       realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
+       setenv seteuid setlogin setproctitle setresgid setreuid setrlimit \
+       setsid setvbuf sigaction sigvec snprintf socketpair strerror \
+       strlcat strlcpy strmode strsep sysconf tcgetpgrp truncate utimes \
+       vhangup vsnprintf waitpid __b64_ntop _getpty
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+
+for ac_func in dirname
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+for ac_header in libgen.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+else
+  
+       echo "$as_me:$LINENO: checking for dirname in -lgen" >&5
+echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6
+if test "${ac_cv_lib_gen_dirname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dirname ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dirname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_gen_dirname=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gen_dirname=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5
+echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6
+if test $ac_cv_lib_gen_dirname = yes; then
+  
+               echo "$as_me:$LINENO: checking for broken dirname" >&5
+echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6
+if test "${ac_cv_have_broken_dirname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+                       save_LIBS="$LIBS"
+                       LIBS="$LIBS -lgen"
+                       if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <libgen.h>
+#include <string.h>
+
+int main(int argc, char **argv) {
+    char *s, buf[32];
+
+    strncpy(buf,"/etc", 32);
+    s = dirname(buf);
+    if (!s || strncmp(s, "/", 32) != 0) {
+       exit(1);
+    } else {
+       exit(0);
+    }
+}
+                               
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_broken_dirname="no" 
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ ac_cv_have_broken_dirname="yes" 
+                       
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+                       LIBS="$save_LIBS"
+               
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5
+echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6
+               if test "x$ac_cv_have_broken_dirname" = "xno" ; then
+                       LIBS="$LIBS -lgen"
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_DIRNAME 1
+_ACEOF
+
+                       
+for ac_header in libgen.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+
+               fi
+       
+fi
+
+
+fi
+done
+
+
+
+
+for ac_func in gettimeofday time
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+
+
+
+
+
+for ac_func in endutent getutent getutid getutline pututline setutent
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+for ac_func in utmpname
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+
+
+
+
+for ac_func in endutxent getutxent getutxid getutxline pututxline 
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+
+for ac_func in setutxent utmpxname
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+echo "$as_me:$LINENO: checking for getuserattr" >&5
+echo $ECHO_N "checking for getuserattr... $ECHO_C" >&6
+if test "${ac_cv_func_getuserattr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getuserattr (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char getuserattr ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getuserattr) || defined (__stub___getuserattr)
+choke me
+#else
+f = getuserattr;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_getuserattr=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_getuserattr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getuserattr" >&5
+echo "${ECHO_T}$ac_cv_func_getuserattr" >&6
+if test $ac_cv_func_getuserattr = yes; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETUSERATTR 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for getuserattr in -ls" >&5
+echo $ECHO_N "checking for getuserattr in -ls... $ECHO_C" >&6
+if test "${ac_cv_lib_s_getuserattr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ls  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char getuserattr ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getuserattr ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_s_getuserattr=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_s_getuserattr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_s_getuserattr" >&5
+echo "${ECHO_T}$ac_cv_lib_s_getuserattr" >&6
+if test $ac_cv_lib_s_getuserattr = yes; then
+  LIBS="$LIBS -ls"; cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETUSERATTR 1
+_ACEOF
+
+fi
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking for daemon" >&5
+echo $ECHO_N "checking for daemon... $ECHO_C" >&6
+if test "${ac_cv_func_daemon+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char daemon (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char daemon ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_daemon) || defined (__stub___daemon)
+choke me
+#else
+f = daemon;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_daemon=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_daemon=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
+echo "${ECHO_T}$ac_cv_func_daemon" >&6
+if test $ac_cv_func_daemon = yes; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_DAEMON 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5
+echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_daemon+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char daemon ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+daemon ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_bsd_daemon=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_bsd_daemon=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6
+if test $ac_cv_lib_bsd_daemon = yes; then
+  LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_DAEMON 1
+_ACEOF
+
+fi
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking for getpagesize" >&5
+echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
+if test "${ac_cv_func_getpagesize+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getpagesize (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char getpagesize ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_getpagesize) || defined (__stub___getpagesize)
+choke me
+#else
+f = getpagesize;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_getpagesize=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_getpagesize=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
+echo "${ECHO_T}$ac_cv_func_getpagesize" >&6
+if test $ac_cv_func_getpagesize = yes; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETPAGESIZE 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5
+echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6
+if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lucb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char getpagesize ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getpagesize ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ucb_getpagesize=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ucb_getpagesize=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5
+echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6
+if test $ac_cv_lib_ucb_getpagesize = yes; then
+  LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+
+
+fi
+
+
+# Check for broken snprintf
+if test "x$ac_cv_func_snprintf" = "xyes" ; then
+       echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5
+echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6
+       if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
+               
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+
+                       echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_SNPRINTF 1
+_ACEOF
+
+                       { echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
+echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
+               
+       
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
+echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
+if test "${ac_cv_func_getpgrp_void+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Use it with a single arg.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getpgrp (0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_getpgrp_void=no
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_getpgrp_void=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
+echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
+if test $ac_cv_func_getpgrp_void = yes; then
+  
+cat >>confdefs.h <<\_ACEOF
+@%:@define GETPGRP_VOID 1
+_ACEOF
+
+fi
+
+
+# Check for PAM libs
+PAM_MSG="no"
+
+# Check whether --with-pam or --without-pam was given.
+if test "${with_pam+set}" = set; then
+  withval="$with_pam"
+  
+               if test "x$withval" != "xno" ; then
+                       if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
+                               { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
+echo "$as_me: error: PAM headers not found" >&2;}
+   { (exit 1); exit 1; }; }
+                       fi
+
+                       
+echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBDL 1
+_ACEOF
+
+  LIBS="-ldl $LIBS"
+
+fi
+
+                       
+echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5
+echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6
+if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpam  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pam_set_item ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+pam_set_item ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_pam_pam_set_item=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_pam_pam_set_item=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5
+echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6
+if test $ac_cv_lib_pam_pam_set_item = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBPAM 1
+_ACEOF
+
+  LIBS="-lpam $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
+echo "$as_me: error: *** libpam missing" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+                       
+for ac_func in pam_getenvlist
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+fi
+done
+
+
+                       disable_shadow=yes
+                       PAM_MSG="yes"
+
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_PAM 1
+_ACEOF
+
+                       if test $ac_cv_lib_dl_dlopen = yes; then
+                               LIBPAM="-lpam -ldl"
+                       else
+                               LIBPAM="-lpam"
+                       fi
+                       
+               fi
+       
+
+fi; 
+
+# Check for older PAM
+if test "x$PAM_MSG" = "xyes" ; then
+       # Check PAM strerror arguments (old PAM)
+       echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5
+echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <security/pam_appl.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+(void)pam_strerror((pam_handle_t *)NULL, -1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_OLD_PAM 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                       PAM_MSG="yes (old library)"
+               
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+# Search for OpenSSL
+saved_CPPFLAGS="$CPPFLAGS"
+saved_LDFLAGS="$LDFLAGS"
+
+# Check whether --with-ssl-dir or --without-ssl-dir was given.
+if test "${with_ssl_dir+set}" = set; then
+  withval="$with_ssl_dir"
+  
+               if test "x$withval" != "xno" ; then
+                       if test -d "$withval/lib"; then
+                               if test -n "${need_dash_r}"; then
+                                       LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+                               else
+                                       LDFLAGS="-L${withval}/lib ${LDFLAGS}"
+                               fi
+                       else
+                               if test -n "${need_dash_r}"; then
+                                       LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
+                               else
+                                       LDFLAGS="-L${withval} ${LDFLAGS}"
+                               fi
+                       fi
+                       if test -d "$withval/include"; then
+                               CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
+                       else
+                               CPPFLAGS="-I${withval} ${CPPFLAGS}"
+                       fi
+               fi
+       
+
+fi; 
+LIBS="$LIBS -lcrypto"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char RAND_add ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+RAND_add ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_OPENSSL 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+                               if test -n "${need_dash_r}"; then
+                       LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
+               else
+                       LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
+               fi
+               CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char RAND_add ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+RAND_add ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_OPENSSL 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+                               { { echo "$as_me:$LINENO: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5
+echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;}
+   { (exit 1); exit 1; }; }
+                       
+               
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+       
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+
+# Sanity check OpenSSL headers
+echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5
+echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6
+if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <string.h>
+#include <openssl/opensslv.h>
+int main(void) { return(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
+       
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your library" >&5
+echo "$as_me: error: Your OpenSSL headers do not match your library" >&2;}
+   { (exit 1); exit 1; }; }
+       
+
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 
+# version in OpenSSL. Skip this for PAM
+if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
+       echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char crypt ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+crypt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_crypt_crypt=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+  LIBS="$LIBS -lcrypt"
+fi
+
+fi
+
+
+### Configure cryptographic random number support
+
+# Check wheter OpenSSL seeds itself
+echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5
+echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6
+if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <string.h>
+#include <openssl/rand.h>
+int main(void) { return(RAND_status() == 1 ? 0 : 1); }
+       
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+               OPENSSL_SEEDS_ITSELF=yes
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               # Default to use of the rand helper if OpenSSL doesn't
+               # seed itself
+               USE_RAND_HELPER=yes
+       
+
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+# Do we want to force the use of the rand helper?
+
+# Check whether --with-rand-helper or --without-rand-helper was given.
+if test "${with_rand_helper+set}" = set; then
+  withval="$with_rand_helper"
+  
+               if test "x$withval" = "xno" ; then
+                       # Force use of OpenSSL's internal RNG, even if 
+                       # the previous test showed it to be unseeded.
+                       if test -z "$OPENSSL_SEEDS_ITSELF" ; then
+                               { echo "$as_me:$LINENO: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&5
+echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;}
+                               OPENSSL_SEEDS_ITSELF=yes
+                               USE_RAND_HELPER=""
+                       fi
+               else
+                       USE_RAND_HELPER=yes
+               fi
+       
+fi;    
+
+# Which randomness source do we use?
+if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
+       # OpenSSL only
+       cat >>confdefs.h <<\_ACEOF
+@%:@define OPENSSL_PRNG_ONLY 1
+_ACEOF
+
+       RAND_MSG="OpenSSL internal ONLY"
+       INSTALL_SSH_RAND_HELPER=""
+elif test ! -z "$USE_RAND_HELPER" ; then
+       # install rand helper
+       RAND_MSG="ssh-rand-helper"
+       INSTALL_SSH_RAND_HELPER="yes"
+fi
+
+
+### Configuration of ssh-rand-helper
+
+# PRNGD TCP socket
+
+# Check whether --with-prngd-port or --without-prngd-port was given.
+if test "${with_prngd_port+set}" = set; then
+  withval="$with_prngd_port"
+  
+               case "$withval" in
+               no)
+                       withval=""
+                       ;;
+               [0-9]*)
+                       ;;
+               *)
+                       { { echo "$as_me:$LINENO: error: You must specify a numeric port number for --with-prngd-port" >&5
+echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;}
+   { (exit 1); exit 1; }; }
+                       ;;
+               esac
+               if test ! -z "$withval" ; then
+                       PRNGD_PORT="$withval"
+                       cat >>confdefs.h <<_ACEOF
+@%:@define PRNGD_PORT $PRNGD_PORT
+_ACEOF
+
+               fi
+       
+
+fi; 
+
+# PRNGD Unix domain socket
+
+# Check whether --with-prngd-socket or --without-prngd-socket was given.
+if test "${with_prngd_socket+set}" = set; then
+  withval="$with_prngd_socket"
+  
+               case "$withval" in
+               yes)
+                       withval="/var/run/egd-pool"
+                       ;;
+               no)
+                       withval=""
+                       ;;
+               /*)
+                       ;;
+               *)
+                       { { echo "$as_me:$LINENO: error: You must specify an absolute path to the entropy socket" >&5
+echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;}
+   { (exit 1); exit 1; }; }
+                       ;;
+               esac
+
+               if test ! -z "$withval" ; then
+                       if test ! -z "$PRNGD_PORT" ; then
+                               { { echo "$as_me:$LINENO: error: You may not specify both a PRNGD/EGD port and socket" >&5
+echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;}
+   { (exit 1); exit 1; }; }
+                       fi
+                       if test ! -r "$withval" ; then
+                               { echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5
+echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
+                       fi
+                       PRNGD_SOCKET="$withval"
+                       cat >>confdefs.h <<_ACEOF
+@%:@define PRNGD_SOCKET "$PRNGD_SOCKET"
+_ACEOF
+
+               fi
+       
+else
+  
+               # Check for existing socket only if we don't have a random device already
+               if test "$USE_RAND_HELPER" = yes ; then
+                       echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
+echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6
+                       # Insert other locations here
+                       for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
+                               if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
+                                       PRNGD_SOCKET="$sock"
+                                       cat >>confdefs.h <<_ACEOF
+@%:@define PRNGD_SOCKET "$PRNGD_SOCKET"
+_ACEOF
+
+                                       break;
+                               fi
+                       done
+                       if test ! -z "$PRNGD_SOCKET" ; then
+                               echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
+echo "${ECHO_T}$PRNGD_SOCKET" >&6
+                       else
+                               echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6
+                       fi
+               fi
+       
+
+fi; 
+
+# Change default command timeout for hashing entropy source
+entropy_timeout=200
+
+# Check whether --with-entropy-timeout or --without-entropy-timeout was given.
+if test "${with_entropy_timeout+set}" = set; then
+  withval="$with_entropy_timeout"
+  
+               if test "x$withval" != "xno" ; then
+                       entropy_timeout=$withval
+               fi
+               
+
+fi; 
+cat >>confdefs.h <<_ACEOF
+@%:@define ENTROPY_TIMEOUT_MSEC $entropy_timeout
+_ACEOF
+
+
+ssh_privsep_user=sshd
+
+# Check whether --with-privsep-user or --without-privsep-user was given.
+if test "${with_privsep_user+set}" = set; then
+  withval="$with_privsep_user"
+  
+               if test -n "$withval"; then
+                       ssh_privsep_user=$withval
+               fi
+               
+
+fi; 
+cat >>confdefs.h <<_ACEOF
+@%:@define SSH_PRIVSEP_USER "$ssh_privsep_user"
+_ACEOF
+
+
+# We do this little dance with the search path to insure
+# that programs that we select for use by installed programs
+# (which may be run by the super-user) come from trusted
+# locations before they come from the user's private area.
+# This should help avoid accidentally configuring some
+# random version of a program in someone's personal bin.
+
+OPATH=$PATH
+PATH=/bin:/usr/bin
+test -h /bin 2> /dev/null && PATH=/usr/bin
+test -d /sbin && PATH=$PATH:/sbin
+test -d /usr/sbin && PATH=$PATH:/usr/sbin
+PATH=$PATH:/etc:$OPATH
+
+# These programs are used by the command hashing source to gather entropy 
+
+       # Extract the first word of "ls", so it can be a program name with args.
+set dummy ls; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_LS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_LS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_LS="$PROG_LS" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_LS=$ac_cv_path_PROG_LS
+
+if test -n "$PROG_LS"; then
+  echo "$as_me:$LINENO: result: $PROG_LS" >&5
+echo "${ECHO_T}$PROG_LS" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_LS" ; then
+               PROG_LS="undef"
+       fi
+       
+
+
+       # Extract the first word of "netstat", so it can be a program name with args.
+set dummy netstat; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_NETSTAT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_NETSTAT="$PROG_NETSTAT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
+
+if test -n "$PROG_NETSTAT"; then
+  echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5
+echo "${ECHO_T}$PROG_NETSTAT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_NETSTAT" ; then
+               PROG_NETSTAT="undef"
+       fi
+       
+
+
+       # Extract the first word of "arp", so it can be a program name with args.
+set dummy arp; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_ARP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_ARP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_ARP="$PROG_ARP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_ARP=$ac_cv_path_PROG_ARP
+
+if test -n "$PROG_ARP"; then
+  echo "$as_me:$LINENO: result: $PROG_ARP" >&5
+echo "${ECHO_T}$PROG_ARP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_ARP" ; then
+               PROG_ARP="undef"
+       fi
+       
+
+
+       # Extract the first word of "ifconfig", so it can be a program name with args.
+set dummy ifconfig; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_IFCONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_IFCONFIG="$PROG_IFCONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
+
+if test -n "$PROG_IFCONFIG"; then
+  echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5
+echo "${ECHO_T}$PROG_IFCONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_IFCONFIG" ; then
+               PROG_IFCONFIG="undef"
+       fi
+       
+
+
+       # Extract the first word of "jstat", so it can be a program name with args.
+set dummy jstat; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_JSTAT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_JSTAT="$PROG_JSTAT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_JSTAT=$ac_cv_path_PROG_JSTAT
+
+if test -n "$PROG_JSTAT"; then
+  echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5
+echo "${ECHO_T}$PROG_JSTAT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_JSTAT" ; then
+               PROG_JSTAT="undef"
+       fi
+       
+
+
+       # Extract the first word of "ps", so it can be a program name with args.
+set dummy ps; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_PS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_PS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_PS="$PROG_PS" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_PS=$ac_cv_path_PROG_PS
+
+if test -n "$PROG_PS"; then
+  echo "$as_me:$LINENO: result: $PROG_PS" >&5
+echo "${ECHO_T}$PROG_PS" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_PS" ; then
+               PROG_PS="undef"
+       fi
+       
+
+
+       # Extract the first word of "sar", so it can be a program name with args.
+set dummy sar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_SAR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_SAR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_SAR="$PROG_SAR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_SAR=$ac_cv_path_PROG_SAR
+
+if test -n "$PROG_SAR"; then
+  echo "$as_me:$LINENO: result: $PROG_SAR" >&5
+echo "${ECHO_T}$PROG_SAR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_SAR" ; then
+               PROG_SAR="undef"
+       fi
+       
+
+
+       # Extract the first word of "w", so it can be a program name with args.
+set dummy w; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_W+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_W in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_W="$PROG_W" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_W=$ac_cv_path_PROG_W
+
+if test -n "$PROG_W"; then
+  echo "$as_me:$LINENO: result: $PROG_W" >&5
+echo "${ECHO_T}$PROG_W" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_W" ; then
+               PROG_W="undef"
+       fi
+       
+
+
+       # Extract the first word of "who", so it can be a program name with args.
+set dummy who; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_WHO+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_WHO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_WHO="$PROG_WHO" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_WHO=$ac_cv_path_PROG_WHO
+
+if test -n "$PROG_WHO"; then
+  echo "$as_me:$LINENO: result: $PROG_WHO" >&5
+echo "${ECHO_T}$PROG_WHO" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_WHO" ; then
+               PROG_WHO="undef"
+       fi
+       
+
+
+       # Extract the first word of "last", so it can be a program name with args.
+set dummy last; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_LAST+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_LAST in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_LAST="$PROG_LAST" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_LAST=$ac_cv_path_PROG_LAST
+
+if test -n "$PROG_LAST"; then
+  echo "$as_me:$LINENO: result: $PROG_LAST" >&5
+echo "${ECHO_T}$PROG_LAST" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_LAST" ; then
+               PROG_LAST="undef"
+       fi
+       
+
+
+       # Extract the first word of "lastlog", so it can be a program name with args.
+set dummy lastlog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_LASTLOG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_LASTLOG="$PROG_LASTLOG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
+
+if test -n "$PROG_LASTLOG"; then
+  echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5
+echo "${ECHO_T}$PROG_LASTLOG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_LASTLOG" ; then
+               PROG_LASTLOG="undef"
+       fi
+       
+
+
+       # Extract the first word of "df", so it can be a program name with args.
+set dummy df; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_DF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_DF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_DF="$PROG_DF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_DF=$ac_cv_path_PROG_DF
+
+if test -n "$PROG_DF"; then
+  echo "$as_me:$LINENO: result: $PROG_DF" >&5
+echo "${ECHO_T}$PROG_DF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_DF" ; then
+               PROG_DF="undef"
+       fi
+       
+
+
+       # Extract the first word of "vmstat", so it can be a program name with args.
+set dummy vmstat; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_VMSTAT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_VMSTAT="$PROG_VMSTAT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
+
+if test -n "$PROG_VMSTAT"; then
+  echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5
+echo "${ECHO_T}$PROG_VMSTAT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_VMSTAT" ; then
+               PROG_VMSTAT="undef"
+       fi
+       
+
+
+       # Extract the first word of "uptime", so it can be a program name with args.
+set dummy uptime; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_UPTIME in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_UPTIME="$PROG_UPTIME" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_UPTIME=$ac_cv_path_PROG_UPTIME
+
+if test -n "$PROG_UPTIME"; then
+  echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5
+echo "${ECHO_T}$PROG_UPTIME" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_UPTIME" ; then
+               PROG_UPTIME="undef"
+       fi
+       
+
+
+       # Extract the first word of "ipcs", so it can be a program name with args.
+set dummy ipcs; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_IPCS+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_IPCS in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_IPCS="$PROG_IPCS" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_IPCS=$ac_cv_path_PROG_IPCS
+
+if test -n "$PROG_IPCS"; then
+  echo "$as_me:$LINENO: result: $PROG_IPCS" >&5
+echo "${ECHO_T}$PROG_IPCS" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_IPCS" ; then
+               PROG_IPCS="undef"
+       fi
+       
+
+
+       # Extract the first word of "tail", so it can be a program name with args.
+set dummy tail; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PROG_TAIL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PROG_TAIL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROG_TAIL="$PROG_TAIL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PROG_TAIL=$ac_cv_path_PROG_TAIL
+
+if test -n "$PROG_TAIL"; then
+  echo "$as_me:$LINENO: result: $PROG_TAIL" >&5
+echo "${ECHO_T}$PROG_TAIL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       if test -z "$PROG_TAIL" ; then
+               PROG_TAIL="undef"
+       fi
+       
+
+# restore PATH
+PATH=$OPATH
+
+# Where does ssh-rand-helper get its randomness from?
+INSTALL_SSH_PRNG_CMDS=""
+if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
+       if test ! -z "$PRNGD_PORT" ; then
+               RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
+       elif test ! -z "$PRNGD_SOCKET" ; then
+               RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
+       else
+               RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
+               RAND_HELPER_CMDHASH=yes
+               INSTALL_SSH_PRNG_CMDS="yes"
+       fi
+fi
+
+
+
+# Cheap hack to ensure NEWS-OS libraries are arranged right.
+if test ! -z "$SONY" ; then
+  LIBS="$LIBS -liberty";
+fi
+
+# Checks for data types
+echo "$as_me:$LINENO: checking for char" >&5
+echo $ECHO_N "checking for char... $ECHO_C" >&6
+if test "${ac_cv_type_char+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((char *) 0)
+  return 0;
+if (sizeof (char))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_char=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_char=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
+echo "${ECHO_T}$ac_cv_type_char" >&6
+
+echo "$as_me:$LINENO: checking size of char" >&5
+echo $ECHO_N "checking size of char... $ECHO_C" >&6
+if test "${ac_cv_sizeof_char+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_char" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+                    if test $ac_lo -le $ac_mid; then
+                      ac_lo= ac_hi=
+                      break
+                    fi
+                    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo= ac_hi=
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
+echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (char)); }
+unsigned long ulongval () { return (long) (sizeof (char)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (char))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (char))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (char))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_char=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
+echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_char=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
+echo "${ECHO_T}$ac_cv_sizeof_char" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for short int" >&5
+echo $ECHO_N "checking for short int... $ECHO_C" >&6
+if test "${ac_cv_type_short_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((short int *) 0)
+  return 0;
+if (sizeof (short int))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_short_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_short_int=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5
+echo "${ECHO_T}$ac_cv_type_short_int" >&6
+
+echo "$as_me:$LINENO: checking size of short int" >&5
+echo $ECHO_N "checking size of short int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_short_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_short_int" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+                    if test $ac_lo -le $ac_mid; then
+                      ac_lo= ac_hi=
+                      break
+                    fi
+                    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo= ac_hi=
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_short_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (short int), 77" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (short int)); }
+unsigned long ulongval () { return (long) (sizeof (short int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (short int))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (short int))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (short int))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_short_int=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (short int), 77" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_short_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6
+if test "${ac_cv_type_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((int *) 0)
+  return 0;
+if (sizeof (int))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_int=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+echo "${ECHO_T}$ac_cv_type_int" >&6
+
+echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_int" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+                    if test $ac_lo -le $ac_mid; then
+                      ac_lo= ac_hi=
+                      break
+                    fi
+                    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo= ac_hi=
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (int)); }
+unsigned long ulongval () { return (long) (sizeof (int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (int))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (int))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (int))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_int=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for long int" >&5
+echo $ECHO_N "checking for long int... $ECHO_C" >&6
+if test "${ac_cv_type_long_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((long int *) 0)
+  return 0;
+if (sizeof (long int))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_long_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_long_int=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of long int" >&5
+echo $ECHO_N "checking size of long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_long_int" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+                    if test $ac_lo -le $ac_mid; then
+                      ac_lo= ac_hi=
+                      break
+                    fi
+                    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo= ac_hi=
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (long int), 77" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (long int)); }
+unsigned long ulongval () { return (long) (sizeof (long int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (long int))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (long int))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (long int))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_long_int=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (long int), 77" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking for long long int" >&5
+echo $ECHO_N "checking for long long int... $ECHO_C" >&6
+if test "${ac_cv_type_long_long_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((long long int *) 0)
+  return 0;
+if (sizeof (long long int))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_long_long_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_long_long_int=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
+
+echo "$as_me:$LINENO: checking size of long long int" >&5
+echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_long_long_int" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr $ac_mid + 1`
+                    if test $ac_lo -le $ac_mid; then
+                      ac_lo= ac_hi=
+                      break
+                    fi
+                    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo= ac_hi=
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_long_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (long long int)); }
+unsigned long ulongval () { return (long) (sizeof (long long int)); }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (long long int))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (long long int))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (long long int))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_long_long_int=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (long long int), 77" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_long_long_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+_ACEOF
+
+
+
+# Sanity check long long for some platforms (AIX)
+if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
+       ac_cv_sizeof_long_long_int=0
+fi
+
+# More checks for data types
+echo "$as_me:$LINENO: checking for u_int type" >&5
+echo $ECHO_N "checking for u_int type... $ECHO_C" >&6
+if test "${ac_cv_have_u_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/types.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ u_int a; a = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_u_int="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_u_int="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5
+echo "${ECHO_T}$ac_cv_have_u_int" >&6
+if test "x$ac_cv_have_u_int" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_U_INT 1
+_ACEOF
+
+       have_u_int=1
+fi
+
+echo "$as_me:$LINENO: checking for intXX_t types" >&5
+echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6
+if test "${ac_cv_have_intxx_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/types.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ int8_t a; int16_t b; int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_intxx_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_intxx_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5
+echo "${ECHO_T}$ac_cv_have_intxx_t" >&6
+if test "x$ac_cv_have_intxx_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_INTXX_T 1
+_ACEOF
+
+       have_intxx_t=1
+fi
+
+if (test -z "$have_intxx_t" && \
+           test "x$ac_cv_header_stdint_h" = "xyes")
+then
+    echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5
+echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <stdint.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ int8_t a; int16_t b; int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_INTXX_T 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: checking for int64_t type" >&5
+echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6
+if test "${ac_cv_have_int64_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/types.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ int64_t a; a = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_int64_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_int64_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5
+echo "${ECHO_T}$ac_cv_have_int64_t" >&6
+if test "x$ac_cv_have_int64_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_INT64_T 1
+_ACEOF
+
+       have_int64_t=1
+fi
+       
+if test -z "$have_int64_t" ; then
+    echo "$as_me:$LINENO: checking for int64_t type in sys/socket.h" >&5
+echo $ECHO_N "checking for int64_t type in sys/socket.h... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/socket.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ int64_t a; a = 1
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_INT64_T 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test -z "$have_int64_t" ; then
+    echo "$as_me:$LINENO: checking for int64_t type in sys/bitypes.h" >&5
+echo $ECHO_N "checking for int64_t type in sys/bitypes.h... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/bitypes.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ int64_t a; a = 1
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_INT64_T 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
+echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6
+if test "${ac_cv_have_u_intxx_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/types.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_u_intxx_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_u_intxx_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5
+echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6
+if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_U_INTXX_T 1
+_ACEOF
+
+       have_u_intxx_t=1
+fi
+
+if test -z "$have_u_intxx_t" ; then
+    echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5
+echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/socket.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_U_INTXX_T 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: checking for u_int64_t types" >&5
+echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6
+if test "${ac_cv_have_u_int64_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/types.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ u_int64_t a; a = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_u_int64_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_u_int64_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5
+echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6
+if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_U_INT64_T 1
+_ACEOF
+
+       have_u_int64_t=1
+fi
+
+if test -z "$have_u_int64_t" ; then
+    echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5
+echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/bitypes.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ u_int64_t a; a = 1
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_U_INT64_T 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test -z "$have_u_intxx_t" ; then
+       echo "$as_me:$LINENO: checking for uintXX_t types" >&5
+echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6
+if test "${ac_cv_have_uintxx_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+                       
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_uintxx_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_uintxx_t="no" 
+               
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5
+echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6
+       if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
+               cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_UINTXX_T 1
+_ACEOF
+
+       fi
+fi
+
+if test -z "$have_uintxx_t" ; then
+    echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5
+echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <stdint.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_UINTXX_T 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
+           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
+then
+       echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
+echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/bitypes.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+                       int8_t a; int16_t b; int32_t c;
+                       u_int8_t e; u_int16_t f; u_int32_t g;
+                       a = b = c = e = f = g = 1;
+               
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_U_INTXX_T 1
+_ACEOF
+
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_INTXX_T 1
+_ACEOF
+
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext 
+fi
+
+
+echo "$as_me:$LINENO: checking for u_char" >&5
+echo $ECHO_N "checking for u_char... $ECHO_C" >&6
+if test "${ac_cv_have_u_char+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ u_char foo; foo = 125; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_u_char="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_u_char="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5
+echo "${ECHO_T}$ac_cv_have_u_char" >&6
+if test "x$ac_cv_have_u_char" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_U_CHAR 1
+_ACEOF
+
+fi
+
+
+   echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
+if test "${ac_cv_type_socklen_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((socklen_t *) 0)
+  return 0;
+if (sizeof (socklen_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_socklen_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_socklen_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
+if test $ac_cv_type_socklen_t = yes; then
+  :
+else
+  
+      echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
+echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6
+      if test "${curl_cv_socklen_t_equiv+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+        # Systems have either "struct sockaddr *" or
+        # "void *" as the second argument to getpeername
+        curl_cv_socklen_t_equiv=
+        for arg2 in "struct sockaddr" void; do
+           for t in int size_t unsigned long "unsigned long"; do
+              cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+                 #include <sys/types.h>
+                 #include <sys/socket.h>
+
+                 int getpeername (int, $arg2 *, $t *);
+              
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+                 $t len;
+                 getpeername(0,0,&len);
+              
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  
+                 curl_cv_socklen_t_equiv="$t"
+                 break
+              
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+           done
+        done
+
+        if test "x$curl_cv_socklen_t_equiv" = x; then
+           { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5
+echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
+   { (exit 1); exit 1; }; }
+        fi
+      
+fi
+
+      echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
+echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6
+      
+cat >>confdefs.h <<_ACEOF
+@%:@define socklen_t $curl_cv_socklen_t_equiv
+_ACEOF
+
+fi
+
+
+
+echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
+echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
+if test "${ac_cv_type_sig_atomic_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <signal.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((sig_atomic_t *) 0)
+  return 0;
+if (sizeof (sig_atomic_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_sig_atomic_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_sig_atomic_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
+echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
+if test $ac_cv_type_sig_atomic_t = yes; then
+  
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIG_ATOMIC_T 1
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_have_size_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ size_t foo; foo = 1235; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_size_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_size_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5
+echo "${ECHO_T}$ac_cv_have_size_t" >&6
+if test "x$ac_cv_have_size_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SIZE_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
+if test "${ac_cv_have_ssize_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ ssize_t foo; foo = 1235; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_ssize_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_ssize_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5
+echo "${ECHO_T}$ac_cv_have_ssize_t" >&6
+if test "x$ac_cv_have_ssize_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SSIZE_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for clock_t" >&5
+echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
+if test "${ac_cv_have_clock_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <time.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ clock_t foo; foo = 1235; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_clock_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_clock_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5
+echo "${ECHO_T}$ac_cv_have_clock_t" >&6
+if test "x$ac_cv_have_clock_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_CLOCK_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for sa_family_t" >&5
+echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6
+if test "${ac_cv_have_sa_family_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ sa_family_t foo; foo = 1235; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_sa_family_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ sa_family_t foo; foo = 1235; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_sa_family_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_sa_family_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5
+echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6
+if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SA_FAMILY_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_have_pid_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ pid_t foo; foo = 1235; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_pid_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_pid_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5
+echo "${ECHO_T}$ac_cv_have_pid_t" >&6
+if test "x$ac_cv_have_pid_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_PID_T 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for mode_t" >&5
+echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
+if test "${ac_cv_have_mode_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ mode_t foo; foo = 1235; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_mode_t="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_mode_t="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5
+echo "${ECHO_T}$ac_cv_have_mode_t" >&6
+if test "x$ac_cv_have_mode_t" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_MODE_T 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
+echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
+if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct sockaddr_storage s; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_struct_sockaddr_storage="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_struct_sockaddr_storage="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5
+echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6
+if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRUCT_SOCKADDR_STORAGE 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
+echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
+if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <netinet/in.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct sockaddr_in6 s; s.sin6_family = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_struct_sockaddr_in6="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_struct_sockaddr_in6="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5
+echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6
+if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRUCT_SOCKADDR_IN6 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct in6_addr" >&5
+echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6
+if test "${ac_cv_have_struct_in6_addr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <netinet/in.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct in6_addr s; s.s6_addr[0] = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_struct_in6_addr="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_struct_in6_addr="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5
+echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6
+if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRUCT_IN6_ADDR 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct addrinfo" >&5
+echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
+if test "${ac_cv_have_struct_addrinfo+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct addrinfo s; s.ai_flags = AI_PASSIVE; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_struct_addrinfo="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_struct_addrinfo="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5
+echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6
+if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRUCT_ADDRINFO 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for struct timeval" >&5
+echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
+if test "${ac_cv_have_struct_timeval+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <sys/time.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct timeval tv; tv.tv_sec = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_struct_timeval="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_struct_timeval="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5
+echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6
+if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_STRUCT_TIMEVAL 1
+_ACEOF
+
+       have_struct_timeval=1
+fi
+
+# If we don't have int64_t then we can't compile sftp-server.  So don't
+# even attempt to do it. 
+if test "x$ac_cv_have_int64_t" = "xno" -a \
+       "x$ac_cv_sizeof_long_int" != "x8" -a \
+       "x$ac_cv_sizeof_long_long_int" = "x0" ; then
+       NO_SFTP='#'
+else
+       if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_SNPRINTF
+main()
+{
+       char buf[50];
+       char expected_out[50];
+       int mazsize = 50 ;
+#if (SIZEOF_LONG_INT == 8)
+       long int num = 0x7fffffffffffffff;
+#else
+       long long num = 0x7fffffffffffffffll;
+#endif
+       strcpy(expected_out, "9223372036854775807");
+       snprintf(buf, mazsize, "%lld", num);
+       if(strcmp(buf, expected_out) != 0)
+               exit(1);
+       exit(0);
+}
+#else
+main() { exit(0); }
+#endif
+               
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   true 
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ cat >>confdefs.h <<\_ACEOF
+@%:@define BROKEN_SNPRINTF 1
+_ACEOF
+       
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+
+
+
+# look for field 'ut_host' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
+       echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5
+echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_host" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_HOST_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_host' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
+       echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5
+echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_host" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_HOST_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'syslen' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
+       echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5
+echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "syslen" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SYSLEN_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_pid' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
+       echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5
+echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_pid" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_PID_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_type' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
+       echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5
+echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_type" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TYPE_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_type' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
+       echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5
+echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_type" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TYPE_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_tv' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
+       echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5
+echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_tv" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TV_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_id' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
+       echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5
+echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_id" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ID_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_id' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
+       echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5
+echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_id" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ID_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_addr' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
+       echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5
+echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_addr" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ADDR_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_addr' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
+       echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5
+echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_addr" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ADDR_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_addr_v6' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
+       echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5
+echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_addr_v6" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ADDR_V6_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_addr_v6' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
+       echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5
+echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_addr_v6" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ADDR_V6_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_exit' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
+       echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5
+echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_exit" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_EXIT_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_time' in header 'utmp.h'
+               ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
+       echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5
+echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmp.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_time" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TIME_IN_UTMP 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_time' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
+       echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5
+echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_time" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TIME_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+# look for field 'ut_tv' in header 'utmpx.h'
+               ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
+               ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
+       echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5
+echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6
+       if eval "test \"\${$ossh_varname+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <utmpx.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ut_tv" >/dev/null 2>&1; then
+                       eval "$ossh_varname=yes"                
+else
+                       eval "$ossh_varname=no"                 
+fi
+rm -f conftest*
+       
+fi
+
+       ossh_result=`eval 'echo $'"$ossh_varname"`
+       if test -n "`echo $ossh_varname`"; then
+               echo "$as_me:$LINENO: result: $ossh_result" >&5
+echo "${ECHO_T}$ossh_result" >&6
+               if test "x$ossh_result" = "xyes"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_TV_IN_UTMPX 1
+_ACEOF
+
+               fi
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+
+
+echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
+echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
+if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blksize)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_blksize=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_member_struct_stat_st_blksize=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
+if test $ac_cv_member_struct_stat_st_blksize = yes; then
+  
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
+echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct sockaddr_storage s; s.ss_family = 1; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_ss_family_in_struct_ss="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_ss_family_in_struct_ss="no" 
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
+echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6
+if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SS_FAMILY_IN_SS 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
+echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6
+if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct sockaddr_storage s; s.__ss_family = 1; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have___ss_family_in_struct_ss="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have___ss_family_in_struct_ss="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
+echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6
+if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE___SS_FAMILY_IN_SS 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5
+echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6
+if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <pwd.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct passwd p; p.pw_class = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_pw_class_in_struct_passwd="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_pw_class_in_struct_passwd="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
+echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6
+if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_PW_CLASS_IN_PASSWD 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5
+echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6
+if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <pwd.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct passwd p; p.pw_expire = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_pw_expire_in_struct_passwd="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_pw_expire_in_struct_passwd="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
+echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6
+if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_PW_EXPIRE_IN_PASSWD 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5
+echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6
+if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <pwd.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct passwd p; p.pw_change = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_pw_change_in_struct_passwd="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_pw_change_in_struct_passwd="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
+echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6
+if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_PW_CHANGE_IN_PASSWD 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
+echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6
+if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct msghdr m; m.msg_accrights = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_accrights_in_msghdr="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_accrights_in_msghdr="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
+echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6
+if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_ACCRIGHTS_IN_MSGHDR 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
+echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6
+if test "${ac_cv_have_control_in_msghdr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ struct msghdr m; m.msg_control = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_control_in_msghdr="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_control_in_msghdr="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
+echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6
+if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_CONTROL_IN_MSGHDR 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking if libc defines __progname" >&5
+echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6
+if test "${ac_cv_libc_defines___progname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ extern char *__progname; printf("%s", __progname); 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_libc_defines___progname="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_libc_defines___progname="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
+echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6
+if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE___PROGNAME 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
+echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6
+if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ printf("%s", __FUNCTION__); 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_cc_implements___FUNCTION__="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_cc_implements___FUNCTION__="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5
+echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6
+if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE___FUNCTION__ 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
+echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6
+if test "${ac_cv_cc_implements___func__+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ printf("%s", __func__); 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_cc_implements___func__="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_cc_implements___func__="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5
+echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6
+if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE___func__ 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5
+echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6
+if test "${ac_cv_have_getopt_optreset+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <getopt.h>
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ extern int optreset; optreset = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_have_getopt_optreset="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_have_getopt_optreset="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5
+echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6
+if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_GETOPT_OPTRESET 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5
+echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6
+if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_libc_defines_sys_errlist="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_libc_defines_sys_errlist="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5
+echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6
+if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SYS_ERRLIST 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5
+echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6
+if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ extern int sys_nerr; printf("%i", sys_nerr);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   ac_cv_libc_defines_sys_nerr="yes" 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ ac_cv_libc_defines_sys_nerr="no" 
+       
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5
+echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6
+if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
+       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_SYS_NERR 1
+_ACEOF
+
+fi
+
+SCARD_MSG="no" 
+
+# Check whether user wants sectok support
+
+# Check whether --with-sectok or --without-sectok was given.
+if test "${with_sectok+set}" = set; then
+  withval="$with_sectok"
+  
+               if test "x$withval" != "xno" ; then
+                       if test "x$withval" != "xyes" ; then
+                               CPPFLAGS="$CPPFLAGS -I${withval}"
+                               LDFLAGS="$LDFLAGS -L${withval}"
+                               if test ! -z "$need_dash_r" ; then
+                                       LDFLAGS="$LDFLAGS -R${withval}"
+                               fi
+                               if test ! -z "$blibpath" ; then
+                                       blibpath="$blibpath:${withval}"
+                               fi
+                       fi
+                       
+for ac_header in sectok.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+
+                       if test "$ac_cv_header_sectok_h" != yes; then
+                               { { echo "$as_me:$LINENO: error: Can't find sectok.h" >&5
+echo "$as_me: error: Can't find sectok.h" >&2;}
+   { (exit 1); exit 1; }; }
+                       fi
+                       
+echo "$as_me:$LINENO: checking for sectok_open in -lsectok" >&5
+echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6
+if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsectok  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char sectok_open ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+sectok_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_sectok_sectok_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sectok_sectok_open=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sectok_sectok_open" >&5
+echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6
+if test $ac_cv_lib_sectok_sectok_open = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBSECTOK 1
+_ACEOF
+
+  LIBS="-lsectok $LIBS"
+
+fi
+
+                       if test "$ac_cv_lib_sectok_sectok_open" != yes; then
+                               { { echo "$as_me:$LINENO: error: Can't find libsectok" >&5
+echo "$as_me: error: Can't find libsectok" >&2;}
+   { (exit 1); exit 1; }; }
+                       fi
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define SMARTCARD 1
+_ACEOF
+
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define USE_SECTOK 1
+_ACEOF
+
+                       SCARD_MSG="yes, using sectok" 
+               fi
+       
+
+fi; 
+
+# Check whether user wants OpenSC support
+
+# Check whether --with-opensc or --without-opensc was given.
+if test "${with_opensc+set}" = set; then
+  withval="$with_opensc"
+  opensc_config_prefix="$withval"
+else
+  opensc_config_prefix=""
+fi; 
+if test x$opensc_config_prefix != x ; then
+  OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
+  # Extract the first word of "opensc-config", so it can be a program name with args.
+set dummy opensc-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $OPENSC_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_OPENSC_CONFIG="$OPENSC_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_OPENSC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no"
+  ;;
+esac
+fi
+OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG
+
+if test -n "$OPENSC_CONFIG"; then
+  echo "$as_me:$LINENO: result: $OPENSC_CONFIG" >&5
+echo "${ECHO_T}$OPENSC_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  if test "$OPENSC_CONFIG" != "no"; then
+    LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
+    LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
+    CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
+    LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
+    cat >>confdefs.h <<\_ACEOF
+@%:@define SMARTCARD 1
+_ACEOF
+
+    cat >>confdefs.h <<\_ACEOF
+@%:@define USE_OPENSC 1
+_ACEOF
+
+    SCARD_MSG="yes, using OpenSC" 
+  fi
+fi
+
+# Check whether user wants Kerberos 5 support
+KRB5_MSG="no" 
+
+# Check whether --with-kerberos5 or --without-kerberos5 was given.
+if test "${with_kerberos5+set}" = set; then
+  withval="$with_kerberos5"
+  
+                if test "x$withval" != "xno" ; then
+                        if test "x$withval" = "xyes" ; then
+                                KRB5ROOT="/usr/local"
+                        else
+                                KRB5ROOT=${withval}
+                        fi
+                       CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
+                        LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
+                        cat >>confdefs.h <<\_ACEOF
+@%:@define KRB5 1
+_ACEOF
+
+                       KRB5_MSG="yes"
+                        echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
+echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6
+                        cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+ #include <krb5.h> 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ char *tmp = heimdal_version; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                                         cat >>confdefs.h <<\_ACEOF
+@%:@define HEIMDAL 1
+_ACEOF
+
+                                         K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
+                                       
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+                                         K5LIBS="-lkrb5 -lk5crypto -lcom_err"
+                                       
+                        
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+                        if test ! -z "$need_dash_r" ; then
+                                LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
+                        fi
+                        if test ! -z "$blibpath" ; then
+                                blibpath="$blibpath:${KRB5ROOT}/lib"
+                        fi
+                        
+echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
+echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dn_expand ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dn_expand ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_resolv_dn_expand=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_dn_expand=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
+if test $ac_cv_lib_resolv_dn_expand = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBRESOLV 1
+_ACEOF
+
+  LIBS="-lresolv $LIBS"
+
+fi
+
+
+                        KRB5=yes
+                fi
+        
+
+fi; 
+# Check whether user wants Kerberos 4 support
+KRB4_MSG="no" 
+
+# Check whether --with-kerberos4 or --without-kerberos4 was given.
+if test "${with_kerberos4+set}" = set; then
+  withval="$with_kerberos4"
+  
+               if test "x$withval" != "xno" ; then
+                       if test "x$withval" != "xyes" ; then
+                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                               LDFLAGS="$LDFLAGS -L${withval}/lib"
+                               if test ! -z "$need_dash_r" ; then
+                                       LDFLAGS="$LDFLAGS -R${withval}/lib"
+                               fi
+                               if test ! -z "$blibpath" ; then
+                                       blibpath="$blibpath:${withval}/lib"
+                               fi
+                       else
+                               if test -d /usr/include/kerberosIV ; then
+                                       CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
+                               fi
+                       fi
+
+                       
+for ac_header in krb.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
+
+done
+
+                       if test "$ac_cv_header_krb_h" != yes; then
+                               { echo "$as_me:$LINENO: WARNING: Cannot find krb.h, build may fail" >&5
+echo "$as_me: WARNING: Cannot find krb.h, build may fail" >&2;}
+                       fi
+                       
+echo "$as_me:$LINENO: checking for main in -lkrb" >&5
+echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
+if test "${ac_cv_lib_krb_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_krb_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_krb_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
+echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
+if test $ac_cv_lib_krb_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBKRB 1
+_ACEOF
+
+  LIBS="-lkrb $LIBS"
+
+fi
+
+                       if test "$ac_cv_lib_krb_main" != yes; then
+                               
+echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
+echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
+if test "${ac_cv_lib_krb4_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb4  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_krb4_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_krb4_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
+echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
+if test $ac_cv_lib_krb4_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBKRB4 1
+_ACEOF
+
+  LIBS="-lkrb4 $LIBS"
+
+fi
+
+                               if test "$ac_cv_lib_krb4_main" != yes; then
+                                       { echo "$as_me:$LINENO: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&5
+echo "$as_me: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&2;}
+                               else
+                                       KLIBS="-lkrb4"
+                               fi
+                       else
+                               KLIBS="-lkrb"
+                       fi
+                       
+echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
+echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
+if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char des_cbc_encrypt ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+des_cbc_encrypt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_des_des_cbc_encrypt=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_des_des_cbc_encrypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
+if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBDES 1
+_ACEOF
+
+  LIBS="-ldes $LIBS"
+
+fi
+
+                       if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
+                               
+echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
+echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
+if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes425  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char des_cbc_encrypt ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+des_cbc_encrypt ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_des425_des_cbc_encrypt=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_des425_des_cbc_encrypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
+if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBDES425 1
+_ACEOF
+
+  LIBS="-ldes425 $LIBS"
+
+fi
+
+                               if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
+                                       { echo "$as_me:$LINENO: WARNING: Cannot find libdes nor libdes425, build may fail" >&5
+echo "$as_me: WARNING: Cannot find libdes nor libdes425, build may fail" >&2;}
+                               else
+                                       KLIBS="-ldes425"
+                               fi
+                       else
+                               KLIBS="-ldes"
+                       fi
+                       
+echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
+echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dn_expand ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dn_expand ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_resolv_dn_expand=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_dn_expand=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
+if test $ac_cv_lib_resolv_dn_expand = yes; then
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBRESOLV 1
+_ACEOF
+
+  LIBS="-lresolv $LIBS"
+
+fi
+
+                       KRB4=yes
+                       KRB4_MSG="yes" 
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define KRB4 1
+_ACEOF
+
+               fi
+       
+
+fi; 
+
+# Check whether user wants AFS support
+AFS_MSG="no" 
+
+# Check whether --with-afs or --without-afs was given.
+if test "${with_afs+set}" = set; then
+  withval="$with_afs"
+  
+               if test "x$withval" != "xno" ; then
+
+                       if test "x$withval" != "xyes" ; then
+                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                               LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       fi
+
+                       if test -z "$KRB4" ; then
+                               { echo "$as_me:$LINENO: WARNING: AFS requires Kerberos IV support, build may fail" >&5
+echo "$as_me: WARNING: AFS requires Kerberos IV support, build may fail" >&2;}
+                       fi
+
+                       LIBS="-lkafs $LIBS"
+                       if test ! -z "$AFS_LIBS" ; then
+                               LIBS="$LIBS $AFS_LIBS"
+                       fi
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define AFS 1
+_ACEOF
+
+                       AFS_MSG="yes" 
+               fi
+       
+
+fi; 
+LIBS="$LIBS $KLIBS $K5LIBS"
+
+# Looking for programs, paths and files
+
+# Check whether --with-rsh or --without-rsh was given.
+if test "${with_rsh+set}" = set; then
+  withval="$with_rsh"
+  
+               if test "x$withval" != "$no" ; then
+                       rsh_path=$withval
+               fi
+       
+else
+  
+               # Extract the first word of "rsh", so it can be a program name with args.
+set dummy rsh; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_rsh_path+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $rsh_path in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_rsh_path="$rsh_path" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_rsh_path="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+rsh_path=$ac_cv_path_rsh_path
+
+if test -n "$rsh_path"; then
+  echo "$as_me:$LINENO: result: $rsh_path" >&5
+echo "${ECHO_T}$rsh_path" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+       
+
+fi; 
+
+PRIVSEP_PATH=/var/empty
+
+# Check whether --with-privsep-path or --without-privsep-path was given.
+if test "${with_privsep_path+set}" = set; then
+  withval="$with_privsep_path"
+  
+               if test "x$withval" != "$no" ; then
+                       PRIVSEP_PATH=$withval
+               fi
+       
+
+fi; 
+
+
+
+# Check whether --with-xauth or --without-xauth was given.
+if test "${with_xauth+set}" = set; then
+  withval="$with_xauth"
+  
+               if test "x$withval" != "xno" ; then
+                       xauth_path=$withval
+               fi
+       
+else
+  
+               # Extract the first word of "xauth", so it can be a program name with args.
+set dummy xauth; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_xauth_path+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $xauth_path in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+xauth_path=$ac_cv_path_xauth_path
+
+if test -n "$xauth_path"; then
+  echo "$as_me:$LINENO: result: $xauth_path" >&5
+echo "${ECHO_T}$xauth_path" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+               if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
+                       xauth_path="/usr/openwin/bin/xauth"
+               fi
+       
+
+fi; 
+
+if test -z "$xauth_path" ; then
+       XAUTH_PATH="undefined"
+       
+else
+       cat >>confdefs.h <<_ACEOF
+@%:@define XAUTH_PATH "$xauth_path"
+_ACEOF
+
+       XAUTH_PATH=$xauth_path
+       
+fi
+if test ! -z "$rsh_path" ; then
+       cat >>confdefs.h <<_ACEOF
+@%:@define RSH_PATH "$rsh_path"
+_ACEOF
+
+fi
+
+# Check for mail directory (last resort if we cannot get it from headers)
+if test ! -z "$MAIL" ; then
+       maildir=`dirname $MAIL`
+       cat >>confdefs.h <<_ACEOF
+@%:@define MAIL_DIRECTORY "$maildir"
+_ACEOF
+
+fi
+
+if test -z "$no_dev_ptmx" ; then
+       if test "x$disable_ptmx_check" != "xyes" ; then
+               echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5
+echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6
+if test "${ac_cv_file___dev_ptmx_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r ""/dev/ptmx""; then
+  ac_cv_file___dev_ptmx_=yes
+else
+  ac_cv_file___dev_ptmx_=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5
+echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6
+if test $ac_cv_file___dev_ptmx_ = yes; then
+  
+                               cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DEV_PTMX 1
+_ACEOF
+
+                               have_dev_ptmx=1
+                       
+               
+fi
+
+       fi
+fi
+echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5
+echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6
+if test "${ac_cv_file___dev_ptc_+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r ""/dev/ptc""; then
+  ac_cv_file___dev_ptc_=yes
+else
+  ac_cv_file___dev_ptc_=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5
+echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6
+if test $ac_cv_file___dev_ptc_ = yes; then
+  
+               cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DEV_PTS_AND_PTC 1
+_ACEOF
+
+               have_dev_ptc=1
+       
+
+fi
+
+
+# Options from here on. Some of these are preset by platform above
+
+# Check whether --with-mantype or --without-mantype was given.
+if test "${with_mantype+set}" = set; then
+  withval="$with_mantype"
+  
+               case "$withval" in
+               man|cat|doc)
+                       MANTYPE=$withval
+                       ;;
+               *)
+                       { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5
+echo "$as_me: error: invalid man type: $withval" >&2;}
+   { (exit 1); exit 1; }; }
+                       ;;
+               esac
+       
+
+fi; 
+if test -z "$MANTYPE"; then
+       for ac_prog in nroff awf
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_NROFF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $NROFF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="/usr/bin:/usr/ucb"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+NROFF=$ac_cv_path_NROFF
+
+if test -n "$NROFF"; then
+  echo "$as_me:$LINENO: result: $NROFF" >&5
+echo "${ECHO_T}$NROFF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$NROFF" && break
+done
+test -n "$NROFF" || NROFF="/bin/false"
+
+       if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
+               MANTYPE=doc
+       elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
+               MANTYPE=man
+       else
+               MANTYPE=cat
+       fi
+fi
+
+if test "$MANTYPE" = "doc"; then
+       mansubdir=man;
+else
+       mansubdir=$MANTYPE;
+fi
+
+
+# Check whether to enable MD5 passwords
+MD5_MSG="no" 
+
+# Check whether --with-md5-passwords or --without-md5-passwords was given.
+if test "${with_md5_passwords+set}" = set; then
+  withval="$with_md5_passwords"
+  
+               if test "x$withval" != "xno" ; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define HAVE_MD5_PASSWORDS 1
+_ACEOF
+
+                       MD5_MSG="yes" 
+               fi
+       
+
+fi; 
+
+# Whether to disable shadow password support
+
+# Check whether --with-shadow or --without-shadow was given.
+if test "${with_shadow+set}" = set; then
+  withval="$with_shadow"
+  
+               if test "x$withval" = "xno" ; then      
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_SHADOW 1
+_ACEOF
+
+                       disable_shadow=yes
+               fi
+       
+
+fi; 
+
+if test -z "$disable_shadow" ; then
+       echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5
+echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <shadow.h>
+       struct spwd sp;
+       
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   sp_expire_available=yes 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+       
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+       if test "x$sp_expire_available" = "xyes" ; then
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+               cat >>confdefs.h <<\_ACEOF
+@%:@define HAS_SHADOW_EXPIRE 1
+_ACEOF
+
+       else
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       fi
+fi
+
+# Use ip address instead of hostname in $DISPLAY
+if test ! -z "$IPADDR_IN_DISPLAY" ; then
+       DISPLAY_HACK_MSG="yes"
+       cat >>confdefs.h <<\_ACEOF
+@%:@define IPADDR_IN_DISPLAY 1
+_ACEOF
+
+else
+       DISPLAY_HACK_MSG="no" 
+       
+# Check whether --with-ipaddr-display or --without-ipaddr-display was given.
+if test "${with_ipaddr_display+set}" = set; then
+  withval="$with_ipaddr_display"
+  
+                       if test "x$withval" != "xno" ; then     
+                               cat >>confdefs.h <<\_ACEOF
+@%:@define IPADDR_IN_DISPLAY 1
+_ACEOF
+
+                               DISPLAY_HACK_MSG="yes" 
+                       fi
+               
+       
+fi; 
+fi
+
+if test $ac_cv_func_login_getcapbool = "yes" -a \
+       $ac_cv_header_login_cap_h = "yes" ; then
+       USES_LOGIN_CONF=yes
+fi
+# Whether to mess with the default path
+SERVER_PATH_MSG="(default)" 
+
+# Check whether --with-default-path or --without-default-path was given.
+if test "${with_default_path+set}" = set; then
+  withval="$with_default_path"
+  
+               if test "$USES_LOGIN_CONF" = "yes" ; then
+                       { echo "$as_me:$LINENO: WARNING: 
+--with-default-path=PATH has no effect on this system.
+Edit /etc/login.conf instead." >&5
+echo "$as_me: WARNING: 
+--with-default-path=PATH has no effect on this system.
+Edit /etc/login.conf instead." >&2;}
+               elif test "x$withval" != "xno" ; then   
+                       user_path="$withval"
+                       SERVER_PATH_MSG="$withval" 
+               fi
+       
+else
+   if test "$USES_LOGIN_CONF" = "yes" ; then
+       { echo "$as_me:$LINENO: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
+echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
+       else
+       if test "$cross_compiling" = yes; then
+   user_path="/usr/bin:/bin:/usr/sbin:/sbin" 
+       
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* find out what STDPATH is */
+#include <stdio.h>
+#ifdef HAVE_PATHS_H
+# include <paths.h>
+#endif
+#ifndef _PATH_STDPATH
+# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#define DATA "conftest.stdpath"
+
+main()
+{
+       FILE *fd;
+       int rc;
+       
+       fd = fopen(DATA,"w");
+       if(fd == NULL)
+               exit(1);
+       
+       if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
+               exit(1);
+
+       exit(0);
+}
+               
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   user_path=`cat conftest.stdpath` 
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ user_path="/usr/bin:/bin:/usr/sbin:/sbin" 
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+# make sure $bindir is in USER_PATH so scp will work
+               t_bindir=`eval echo ${bindir}`
+               case $t_bindir in
+                       NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
+               esac
+               case $t_bindir in
+                       NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
+               esac
+               echo $user_path | grep ":$t_bindir"  > /dev/null 2>&1
+               if test $? -ne 0  ; then
+                       echo $user_path | grep "^$t_bindir"  > /dev/null 2>&1
+                       if test $? -ne 0  ; then
+                               user_path=$user_path:$t_bindir
+                               echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5
+echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6
+                       fi
+               fi
+       fi 
+
+fi; 
+if test "$USES_LOGIN_CONF" != "yes" ; then
+       cat >>confdefs.h <<_ACEOF
+@%:@define USER_PATH "$user_path"
+_ACEOF
+
+       
+fi
+
+# Set superuser path separately to user path
+MD5_MSG="no" 
+
+# Check whether --with-superuser-path or --without-superuser-path was given.
+if test "${with_superuser_path+set}" = set; then
+  withval="$with_superuser_path"
+  
+               if test "x$withval" != "xno" ; then
+                       cat >>confdefs.h <<_ACEOF
+@%:@define SUPERUSER_PATH "$withval"
+_ACEOF
+
+                       superuser_path=$withval
+               fi
+       
+
+fi; 
+
+
+# Whether to force IPv4 by default (needed on broken glibc Linux)
+IPV4_HACK_MSG="no" 
+
+# Check whether --with-ipv4-default or --without-ipv4-default was given.
+if test "${with_ipv4_default+set}" = set; then
+  withval="$with_ipv4_default"
+  
+               if test "x$withval" != "xno" ; then     
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define IPV4_DEFAULT 1
+_ACEOF
+
+                       IPV4_HACK_MSG="yes" 
+               fi
+       
+
+fi; 
+
+echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
+echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6
+IPV4_IN6_HACK_MSG="no" 
+
+# Check whether --with-4in6 or --without-4in6 was given.
+if test "${with_4in6+set}" = set; then
+  withval="$with_4in6"
+  
+               if test "x$withval" != "xno" ; then
+                       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define IPV4_IN_IPV6 1
+_ACEOF
+
+                       IPV4_IN6_HACK_MSG="yes" 
+               else
+                       echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               fi
+       
+else
+  
+               if test "x$inet6_default_4in6" = "xyes"; then
+                       echo "$as_me:$LINENO: result: yes (default)" >&5
+echo "${ECHO_T}yes (default)" >&6
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define IPV4_IN_IPV6 1
+_ACEOF
+
+                       IPV4_IN6_HACK_MSG="yes" 
+               else
+                       echo "$as_me:$LINENO: result: no (default)" >&5
+echo "${ECHO_T}no (default)" >&6
+               fi
+       
+
+fi; 
+
+# Whether to enable BSD auth support
+BSD_AUTH_MSG=no
+
+# Check whether --with-bsd-auth or --without-bsd-auth was given.
+if test "${with_bsd_auth+set}" = set; then
+  withval="$with_bsd_auth"
+  
+               if test "x$withval" != "xno" ; then     
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define BSD_AUTH 1
+_ACEOF
+
+                       BSD_AUTH_MSG=yes
+               fi
+       
+
+fi; 
+
+echo "$as_me:$LINENO: checking whether to install ssh as suid root" >&5
+echo $ECHO_N "checking whether to install ssh as suid root... $ECHO_C" >&6
+# Check whether --enable-suid-ssh or --disable-suid-ssh was given.
+if test "${enable_suid_ssh+set}" = set; then
+  enableval="$enable_suid_ssh"
+   case "$enableval" in
+  no)
+       echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       SSHMODE=0711
+       ;;
+  *)   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       SSHMODE=4711
+       ;;
+  esac 
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SSHMODE=4711
+
+fi; 
+
+
+
+# Where to place sshd.pid
+piddir=/var/run
+# make sure the directory exists
+if test ! -d $piddir ; then    
+       piddir=`eval echo ${sysconfdir}`
+       case $piddir in
+               NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
+       esac
+fi
+
+
+# Check whether --with-pid-dir or --without-pid-dir was given.
+if test "${with_pid_dir+set}" = set; then
+  withval="$with_pid_dir"
+  
+               if test "x$withval" != "xno" ; then     
+                       piddir=$withval
+                       if test ! -d $piddir ; then     
+                       { echo "$as_me:$LINENO: WARNING: ** no $piddir directory on this system **" >&5
+echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
+                       fi
+               fi
+       
+
+fi; 
+
+cat >>confdefs.h <<_ACEOF
+@%:@define _PATH_SSH_PIDDIR "$piddir"
+_ACEOF
+
+
+
+# Check whether --enable-lastlog or --disable-lastlog was given.
+if test "${enable_lastlog+set}" = set; then
+  enableval="$enable_lastlog"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_LASTLOG 1
+_ACEOF
+
+fi; 
+# Check whether --enable-utmp or --disable-utmp was given.
+if test "${enable_utmp+set}" = set; then
+  enableval="$enable_utmp"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMP 1
+_ACEOF
+
+fi; 
+# Check whether --enable-utmpx or --disable-utmpx was given.
+if test "${enable_utmpx+set}" = set; then
+  enableval="$enable_utmpx"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMPX 1
+_ACEOF
+
+fi; 
+# Check whether --enable-wtmp or --disable-wtmp was given.
+if test "${enable_wtmp+set}" = set; then
+  enableval="$enable_wtmp"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_WTMP 1
+_ACEOF
+
+fi; 
+# Check whether --enable-wtmpx or --disable-wtmpx was given.
+if test "${enable_wtmpx+set}" = set; then
+  enableval="$enable_wtmpx"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_WTMPX 1
+_ACEOF
+
+fi; 
+# Check whether --enable-libutil or --disable-libutil was given.
+if test "${enable_libutil+set}" = set; then
+  enableval="$enable_libutil"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_LOGIN 1
+_ACEOF
+
+fi; 
+# Check whether --enable-pututline or --disable-pututline was given.
+if test "${enable_pututline+set}" = set; then
+  enableval="$enable_pututline"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_PUTUTLINE 1
+_ACEOF
+
+fi; 
+# Check whether --enable-pututxline or --disable-pututxline was given.
+if test "${enable_pututxline+set}" = set; then
+  enableval="$enable_pututxline"
+   cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_PUTUTXLINE 1
+_ACEOF
+
+fi; 
+
+# Check whether --with-lastlog or --without-lastlog was given.
+if test "${with_lastlog+set}" = set; then
+  withval="$with_lastlog"
+  
+               if test "x$withval" = "xno" ; then      
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_LASTLOG 1
+_ACEOF
+
+               else
+                       conf_lastlog_location=$withval
+               fi
+       
+
+fi; 
+
+
+echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5
+echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <utmp.h>
+#ifdef HAVE_LASTLOG_H
+#  include <lastlog.h>
+#endif
+#ifdef HAVE_PATHS_H
+#  include <paths.h>
+#endif
+#ifdef HAVE_LOGIN_H
+# include <login.h>
+#endif
+       
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ char *lastlog = LASTLOG_FILE; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+               echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5
+echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6
+               cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <utmp.h>
+#ifdef HAVE_LASTLOG_H
+#  include <lastlog.h>
+#endif
+#ifdef HAVE_PATHS_H
+#  include <paths.h>
+#endif
+               
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ char *lastlog = _PATH_LASTLOG; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+                       echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+                       system_lastlog_path=no
+               
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test -z "$conf_lastlog_location"; then
+       if test x"$system_lastlog_path" = x"no" ; then
+               for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
+                               if (test -d "$f" || test -f "$f") ; then
+                                       conf_lastlog_location=$f
+                               fi
+               done
+               if test -z "$conf_lastlog_location"; then
+                       { echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5
+echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
+                                       fi
+       fi
+fi
+
+if test -n "$conf_lastlog_location"; then
+       cat >>confdefs.h <<_ACEOF
+@%:@define CONF_LASTLOG_FILE "$conf_lastlog_location"
+_ACEOF
+
+fi     
+
+echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5
+echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <utmp.h>
+#ifdef HAVE_PATHS_H
+#  include <paths.h>
+#endif
+       
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ char *utmp = UTMP_FILE; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+         system_utmp_path=no 
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+if test -z "$conf_utmp_location"; then
+       if test x"$system_utmp_path" = x"no" ; then
+               for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
+                       if test -f $f ; then
+                               conf_utmp_location=$f
+                       fi
+               done
+               if test -z "$conf_utmp_location"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMP 1
+_ACEOF
+
+               fi
+       fi
+fi
+if test -n "$conf_utmp_location"; then
+       cat >>confdefs.h <<_ACEOF
+@%:@define CONF_UTMP_FILE "$conf_utmp_location"
+_ACEOF
+
+fi     
+
+echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5
+echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <utmp.h>
+#ifdef HAVE_PATHS_H
+#  include <paths.h>
+#endif
+       
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ char *wtmp = WTMP_FILE; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+         system_wtmp_path=no 
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+if test -z "$conf_wtmp_location"; then
+       if test x"$system_wtmp_path" = x"no" ; then
+               for f in /usr/adm/wtmp /var/log/wtmp; do
+                       if test -f $f ; then
+                               conf_wtmp_location=$f
+                       fi
+               done
+               if test -z "$conf_wtmp_location"; then
+                       cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_WTMP 1
+_ACEOF
+
+               fi
+       fi
+fi
+if test -n "$conf_wtmp_location"; then
+       cat >>confdefs.h <<_ACEOF
+@%:@define CONF_WTMP_FILE "$conf_wtmp_location"
+_ACEOF
+
+fi     
+
+
+echo "$as_me:$LINENO: checking if your system defines UTMPX_FILE" >&5
+echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <utmp.h>
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif
+#ifdef HAVE_PATHS_H
+#  include <paths.h>
+#endif
+       
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ char *utmpx = UTMPX_FILE; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+         system_utmpx_path=no 
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+if test -z "$conf_utmpx_location"; then
+       if test x"$system_utmpx_path" = x"no" ; then
+               cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_UTMPX 1
+_ACEOF
+
+       fi
+else
+       cat >>confdefs.h <<_ACEOF
+@%:@define CONF_UTMPX_FILE "$conf_utmpx_location"
+_ACEOF
+
+fi     
+
+echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5
+echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <utmp.h>
+#ifdef HAVE_UTMPX_H
+#include <utmpx.h>
+#endif
+#ifdef HAVE_PATHS_H
+#  include <paths.h>
+#endif
+       
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ char *wtmpx = WTMPX_FILE; 
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6 
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+         system_wtmpx_path=no 
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+if test -z "$conf_wtmpx_location"; then
+       if test x"$system_wtmpx_path" = x"no" ; then
+               cat >>confdefs.h <<\_ACEOF
+@%:@define DISABLE_WTMPX 1
+_ACEOF
+
+       fi
+else
+       cat >>confdefs.h <<_ACEOF
+@%:@define CONF_WTMPX_FILE "$conf_wtmpx_location"
+_ACEOF
+
+fi     
+
+
+if test ! -z "$blibpath" ; then
+       LDFLAGS="$LDFLAGS -blibpath:$blibpath"
+       { echo "$as_me:$LINENO: WARNING: Please check and edit -blibpath in LDFLAGS in Makefile" >&5
+echo "$as_me: WARNING: Please check and edit -blibpath in LDFLAGS in Makefile" >&2;}
+fi
+
+if test "$PAM_MSG" = yes ; then
+       LIBS=`echo $LIBS | sed 's/-lpam //'`
+fi
+if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
+       LIBS=`echo $LIBS | sed 's/-ldl //'`
+fi
+
+
+ac_config_files="$ac_config_files Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+        "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[        ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[   ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[     ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+    { $as_unset LANG || test "${LANG+set}" != set; } ||
+      { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+    { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+      { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+    { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+      { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+    { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+      { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+    { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+      { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+    { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+      { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+    { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+      { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+    { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+      { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conftest.sh
+  echo  "exit 0"   >>conftest.sh
+  chmod +x conftest.sh
+  if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conftest.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.53.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.53,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    shift
+    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+    shift
+    ;;
+  -*);;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_need_defaults=false;;
+  esac
+
+  case $1 in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    shift
+    CONFIG_FILES="$CONFIG_FILES $1"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $1"
+    ac_need_defaults=false;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "openbsd-compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
+  "scard/Makefile" ) CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;;
+  "ssh_prng_cmds" ) CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=$TMPDIR/cs$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@CPP@,$CPP,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@AR@,$AR,;t t
+s,@PERL@,$PERL,;t t
+s,@ENT@,$ENT,;t t
+s,@FILEPRIV@,$FILEPRIV,;t t
+s,@TEST_MINUS_S_SH@,$TEST_MINUS_S_SH,;t t
+s,@SH@,$SH,;t t
+s,@LOGIN_PROGRAM_FALLBACK@,$LOGIN_PROGRAM_FALLBACK,;t t
+s,@LD@,$LD,;t t
+s,@LIBWRAP@,$LIBWRAP,;t t
+s,@LIBPAM@,$LIBPAM,;t t
+s,@INSTALL_SSH_RAND_HELPER@,$INSTALL_SSH_RAND_HELPER,;t t
+s,@PROG_LS@,$PROG_LS,;t t
+s,@PROG_NETSTAT@,$PROG_NETSTAT,;t t
+s,@PROG_ARP@,$PROG_ARP,;t t
+s,@PROG_IFCONFIG@,$PROG_IFCONFIG,;t t
+s,@PROG_JSTAT@,$PROG_JSTAT,;t t
+s,@PROG_PS@,$PROG_PS,;t t
+s,@PROG_SAR@,$PROG_SAR,;t t
+s,@PROG_W@,$PROG_W,;t t
+s,@PROG_WHO@,$PROG_WHO,;t t
+s,@PROG_LAST@,$PROG_LAST,;t t
+s,@PROG_LASTLOG@,$PROG_LASTLOG,;t t
+s,@PROG_DF@,$PROG_DF,;t t
+s,@PROG_VMSTAT@,$PROG_VMSTAT,;t t
+s,@PROG_UPTIME@,$PROG_UPTIME,;t t
+s,@PROG_IPCS@,$PROG_IPCS,;t t
+s,@PROG_TAIL@,$PROG_TAIL,;t t
+s,@INSTALL_SSH_PRNG_CMDS@,$INSTALL_SSH_PRNG_CMDS,;t t
+s,@NO_SFTP@,$NO_SFTP,;t t
+s,@OPENSC_CONFIG@,$OPENSC_CONFIG,;t t
+s,@rsh_path@,$rsh_path,;t t
+s,@PRIVSEP_PATH@,$PRIVSEP_PATH,;t t
+s,@xauth_path@,$xauth_path,;t t
+s,@XAUTH_PATH@,$XAUTH_PATH,;t t
+s,@NROFF@,$NROFF,;t t
+s,@MANTYPE@,$MANTYPE,;t t
+s,@mansubdir@,$mansubdir,;t t
+s,@user_path@,$user_path,;t t
+s,@SSHMODE@,$SSHMODE,;t t
+s,@piddir@,$piddir,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" ||
+        mkdir "$as_incr_dir" ||
+       { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  esac
+done; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([  ]*\)#\([        ]*define[       ][      ]*\)'
+ac_dB='[       ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[     ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if egrep "^[   ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[    ]*#[    ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # egrep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[    ]*#[    ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+      { case "$ac_dir" in
+  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+  *)                      as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+  case $as_mkdir_dir in
+    # Skip DOS drivespec
+    ?:) as_incr_dir=$as_mkdir_dir ;;
+    *)
+      as_incr_dir=$as_incr_dir/$as_mkdir_dir
+      test -d "$as_incr_dir" ||
+        mkdir "$as_incr_dir" ||
+       { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  esac
+done; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+# Print summary of options
+
+# Someone please show me a better way :)
+A=`eval echo ${prefix}` ; A=`eval echo ${A}`
+B=`eval echo ${bindir}` ; B=`eval echo ${B}`
+C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
+D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
+E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
+F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
+G=`eval echo ${piddir}` ; G=`eval echo ${G}`
+H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
+I=`eval echo ${user_path}` ; I=`eval echo ${I}`
+J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
+
+echo ""
+echo "OpenSSH has been configured with the following options:"
+echo "                     User binaries: $B"
+echo "                   System binaries: $C"
+echo "               Configuration files: $D"
+echo "                   Askpass program: $E"
+echo "                      Manual pages: $F"
+echo "                          PID file: $G"
+echo "  Privilege separation chroot path: $H"
+if test "$USES_LOGIN_CONF" = "yes" ; then
+echo "   At runtime, sshd will use the path defined in /etc/login.conf"
+else
+echo "            sshd default user PATH: $I"
+fi
+if test ! -z "$superuser_path" ; then
+echo "          sshd superuser user PATH: $J"
+fi
+echo "                    Manpage format: $MANTYPE"
+echo "                       PAM support: ${PAM_MSG}"
+echo "                KerberosIV support: $KRB4_MSG"
+echo "                 KerberosV support: $KRB5_MSG"
+echo "                 Smartcard support: $SCARD_MSG"
+echo "                       AFS support: $AFS_MSG"
+echo "                     S/KEY support: $SKEY_MSG"
+echo "              TCP Wrappers support: $TCPW_MSG"
+echo "              MD5 password support: $MD5_MSG"
+echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
+echo "          Use IPv4 by default hack: $IPV4_HACK_MSG"
+echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
+echo "                  BSD Auth support: $BSD_AUTH_MSG"
+echo "              Random number source: $RAND_MSG"
+if test ! -z "$USE_RAND_HELPER" ; then
+echo "     ssh-rand-helper collects from: $RAND_HELPER_MSG"
+fi
+
+echo ""
+
+echo "              Host: ${host}"
+echo "          Compiler: ${CC}"
+echo "    Compiler flags: ${CFLAGS}"
+echo "Preprocessor flags: ${CPPFLAGS}"
+echo "      Linker flags: ${LDFLAGS}"
+echo "         Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
+
+echo ""
+
+if test "x$PAM_MSG" = "xyes" ; then
+       echo "PAM is enabled. You may need to install a PAM control file "
+       echo "for sshd, otherwise password authentication may fail. "
+       echo "Example PAM control files can be found in the contrib/ " 
+       echo "subdirectory"
+       echo ""
+fi
+
+if test ! -z "$NO_SFTP"; then
+       echo "sftp-server will be disabled.  Your compiler does not "
+       echo "support 64bit integers."
+       echo ""
+fi
+
+if test ! -z "$RAND_HELPER_CMDHASH" ; then
+       echo "WARNING: you are using the builtin random number collection "
+       echo "service. Please read WARNING.RNG and request that your OS "
+       echo "vendor includes kernel-based random number collection in "
+       echo "future versions of your OS."
+       echo ""
+fi
+
diff --git a/openssh/autom4te-2.53.cache/requests b/openssh/autom4te-2.53.cache/requests
new file mode 100644 (file)
index 0000000..a1d9e87
--- /dev/null
@@ -0,0 +1,96 @@
+# This file was created by autom4te-2.53.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+@request = (
+             bless( [
+                      '0',
+                      1,
+                      [
+                        '/usr/share/autoconf-2.53'
+                      ],
+                      [
+                        '--reload-state=/usr/share/autoconf-2.53/autoconf/autoconf.m4f',
+                        'aclocal.m4',
+                        'configure.ac'
+                      ],
+                      {
+                        'AC_HEADER_STAT' => 1,
+                        'AC_FUNC_STRFTIME' => 1,
+                        'AC_PROG_RANLIB' => 1,
+                        'AC_FUNC_WAIT3' => 1,
+                        'AC_FUNC_SETPGRP' => 1,
+                        'AC_HEADER_TIME' => 1,
+                        'AC_FUNC_SETVBUF_REVERSED' => 1,
+                        'AC_HEADER_SYS_WAIT' => 1,
+                        'AC_TYPE_UID_T' => 1,
+                        'AM_CONDITIONAL' => 1,
+                        'AC_CHECK_LIB' => 1,
+                        'AC_PROG_LN_S' => 1,
+                        'AC_FUNC_MEMCMP' => 1,
+                        'AC_FUNC_FORK' => 1,
+                        'AC_FUNC_GETGROUPS' => 1,
+                        'AC_HEADER_MAJOR' => 1,
+                        'AC_FUNC_STRTOD' => 1,
+                        'AC_HEADER_DIRENT' => 1,
+                        'AC_FUNC_UTIME_NULL' => 1,
+                        'AC_CONFIG_FILES' => 1,
+                        'AC_FUNC_ALLOCA' => 1,
+                        'AC_C_CONST' => 1,
+                        'include' => 1,
+                        'AC_FUNC_OBSTACK' => 1,
+                        'AC_FUNC_LSTAT' => 1,
+                        'AC_STRUCT_TIMEZONE' => 1,
+                        'AC_FUNC_GETPGRP' => 1,
+                        'AC_DEFINE_TRACE_LITERAL' => 1,
+                        'AC_CHECK_HEADERS' => 1,
+                        'AC_TYPE_MODE_T' => 1,
+                        'AC_CHECK_TYPES' => 1,
+                        'AC_PROG_YACC' => 1,
+                        'AC_TYPE_PID_T' => 1,
+                        'AC_FUNC_STRERROR_R' => 1,
+                        'AC_STRUCT_ST_BLOCKS' => 1,
+                        'AC_PROG_GCC_TRADITIONAL' => 1,
+                        'AC_TYPE_SIGNAL' => 1,
+                        'AM_PROG_LIBTOOL' => 1,
+                        'AC_FUNC_FNMATCH' => 1,
+                        'AC_PROG_CPP' => 1,
+                        'AC_FUNC_STAT' => 1,
+                        'AC_PROG_INSTALL' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        'AC_CONFIG_SUBDIRS' => 1,
+                        'AC_FUNC_STRCOLL' => 1,
+                        'AC_LIBSOURCE' => 1,
+                        'AC_C_INLINE' => 1,
+                        'AC_FUNC_CHOWN' => 1,
+                        'AC_INIT' => 1,
+                        'AC_PROG_LEX' => 1,
+                        'AH_OUTPUT' => 1,
+                        'AC_HEADER_STDC' => 1,
+                        'AC_FUNC_GETLOADAVG' => 1,
+                        'AC_CHECK_FUNCS' => 1,
+                        'AC_TYPE_SIZE_T' => 1,
+                        'AC_DECL_SYS_SIGLIST' => 1,
+                        'AC_FUNC_MKTIME' => 1,
+                        'AC_PROG_MAKE_SET' => 1,
+                        'AC_PROG_CXX' => 1,
+                        'm4_pattern_allow' => 1,
+                        'm4_include' => 1,
+                        'm4_pattern_forbid' => 1,
+                        'AC_PROG_AWK' => 1,
+                        'AC_FUNC_VPRINTF' => 1,
+                        'AC_CONFIG_HEADERS' => 1,
+                        'AC_PATH_X' => 1,
+                        'AC_TYPE_OFF_T' => 1,
+                        'AC_FUNC_MALLOC' => 1,
+                        'AC_FUNC_ERROR_AT_LINE' => 1,
+                        'AC_FUNC_FSEEKO' => 1,
+                        'AC_FUNC_MMAP' => 1,
+                        'AC_STRUCT_TM' => 1,
+                        'AC_SUBST' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
+                        'AC_PROG_CC' => 1
+                      }
+                    ], 'Request' )
+           );
+
diff --git a/openssh/autom4te-2.53.cache/traces.0 b/openssh/autom4te-2.53.cache/traces.0
new file mode 100644 (file)
index 0000000..0827a33
--- /dev/null
@@ -0,0 +1,866 @@
+m4trace:configure.ac:3: -1- AC_INIT
+m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:3: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs. LIBOBJS'])
+m4trace:configure.ac:3: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:3: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:3: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.ac:3: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:3: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:3: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:3: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:3: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.ac:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:3: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:3: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:3: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:3: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.ac:3: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:3: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:3: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:3: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:3: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:3: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:3: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:3: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:3: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:6: -1- AC_CONFIG_HEADERS([config.h])
+m4trace:configure.ac:7: -1- AC_PROG_CC
+m4trace:configure.ac:7: -1- AC_SUBST([CC])
+m4trace:configure.ac:7: -1- AC_SUBST([CFLAGS])
+m4trace:configure.ac:7: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:7: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:7: -1- AC_SUBST([CC])
+m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:7: -1- AC_SUBST([CC])
+m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:7: -1- AC_SUBST([CC])
+m4trace:configure.ac:7: -1- AC_SUBST([CC])
+m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:7: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.ac:7: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.ac:8: -1- AC_SUBST([build], [$ac_cv_build])
+m4trace:configure.ac:8: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.ac:8: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.ac:8: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.ac:8: -1- AC_SUBST([host], [$ac_cv_host])
+m4trace:configure.ac:8: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
+m4trace:configure.ac:8: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
+m4trace:configure.ac:8: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
+m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
+m4trace:configure.ac:9: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN])
+m4trace:configure.ac:12: -1- AC_PROG_CPP
+m4trace:configure.ac:12: -1- AC_SUBST([CPP])
+m4trace:configure.ac:12: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:12: -1- AC_SUBST([CPP])
+m4trace:configure.ac:13: -1- AC_PROG_RANLIB
+m4trace:configure.ac:13: -1- AC_SUBST([RANLIB])
+m4trace:configure.ac:13: -1- AC_SUBST([ac_ct_RANLIB])
+m4trace:configure.ac:14: -1- AC_PROG_INSTALL
+m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:15: -1- AC_SUBST([AR], [$ac_cv_path_AR])
+m4trace:configure.ac:16: -1- AC_SUBST([PERL], [$ac_cv_path_PERL])
+m4trace:configure.ac:17: -1- AC_SUBST([PERL])
+m4trace:configure.ac:18: -1- AC_SUBST([ENT], [$ac_cv_path_ENT])
+m4trace:configure.ac:19: -1- AC_SUBST([ENT])
+m4trace:configure.ac:20: -1- AC_SUBST([FILEPRIV], [$ac_cv_path_FILEPRIV])
+m4trace:configure.ac:21: -1- AC_SUBST([TEST_MINUS_S_SH], [$ac_cv_path_TEST_MINUS_S_SH])
+m4trace:configure.ac:22: -1- AC_SUBST([TEST_MINUS_S_SH], [$ac_cv_path_TEST_MINUS_S_SH])
+m4trace:configure.ac:23: -1- AC_SUBST([TEST_MINUS_S_SH], [$ac_cv_path_TEST_MINUS_S_SH])
+m4trace:configure.ac:24: -1- AC_SUBST([SH], [$ac_cv_path_SH])
+m4trace:configure.ac:27: -1- AC_DEFINE_TRACE_LITERAL([_FILE_OFFSET_BITS])
+m4trace:configure.ac:27: -1- AH_OUTPUT([_FILE_OFFSET_BITS], [/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS])
+m4trace:configure.ac:27: -1- AC_DEFINE_TRACE_LITERAL([_LARGE_FILES])
+m4trace:configure.ac:27: -1- AH_OUTPUT([_LARGE_FILES], [/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES])
+m4trace:configure.ac:35: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_PROGRAM_FALLBACK])
+m4trace:configure.ac:38: -1- AC_SUBST([LOGIN_PROGRAM_FALLBACK], [$ac_cv_path_LOGIN_PROGRAM_FALLBACK])
+m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_PROGRAM_FALLBACK])
+m4trace:configure.ac:47: -1- AC_SUBST([LD])
+m4trace:configure.ac:49: -1- AC_C_INLINE
+m4trace:configure.ac:49: -1- AC_DEFINE_TRACE_LITERAL([inline])
+m4trace:configure.ac:49: -1- AH_OUTPUT([inline], [/* Define as \`__inline' if that's what the C compiler calls it, or to nothing
+   if it is not supported. */
+#undef inline])
+m4trace:configure.ac:49: -1- AC_DEFINE_TRACE_LITERAL([inline])
+m4trace:configure.ac:74: -1- AC_DEFINE_TRACE_LITERAL([WITH_AIXAUTHENTICATE])
+m4trace:configure.ac:75: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_GETADDRINFO])
+m4trace:configure.ac:76: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_REALPATH])
+m4trace:configure.ac:78: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LASTLOG])
+m4trace:configure.ac:82: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CYGWIN])
+m4trace:configure.ac:83: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:84: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
+m4trace:configure.ac:85: -1- AC_DEFINE_TRACE_LITERAL([IPV4_DEFAULT])
+m4trace:configure.ac:86: -1- AC_DEFINE_TRACE_LITERAL([IP_TOS_IS_BROKEN])
+m4trace:configure.ac:87: -1- AC_DEFINE_TRACE_LITERAL([NO_X11_UNIX_SOCKETS])
+m4trace:configure.ac:90: -1- AC_DEFINE_TRACE_LITERAL([IP_TOS_IS_BROKEN])
+m4trace:configure.ac:93: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_GETADDRINFO])
+m4trace:configure.ac:101: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SECUREWARE])
+m4trace:configure.ac:102: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:103: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NO_ENDOPT])
+m4trace:configure.ac:104: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
+m4trace:configure.ac:105: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
+m4trace:configure.ac:106: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
+m4trace:configure.ac:107: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE])
+m4trace:configure.ac:117: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:118: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NO_ENDOPT])
+m4trace:configure.ac:119: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
+m4trace:configure.ac:120: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
+m4trace:configure.ac:121: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
+m4trace:configure.ac:122: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE])
+m4trace:configure.ac:128: -1- AC_DEFINE_TRACE_LITERAL([PAM_SUN_CODEBASE])
+m4trace:configure.ac:129: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:130: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NO_ENDOPT])
+m4trace:configure.ac:131: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
+m4trace:configure.ac:132: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
+m4trace:configure.ac:133: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
+m4trace:configure.ac:134: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE])
+m4trace:configure.ac:141: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_INET_NTOA])
+m4trace:configure.ac:142: -1- AC_DEFINE_TRACE_LITERAL([WITH_ABBREV_NO_TTY])
+m4trace:configure.ac:148: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_ARRAY])
+m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_PROJECT])
+m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_AUDIT])
+m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_JOBS])
+m4trace:configure.ac:152: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_INET_NTOA])
+m4trace:configure.ac:153: -1- AC_DEFINE_TRACE_LITERAL([WITH_ABBREV_NO_TTY])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DONT_TRY_OTHER_AF])
+m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([PAM_TTY_KLUDGE])
+m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NEWS4])
+m4trace:configure.ac:177: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NEXT])
+m4trace:configure.ac:178: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_REALPATH])
+m4trace:configure.ac:179: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:180: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SAVED_UIDS])
+m4trace:configure.ac:188: -1- AC_DEFINE_TRACE_LITERAL([PAM_SUN_CODEBASE])
+m4trace:configure.ac:189: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
+m4trace:configure.ac:190: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_TERM])
+m4trace:configure.ac:191: -1- AC_DEFINE_TRACE_LITERAL([PAM_TTY_KLUDGE])
+m4trace:configure.ac:198: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
+m4trace:configure.ac:199: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMP])
+m4trace:configure.ac:206: -1- AC_CHECK_FUNCS([getpwanam])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_GETPWANAM], [/* Define to 1 if you have the \`getpwanam' function. */
+#undef HAVE_GETPWANAM])
+m4trace:configure.ac:207: -1- AC_DEFINE_TRACE_LITERAL([PAM_SUN_CODEBASE])
+m4trace:configure.ac:211: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:217: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:224: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:225: -1- AC_DEFINE_TRACE_LITERAL([IP_TOS_IS_BROKEN])
+m4trace:configure.ac:234: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:240: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:253: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SYS_TERMIO_H])
+m4trace:configure.ac:254: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:255: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SECUREWARE])
+m4trace:configure.ac:256: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
+m4trace:configure.ac:257: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SAVED_UIDS])
+m4trace:configure.ac:258: -1- AC_CHECK_FUNCS([getluid setluid])
+m4trace:configure.ac:258: -1- AH_OUTPUT([HAVE_GETLUID], [/* Define to 1 if you have the \`getluid' function. */
+#undef HAVE_GETLUID])
+m4trace:configure.ac:258: -1- AH_OUTPUT([HAVE_SETLUID], [/* Define to 1 if you have the \`setluid' function. */
+#undef HAVE_SETLUID])
+m4trace:configure.ac:268: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:269: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SECUREWARE])
+m4trace:configure.ac:270: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
+m4trace:configure.ac:271: -1- AC_CHECK_FUNCS([getluid setluid])
+m4trace:configure.ac:271: -1- AH_OUTPUT([HAVE_GETLUID], [/* Define to 1 if you have the \`getluid' function. */
+#undef HAVE_GETLUID])
+m4trace:configure.ac:271: -1- AH_OUTPUT([HAVE_SETLUID], [/* Define to 1 if you have the \`setluid' function. */
+#undef HAVE_SETLUID])
+m4trace:configure.ac:277: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:296: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OSF_SIA])
+m4trace:configure.ac:297: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LOGIN])
+m4trace:configure.ac:306: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
+m4trace:configure.ac:307: -1- AC_DEFINE_TRACE_LITERAL([NO_X11_UNIX_SOCKETS])
+m4trace:configure.ac:308: -1- AC_DEFINE_TRACE_LITERAL([MISSING_NFDBITS])
+m4trace:configure.ac:309: -1- AC_DEFINE_TRACE_LITERAL([MISSING_HOWMANY])
+m4trace:configure.ac:310: -1- AC_DEFINE_TRACE_LITERAL([MISSING_FD_MASK])
+m4trace:configure.ac:358: -1- AC_CHECK_HEADERS([bstring.h crypt.h endian.h floatingpoint.h \
+       getopt.h glob.h lastlog.h limits.h login.h \
+       login_cap.h maillock.h netdb.h netgroup.h \
+       netinet/in_systm.h paths.h pty.h readpassphrase.h \
+       rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
+       strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
+       sys/mman.h sys/select.h sys/stat.h \
+       sys/stropts.h sys/sysmacros.h sys/time.h \
+       sys/un.h time.h ttyent.h usersec.h \
+       util.h utime.h utmp.h utmpx.h])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_BSTRING_H], [/* Define to 1 if you have the <bstring.h> header file. */
+#undef HAVE_BSTRING_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_CRYPT_H], [/* Define to 1 if you have the <crypt.h> header file. */
+#undef HAVE_CRYPT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_ENDIAN_H], [/* Define to 1 if you have the <endian.h> header file. */
+#undef HAVE_ENDIAN_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_FLOATINGPOINT_H], [/* Define to 1 if you have the <floatingpoint.h> header file. */
+#undef HAVE_FLOATINGPOINT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_GLOB_H], [/* Define to 1 if you have the <glob.h> header file. */
+#undef HAVE_GLOB_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_LASTLOG_H], [/* Define to 1 if you have the <lastlog.h> header file. */
+#undef HAVE_LASTLOG_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_LOGIN_H], [/* Define to 1 if you have the <login.h> header file. */
+#undef HAVE_LOGIN_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_LOGIN_CAP_H], [/* Define to 1 if you have the <login_cap.h> header file. */
+#undef HAVE_LOGIN_CAP_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_MAILLOCK_H], [/* Define to 1 if you have the <maillock.h> header file. */
+#undef HAVE_MAILLOCK_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_NETGROUP_H], [/* Define to 1 if you have the <netgroup.h> header file. */
+#undef HAVE_NETGROUP_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_NETINET_IN_SYSTM_H], [/* Define to 1 if you have the <netinet/in_systm.h> header file. */
+#undef HAVE_NETINET_IN_SYSTM_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_PATHS_H], [/* Define to 1 if you have the <paths.h> header file. */
+#undef HAVE_PATHS_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_PTY_H], [/* Define to 1 if you have the <pty.h> header file. */
+#undef HAVE_PTY_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_READPASSPHRASE_H], [/* Define to 1 if you have the <readpassphrase.h> header file. */
+#undef HAVE_READPASSPHRASE_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_RPC_TYPES_H], [/* Define to 1 if you have the <rpc/types.h> header file. */
+#undef HAVE_RPC_TYPES_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SECURITY_PAM_APPL_H], [/* Define to 1 if you have the <security/pam_appl.h> header file. */
+#undef HAVE_SECURITY_PAM_APPL_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SHADOW_H], [/* Define to 1 if you have the <shadow.h> header file. */
+#undef HAVE_SHADOW_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_BITYPES_H], [/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#undef HAVE_SYS_BITYPES_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_BSDTTY_H], [/* Define to 1 if you have the <sys/bsdtty.h> header file. */
+#undef HAVE_SYS_BSDTTY_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_CDEFS_H], [/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_STROPTS_H], [/* Define to 1 if you have the <sys/stropts.h> header file. */
+#undef HAVE_SYS_STROPTS_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_SYSMACROS_H], [/* Define to 1 if you have the <sys/sysmacros.h> header file. */
+#undef HAVE_SYS_SYSMACROS_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_UN_H], [/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_TIME_H], [/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_TTYENT_H], [/* Define to 1 if you have the <ttyent.h> header file. */
+#undef HAVE_TTYENT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_USERSEC_H], [/* Define to 1 if you have the <usersec.h> header file. */
+#undef HAVE_USERSEC_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_UTIL_H], [/* Define to 1 if you have the <util.h> header file. */
+#undef HAVE_UTIL_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_UTIME_H], [/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_UTMP_H], [/* Define to 1 if you have the <utmp.h> header file. */
+#undef HAVE_UTMP_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_UTMPX_H], [/* Define to 1 if you have the <utmpx.h> header file. */
+#undef HAVE_UTMPX_H])
+m4trace:configure.ac:358: -1- AC_HEADER_STDC
+m4trace:configure.ac:358: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.ac:358: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS])
+m4trace:configure.ac:358: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H])
+m4trace:configure.ac:358: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.ac:361: -2- AC_CHECK_LIB([nsl], [yp_match])
+m4trace:configure.ac:361: -2- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the \`nsl' library (-lnsl). */
+#undef HAVE_LIBNSL])
+m4trace:configure.ac:361: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL])
+m4trace:configure.ac:362: -2- AC_CHECK_LIB([socket], [setsockopt])
+m4trace:configure.ac:362: -2- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the \`socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET])
+m4trace:configure.ac:362: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
+m4trace:configure.ac:367: -1- AC_CHECK_LIB([rpc], [innetgr], [LIBS="-lrpc -lyp -lrpc $LIBS" ], [], [-lyp -lrpc])
+m4trace:configure.ac:372: -2- AC_CHECK_LIB([gen], [getspnam], [LIBS="$LIBS -lgen"])
+m4trace:configure.ac:414: -1- AC_CHECK_LIB([z], [deflate], [], [{ { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5
+echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
+   { (exit 1); exit 1; }; }])
+m4trace:configure.ac:414: -1- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the \`z' library (-lz). */
+#undef HAVE_LIBZ])
+m4trace:configure.ac:414: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ])
+m4trace:configure.ac:419: -1- AC_CHECK_LIB([resolv], [strcasecmp], [LIBS="$LIBS -lresolv"])
+m4trace:configure.ac:422: -1- AC_CHECK_LIB([c89], [utimes], [LIBS="$LIBS -lc89"])
+m4trace:configure.ac:425: -1- AC_CHECK_HEADERS([libutil.h])
+m4trace:configure.ac:425: -1- AH_OUTPUT([HAVE_LIBUTIL_H], [/* Define to 1 if you have the <libutil.h> header file. */
+#undef HAVE_LIBUTIL_H])
+m4trace:configure.ac:426: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LOGIN])
+m4trace:configure.ac:427: -1- AC_CHECK_FUNCS([logout updwtmp logwtmp])
+m4trace:configure.ac:427: -1- AH_OUTPUT([HAVE_LOGOUT], [/* Define to 1 if you have the \`logout' function. */
+#undef HAVE_LOGOUT])
+m4trace:configure.ac:427: -1- AH_OUTPUT([HAVE_UPDWTMP], [/* Define to 1 if you have the \`updwtmp' function. */
+#undef HAVE_UPDWTMP])
+m4trace:configure.ac:427: -1- AH_OUTPUT([HAVE_LOGWTMP], [/* Define to 1 if you have the \`logwtmp' function. */
+#undef HAVE_LOGWTMP])
+m4trace:configure.ac:429: -1- AC_FUNC_STRFTIME
+m4trace:configure.ac:429: -1- AC_CHECK_FUNCS([strftime], [], [# strftime is in -lintl on SCO UNIX.
+AC_CHECK_LIB(intl, strftime,
+             [AC_DEFINE(HAVE_STRFTIME)
+LIBS="-lintl $LIBS"])])
+m4trace:configure.ac:429: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the \`strftime' function. */
+#undef HAVE_STRFTIME])
+m4trace:configure.ac:429: -1- AC_CHECK_LIB([intl], [strftime], [AC_DEFINE(HAVE_STRFTIME)
+LIBS="-lintl $LIBS"])
+m4trace:configure.ac:429: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
+m4trace:configure.ac:447: -1- AC_DEFINE_TRACE_LITERAL([GLOB_HAS_ALTDIRFUNC])
+m4trace:configure.ac:463: -1- AC_DEFINE_TRACE_LITERAL([GLOB_HAS_GL_MATCHC])
+m4trace:configure.ac:477: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_ONE_BYTE_DIRENT_D_NAME])
+m4trace:configure.ac:510: -1- AC_DEFINE_TRACE_LITERAL([SKEY])
+m4trace:configure.ac:564: -1- AC_DEFINE_TRACE_LITERAL([LIBWRAP])
+m4trace:configure.ac:564: -1- AC_SUBST([LIBWRAP])
+m4trace:configure.ac:577: -1- AC_CHECK_FUNCS([arc4random b64_ntop bcopy bindresvport_sa \
+       clock fchmod fchown freeaddrinfo futimes gai_strerror \
+       getaddrinfo getcwd getgrouplist getnameinfo getopt \
+       getrlimit getrusage getttyent glob inet_aton inet_ntoa \
+       inet_ntop innetgr login_getcapbool md5_crypt memmove \
+       mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \
+       realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
+       setenv seteuid setlogin setproctitle setresgid setreuid setrlimit \
+       setsid setvbuf sigaction sigvec snprintf socketpair strerror \
+       strlcat strlcpy strmode strsep sysconf tcgetpgrp truncate utimes \
+       vhangup vsnprintf waitpid __b64_ntop _getpty])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_ARC4RANDOM], [/* Define to 1 if you have the \`arc4random' function. */
+#undef HAVE_ARC4RANDOM])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_B64_NTOP], [/* Define to 1 if you have the \`b64_ntop' function. */
+#undef HAVE_B64_NTOP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_BCOPY], [/* Define to 1 if you have the \`bcopy' function. */
+#undef HAVE_BCOPY])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_BINDRESVPORT_SA], [/* Define to 1 if you have the \`bindresvport_sa' function. */
+#undef HAVE_BINDRESVPORT_SA])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_CLOCK], [/* Define to 1 if you have the \`clock' function. */
+#undef HAVE_CLOCK])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_FCHMOD], [/* Define to 1 if you have the \`fchmod' function. */
+#undef HAVE_FCHMOD])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_FCHOWN], [/* Define to 1 if you have the \`fchown' function. */
+#undef HAVE_FCHOWN])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_FREEADDRINFO], [/* Define to 1 if you have the \`freeaddrinfo' function. */
+#undef HAVE_FREEADDRINFO])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_FUTIMES], [/* Define to 1 if you have the \`futimes' function. */
+#undef HAVE_FUTIMES])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GAI_STRERROR], [/* Define to 1 if you have the \`gai_strerror' function. */
+#undef HAVE_GAI_STRERROR])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Define to 1 if you have the \`getaddrinfo' function. */
+#undef HAVE_GETADDRINFO])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETCWD], [/* Define to 1 if you have the \`getcwd' function. */
+#undef HAVE_GETCWD])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETGROUPLIST], [/* Define to 1 if you have the \`getgrouplist' function. */
+#undef HAVE_GETGROUPLIST])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETNAMEINFO], [/* Define to 1 if you have the \`getnameinfo' function. */
+#undef HAVE_GETNAMEINFO])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETOPT], [/* Define to 1 if you have the \`getopt' function. */
+#undef HAVE_GETOPT])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETRLIMIT], [/* Define to 1 if you have the \`getrlimit' function. */
+#undef HAVE_GETRLIMIT])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETRUSAGE], [/* Define to 1 if you have the \`getrusage' function. */
+#undef HAVE_GETRUSAGE])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GETTTYENT], [/* Define to 1 if you have the \`getttyent' function. */
+#undef HAVE_GETTTYENT])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_GLOB], [/* Define to 1 if you have the \`glob' function. */
+#undef HAVE_GLOB])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_INET_ATON], [/* Define to 1 if you have the \`inet_aton' function. */
+#undef HAVE_INET_ATON])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the \`inet_ntoa' function. */
+#undef HAVE_INET_NTOA])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_INET_NTOP], [/* Define to 1 if you have the \`inet_ntop' function. */
+#undef HAVE_INET_NTOP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_INNETGR], [/* Define to 1 if you have the \`innetgr' function. */
+#undef HAVE_INNETGR])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_LOGIN_GETCAPBOOL], [/* Define to 1 if you have the \`login_getcapbool' function. */
+#undef HAVE_LOGIN_GETCAPBOOL])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_MD5_CRYPT], [/* Define to 1 if you have the \`md5_crypt' function. */
+#undef HAVE_MD5_CRYPT])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the \`memmove' function. */
+#undef HAVE_MEMMOVE])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_MKDTEMP], [/* Define to 1 if you have the \`mkdtemp' function. */
+#undef HAVE_MKDTEMP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the \`mmap' function. */
+#undef HAVE_MMAP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_NGETADDRINFO], [/* Define to 1 if you have the \`ngetaddrinfo' function. */
+#undef HAVE_NGETADDRINFO])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_OPENPTY], [/* Define to 1 if you have the \`openpty' function. */
+#undef HAVE_OPENPTY])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_OGETADDRINFO], [/* Define to 1 if you have the \`ogetaddrinfo' function. */
+#undef HAVE_OGETADDRINFO])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_READPASSPHRASE], [/* Define to 1 if you have the \`readpassphrase' function. */
+#undef HAVE_READPASSPHRASE])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_REALPATH], [/* Define to 1 if you have the \`realpath' function. */
+#undef HAVE_REALPATH])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_RECVMSG], [/* Define to 1 if you have the \`recvmsg' function. */
+#undef HAVE_RECVMSG])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_RRESVPORT_AF], [/* Define to 1 if you have the \`rresvport_af' function. */
+#undef HAVE_RRESVPORT_AF])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SENDMSG], [/* Define to 1 if you have the \`sendmsg' function. */
+#undef HAVE_SENDMSG])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETDTABLESIZE], [/* Define to 1 if you have the \`setdtablesize' function. */
+#undef HAVE_SETDTABLESIZE])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETEGID], [/* Define to 1 if you have the \`setegid' function. */
+#undef HAVE_SETEGID])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETENV], [/* Define to 1 if you have the \`setenv' function. */
+#undef HAVE_SETENV])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETEUID], [/* Define to 1 if you have the \`seteuid' function. */
+#undef HAVE_SETEUID])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETLOGIN], [/* Define to 1 if you have the \`setlogin' function. */
+#undef HAVE_SETLOGIN])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETPROCTITLE], [/* Define to 1 if you have the \`setproctitle' function. */
+#undef HAVE_SETPROCTITLE])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETRESGID], [/* Define to 1 if you have the \`setresgid' function. */
+#undef HAVE_SETRESGID])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETREUID], [/* Define to 1 if you have the \`setreuid' function. */
+#undef HAVE_SETREUID])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the \`setrlimit' function. */
+#undef HAVE_SETRLIMIT])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETSID], [/* Define to 1 if you have the \`setsid' function. */
+#undef HAVE_SETSID])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SETVBUF], [/* Define to 1 if you have the \`setvbuf' function. */
+#undef HAVE_SETVBUF])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the \`sigaction' function. */
+#undef HAVE_SIGACTION])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SIGVEC], [/* Define to 1 if you have the \`sigvec' function. */
+#undef HAVE_SIGVEC])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the \`snprintf' function. */
+#undef HAVE_SNPRINTF])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SOCKETPAIR], [/* Define to 1 if you have the \`socketpair' function. */
+#undef HAVE_SOCKETPAIR])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the \`strerror' function. */
+#undef HAVE_STRERROR])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the \`strlcat' function. */
+#undef HAVE_STRLCAT])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the \`strlcpy' function. */
+#undef HAVE_STRLCPY])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_STRMODE], [/* Define to 1 if you have the \`strmode' function. */
+#undef HAVE_STRMODE])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_STRSEP], [/* Define to 1 if you have the \`strsep' function. */
+#undef HAVE_STRSEP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_SYSCONF], [/* Define to 1 if you have the \`sysconf' function. */
+#undef HAVE_SYSCONF])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_TCGETPGRP], [/* Define to 1 if you have the \`tcgetpgrp' function. */
+#undef HAVE_TCGETPGRP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_TRUNCATE], [/* Define to 1 if you have the \`truncate' function. */
+#undef HAVE_TRUNCATE])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_UTIMES], [/* Define to 1 if you have the \`utimes' function. */
+#undef HAVE_UTIMES])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_VHANGUP], [/* Define to 1 if you have the \`vhangup' function. */
+#undef HAVE_VHANGUP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the \`vsnprintf' function. */
+#undef HAVE_VSNPRINTF])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE_WAITPID], [/* Define to 1 if you have the \`waitpid' function. */
+#undef HAVE_WAITPID])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE___B64_NTOP], [/* Define to 1 if you have the \`__b64_ntop' function. */
+#undef HAVE___B64_NTOP])
+m4trace:configure.ac:577: -1- AH_OUTPUT([HAVE__GETPTY], [/* Define to 1 if you have the \`_getpty' function. */
+#undef HAVE__GETPTY])
+m4trace:configure.ac:614: -1- AC_CHECK_FUNCS([dirname], [AC_CHECK_HEADERS(libgen.h) ], [
+       AC_CHECK_LIB(gen, dirname,[
+               AC_CACHE_CHECK([for broken dirname],
+                       ac_cv_have_broken_dirname, [
+                       save_LIBS="$LIBS"
+                       LIBS="$LIBS -lgen"
+                       AC_TRY_RUN(
+                               [
+#include <libgen.h>
+#include <string.h>
+
+int main(int argc, char **argv) {
+    char *s, buf[32];
+
+    strncpy(buf,"/etc", 32);
+    s = dirname(buf);
+    if (!s || strncmp(s, "/", 32) != 0) {
+       exit(1);
+    } else {
+       exit(0);
+    }
+}
+                               ],
+                               [ ac_cv_have_broken_dirname="no" ],
+                               [ ac_cv_have_broken_dirname="yes" ]
+                       )
+                       LIBS="$save_LIBS"
+               ])
+               if test "x$ac_cv_have_broken_dirname" = "xno" ; then
+                       LIBS="$LIBS -lgen"
+                       AC_DEFINE(HAVE_DIRNAME)
+                       AC_CHECK_HEADERS(libgen.h)
+               fi
+       ])
+])
+m4trace:configure.ac:614: -1- AH_OUTPUT([HAVE_DIRNAME], [/* Define to 1 if you have the \`dirname' function. */
+#undef HAVE_DIRNAME])
+m4trace:configure.ac:614: -1- AC_CHECK_HEADERS([libgen.h])
+m4trace:configure.ac:614: -1- AH_OUTPUT([HAVE_LIBGEN_H], [/* Define to 1 if you have the <libgen.h> header file. */
+#undef HAVE_LIBGEN_H])
+m4trace:configure.ac:614: -1- AC_CHECK_LIB([gen], [dirname], [
+               AC_CACHE_CHECK([for broken dirname],
+                       ac_cv_have_broken_dirname, [
+                       save_LIBS="$LIBS"
+                       LIBS="$LIBS -lgen"
+                       AC_TRY_RUN(
+                               [
+#include <libgen.h>
+#include <string.h>
+
+int main(int argc, char **argv) {
+    char *s, buf[32];
+
+    strncpy(buf,"/etc", 32);
+    s = dirname(buf);
+    if (!s || strncmp(s, "/", 32) != 0) {
+       exit(1);
+    } else {
+       exit(0);
+    }
+}
+                               ],
+                               [ ac_cv_have_broken_dirname="no" ],
+                               [ ac_cv_have_broken_dirname="yes" ]
+                       )
+                       LIBS="$save_LIBS"
+               ])
+               if test "x$ac_cv_have_broken_dirname" = "xno" ; then
+                       LIBS="$LIBS -lgen"
+                       AC_DEFINE(HAVE_DIRNAME)
+                       AC_CHECK_HEADERS(libgen.h)
+               fi
+       ])
+m4trace:configure.ac:614: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DIRNAME])
+m4trace:configure.ac:614: -1- AC_CHECK_HEADERS([libgen.h])
+m4trace:configure.ac:614: -1- AH_OUTPUT([HAVE_LIBGEN_H], [/* Define to 1 if you have the <libgen.h> header file. */
+#undef HAVE_LIBGEN_H])
+m4trace:configure.ac:617: -1- AC_CHECK_FUNCS([gettimeofday time])
+m4trace:configure.ac:617: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the \`gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY])
+m4trace:configure.ac:617: -1- AH_OUTPUT([HAVE_TIME], [/* Define to 1 if you have the \`time' function. */
+#undef HAVE_TIME])
+m4trace:configure.ac:619: -1- AC_CHECK_FUNCS([endutent getutent getutid getutline pututline setutent])
+m4trace:configure.ac:619: -1- AH_OUTPUT([HAVE_ENDUTENT], [/* Define to 1 if you have the \`endutent' function. */
+#undef HAVE_ENDUTENT])
+m4trace:configure.ac:619: -1- AH_OUTPUT([HAVE_GETUTENT], [/* Define to 1 if you have the \`getutent' function. */
+#undef HAVE_GETUTENT])
+m4trace:configure.ac:619: -1- AH_OUTPUT([HAVE_GETUTID], [/* Define to 1 if you have the \`getutid' function. */
+#undef HAVE_GETUTID])
+m4trace:configure.ac:619: -1- AH_OUTPUT([HAVE_GETUTLINE], [/* Define to 1 if you have the \`getutline' function. */
+#undef HAVE_GETUTLINE])
+m4trace:configure.ac:619: -1- AH_OUTPUT([HAVE_PUTUTLINE], [/* Define to 1 if you have the \`pututline' function. */
+#undef HAVE_PUTUTLINE])
+m4trace:configure.ac:619: -1- AH_OUTPUT([HAVE_SETUTENT], [/* Define to 1 if you have the \`setutent' function. */
+#undef HAVE_SETUTENT])
+m4trace:configure.ac:620: -1- AC_CHECK_FUNCS([utmpname])
+m4trace:configure.ac:620: -1- AH_OUTPUT([HAVE_UTMPNAME], [/* Define to 1 if you have the \`utmpname' function. */
+#undef HAVE_UTMPNAME])
+m4trace:configure.ac:622: -1- AC_CHECK_FUNCS([endutxent getutxent getutxid getutxline pututxline ])
+m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_ENDUTXENT], [/* Define to 1 if you have the \`endutxent' function. */
+#undef HAVE_ENDUTXENT])
+m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETUTXENT], [/* Define to 1 if you have the \`getutxent' function. */
+#undef HAVE_GETUTXENT])
+m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETUTXID], [/* Define to 1 if you have the \`getutxid' function. */
+#undef HAVE_GETUTXID])
+m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETUTXLINE], [/* Define to 1 if you have the \`getutxline' function. */
+#undef HAVE_GETUTXLINE])
+m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_PUTUTXLINE], [/* Define to 1 if you have the \`pututxline' function. */
+#undef HAVE_PUTUTXLINE])
+m4trace:configure.ac:623: -1- AC_CHECK_FUNCS([setutxent utmpxname])
+m4trace:configure.ac:623: -1- AH_OUTPUT([HAVE_SETUTXENT], [/* Define to 1 if you have the \`setutxent' function. */
+#undef HAVE_SETUTXENT])
+m4trace:configure.ac:623: -1- AH_OUTPUT([HAVE_UTMPXNAME], [/* Define to 1 if you have the \`utmpxname' function. */
+#undef HAVE_UTMPXNAME])
+m4trace:configure.ac:628: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETUSERATTR])
+m4trace:configure.ac:628: -1- AC_CHECK_LIB([s], [getuserattr], [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])
+m4trace:configure.ac:628: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETUSERATTR])
+m4trace:configure.ac:633: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DAEMON])
+m4trace:configure.ac:633: -1- AC_CHECK_LIB([bsd], [daemon], [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])
+m4trace:configure.ac:633: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DAEMON])
+m4trace:configure.ac:638: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPAGESIZE])
+m4trace:configure.ac:638: -1- AC_CHECK_LIB([ucb], [getpagesize], [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])
+m4trace:configure.ac:638: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPAGESIZE])
+m4trace:configure.ac:654: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SNPRINTF])
+m4trace:configure.ac:657: -1- AC_FUNC_GETPGRP
+m4trace:configure.ac:657: -1- AC_DEFINE_TRACE_LITERAL([GETPGRP_VOID])
+m4trace:configure.ac:657: -1- AH_OUTPUT([GETPGRP_VOID], [/* Define to 1 if the \`getpgrp' function requires zero arguments. */
+#undef GETPGRP_VOID])
+m4trace:configure.ac:685: -1- AC_CHECK_LIB([dl], [dlopen], [], [])
+m4trace:configure.ac:685: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the \`dl' library (-ldl). */
+#undef HAVE_LIBDL])
+m4trace:configure.ac:685: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
+m4trace:configure.ac:685: -1- AC_CHECK_LIB([pam], [pam_set_item], [], [{ { echo "$as_me:$LINENO: error: *** libpam missing" >&5
+echo "$as_me: error: *** libpam missing" >&2;}
+   { (exit 1); exit 1; }; }])
+m4trace:configure.ac:685: -1- AH_OUTPUT([HAVE_LIBPAM], [/* Define to 1 if you have the \`pam' library (-lpam). */
+#undef HAVE_LIBPAM])
+m4trace:configure.ac:685: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPAM])
+m4trace:configure.ac:685: -1- AC_CHECK_FUNCS([pam_getenvlist])
+m4trace:configure.ac:685: -1- AH_OUTPUT([HAVE_PAM_GETENVLIST], [/* Define to 1 if you have the \`pam_getenvlist' function. */
+#undef HAVE_PAM_GETENVLIST])
+m4trace:configure.ac:685: -1- AC_DEFINE_TRACE_LITERAL([USE_PAM])
+m4trace:configure.ac:685: -1- AC_SUBST([LIBPAM])
+m4trace:configure.ac:703: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OLD_PAM])
+m4trace:configure.ac:735: -2- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL])
+m4trace:configure.ac:750: -2- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL])
+m4trace:configure.ac:773: -1- AC_CHECK_LIB([crypt], [crypt], [LIBS="$LIBS -lcrypt"])
+m4trace:configure.ac:821: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_PRNG_ONLY])
+m4trace:configure.ac:829: -1- AC_SUBST([INSTALL_SSH_RAND_HELPER])
+m4trace:configure.ac:852: -1- AC_DEFINE_TRACE_LITERAL([PRNGD_PORT])
+m4trace:configure.ac:902: -1- AC_DEFINE_TRACE_LITERAL([PRNGD_SOCKET])
+m4trace:configure.ac:902: -1- AC_DEFINE_TRACE_LITERAL([PRNGD_SOCKET])
+m4trace:configure.ac:914: -1- AC_DEFINE_TRACE_LITERAL([ENTROPY_TIMEOUT_MSEC])
+m4trace:configure.ac:925: -1- AC_DEFINE_TRACE_LITERAL([SSH_PRIVSEP_USER])
+m4trace:configure.ac:942: -1- AC_SUBST([PROG_LS], [$ac_cv_path_PROG_LS])
+m4trace:configure.ac:942: -1- AC_SUBST([PROG_LS])
+m4trace:configure.ac:943: -1- AC_SUBST([PROG_NETSTAT], [$ac_cv_path_PROG_NETSTAT])
+m4trace:configure.ac:943: -1- AC_SUBST([PROG_NETSTAT])
+m4trace:configure.ac:944: -1- AC_SUBST([PROG_ARP], [$ac_cv_path_PROG_ARP])
+m4trace:configure.ac:944: -1- AC_SUBST([PROG_ARP])
+m4trace:configure.ac:945: -1- AC_SUBST([PROG_IFCONFIG], [$ac_cv_path_PROG_IFCONFIG])
+m4trace:configure.ac:945: -1- AC_SUBST([PROG_IFCONFIG])
+m4trace:configure.ac:946: -1- AC_SUBST([PROG_JSTAT], [$ac_cv_path_PROG_JSTAT])
+m4trace:configure.ac:946: -1- AC_SUBST([PROG_JSTAT])
+m4trace:configure.ac:947: -1- AC_SUBST([PROG_PS], [$ac_cv_path_PROG_PS])
+m4trace:configure.ac:947: -1- AC_SUBST([PROG_PS])
+m4trace:configure.ac:948: -1- AC_SUBST([PROG_SAR], [$ac_cv_path_PROG_SAR])
+m4trace:configure.ac:948: -1- AC_SUBST([PROG_SAR])
+m4trace:configure.ac:949: -1- AC_SUBST([PROG_W], [$ac_cv_path_PROG_W])
+m4trace:configure.ac:949: -1- AC_SUBST([PROG_W])
+m4trace:configure.ac:950: -1- AC_SUBST([PROG_WHO], [$ac_cv_path_PROG_WHO])
+m4trace:configure.ac:950: -1- AC_SUBST([PROG_WHO])
+m4trace:configure.ac:951: -1- AC_SUBST([PROG_LAST], [$ac_cv_path_PROG_LAST])
+m4trace:configure.ac:951: -1- AC_SUBST([PROG_LAST])
+m4trace:configure.ac:952: -1- AC_SUBST([PROG_LASTLOG], [$ac_cv_path_PROG_LASTLOG])
+m4trace:configure.ac:952: -1- AC_SUBST([PROG_LASTLOG])
+m4trace:configure.ac:953: -1- AC_SUBST([PROG_DF], [$ac_cv_path_PROG_DF])
+m4trace:configure.ac:953: -1- AC_SUBST([PROG_DF])
+m4trace:configure.ac:954: -1- AC_SUBST([PROG_VMSTAT], [$ac_cv_path_PROG_VMSTAT])
+m4trace:configure.ac:954: -1- AC_SUBST([PROG_VMSTAT])
+m4trace:configure.ac:955: -1- AC_SUBST([PROG_UPTIME], [$ac_cv_path_PROG_UPTIME])
+m4trace:configure.ac:955: -1- AC_SUBST([PROG_UPTIME])
+m4trace:configure.ac:956: -1- AC_SUBST([PROG_IPCS], [$ac_cv_path_PROG_IPCS])
+m4trace:configure.ac:956: -1- AC_SUBST([PROG_IPCS])
+m4trace:configure.ac:957: -1- AC_SUBST([PROG_TAIL], [$ac_cv_path_PROG_TAIL])
+m4trace:configure.ac:957: -1- AC_SUBST([PROG_TAIL])
+m4trace:configure.ac:974: -1- AC_SUBST([INSTALL_SSH_PRNG_CMDS])
+m4trace:configure.ac:983: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_CHAR])
+m4trace:configure.ac:983: -1- AH_OUTPUT([SIZEOF_CHAR], [/* The size of a \`char', as computed by sizeof. */
+#undef SIZEOF_CHAR])
+m4trace:configure.ac:984: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SHORT_INT])
+m4trace:configure.ac:984: -1- AH_OUTPUT([SIZEOF_SHORT_INT], [/* The size of a \`short int', as computed by sizeof. */
+#undef SIZEOF_SHORT_INT])
+m4trace:configure.ac:985: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT])
+m4trace:configure.ac:985: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of a \`int', as computed by sizeof. */
+#undef SIZEOF_INT])
+m4trace:configure.ac:986: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_INT])
+m4trace:configure.ac:986: -1- AH_OUTPUT([SIZEOF_LONG_INT], [/* The size of a \`long int', as computed by sizeof. */
+#undef SIZEOF_LONG_INT])
+m4trace:configure.ac:987: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT])
+m4trace:configure.ac:987: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of a \`long long int', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG_INT])
+m4trace:configure.ac:1004: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT])
+m4trace:configure.ac:1017: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTXX_T])
+m4trace:configure.ac:1033: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTXX_T])
+m4trace:configure.ac:1045: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT64_T])
+m4trace:configure.ac:1059: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT64_T])
+m4trace:configure.ac:1072: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT64_T])
+m4trace:configure.ac:1084: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INTXX_T])
+m4trace:configure.ac:1098: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INTXX_T])
+m4trace:configure.ac:1110: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT64_T])
+m4trace:configure.ac:1124: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT64_T])
+m4trace:configure.ac:1139: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINTXX_T])
+m4trace:configure.ac:1153: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINTXX_T])
+m4trace:configure.ac:1175: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INTXX_T])
+m4trace:configure.ac:1175: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTXX_T])
+m4trace:configure.ac:1190: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_CHAR])
+m4trace:configure.ac:1193: -1- AC_DEFINE_TRACE_LITERAL([socklen_t])
+m4trace:configure.ac:1193: -1- AH_OUTPUT([socklen_t], [/* type to use in place of socklen_t if not defined */
+#undef socklen_t])
+m4trace:configure.ac:1195: -1- AC_CHECK_TYPES([sig_atomic_t], [], [], [#include <signal.h>])
+m4trace:configure.ac:1195: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIG_ATOMIC_T])
+m4trace:configure.ac:1195: -1- AH_OUTPUT([HAVE_SIG_ATOMIC_T], [/* Define to 1 if the system has the type \`sig_atomic_t'. */
+#undef HAVE_SIG_ATOMIC_T])
+m4trace:configure.ac:1208: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIZE_T])
+m4trace:configure.ac:1222: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSIZE_T])
+m4trace:configure.ac:1236: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CLOCK_T])
+m4trace:configure.ac:1261: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SA_FAMILY_T])
+m4trace:configure.ac:1275: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PID_T])
+m4trace:configure.ac:1289: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MODE_T])
+m4trace:configure.ac:1305: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE])
+m4trace:configure.ac:1320: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_IN6])
+m4trace:configure.ac:1335: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_IN6_ADDR])
+m4trace:configure.ac:1351: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_ADDRINFO])
+m4trace:configure.ac:1363: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TIMEVAL])
+m4trace:configure.ac:1400: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SNPRINTF])
+m4trace:configure.ac:1402: -1- AC_SUBST([NO_SFTP])
+m4trace:configure.ac:1405: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_IN_UTMP])
+m4trace:configure.ac:1406: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_IN_UTMPX])
+m4trace:configure.ac:1407: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYSLEN_IN_UTMPX])
+m4trace:configure.ac:1408: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PID_IN_UTMP])
+m4trace:configure.ac:1409: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TYPE_IN_UTMP])
+m4trace:configure.ac:1410: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TYPE_IN_UTMPX])
+m4trace:configure.ac:1411: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TV_IN_UTMP])
+m4trace:configure.ac:1412: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ID_IN_UTMP])
+m4trace:configure.ac:1413: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ID_IN_UTMPX])
+m4trace:configure.ac:1414: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_IN_UTMP])
+m4trace:configure.ac:1415: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_IN_UTMPX])
+m4trace:configure.ac:1416: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_V6_IN_UTMP])
+m4trace:configure.ac:1417: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_V6_IN_UTMPX])
+m4trace:configure.ac:1418: -1- AC_DEFINE_TRACE_LITERAL([HAVE_EXIT_IN_UTMP])
+m4trace:configure.ac:1419: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TIME_IN_UTMP])
+m4trace:configure.ac:1420: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TIME_IN_UTMPX])
+m4trace:configure.ac:1421: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TV_IN_UTMPX])
+m4trace:configure.ac:1423: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_STAT_ST_BLKSIZE])
+m4trace:configure.ac:1423: -1- AH_OUTPUT([HAVE_STRUCT_STAT_ST_BLKSIZE], [/* Define to 1 if \`st_blksize' is member of \`struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE])
+m4trace:configure.ac:1438: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SS_FAMILY_IN_SS])
+m4trace:configure.ac:1454: -1- AC_DEFINE_TRACE_LITERAL([HAVE___SS_FAMILY_IN_SS])
+m4trace:configure.ac:1469: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PW_CLASS_IN_PASSWD])
+m4trace:configure.ac:1484: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PW_EXPIRE_IN_PASSWD])
+m4trace:configure.ac:1499: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PW_CHANGE_IN_PASSWD])
+m4trace:configure.ac:1516: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ACCRIGHTS_IN_MSGHDR])
+m4trace:configure.ac:1533: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CONTROL_IN_MSGHDR])
+m4trace:configure.ac:1544: -1- AC_DEFINE_TRACE_LITERAL([HAVE___PROGNAME])
+m4trace:configure.ac:1557: -1- AC_DEFINE_TRACE_LITERAL([HAVE___FUNCTION__])
+m4trace:configure.ac:1570: -1- AC_DEFINE_TRACE_LITERAL([HAVE___func__])
+m4trace:configure.ac:1585: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_OPTRESET])
+m4trace:configure.ac:1596: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_ERRLIST])
+m4trace:configure.ac:1608: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_NERR])
+m4trace:configure.ac:1641: -1- AC_CHECK_HEADERS([sectok.h])
+m4trace:configure.ac:1641: -1- AH_OUTPUT([HAVE_SECTOK_H], [/* Define to 1 if you have the <sectok.h> header file. */
+#undef HAVE_SECTOK_H])
+m4trace:configure.ac:1641: -1- AC_CHECK_LIB([sectok], [sectok_open])
+m4trace:configure.ac:1641: -1- AH_OUTPUT([HAVE_LIBSECTOK], [/* Define to 1 if you have the \`sectok' library (-lsectok). */
+#undef HAVE_LIBSECTOK])
+m4trace:configure.ac:1641: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSECTOK])
+m4trace:configure.ac:1641: -1- AC_DEFINE_TRACE_LITERAL([SMARTCARD])
+m4trace:configure.ac:1641: -1- AC_DEFINE_TRACE_LITERAL([USE_SECTOK])
+m4trace:configure.ac:1650: -1- AC_SUBST([OPENSC_CONFIG], [$ac_cv_path_OPENSC_CONFIG])
+m4trace:configure.ac:1656: -1- AC_DEFINE_TRACE_LITERAL([SMARTCARD])
+m4trace:configure.ac:1657: -1- AC_DEFINE_TRACE_LITERAL([USE_OPENSC])
+m4trace:configure.ac:1699: -1- AC_DEFINE_TRACE_LITERAL([KRB5])
+m4trace:configure.ac:1699: -1- AC_DEFINE_TRACE_LITERAL([HEIMDAL])
+m4trace:configure.ac:1699: -1- AC_CHECK_LIB([resolv], [dn_expand], [], [])
+m4trace:configure.ac:1699: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the \`resolv' library (-lresolv). */
+#undef HAVE_LIBRESOLV])
+m4trace:configure.ac:1699: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
+m4trace:configure.ac:1753: -1- AC_CHECK_HEADERS([krb.h])
+m4trace:configure.ac:1753: -1- AH_OUTPUT([HAVE_KRB_H], [/* Define to 1 if you have the <krb.h> header file. */
+#undef HAVE_KRB_H])
+m4trace:configure.ac:1753: -1- AC_CHECK_LIB([krb], [main])
+m4trace:configure.ac:1753: -1- AH_OUTPUT([HAVE_LIBKRB], [/* Define to 1 if you have the \`krb' library (-lkrb). */
+#undef HAVE_LIBKRB])
+m4trace:configure.ac:1753: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBKRB])
+m4trace:configure.ac:1753: -1- AC_CHECK_LIB([krb4], [main])
+m4trace:configure.ac:1753: -1- AH_OUTPUT([HAVE_LIBKRB4], [/* Define to 1 if you have the \`krb4' library (-lkrb4). */
+#undef HAVE_LIBKRB4])
+m4trace:configure.ac:1753: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBKRB4])
+m4trace:configure.ac:1753: -1- AC_CHECK_LIB([des], [des_cbc_encrypt])
+m4trace:configure.ac:1753: -1- AH_OUTPUT([HAVE_LIBDES], [/* Define to 1 if you have the \`des' library (-ldes). */
+#undef HAVE_LIBDES])
+m4trace:configure.ac:1753: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDES])
+m4trace:configure.ac:1753: -1- AC_CHECK_LIB([des425], [des_cbc_encrypt])
+m4trace:configure.ac:1753: -1- AH_OUTPUT([HAVE_LIBDES425], [/* Define to 1 if you have the \`des425' library (-ldes425). */
+#undef HAVE_LIBDES425])
+m4trace:configure.ac:1753: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDES425])
+m4trace:configure.ac:1753: -1- AC_CHECK_LIB([resolv], [dn_expand], [], [])
+m4trace:configure.ac:1753: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the \`resolv' library (-lresolv). */
+#undef HAVE_LIBRESOLV])
+m4trace:configure.ac:1753: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
+m4trace:configure.ac:1753: -1- AC_DEFINE_TRACE_LITERAL([KRB4])
+m4trace:configure.ac:1779: -1- AC_DEFINE_TRACE_LITERAL([AFS])
+m4trace:configure.ac:1793: -1- AC_SUBST([rsh_path], [$ac_cv_path_rsh_path])
+m4trace:configure.ac:1804: -1- AC_SUBST([PRIVSEP_PATH])
+m4trace:configure.ac:1819: -1- AC_SUBST([xauth_path], [$ac_cv_path_xauth_path])
+m4trace:configure.ac:1823: -1- AC_SUBST([XAUTH_PATH])
+m4trace:configure.ac:1825: -1- AC_DEFINE_TRACE_LITERAL([XAUTH_PATH])
+m4trace:configure.ac:1827: -1- AC_SUBST([XAUTH_PATH])
+m4trace:configure.ac:1830: -1- AC_DEFINE_TRACE_LITERAL([RSH_PATH])
+m4trace:configure.ac:1836: -1- AC_DEFINE_TRACE_LITERAL([MAIL_DIRECTORY])
+m4trace:configure.ac:1846: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DEV_PTMX])
+m4trace:configure.ac:1854: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DEV_PTS_AND_PTC])
+m4trace:configure.ac:1871: -1- AC_SUBST([NROFF], [$ac_cv_path_NROFF])
+m4trace:configure.ac:1880: -1- AC_SUBST([MANTYPE])
+m4trace:configure.ac:1886: -1- AC_SUBST([mansubdir])
+m4trace:configure.ac:1898: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MD5_PASSWORDS])
+m4trace:configure.ac:1909: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
+m4trace:configure.ac:1924: -1- AC_DEFINE_TRACE_LITERAL([HAS_SHADOW_EXPIRE])
+m4trace:configure.ac:1933: -1- AC_DEFINE_TRACE_LITERAL([IPADDR_IN_DISPLAY])
+m4trace:configure.ac:1944: -1- AC_DEFINE_TRACE_LITERAL([IPADDR_IN_DISPLAY])
+m4trace:configure.ac:2021: -1- AC_DEFINE_TRACE_LITERAL([USER_PATH])
+m4trace:configure.ac:2022: -1- AC_SUBST([user_path])
+m4trace:configure.ac:2035: -1- AC_DEFINE_TRACE_LITERAL([SUPERUSER_PATH])
+m4trace:configure.ac:2048: -1- AC_DEFINE_TRACE_LITERAL([IPV4_DEFAULT])
+m4trace:configure.ac:2071: -1- AC_DEFINE_TRACE_LITERAL([IPV4_IN_IPV6])
+m4trace:configure.ac:2071: -1- AC_DEFINE_TRACE_LITERAL([IPV4_IN_IPV6])
+m4trace:configure.ac:2083: -1- AC_DEFINE_TRACE_LITERAL([BSD_AUTH])
+m4trace:configure.ac:2101: -1- AC_SUBST([SSHMODE])
+m4trace:configure.ac:2126: -1- AC_DEFINE_TRACE_LITERAL([_PATH_SSH_PIDDIR])
+m4trace:configure.ac:2127: -1- AC_SUBST([piddir])
+m4trace:configure.ac:2133: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LASTLOG])
+m4trace:configure.ac:2137: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
+m4trace:configure.ac:2141: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMPX])
+m4trace:configure.ac:2145: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMP])
+m4trace:configure.ac:2149: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMPX])
+m4trace:configure.ac:2153: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LOGIN])
+m4trace:configure.ac:2157: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_PUTUTLINE])
+m4trace:configure.ac:2161: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_PUTUTXLINE])
+m4trace:configure.ac:2171: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LASTLOG])
+m4trace:configure.ac:2233: -1- AC_DEFINE_TRACE_LITERAL([CONF_LASTLOG_FILE])
+m4trace:configure.ac:2258: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
+m4trace:configure.ac:2263: -1- AC_DEFINE_TRACE_LITERAL([CONF_UTMP_FILE])
+m4trace:configure.ac:2288: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMP])
+m4trace:configure.ac:2293: -1- AC_DEFINE_TRACE_LITERAL([CONF_WTMP_FILE])
+m4trace:configure.ac:2318: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMPX])
+m4trace:configure.ac:2321: -1- AC_DEFINE_TRACE_LITERAL([CONF_UTMPX_FILE])
+m4trace:configure.ac:2343: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMPX])
+m4trace:configure.ac:2346: -1- AC_DEFINE_TRACE_LITERAL([CONF_WTMPX_FILE])
+m4trace:configure.ac:2364: -1- AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
index 23bc0c814d229cd685fd3952d5028b542362eb60..79f8bbd49667f528e6f56d39459c51573a4a2e57 100644 (file)
@@ -37,7 +37,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: bufaux.c,v 1.22 2002/01/18 18:14:17 stevesk Exp $");
+RCSID("$OpenBSD: bufaux.c,v 1.25 2002/04/20 09:14:58 markus Exp $");
 
 #include <openssl/bn.h>
 #include "bufaux.h"
@@ -137,10 +137,18 @@ buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
        BN_bin2bn(bin, len, value);
        xfree(bin);
 }
-
 /*
- * Returns an integer from the buffer (4 bytes, msb first).
+ * Returns integers from the buffer (msb first).
  */
+
+u_short
+buffer_get_short(Buffer *buffer)
+{
+       u_char buf[2];
+       buffer_get(buffer, (char *) buf, 2);
+       return GET_16BIT(buf);
+}
+
 u_int
 buffer_get_int(Buffer *buffer)
 {
@@ -160,8 +168,16 @@ buffer_get_int64(Buffer *buffer)
 #endif
 
 /*
- * Stores an integer in the buffer in 4 bytes, msb first.
+ * Stores integers in the buffer, msb first.
  */
+void
+buffer_put_short(Buffer *buffer, u_short value)
+{
+       char buf[2];
+       PUT_16BIT(buf, value);
+       buffer_append(buffer, buf, 2);
+}
+
 void
 buffer_put_int(Buffer *buffer, u_int value)
 {
@@ -196,7 +212,7 @@ buffer_get_string(Buffer *buffer, u_int *length_ptr)
        /* Get the length. */
        len = buffer_get_int(buffer);
        if (len > 256 * 1024)
-               fatal("Received packet with bad string length %d", len);
+               fatal("buffer_get_string: bad string length %d", len);
        /* Allocate space for the string.  Add one byte for a null character. */
        value = xmalloc(len + 1);
        /* Get the string. */
@@ -221,6 +237,8 @@ buffer_put_string(Buffer *buffer, const void *buf, u_int len)
 void
 buffer_put_cstring(Buffer *buffer, const char *s)
 {
+       if (s == NULL)
+               fatal("buffer_put_cstring: s == NULL");
        buffer_put_string(buffer, s, strlen(s));
 }
 
index 400013490d287741511f0e2da7df1a6cab439b37..80f35c1ecfa4223d70026ee7889e6893827c0767 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: bufaux.h,v 1.16 2002/03/04 17:27:39 stevesk Exp $     */
+/*     $OpenBSD: bufaux.h,v 1.18 2002/04/20 09:14:58 markus Exp $      */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -23,6 +23,9 @@ void    buffer_put_bignum2(Buffer *, BIGNUM *);
 void   buffer_get_bignum(Buffer *, BIGNUM *);
 void   buffer_get_bignum2(Buffer *, BIGNUM *);
 
+u_short        buffer_get_short(Buffer *);
+void   buffer_put_short(Buffer *, u_short);
+
 u_int  buffer_get_int(Buffer *);
 void    buffer_put_int(Buffer *, u_int);
 
@@ -38,4 +41,7 @@ void   *buffer_get_string(Buffer *, u_int *);
 void    buffer_put_string(Buffer *, const void *, u_int);
 void   buffer_put_cstring(Buffer *, const char *);
 
+#define buffer_skip_string(b) \
+    do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while(0)
+
 #endif                         /* BUFAUX_H */
index 2b1f33f34792d474387854accef728fbe1794d6c..520bff82292345903f6619c6b4d42b9287a8dc53 100644 (file)
@@ -39,7 +39,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.171 2002/03/04 19:37:58 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.173 2002/04/22 21:04:52 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -706,7 +706,11 @@ channel_pre_open(Channel *c, fd_set * readset, fd_set * writeset)
                if (buffer_len(&c->output) > 0) {
                        FD_SET(c->wfd, writeset);
                } else if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN) {
-                       chan_obuf_empty(c);
+                       if (CHANNEL_EFD_OUTPUT_ACTIVE(c))
+                               debug2("channel %d: obuf_empty delayed efd %d/(%d)",
+                                   c->self, c->efd, buffer_len(&c->extended));
+                       else
+                               chan_obuf_empty(c);
                }
        }
        /** XXX check close conditions, too */
@@ -714,7 +718,8 @@ channel_pre_open(Channel *c, fd_set * readset, fd_set * writeset)
                if (c->extended_usage == CHAN_EXTENDED_WRITE &&
                    buffer_len(&c->extended) > 0)
                        FD_SET(c->efd, writeset);
-               else if (c->extended_usage == CHAN_EXTENDED_READ &&
+               else if (!(c->flags & CHAN_EOF_SENT) &&
+                   c->extended_usage == CHAN_EXTENDED_READ &&
                    buffer_len(&c->extended) < c->remote_window)
                        FD_SET(c->efd, readset);
        }
@@ -1632,12 +1637,18 @@ channel_output_poll(void)
                                fatal("cannot happen: istate == INPUT_WAIT_DRAIN for proto 1.3");
                        /*
                         * input-buffer is empty and read-socket shutdown:
-                        * tell peer, that we will not send more data: send IEOF
+                        * tell peer, that we will not send more data: send IEOF.
+                        * hack for extended data: delay EOF if EFD still in use.
                         */
-                       chan_ibuf_empty(c);
+                       if (CHANNEL_EFD_INPUT_ACTIVE(c))
+                               debug2("channel %d: ibuf_empty delayed efd %d/(%d)",
+                                   c->self, c->efd, buffer_len(&c->extended));
+                       else
+                               chan_ibuf_empty(c);
                }
                /* Send extended data, i.e. stderr */
                if (compat20 &&
+                   !(c->flags & CHAN_EOF_SENT) &&
                    c->remote_window > 0 &&
                    (len = buffer_len(&c->extended)) > 0 &&
                    c->extended_usage == CHAN_EXTENDED_READ) {
@@ -1726,6 +1737,13 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
                log("channel %d: ext data for non open", id);
                return;
        }
+       if (c->flags & CHAN_EOF_RCVD) {
+               if (datafellows & SSH_BUG_EXTEOF)
+                       debug("channel %d: accepting ext data after eof", id);
+               else
+                       packet_disconnect("Received extended_data after EOF "
+                           "on channel %d.", id);
+       }
        tcode = packet_get_int();
        if (c->efd == -1 ||
            c->extended_usage != CHAN_EXTENDED_WRITE ||
@@ -2112,7 +2130,7 @@ channel_request_remote_forwarding(u_short listen_port,
                const char *address_to_bind = "0.0.0.0";
                packet_start(SSH2_MSG_GLOBAL_REQUEST);
                packet_put_cstring("tcpip-forward");
-               packet_put_char(0);                     /* boolean: want reply */
+               packet_put_char(1);                     /* boolean: want reply */
                packet_put_cstring(address_to_bind);
                packet_put_int(listen_port);
                packet_send();
index 707d9a925820f71f9ef4a99426a936093c3a67c4..bd31c455825b8f927906cc496b7e8c87456f529c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: channels.h,v 1.65 2002/03/04 17:27:39 stevesk Exp $   */
+/*     $OpenBSD: channels.h,v 1.67 2002/03/26 22:50:39 markus Exp $    */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -135,6 +135,18 @@ struct Channel {
 
 #define CHAN_CLOSE_SENT                        0x01
 #define CHAN_CLOSE_RCVD                        0x02
+#define CHAN_EOF_SENT                  0x04
+#define CHAN_EOF_RCVD                  0x08
+
+/* check whether 'efd' is still in use */
+#define CHANNEL_EFD_INPUT_ACTIVE(c) \
+       (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \
+       (c->efd != -1 || \
+       buffer_len(&c->extended) > 0))
+#define CHANNEL_EFD_OUTPUT_ACTIVE(c) \
+       (compat20 && c->extended_usage == CHAN_EXTENDED_WRITE && \
+       ((c->efd != -1 && !(c->flags & (CHAN_EOF_RCVD|CHAN_CLOSE_RCVD))) || \
+       buffer_len(&c->extended) > 0))
 
 /* channel management */
 
index ce3f6f3ce2088306a9813d6e88c2357e0485f382..86d923409c55d70c784ea15b5294863001253ea6 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: cipher.c,v 1.52 2002/02/18 13:05:32 markus Exp $");
+RCSID("$OpenBSD: cipher.c,v 1.55 2002/04/03 09:26:11 markus Exp $");
 
 #include "xmalloc.h"
 #include "log.h"
@@ -44,6 +44,11 @@ RCSID("$OpenBSD: cipher.c,v 1.52 2002/02/18 13:05:32 markus Exp $");
 #include <openssl/md5.h>
 #include "rijndael.h"
 
+#if OPENSSL_VERSION_NUMBER < 0x00906000L
+#define SSH_OLD_EVP
+#define EVP_CIPHER_CTX_get_app_data(e)          ((e)->app_data)
+#endif
+
 static EVP_CIPHER *evp_ssh1_3des(void);
 static EVP_CIPHER *evp_ssh1_bf(void);
 static EVP_CIPHER *evp_rijndael(void);
@@ -67,22 +72,29 @@ struct Cipher {
        { "aes128-cbc",         SSH_CIPHER_SSH2, 16, 16, evp_rijndael },
        { "aes192-cbc",         SSH_CIPHER_SSH2, 16, 24, evp_rijndael },
        { "aes256-cbc",         SSH_CIPHER_SSH2, 16, 32, evp_rijndael },
+       { "rijndael-cbc@lysator.liu.se",
+                               SSH_CIPHER_SSH2, 16, 32, evp_rijndael },
 
        { NULL,                 SSH_CIPHER_ILLEGAL, 0, 0, NULL }
 };
 
 /*--*/
 
-u_int  
+u_int
 cipher_blocksize(Cipher *c)
 {
        return (c->block_size);
 }
-u_int  
+u_int
 cipher_keylen(Cipher *c)
 {
        return (c->key_len);
 }
+u_int
+cipher_get_number(Cipher *c)
+{
+       return (c->number);
+}
 
 u_int
 cipher_mask_ssh1(int client)
@@ -171,7 +183,11 @@ cipher_init(CipherContext *cc, Cipher *cipher,
     int encrypt)
 {
        static int dowarn = 1;
+#ifdef SSH_OLD_EVP
+       EVP_CIPHER *type;
+#else
        const EVP_CIPHER *type;
+#endif
        int klen;
 
        if (cipher->number == SSH_CIPHER_DES) {
@@ -196,6 +212,15 @@ cipher_init(CipherContext *cc, Cipher *cipher,
        type = (*cipher->evptype)();
 
        EVP_CIPHER_CTX_init(&cc->evp);
+#ifdef SSH_OLD_EVP
+       if (type->key_len > 0 && type->key_len != keylen) {
+               debug("cipher_init: set keylen (%d -> %d)",
+                   type->key_len, keylen);
+               type->key_len = keylen;
+       }
+       EVP_CipherInit(&cc->evp, type, (u_char *)key, (u_char *)iv,
+           (encrypt == CIPHER_ENCRYPT));
+#else
        if (EVP_CipherInit(&cc->evp, type, NULL, (u_char *)iv,
            (encrypt == CIPHER_ENCRYPT)) == 0)
                fatal("cipher_init: EVP_CipherInit failed for %s",
@@ -210,6 +235,7 @@ cipher_init(CipherContext *cc, Cipher *cipher,
        if (EVP_CipherInit(&cc->evp, NULL, (u_char *)key, NULL, -1) == 0)
                fatal("cipher_init: EVP_CipherInit: set key failed for %s",
                    cipher->name);
+#endif
 }
 
 void
@@ -217,15 +243,23 @@ cipher_crypt(CipherContext *cc, u_char *dest, const u_char *src, u_int len)
 {
        if (len % cc->cipher->block_size)
                fatal("cipher_encrypt: bad plaintext length %d", len);
+#ifdef SSH_OLD_EVP
+       EVP_Cipher(&cc->evp, dest, (u_char *)src, len);
+#else
        if (EVP_Cipher(&cc->evp, dest, (u_char *)src, len) == 0)
                fatal("evp_crypt: EVP_Cipher failed");
+#endif
 }
 
 void
 cipher_cleanup(CipherContext *cc)
 {
+#ifdef SSH_OLD_EVP
+       EVP_CIPHER_CTX_cleanup(&cc->evp);
+#else
        if (EVP_CIPHER_CTX_cleanup(&cc->evp) == 0)
                error("cipher_cleanup: EVP_CIPHER_CTX_cleanup failed");
+#endif
 }
 
 /*
@@ -296,6 +330,11 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
        EVP_CIPHER_CTX_init(&c->k1);
        EVP_CIPHER_CTX_init(&c->k2);
        EVP_CIPHER_CTX_init(&c->k3);
+#ifdef SSH_OLD_EVP
+       EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc);
+       EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc);
+       EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc);
+#else
        if (EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc) == 0 ||
            EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc) == 0 ||
            EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc) == 0) {
@@ -304,6 +343,7 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
                EVP_CIPHER_CTX_set_app_data(ctx, NULL);
                return (0);
        }
+#endif
        return (1);
 }
 static int
@@ -315,10 +355,16 @@ ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len)
                error("ssh1_3des_cbc: no context");
                return (0);
        }
+#ifdef SSH_OLD_EVP
+       EVP_Cipher(&c->k1, dest, (u_char *)src, len);
+       EVP_Cipher(&c->k2, dest, dest, len);
+       EVP_Cipher(&c->k3, dest, dest, len);
+#else
        if (EVP_Cipher(&c->k1, dest, (u_char *)src, len) == 0 ||
            EVP_Cipher(&c->k2, dest, dest, len) == 0 ||
            EVP_Cipher(&c->k3, dest, dest, len) == 0)
                return (0);
+#endif
        return (1);
 }
 static int
@@ -346,7 +392,9 @@ evp_ssh1_3des(void)
        ssh1_3des.init = ssh1_3des_init;
        ssh1_3des.cleanup = ssh1_3des_cleanup;
        ssh1_3des.do_cipher = ssh1_3des_cbc;
+#ifndef SSH_OLD_EVP
        ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH;
+#endif
        return (&ssh1_3des);
 }
 
@@ -494,7 +542,177 @@ evp_rijndael(void)
        rijndal_cbc.init = ssh_rijndael_init;
        rijndal_cbc.cleanup = ssh_rijndael_cleanup;
        rijndal_cbc.do_cipher = ssh_rijndael_cbc;
+#ifndef SSH_OLD_EVP
        rijndal_cbc.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
            EVP_CIPH_ALWAYS_CALL_INIT;
+#endif
        return (&rijndal_cbc);
 }
+
+/*
+ * Exports an IV from the CipherContext required to export the key
+ * state back from the unprivileged child to the privileged parent
+ * process.
+ */
+
+int
+cipher_get_keyiv_len(CipherContext *cc)
+{
+       Cipher *c = cc->cipher;
+       int ivlen;
+
+       if (c->number == SSH_CIPHER_3DES)
+               ivlen = 24;
+       else
+               ivlen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+       return (ivlen);
+}
+
+void
+cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len)
+{
+       Cipher *c = cc->cipher;
+       u_char *civ = NULL;
+       int evplen;
+
+       switch (c->number) {
+       case SSH_CIPHER_SSH2:
+       case SSH_CIPHER_DES:
+       case SSH_CIPHER_BLOWFISH:
+               evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+               if (evplen == 0)
+                       return;
+               if (evplen != len)
+                       fatal("%s: wrong iv length %d != %d", __FUNCTION__,
+                           evplen, len);
+
+               if (c->evptype == evp_rijndael) {
+                       struct ssh_rijndael_ctx *aesc;
+
+                       aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
+                       if (aesc == NULL)
+                               fatal("%s: no rijndael context", __FUNCTION__);
+                       civ = aesc->r_iv;
+               } else {
+                       civ = cc->evp.iv;
+               }
+               break;
+       case SSH_CIPHER_3DES: {
+               struct ssh1_3des_ctx *desc;
+               if (len != 24)
+                       fatal("%s: bad 3des iv length: %d", __FUNCTION__, len);
+               desc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
+               if (desc == NULL)
+                       fatal("%s: no 3des context", __FUNCTION__);
+               debug3("%s: Copying 3DES IV", __FUNCTION__);
+               memcpy(iv, desc->k1.iv, 8);
+               memcpy(iv + 8, desc->k2.iv, 8);
+               memcpy(iv + 16, desc->k3.iv, 8);
+               return;
+       }
+       default:
+               fatal("%s: bad cipher %d", __FUNCTION__, c->number);
+       }
+       memcpy(iv, civ, len);
+}
+
+void
+cipher_set_keyiv(CipherContext *cc, u_char *iv)
+{
+       Cipher *c = cc->cipher;
+       u_char *div = NULL;
+       int evplen = 0;
+
+       switch (c->number) {
+       case SSH_CIPHER_SSH2:
+       case SSH_CIPHER_DES:
+       case SSH_CIPHER_BLOWFISH:
+               evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+               if (evplen == 0)
+                       return;
+
+               if (c->evptype == evp_rijndael) {
+                       struct ssh_rijndael_ctx *aesc;
+
+                       aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
+                       if (aesc == NULL)
+                               fatal("%s: no rijndael context", __FUNCTION__);
+                       div = aesc->r_iv;
+               }else {
+                       div = cc->evp.iv;
+               }
+               break;
+       case SSH_CIPHER_3DES: {
+               struct ssh1_3des_ctx *desc;
+               desc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
+               if (desc == NULL)
+                       fatal("%s: no 3des context", __FUNCTION__);
+               debug3("%s: Installed 3DES IV", __FUNCTION__);
+               memcpy(desc->k1.iv, iv, 8);
+               memcpy(desc->k2.iv, iv + 8, 8);
+               memcpy(desc->k3.iv, iv + 16, 8);
+               return;
+       }
+       default:
+               fatal("%s: bad cipher %d", __FUNCTION__, c->number);
+       }
+       memcpy(div, iv, evplen);
+}
+
+#if OPENSSL_VERSION_NUMBER < 0x00907000L
+#define EVP_X_STATE(evp)       &(evp).c
+#define EVP_X_STATE_LEN(evp)   sizeof((evp).c)
+#else
+#define EVP_X_STATE(evp)       (evp).cipher_data
+#define EVP_X_STATE_LEN(evp)   (evp).cipher->ctx_size
+#endif
+
+int
+cipher_get_keycontext(CipherContext *cc, u_char *dat)
+{
+       Cipher *c = cc->cipher;
+       int plen;
+
+       if (c->number == SSH_CIPHER_3DES) {
+               struct ssh1_3des_ctx *desc;
+               desc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
+               if (desc == NULL)
+                       fatal("%s: no 3des context", __FUNCTION__);
+               plen = EVP_X_STATE_LEN(desc->k1);
+               if (dat == NULL)
+                       return (3*plen);
+               memcpy(dat, EVP_X_STATE(desc->k1), plen);
+               memcpy(dat + plen, EVP_X_STATE(desc->k2), plen);
+               memcpy(dat + 2*plen, EVP_X_STATE(desc->k3), plen);
+               return (3*plen);
+       }
+
+       /* Generic EVP */
+       plen = EVP_X_STATE_LEN(cc->evp);
+       if (dat == NULL)
+               return (plen);
+
+       memcpy(dat, EVP_X_STATE(cc->evp), plen);
+       return (plen);
+}
+
+void
+cipher_set_keycontext(CipherContext *cc, u_char *dat)
+{
+       Cipher *c = cc->cipher;
+       int plen;
+
+       if (c->number == SSH_CIPHER_3DES) {
+               struct ssh1_3des_ctx *desc;
+               desc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
+               if (desc == NULL)
+                       fatal("%s: no 3des context", __FUNCTION__);
+               plen = EVP_X_STATE_LEN(desc->k1);
+               memcpy(EVP_X_STATE(desc->k1), dat, plen);
+               memcpy(EVP_X_STATE(desc->k2), dat + plen, plen);
+               memcpy(EVP_X_STATE(desc->k3), dat + 2*plen, plen);
+       } else {
+               plen = EVP_X_STATE_LEN(cc->evp);
+               memcpy(EVP_X_STATE(cc->evp), dat, plen);
+       }
+}
index b3b0303c7f6079522b585d5d257462cdb6d39f04..fc7f6dd0fc46b3301938626c3a2b6d319313e28d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cipher.h,v 1.32 2002/03/04 17:27:39 stevesk Exp $     */
+/*     $OpenBSD: cipher.h,v 1.33 2002/03/18 17:13:15 markus Exp $      */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -81,4 +81,11 @@ void  cipher_cleanup(CipherContext *);
 void    cipher_set_key_string(CipherContext *, Cipher *, const char *, int);
 u_int   cipher_blocksize(Cipher *);
 u_int   cipher_keylen(Cipher *);
+
+u_int   cipher_get_number(Cipher *);
+void    cipher_get_keyiv(CipherContext *, u_char *, u_int);
+void    cipher_set_keyiv(CipherContext *, u_char *);
+int     cipher_get_keyiv_len(CipherContext *);
+int     cipher_get_keycontext(CipherContext *, u_char *);
+void    cipher_set_keycontext(CipherContext *, u_char *);
 #endif                         /* CIPHER_H */
index 65a6682a68e194b7db5c171745316a0a40c8c30c..15945a80d0b48019aae8af445a332543c7b16cf9 100644 (file)
@@ -59,7 +59,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.96 2002/02/06 14:55:15 markus Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.100 2002/04/22 21:04:52 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -81,6 +81,7 @@ RCSID("$OpenBSD: clientloop.c,v 1.96 2002/02/06 14:55:15 markus Exp $");
 #include "atomicio.h"
 #include "sshtty.h"
 #include "misc.h"
+#include "readpass.h"
 
 /* import options */
 extern Options options;
@@ -470,6 +471,67 @@ client_process_net_input(fd_set * readset)
        }
 }
 
+static void
+process_cmdline(void)
+{
+       void (*handler)(int);
+       char *s, *cmd;
+       u_short fwd_port, fwd_host_port;
+       char buf[1024], sfwd_port[6], sfwd_host_port[6];
+       int local = 0;
+
+       leave_raw_mode();
+       handler = signal(SIGINT, SIG_IGN);
+       cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
+       if (s == NULL)
+               goto out;
+       while (*s && isspace(*s))
+               s++;
+       if (*s == 0)
+               goto out;
+       if (strlen(s) < 2 || s[0] != '-' || !(s[1] == 'L' || s[1] == 'R')) {
+               log("Invalid command.");
+               goto out;
+       }
+       if (s[1] == 'L')
+               local = 1;
+       if (!local && !compat20) {
+               log("Not supported for SSH protocol version 1.");
+               goto out;
+       }
+       s += 2;
+       while (*s && isspace(*s))
+               s++;
+
+       if (sscanf(s, "%5[0-9]:%255[^:]:%5[0-9]",
+           sfwd_port, buf, sfwd_host_port) != 3 &&
+           sscanf(s, "%5[0-9]/%255[^/]/%5[0-9]",
+           sfwd_port, buf, sfwd_host_port) != 3) {
+               log("Bad forwarding specification.");
+               goto out;
+       }
+       if ((fwd_port = a2port(sfwd_port)) == 0 ||
+           (fwd_host_port = a2port(sfwd_host_port)) == 0) {
+               log("Bad forwarding port(s).");
+               goto out;
+       }
+       if (local) {
+               if (channel_setup_local_fwd_listener(fwd_port, buf,
+                   fwd_host_port, options.gateway_ports) < 0) {
+                       log("Port forwarding failed.");
+                       goto out;
+               }
+       } else
+               channel_request_remote_forwarding(fwd_port, buf,
+                   fwd_host_port);
+       log("Forwarding port.");
+out:
+       signal(SIGINT, handler);
+       enter_raw_mode();
+       if (cmd)
+               xfree(cmd);
+}
+
 /* process the characters one by one */
 static int
 process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
@@ -574,6 +636,7 @@ process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
 "%c?\r\n\
 Supported escape sequences:\r\n\
 ~.  - terminate connection\r\n\
+~C  - open a command line\r\n\
 ~R  - Request rekey (SSH protocol 2 only)\r\n\
 ~^Z - suspend ssh\r\n\
 ~#  - list forwarded connections\r\n\
@@ -593,6 +656,10 @@ Supported escape sequences:\r\n\
                                xfree(s);
                                continue;
 
+                       case 'C':
+                               process_cmdline();
+                               continue;
+
                        default:
                                if (ch != escape_char) {
                                        buffer_put_char(bin, escape_char);
@@ -1247,6 +1314,7 @@ static void
 client_init_dispatch_20(void)
 {
        dispatch_init(&dispatch_protocol_error);
+
        dispatch_set(SSH2_MSG_CHANNEL_CLOSE, &channel_input_oclose);
        dispatch_set(SSH2_MSG_CHANNEL_DATA, &channel_input_data);
        dispatch_set(SSH2_MSG_CHANNEL_EOF, &channel_input_ieof);
@@ -1260,6 +1328,10 @@ client_init_dispatch_20(void)
 
        /* rekeying */
        dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
+
+       /* global request reply messages */
+       dispatch_set(SSH2_MSG_REQUEST_FAILURE, &client_global_request_reply);
+       dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &client_global_request_reply);
 }
 static void
 client_init_dispatch_13(void)
index 1bc9a95236ccaa1bab54ddef1e4bbc540295f1b7..8056a40c3ab9798c5dabd76ba0baae8107e2710e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: clientloop.h,v 1.6 2001/06/26 17:27:23 markus Exp $   */
+/*     $OpenBSD: clientloop.h,v 1.7 2002/04/22 21:04:52 markus Exp $   */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -37,3 +37,4 @@
 
 /* Client side main loop for the interactive session. */
 int     client_loop(int, int, int);
+void    client_global_request_reply(int type, u_int32_t seq, void *ctxt);
index 74d5ed85ed6bd986dc02172c3dbadc194deac6bd..406b47c25714df1659c4593658b19fae5fa1d956 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: compat.c,v 1.61 2002/03/06 00:24:39 markus Exp $");
+RCSID("$OpenBSD: compat.c,v 1.63 2002/04/10 08:21:47 markus Exp $");
 
 #include "buffer.h"
 #include "packet.h"
@@ -61,20 +61,26 @@ compat_datafellows(const char *version)
                  "OpenSSH-2.1*,"
                  "OpenSSH_2.1*,"
                  "OpenSSH_2.2*",       SSH_OLD_SESSIONID|SSH_BUG_BANNER|
-                                       SSH_OLD_DHGEX|SSH_BUG_NOREKEY },
+                                       SSH_OLD_DHGEX|SSH_BUG_NOREKEY|
+                                       SSH_BUG_EXTEOF},
                { "OpenSSH_2.3.0*",     SSH_BUG_BANNER|SSH_BUG_BIGENDIANAES|
-                                       SSH_OLD_DHGEX|SSH_BUG_NOREKEY},
+                                       SSH_OLD_DHGEX|SSH_BUG_NOREKEY|
+                                       SSH_BUG_EXTEOF},
                { "OpenSSH_2.3.*",      SSH_BUG_BIGENDIANAES|SSH_OLD_DHGEX|
-                                       SSH_BUG_NOREKEY},
+                                       SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
                { "OpenSSH_2.5.0p1*,"
                  "OpenSSH_2.5.1p1*",
                                        SSH_BUG_BIGENDIANAES|SSH_OLD_DHGEX|
-                                       SSH_BUG_NOREKEY },
+                                       SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
                { "OpenSSH_2.5.0*,"
                  "OpenSSH_2.5.1*,"
-                 "OpenSSH_2.5.2*",     SSH_OLD_DHGEX|SSH_BUG_NOREKEY },
-               { "OpenSSH_2.5.3*",     SSH_BUG_NOREKEY },
-               { "Sun_SSH_1.0*",       SSH_BUG_NOREKEY },
+                 "OpenSSH_2.5.2*",     SSH_OLD_DHGEX|SSH_BUG_NOREKEY|
+                                       SSH_BUG_EXTEOF},
+               { "OpenSSH_2.5.3*",     SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
+               { "OpenSSH_2.*,"
+                 "OpenSSH_3.0*,"
+                 "OpenSSH_3.1*",       SSH_BUG_EXTEOF},
+               { "Sun_SSH_1.0*",       SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
                { "OpenSSH*",           0 },
                { "*MindTerm*",         0 },
                { "2.1.0*",             SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
@@ -121,8 +127,12 @@ compat_datafellows(const char *version)
                  "1.2.19*,"
                  "1.2.20*,"
                  "1.2.21*,"
-                 "1.2.22*",            SSH_BUG_IGNOREMSG },
-               { "1.3.2*",             SSH_BUG_IGNOREMSG },    /* f-secure */
+                 "1.2.22*",            SSH_BUG_IGNOREMSG|SSH_BUG_K5USER },
+               { "1.3.2*",             /* F-Secure */
+                                       SSH_BUG_IGNOREMSG|SSH_BUG_K5USER },
+               { "1.2.1*,"
+                 "1.2.2*,"
+                 "1.2.3*",             SSH_BUG_K5USER },
                { "*SSH Compatible Server*",                    /* Netscreen */
                                        SSH_BUG_PASSWORDPAD },
                { "*OSU_0*,"
index 0eeb782e861ad770163dccd1bf9f07d606be4c35..7afca046019b20a450b8b135ca033a558789d6a9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: compat.h,v 1.30 2002/03/04 17:27:39 stevesk Exp $     */
+/*     $OpenBSD: compat.h,v 1.32 2002/04/10 08:21:47 markus Exp $      */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Markus Friedl.  All rights reserved.
@@ -52,6 +52,8 @@
 #define SSH_BUG_OPENFAILURE    0x00020000
 #define SSH_BUG_DERIVEKEY      0x00040000
 #define SSH_BUG_DUMMYCHAN      0x00100000
+#define SSH_BUG_EXTEOF         0x00200000
+#define SSH_BUG_K5USER         0x00400000
 
 void     enable_compat13(void);
 void     enable_compat20(void);
index 3badbf452da28c21c6f8f33a29c0b1f6d63b8bd8..85a361d3a58ec282a84ad40da8f43ed4e643b4b5 100644 (file)
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: compress.c,v 1.17 2001/12/29 21:56:01 stevesk Exp $");
+RCSID("$OpenBSD: compress.c,v 1.19 2002/03/18 17:31:54 provos Exp $");
 
 #include "log.h"
 #include "buffer.h"
 #include "zlib.h"
 #include "compress.h"
 
-static z_stream incoming_stream;
-static z_stream outgoing_stream;
+z_stream incoming_stream;
+z_stream outgoing_stream;
 static int compress_init_send_called = 0;
 static int compress_init_recv_called = 0;
+static int inflate_failed = 0;
+static int deflate_failed = 0;
 
 /*
  * Initializes compression; level is compression level from 1 to 9
@@ -62,9 +64,9 @@ buffer_compress_uninit(void)
            incoming_stream.total_out, incoming_stream.total_in,
            incoming_stream.total_out == 0 ? 0.0 :
            (double) incoming_stream.total_in / incoming_stream.total_out);
-       if (compress_init_recv_called == 1)
+       if (compress_init_recv_called == 1 && inflate_failed == 0)
                inflateEnd(&incoming_stream);
-       if (compress_init_send_called == 1)
+       if (compress_init_send_called == 1 && deflate_failed == 0)
                deflateEnd(&outgoing_stream);
 }
 
@@ -106,6 +108,7 @@ buffer_compress(Buffer * input_buffer, Buffer * output_buffer)
                            sizeof(buf) - outgoing_stream.avail_out);
                        break;
                default:
+                       deflate_failed = 1;
                        fatal("buffer_compress: deflate returned %d", status);
                        /* NOTREACHED */
                }
@@ -149,6 +152,7 @@ buffer_uncompress(Buffer * input_buffer, Buffer * output_buffer)
                         */
                        return;
                default:
+                       inflate_failed = 1;
                        fatal("buffer_uncompress: inflate returned %d", status);
                        /* NOTREACHED */
                }
index 88841259b521be337d32a18a132ee7101663f5f2..2181ac9c0781741a241c1276e08d9fb275a6b099 100644 (file)
@@ -21,6 +21,7 @@ AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
 AC_PATH_PROG(TEST_MINUS_S_SH, bash)
 AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
 AC_PATH_PROG(TEST_MINUS_S_SH, sh)
+AC_PATH_PROG(SH, sh)
 
 # System features
 AC_SYS_LARGEFILE
@@ -57,13 +58,24 @@ case "$host" in
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
        LDFLAGS="$LDFLAGS -L/usr/local/lib"
        if (test "$LD" != "gcc" && test -z "$blibpath"); then
-               blibpath="/usr/lib:/lib:/usr/local/lib"
+               AC_MSG_CHECKING([if linkage editor ($LD) accepts -blibpath])
+               saved_LDFLAGS="$LDFLAGS"
+               LDFLAGS="$LDFLAGS -blibpath:/usr/lib:/lib:/usr/local/lib"
+               AC_TRY_LINK([],
+                       [],
+                       [
+                               AC_MSG_RESULT(yes)
+                               blibpath="/usr/lib:/lib:/usr/local/lib"
+                       ],
+                       [ AC_MSG_RESULT(no) ]
+               )
+               LDFLAGS="$saved_LDFLAGS"
        fi
        AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
        AC_DEFINE(BROKEN_GETADDRINFO)
+       AC_DEFINE(BROKEN_REALPATH)
        dnl AIX handles lastlog as part of its login message
        AC_DEFINE(DISABLE_LASTLOG)
-       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        ;;
 *-*-cygwin*)
        LIBS="$LIBS /usr/lib/textmode.o"
@@ -80,6 +92,22 @@ case "$host" in
 *-*-darwin*)
        AC_DEFINE(BROKEN_GETADDRINFO)
        ;;
+*-*-hpux10.26)
+       if test -z "$GCC"; then
+               CFLAGS="$CFLAGS -Ae"
+       fi
+       CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
+       IPADDR_IN_DISPLAY=yes
+       AC_DEFINE(HAVE_SECUREWARE)
+       AC_DEFINE(USE_PIPES)
+       AC_DEFINE(LOGIN_NO_ENDOPT)
+       AC_DEFINE(LOGIN_NEEDS_UTMPX)
+       AC_DEFINE(DISABLE_SHADOW)
+       AC_DEFINE(DISABLE_UTMP)
+       AC_DEFINE(SPT_TYPE,SPT_PSTAT)
+       LIBS="$LIBS -lxnet -lsec -lsecpw"
+       disable_ptmx_check=yes
+       ;;
 *-*-hpux10*)
        if test -z "$GCC"; then
                CFLAGS="$CFLAGS -Ae"
@@ -87,6 +115,8 @@ case "$host" in
        CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
        IPADDR_IN_DISPLAY=yes
        AC_DEFINE(USE_PIPES)
+       AC_DEFINE(LOGIN_NO_ENDOPT)
+       AC_DEFINE(LOGIN_NEEDS_UTMPX)
        AC_DEFINE(DISABLE_SHADOW)
        AC_DEFINE(DISABLE_UTMP)
        AC_DEFINE(SPT_TYPE,SPT_PSTAT)
@@ -97,6 +127,8 @@ case "$host" in
        IPADDR_IN_DISPLAY=yes
        AC_DEFINE(PAM_SUN_CODEBASE)
        AC_DEFINE(USE_PIPES)
+       AC_DEFINE(LOGIN_NO_ENDOPT)
+       AC_DEFINE(LOGIN_NEEDS_UTMPX)
        AC_DEFINE(DISABLE_SHADOW)
        AC_DEFINE(DISABLE_UTMP)
        AC_DEFINE(SPT_TYPE,SPT_PSTAT)
@@ -107,6 +139,7 @@ case "$host" in
        LDFLAGS="$LDFLAGS"
        PATH="$PATH:/usr/etc"
        AC_DEFINE(BROKEN_INET_NTOA)
+       AC_DEFINE(WITH_ABBREV_NO_TTY)
        ;;
 *-*-irix6*)
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
@@ -117,21 +150,18 @@ case "$host" in
        AC_DEFINE(WITH_IRIX_AUDIT)
        AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
        AC_DEFINE(BROKEN_INET_NTOA)
+       AC_DEFINE(WITH_ABBREV_NO_TTY)
        ;;
 *-*-linux*)
        no_dev_ptmx=1
        check_for_libcrypt_later=1
        AC_DEFINE(DONT_TRY_OTHER_AF)
        AC_DEFINE(PAM_TTY_KLUDGE)
-       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        inet6_default_4in6=yes
        ;;
 mips-sony-bsd|mips-sony-newsos4)
        AC_DEFINE(HAVE_NEWS4)
        SONY=1
-       AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
-               AC_MSG_ERROR([*** libiberty missing - please install first or check config.log ***])
-        )
        ;;
 *-*-netbsd*)
        need_dash_r=1
@@ -175,7 +205,6 @@ mips-sony-bsd|mips-sony-newsos4)
        CPPFLAGS="$CPPFLAGS -DSUNOS4"
        AC_CHECK_FUNCS(getpwanam)
        AC_DEFINE(PAM_SUN_CODEBASE)
-       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        conf_utmp_location=/etc/utmp
        conf_wtmp_location=/var/adm/wtmp
        conf_lastlog_location=/var/adm/lastlog
@@ -185,7 +214,6 @@ mips-sony-bsd|mips-sony-newsos4)
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
        LDFLAGS="$LDFLAGS -L/usr/local/lib"
        LIBS="$LIBS -lc89"
-       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        AC_DEFINE(USE_PIPES)
        ;;
 *-sni-sysv*)
@@ -195,7 +223,6 @@ mips-sony-bsd|mips-sony-newsos4)
        IPADDR_IN_DISPLAY=yes
        AC_DEFINE(USE_PIPES)
        AC_DEFINE(IP_TOS_IS_BROKEN)
-       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
        # Attention: always take care to bind libsocket and libnsl before libc,
        # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
@@ -225,9 +252,8 @@ mips-sony-bsd|mips-sony-newsos4)
        no_dev_ptmx=1
        AC_DEFINE(BROKEN_SYS_TERMIO_H)
        AC_DEFINE(USE_PIPES)
-       AC_DEFINE(HAVE_SCO_PROTECTED_PW)
+       AC_DEFINE(HAVE_SECUREWARE)
        AC_DEFINE(DISABLE_SHADOW)
-       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        AC_DEFINE(BROKEN_SAVED_UIDS)
        AC_CHECK_FUNCS(getluid setluid)
        MANTYPE=man
@@ -240,9 +266,8 @@ mips-sony-bsd|mips-sony-newsos4)
        no_dev_ptmx=1
        rsh_path="/usr/bin/rcmd"
        AC_DEFINE(USE_PIPES)
-       AC_DEFINE(HAVE_SCO_PROTECTED_PW)
+       AC_DEFINE(HAVE_SECUREWARE)
        AC_DEFINE(DISABLE_SHADOW)
-       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        AC_CHECK_FUNCS(getluid setluid)
        MANTYPE=man
        ;;
@@ -324,12 +349,12 @@ AC_ARG_WITH(libs,
 AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
        getopt.h glob.h lastlog.h limits.h login.h \
        login_cap.h maillock.h netdb.h netgroup.h \
-       netinet/in_systm.h paths.h poll.h pty.h \
-       security/pam_appl.h shadow.h stddef.h stdint.h \
+       netinet/in_systm.h paths.h pty.h readpassphrase.h \
+       rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
        strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
-       sys/poll.h sys/queue.h sys/select.h sys/stat.h \
+       sys/mman.h sys/select.h sys/stat.h \
        sys/stropts.h sys/sysmacros.h sys/time.h \
-       sys/ttcompat.h sys/un.h time.h ttyent.h usersec.h \
+       sys/un.h time.h ttyent.h usersec.h \
        util.h utime.h utmp.h utmpx.h)
 
 # Checks for libraries.
@@ -539,16 +564,16 @@ AC_ARG_WITH(tcp-wrappers,
 )
 
 dnl    Checks for library functions.
-AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa \
+AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \
        clock fchmod fchown freeaddrinfo futimes gai_strerror \
        getaddrinfo getcwd getgrouplist getnameinfo getopt \
        getrlimit getrusage getttyent glob inet_aton inet_ntoa \
        inet_ntop innetgr login_getcapbool md5_crypt memmove \
-       mkdtemp on_exit openpty readpassphrase realpath \
-       rresvport_af setdtablesize setegid setenv seteuid \
-       setlogin setproctitle setresgid setreuid setrlimit \
-       setsid setvbuf sigaction sigvec snprintf strerror \
-       strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes \
+       mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \
+       realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
+       setenv seteuid setlogin setproctitle setresgid setreuid setrlimit \
+       setsid setvbuf sigaction sigvec snprintf socketpair strerror \
+       strlcat strlcpy strmode strsep sysconf tcgetpgrp truncate utimes \
        vhangup vsnprintf waitpid __b64_ntop _getpty)
 
 dnl IRIX and Solaris 2.5.1 have dirname() in libgen
@@ -678,169 +703,52 @@ if test "x$PAM_MSG" = "xyes" ; then
        )
 fi
 
-# The big search for OpenSSL
+# Search for OpenSSL
+saved_CPPFLAGS="$CPPFLAGS"
+saved_LDFLAGS="$LDFLAGS"
 AC_ARG_WITH(ssl-dir,
        [  --with-ssl-dir=PATH     Specify path to OpenSSL installation ],
        [
                if test "x$withval" != "xno" ; then
-                       tryssldir=$withval
-               fi
-       ]
-)
-
-saved_LIBS="$LIBS"
-saved_LDFLAGS="$LDFLAGS"
-saved_CPPFLAGS="$CPPFLAGS"
-if test "x$prefix" != "xNONE" ; then
-       tryssldir="$tryssldir $prefix"
-fi
-AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
-       for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
-               CPPFLAGS="$saved_CPPFLAGS"
-               LDFLAGS="$saved_LDFLAGS"
-               LIBS="$saved_LIBS -lcrypto"
-               
-               # Skip directories if they don't exist
-               if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
-                       continue;
-               fi
-               if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
-                       # Try to use $ssldir/lib if it exists, otherwise 
-                       # $ssldir
-                       if test -d "$ssldir/lib" ; then
-                               LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
-                               if test ! -z "$need_dash_r" ; then
-                                       LDFLAGS="-R$ssldir/lib $LDFLAGS"
+                       if test -d "$withval/lib"; then
+                               if test -n "${need_dash_r}"; then
+                                       LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
+                               else
+                                       LDFLAGS="-L${withval}/lib ${LDFLAGS}"
                                fi
                        else
-                               LDFLAGS="-L$ssldir $saved_LDFLAGS"
-                               if test ! -z "$need_dash_r" ; then
-                                       LDFLAGS="-R$ssldir $LDFLAGS"
+                               if test -n "${need_dash_r}"; then
+                                       LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
+                               else
+                                       LDFLAGS="-L${withval} ${LDFLAGS}"
                                fi
                        fi
-                       # Try to use $ssldir/include if it exists, otherwise 
-                       # $ssldir
-                       if test -d "$ssldir/include" ; then
-                               CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
+                       if test -d "$withval/include"; then
+                               CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
                        else
-                               CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
+                               CPPFLAGS="-I${withval} ${CPPFLAGS}"
                        fi
                fi
-
-               # Basic test to check for compatible version and correct linking
-               # *does not* test for RSA - that comes later.
-               AC_TRY_RUN(
-                       [
-#include <string.h>
-#include <openssl/rand.h>
-int main(void) 
-{
-       char a[2048];
-       memset(a, 0, sizeof(a));
-       RAND_add(a, sizeof(a), sizeof(a));
-       return(RAND_status() <= 0);
-}
-                       ],
-                       [
-                               found_crypto=1
-                               break;
-                       ], []
-               )
-
-               if test ! -z "$found_crypto" ; then
-                       break;
-               fi
-       done
-
-       if test -z "$found_crypto" ; then
-               AC_MSG_ERROR([Could not find working OpenSSL library, please install or check config.log])      
-       fi
-       if test -z "$ssldir" ; then
-               ssldir="(system)"
-       fi
-
-       ac_cv_openssldir=$ssldir
-])
-
-if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
-       AC_DEFINE(HAVE_OPENSSL)
-       dnl Need to recover ssldir - test above runs in subshell
-       ssldir=$ac_cv_openssldir
-       if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
-               # Try to use $ssldir/lib if it exists, otherwise 
-               # $ssldir
-               if test -d "$ssldir/lib" ; then
-                       LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
-                       if test ! -z "$need_dash_r" ; then
-                               LDFLAGS="-R$ssldir/lib $LDFLAGS"
-                       fi
-               else
-                       LDFLAGS="-L$ssldir $saved_LDFLAGS"
-                       if test ! -z "$need_dash_r" ; then
-                               LDFLAGS="-R$ssldir $LDFLAGS"
-                       fi
-               fi
-               # Try to use $ssldir/include if it exists, otherwise 
-               # $ssldir
-               if test -d "$ssldir/include" ; then
-                       CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
-               else
-                       CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
-               fi
-       fi
-fi
-LIBS="$saved_LIBS -lcrypto"
-
-# Now test RSA support
-saved_LIBS="$LIBS"
-AC_MSG_CHECKING([for RSA support])
-for WANTS_RSAREF in "" 1 ; do
-       if test -z "$WANTS_RSAREF" ; then
-               LIBS="$saved_LIBS"
-       else
-               LIBS="$saved_LIBS -lRSAglue -lrsaref"
-       fi
-       AC_TRY_RUN([
-#include <string.h>
-#include <openssl/rand.h>
-#include <openssl/rsa.h>
-#include <openssl/bn.h>
-#include <openssl/sha.h>
-int main(void) 
-{
-       int num; RSA *key; static unsigned char p_in[] = "blahblah";
-       unsigned char c[256], p[256];
-       memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
-       if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
-       num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
-       return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
-}
-       ],
+       ]
+)
+LIBS="$LIBS -lcrypto"
+AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
        [
-               rsa_works=1
-               break;
-       ], [])
-done
-LIBS="$saved_LIBS"
-
-if test ! -z "$no_rsa" ; then
-       AC_MSG_RESULT(disabled)
-       RSA_MSG="disabled"
-else
-       if test -z "$rsa_works" ; then
-               AC_MSG_WARN([*** No RSA support found *** ])
-               RSA_MSG="no"
-       else
-               if test -z "$WANTS_RSAREF" ; then
-                       AC_MSG_RESULT(yes)
-                       RSA_MSG="yes"
+               dnl Check default openssl install dir
+               if test -n "${need_dash_r}"; then
+                       LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
                else
-                       RSA_MSG="yes (using RSAref)"
-                       AC_MSG_RESULT(using RSAref)
-                       LIBS="$LIBS -lcrypto -lRSAglue -lrsaref"
+                       LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
                fi
-       fi
-fi
+               CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
+               AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
+                       [
+                               AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
+                       ]
+               )
+       ]
+)
+
 
 # Sanity check OpenSSL headers
 AC_MSG_CHECKING([whether OpenSSL's headers match the library])
@@ -1003,9 +911,33 @@ AC_ARG_WITH(entropy-timeout,
                fi
        ]       
 )
-
 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
 
+ssh_privsep_user=sshd
+AC_ARG_WITH(privsep-user,
+       [  --with-privsep-user=user Specify non-privileged user for privilege separation],
+       [
+               if test -n "$withval"; then
+                       ssh_privsep_user=$withval
+               fi
+       ]       
+)
+AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$ssh_privsep_user")
+
+# We do this little dance with the search path to insure
+# that programs that we select for use by installed programs
+# (which may be run by the super-user) come from trusted
+# locations before they come from the user's private area.
+# This should help avoid accidentally configuring some
+# random version of a program in someone's personal bin.
+
+OPATH=$PATH
+PATH=/bin:/usr/bin
+test -h /bin 2> /dev/null && PATH=/usr/bin
+test -d /sbin && PATH=$PATH:/sbin
+test -d /usr/sbin && PATH=$PATH:/usr/sbin
+PATH=$PATH:/etc:$OPATH
+
 # These programs are used by the command hashing source to gather entropy 
 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
@@ -1023,6 +955,8 @@ OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
+# restore PATH
+PATH=$OPATH
 
 # Where does ssh-rand-helper get its randomness from?
 INSTALL_SSH_PRNG_CMDS=""
@@ -1052,6 +986,11 @@ AC_CHECK_SIZEOF(int, 4)
 AC_CHECK_SIZEOF(long int, 4)
 AC_CHECK_SIZEOF(long long int, 8)
 
+# Sanity check long long for some platforms (AIX)
+if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
+       ac_cv_sizeof_long_long_int=0
+fi
+
 # More checks for data types
 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
        AC_TRY_COMPILE(
@@ -1560,6 +1499,40 @@ if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
        AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
 fi
 
+AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
+               ac_cv_have_accrights_in_msghdr, [
+       AC_TRY_COMPILE(
+               [
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+               ],
+               [ struct msghdr m; m.msg_accrights = 0; ],
+               [ ac_cv_have_accrights_in_msghdr="yes" ],
+               [ ac_cv_have_accrights_in_msghdr="no" ]
+       )
+])
+if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
+       AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
+fi
+
+AC_CACHE_CHECK([for msg_control field in struct msghdr],
+               ac_cv_have_control_in_msghdr, [
+       AC_TRY_COMPILE(
+               [
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+               ],
+               [ struct msghdr m; m.msg_control = 0; ],
+               [ ac_cv_have_control_in_msghdr="yes" ],
+               [ ac_cv_have_control_in_msghdr="no" ]
+       )
+])
+if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
+       AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
+fi
+
 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
        AC_TRY_LINK([], 
                [ extern char *__progname; printf("%s", __progname); ], 
@@ -1571,6 +1544,32 @@ if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
        AC_DEFINE(HAVE___PROGNAME)
 fi
 
+AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
+       AC_TRY_LINK([
+#include <stdio.h>
+], 
+               [ printf("%s", __FUNCTION__); ], 
+               [ ac_cv_cc_implements___FUNCTION__="yes" ],
+               [ ac_cv_cc_implements___FUNCTION__="no" ]
+       )
+])
+if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
+       AC_DEFINE(HAVE___FUNCTION__)
+fi
+
+AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
+       AC_TRY_LINK([
+#include <stdio.h>
+], 
+               [ printf("%s", __func__); ], 
+               [ ac_cv_cc_implements___func__="yes" ],
+               [ ac_cv_cc_implements___func__="no" ]
+       )
+])
+if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
+       AC_DEFINE(HAVE___func__)
+fi
+
 AC_CACHE_CHECK([whether getopt has optreset support],
                ac_cv_have_getopt_optreset, [
        AC_TRY_LINK(
@@ -1609,11 +1608,11 @@ if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
        AC_DEFINE(HAVE_SYS_NERR)
 fi
 
-
-# Check whether user wants Kerberos support
 SCARD_MSG="no" 
-AC_ARG_WITH(smartcard,
-       [  --with-smartcard        Enable smartcard support],
+
+# Check whether user wants sectok support
+AC_ARG_WITH(sectok,
+       [  --with-sectok           Enable smartcard support using libsectok],
        [
                if test "x$withval" != "xno" ; then
                        if test "x$withval" != "xyes" ; then
@@ -1635,12 +1634,70 @@ AC_ARG_WITH(smartcard,
                                AC_MSG_ERROR(Can't find libsectok)
                        fi
                        AC_DEFINE(SMARTCARD)
-                       SCARD_MSG="yes" 
+                       AC_DEFINE(USE_SECTOK)
+                       SCARD_MSG="yes, using sectok" 
                fi
        ]
 )
 
-# Check whether user wants Kerberos support
+# Check whether user wants OpenSC support
+AC_ARG_WITH(opensc,
+       AC_HELP_STRING([--with-opensc=PFX],
+                      [Enable smartcard support using OpenSC]),
+       opensc_config_prefix="$withval", opensc_config_prefix="")
+if test x$opensc_config_prefix != x ; then
+  OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
+  AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
+  if test "$OPENSC_CONFIG" != "no"; then
+    LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
+    LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
+    CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
+    LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
+    AC_DEFINE(SMARTCARD)
+    AC_DEFINE(USE_OPENSC)
+    SCARD_MSG="yes, using OpenSC" 
+  fi
+fi
+
+# Check whether user wants Kerberos 5 support
+KRB5_MSG="no" 
+AC_ARG_WITH(kerberos5,
+        [  --with-kerberos5=PATH   Enable Kerberos 5 support],
+        [
+                if test "x$withval" != "xno" ; then
+                        if test "x$withval" = "xyes" ; then
+                                KRB5ROOT="/usr/local"
+                        else
+                                KRB5ROOT=${withval}
+                        fi
+                       CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
+                        LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
+                        AC_DEFINE(KRB5)
+                       KRB5_MSG="yes"
+                        AC_MSG_CHECKING(whether we are using Heimdal)
+                        AC_TRY_COMPILE([ #include <krb5.h> ],
+                                       [ char *tmp = heimdal_version; ],
+                                       [ AC_MSG_RESULT(yes)
+                                         AC_DEFINE(HEIMDAL)
+                                         K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
+                                       ],
+                                       [ AC_MSG_RESULT(no)
+                                         K5LIBS="-lkrb5 -lk5crypto -lcom_err"
+                                       ]
+                        )
+                        if test ! -z "$need_dash_r" ; then
+                                LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
+                        fi
+                        if test ! -z "$blibpath" ; then
+                                blibpath="$blibpath:${KRB5ROOT}/lib"
+                        fi
+                        AC_CHECK_LIB(resolv, dn_expand, , )
+
+                        KRB5=yes
+                fi
+        ]
+)
+# Check whether user wants Kerberos 4 support
 KRB4_MSG="no" 
 AC_ARG_WITH(kerberos4,
        [  --with-kerberos4=PATH   Enable Kerberos 4 support],
@@ -1720,7 +1777,7 @@ AC_ARG_WITH(afs,
                fi
        ]
 )
-LIBS="$LIBS $KLIBS"
+LIBS="$LIBS $KLIBS $K5LIBS"
 
 # Looking for programs, paths and files
 AC_ARG_WITH(rsh,
@@ -1735,6 +1792,17 @@ AC_ARG_WITH(rsh,
        ]
 )
 
+PRIVSEP_PATH=/var/empty
+AC_ARG_WITH(privsep-path,
+       [  --with-privsep-path=xxx Path for privilege seperation chroot ],
+       [
+               if test "x$withval" != "$no" ; then
+                       PRIVSEP_PATH=$withval
+               fi
+       ]
+)
+AC_SUBST(PRIVSEP_PATH)
+
 AC_ARG_WITH(xauth,
        [  --with-xauth=PATH       Specify path to xauth program ],
        [
@@ -1769,12 +1837,14 @@ if test ! -z "$MAIL" ; then
 fi
 
 if test -z "$no_dev_ptmx" ; then
-       AC_CHECK_FILE("/dev/ptmx", 
-               [
-                       AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
-                       have_dev_ptmx=1
-               ]
-       )
+       if test "x$disable_ptmx_check" != "xyes" ; then
+               AC_CHECK_FILE("/dev/ptmx", 
+                       [
+                               AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
+                               have_dev_ptmx=1
+                       ]
+               )
+       fi
 fi
 AC_CHECK_FILE("/dev/ptc", 
        [
@@ -1874,17 +1944,28 @@ else
        )
 fi
 
+dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
+if test $ac_cv_func_login_getcapbool = "yes" -a \
+       $ac_cv_header_login_cap_h = "yes" ; then
+       USES_LOGIN_CONF=yes
+fi
 # Whether to mess with the default path
 SERVER_PATH_MSG="(default)" 
 AC_ARG_WITH(default-path,
-       [  --with-default-path=PATH Specify default \$PATH environment for server],
+       [  --with-default-path=    Specify default \$PATH environment for server],
        [
-               if test "x$withval" != "xno" ; then     
+               if test "$USES_LOGIN_CONF" = "yes" ; then
+                       AC_MSG_WARN([
+--with-default-path=PATH has no effect on this system.
+Edit /etc/login.conf instead.])
+               elif test "x$withval" != "xno" ; then   
                        user_path="$withval"
                        SERVER_PATH_MSG="$withval" 
                fi
        ],
-       [
+       [ if test "$USES_LOGIN_CONF" = "yes" ; then
+       AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
+       else
        AC_TRY_RUN(
                [
 /* find out what STDPATH is */
@@ -1934,10 +2015,25 @@ main()
                                AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
                        fi
                fi
+       fi ]
+)
+if test "$USES_LOGIN_CONF" != "yes" ; then
+       AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
+       AC_SUBST(user_path)
+fi
+
+# Set superuser path separately to user path
+MD5_MSG="no" 
+AC_ARG_WITH(superuser-path,
+       [  --with-superuser-path=  Specify different path for super-user],
+       [
+               if test "x$withval" != "xno" ; then
+                       AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval")
+                       superuser_path=$withval
+               fi
        ]
 )
-AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
-AC_SUBST(user_path)
+
 
 # Whether to force IPv4 by default (needed on broken glibc Linux)
 IPV4_HACK_MSG="no" 
@@ -2007,23 +2103,26 @@ AC_SUBST(SSHMODE)
 
 # Where to place sshd.pid
 piddir=/var/run
+# make sure the directory exists
+if test ! -d $piddir ; then    
+       piddir=`eval echo ${sysconfdir}`
+       case $piddir in
+               NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
+       esac
+fi
+
 AC_ARG_WITH(pid-dir,
        [  --with-pid-dir=PATH     Specify location of ssh.pid file],
        [
                if test "x$withval" != "xno" ; then     
                        piddir=$withval
+                       if test ! -d $piddir ; then     
+                       AC_MSG_WARN([** no $piddir directory on this system **])
+                       fi
                fi
        ]
 )
 
-# make sure the directory exists
-if test ! -d $piddir ; then    
-       piddir=`eval echo ${sysconfdir}`
-       case $piddir in
-               NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
-       esac
-fi
-
 AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
 AC_SUBST(piddir)
 
@@ -2275,32 +2374,43 @@ D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
-H=`eval echo ${user_path}` ; H=`eval echo ${H}`
+H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
+I=`eval echo ${user_path}` ; I=`eval echo ${I}`
+J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
 
 echo ""
 echo "OpenSSH has been configured with the following options:"
-echo "                 User binaries: $B"
-echo "               System binaries: $C"
-echo "           Configuration files: $D"
-echo "               Askpass program: $E"
-echo "                  Manual pages: $F"
-echo "                      PID file: $G"
-echo "        sshd default user PATH: $H"
-echo "                Manpage format: $MANTYPE"
-echo "                   PAM support: ${PAM_MSG}"
-echo "            KerberosIV support: $KRB4_MSG"
-echo "             Smartcard support: $SCARD_MSG"
-echo "                   AFS support: $AFS_MSG"
-echo "                 S/KEY support: $SKEY_MSG"
-echo "          TCP Wrappers support: $TCPW_MSG"
-echo "          MD5 password support: $MD5_MSG"
-echo "   IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
-echo "      Use IPv4 by default hack: $IPV4_HACK_MSG"
-echo "       Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
-echo "              BSD Auth support: $BSD_AUTH_MSG"
-echo "          Random number source: $RAND_MSG"
+echo "                     User binaries: $B"
+echo "                   System binaries: $C"
+echo "               Configuration files: $D"
+echo "                   Askpass program: $E"
+echo "                      Manual pages: $F"
+echo "                          PID file: $G"
+echo "  Privilege separation chroot path: $H"
+if test "$USES_LOGIN_CONF" = "yes" ; then
+echo "   At runtime, sshd will use the path defined in /etc/login.conf"
+else
+echo "            sshd default user PATH: $I"
+fi
+if test ! -z "$superuser_path" ; then
+echo "          sshd superuser user PATH: $J"
+fi
+echo "                    Manpage format: $MANTYPE"
+echo "                       PAM support: ${PAM_MSG}"
+echo "                KerberosIV support: $KRB4_MSG"
+echo "                 KerberosV support: $KRB5_MSG"
+echo "                 Smartcard support: $SCARD_MSG"
+echo "                       AFS support: $AFS_MSG"
+echo "                     S/KEY support: $SKEY_MSG"
+echo "              TCP Wrappers support: $TCPW_MSG"
+echo "              MD5 password support: $MD5_MSG"
+echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
+echo "          Use IPv4 by default hack: $IPV4_HACK_MSG"
+echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
+echo "                  BSD Auth support: $BSD_AUTH_MSG"
+echo "              Random number source: $RAND_MSG"
 if test ! -z "$USE_RAND_HELPER" ; then
-       echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
+echo "     ssh-rand-helper collects from: $RAND_HELPER_MSG"
 fi
 
 echo ""
index 6c7aaf4547d4c55f0f744f84dd2cb96212d9271e..4095884845d02a81cc0de041cc357053ee49c952 100755 (executable)
 
 umask 022
 PKGNAME=openssh
+PKGDIR=package
 
-PATH=$PATH:`pwd`               # set path for external tools
+PATH=`pwd`:$PATH               # set path for external tools
 export PATH
 
-## Extract common info requires for the 'info' part of the package.
-VERSION=`tail -1 ../../version.h | sed -e 's/.*_\([0-9]\)/\1/g' | sed 's/\"$//'`
-BFFVERSION=`echo $VERSION | sed 's/p/./g'`
-
-echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
-PKGDIR=package
-
-# Clean build directory and package file
+# Clean build directory 
 rm -rf $PKGDIR
 mkdir $PKGDIR
-rm -f $PKGNAME-$VERSION.bff
 
 if [ ! -f ../../Makefile ]
 then
@@ -40,6 +33,29 @@ FAKE_ROOT=$START/$PKGDIR
 cd ../.. 
 make install-nokeys DESTDIR=$FAKE_ROOT
 
+if [ $? -gt 0 ]
+then
+       echo "Fake root install failed, stopping."
+       exit 1
+fi
+
+#
+# Extract common info requires for the 'info' part of the package.
+#      AIX requires 4-part version numbers
+#
+VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//' | cut -f 2 -d _`
+MAJOR=`echo $VERSION | cut -f 1 -d p | cut -f 1 -d .`
+MINOR=`echo $VERSION | cut -f 1 -d p | cut -f 2 -d .`
+PATCH=`echo $VERSION | cut -f 1 -d p | cut -f 3 -d .`
+PORTABLE=`echo $VERSION | cut -f 2 -d p`
+if [ "$PATCH" = "" ]
+then
+       PATCH=0
+fi
+BFFVERSION=`printf "%d.%d.%d.%d" $MAJOR $MINOR $PATCH $PORTABLE`
+
+echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
+
 #
 # Fill in some details, like prefix and sysconfdir
 #      the eval also expands variables like sysconfdir=${prefix}/etc
@@ -175,6 +191,7 @@ mv ../lpp_name .
 #      file list on the fly and feed it to backup using -i
 #
 echo Creating $PKGNAME-$VERSION.bff with backup...
+rm -f $PKGNAME-$VERSION.bff
 (
        echo "./lpp_name"
        find . ! -name lpp_name -a ! -name . -print 
index aa44ab9d4453999b96b4059d84fe63de89675f96..78df0d16e7a7ddb09ac9c59c156a2d580a4bda25 100755 (executable)
@@ -52,7 +52,7 @@ find . ! -name . -print | perl -ne '{
        } elsif ( -f $_ ) {
                # Entry is File
                print "\ttype=FILE\n";
-               print "\tsize=VOLATILE\n";
+               print "\tsize=$sz\n";
                print "\tchecksum=VOLATILE\n";
        } elsif ( -d $_ ) {
                # Entry is Directory
index e2077bf0a941382532a52049ab68c72c0a09d1c8..4abfde10e27fe5d6c3b277c3c39bdd57ded4a018 100644 (file)
@@ -1,11 +1,11 @@
 %define use-stable     1
 %if %{use-stable}
-  %define version      3.1p1
+  %define version      3.2.2p1
   %define cvs          %{nil}
   %define release      1
 %else
-  %define version      3.0p1
-  %define cvs          cvs20011102
+  %define version      3.2.2
+  %define cvs          cvs20020515
   %define release      0r1
 %endif
 %define xsa            x11-ssh-askpass         
@@ -93,7 +93,7 @@ mkdir -p $DESTDIR/{etc/pam.d,%{SVIcdir},%{SVIdir}}
 # enabling X11 forwarding on the server is convenient and okay,
 # on the client side we consider it a potential security risk!
 %{fixUP} -vT  $DESTDIR/etc/ssh/sshd_config -e '
-   s/X11Forwarding no/X11Forwarding yes/i'
+   s/#X11Forwarding no/X11Forwarding yes/i'
 
 install -m644 contrib/caldera/sshd.pam $DESTDIR/etc/pam.d/sshd
 # FIXME: disabled, find out why this doesn't work with NIS
@@ -171,7 +171,7 @@ EOF
 if [ -x %{LSBinit}-install ]; then
   %{LSBinit}-install sshd
 else
-  lisa --SysV-init install sshd S55 3:4:5 K45 0:1:2:6
+  lisa --SysV-init install sshd S55 2:3:4:5 K45 0:1:6
 fi
 
 ! %{SVIdir}/sshd status || %{SVIdir}/sshd restart
index 60d3916915f6682d84997a5b9f98ed41e2084720..9021ba2b0322d36400228d24fae736cf435b2a2f 100644 (file)
@@ -172,8 +172,8 @@ configure are used for the Cygwin binary distribution:
        --sysconfdir=/etc \
        --libexecdir='${exec_prefix}/sbin'
 
-You must have installed the zlib, openssl and regex packages to
-be able to build OpenSSH!
+You must have installed the zlib and openssl packages to be able to
+build OpenSSH!
 
 Please send requests, error reports etc. to cygwin@cygwin.com.
 
index bfeee7fca8b55fcde2b3be1875f72b59be13026a..da60112678d0920fe761ebb6f41e8bebfaadd4e9 100644 (file)
@@ -434,9 +434,9 @@ then
   then
     if [ "${with_comment}" -eq 0 ]
     then
-      echo 'ssh  stream  tcp     nowait  root    /usr/sbin/sshd -i' >> "${_inetcnf}"
+      echo 'ssh  stream  tcp     nowait  root    /usr/sbin/sshd sshd -i' >> "${_inetcnf}"
     else
-      echo '# ssh  stream  tcp     nowait  root    /usr/sbin/sshd -i' >> "${_inetcnf}"
+      echo '# ssh  stream  tcp     nowait  root    /usr/sbin/sshd sshd -i' >> "${_inetcnf}"
     fi
     echo "Added ssh to ${_inetcnf}"
   fi
diff --git a/openssh/contrib/redhat/gnome-ssh-askpass.csh b/openssh/contrib/redhat/gnome-ssh-askpass.csh
new file mode 100644 (file)
index 0000000..dd77712
--- /dev/null
@@ -0,0 +1 @@
+setenv SSH_ASKPASS /usr/libexec/openssh/gnome-ssh-askpass
diff --git a/openssh/contrib/redhat/gnome-ssh-askpass.sh b/openssh/contrib/redhat/gnome-ssh-askpass.sh
new file mode 100644 (file)
index 0000000..355189f
--- /dev/null
@@ -0,0 +1,2 @@
+SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
+export SSH_ASKPASS
index c36b65153c2d45a9f365ea1d1a055c8f507cf0d6..ca979096aaa6e10566f46c3bf9e055dc37b7bd91 100644 (file)
@@ -1,5 +1,9 @@
-# Version of OpenSSH
-%define oversion 3.1p1
+%define ver 3.2.2p1
+%define rel 1
+
+# OpenSSH privilege separation requires a user & group ID
+%define sshd_uid    74
+%define sshd_gid    74
 
 # Version of ssh-askpass
 %define aversion 1.2.4.1
@@ -16,8 +20,8 @@
 # Do we want smartcard support (1=yes 0=no)
 %define scard 0
 
-# Use Redhat 7.0 pam control file
-%define redhat7 0
+# Is this build for RHL 6.x?
+%define build6x 0
 
 # Disable IPv6 (avoids DNS hangs on some glibc versions)
 %define noip6 0
 %{?skip_x11_askpass:%define no_x11_askpass 1}
 %{?skip_gnome_askpass:%define no_gnome_askpass 1}
 
-# Options for Redhat version:
-# rpm -ba|--rebuild --define "rh7 1"
-%{?rh7:%define redhat7 1}
+# Is this a build for RHL 6.x or earlier?
+%{?build_6x:%define build6x 1}
+
+# If this is RHL 6.x, the default configuration has sysconfdir in /usr/etc.
+%if %{build6x}
+%define _sysconfdir /etc
+%define noip6 1
+%endif
 
 # Options for static OpenSSL link:
 # rpm -ba|--rebuild --define "static_openssl 1"
 # rpm -ba|--rebuild --define "noipv6 1"
 %{?noipv6:%define noip6 1}
 
-%define exact_openssl_version   %(rpm -q openssl | cut -d - -f 2)
+# Is this a build for the rescue CD (without PAM, with MD5)? (1=yes 0=no)
+%define rescue 0
+%{?build_rescue:%define rescue 1}
 
-Summary: The OpenSSH implementation of SSH protocol versions 1 and 2
+Summary: The OpenSSH implementation of SSH protocol versions 1 and 2.
 Name: openssh
-Version: %{oversion}
-Release: 1
-Packager: Damien Miller <djm@mindrot.org>
+Version: %{ver}
+%if %{rescue}
+Release: %{rel}rescue
+%else
+Release: %{rel}
+%endif
 URL: http://www.openssh.com/portable.html
-Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz
-%if ! %{no_x11_askpass}
+Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
 Source1: http://www.pobox.com/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
-%endif
 License: BSD
 Group: Applications/Internet
 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
 Obsoletes: ssh
-BuildPreReq: perl, openssl-devel, tcp_wrappers
-BuildPreReq: /bin/login, /usr/include/security/pam_appl.h
-BuildPreReq: rpm >= 3.0.5
+%if %{build6x}
+PreReq: initscripts >= 5.00
+%else
+PreReq: initscripts >= 5.20
+%endif
+BuildPreReq: perl, openssl-devel, sharutils, tcp_wrappers
+BuildPreReq: /bin/login
+%if %{build6x}
+BuildPreReq: glibc-devel, pam
+%else
+BuildPreReq: db1-devel, /usr/include/security/pam_appl.h
+%endif
 %if ! %{no_x11_askpass}
 BuildPreReq: XFree86-devel
 %endif
 %if ! %{no_gnome_askpass}
 BuildPreReq: gnome-libs-devel
 %endif
-%if ! %{static_libcrypto}
-PreReq: openssl >= 0.9.5a
-PreReq: openssl = %{exact_openssl_version}
-Requires: openssl >= 0.9.5a
-%endif
-Requires: rpm >= 3.0.5
 
 %package clients
 Summary: OpenSSH clients.
@@ -86,7 +101,7 @@ Summary: The OpenSSH server daemon.
 Group: System Environment/Daemons
 Obsoletes: ssh-server
 PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9
-%if %{redhat7}
+%if ! %{build6x}
 Requires: /etc/pam.d/system-auth
 %endif
 
@@ -103,41 +118,43 @@ Requires: openssh = %{version}-%{release}
 Obsoletes: ssh-extras
 
 %description
-OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation. SSH
-replaces rlogin and rsh, to provide secure encrypted communications
-between two untrusted hosts over an insecure network. X11 connections
-and arbitrary TCP/IP ports can also be forwarded over the secure
-channel. Public key authentication may be used for "passwordless"
-access to servers.
+SSH (Secure SHell) is a program for logging into and executing
+commands on a remote machine. SSH is intended to replace rlogin and
+rsh, and to provide secure encrypted communications between two
+untrusted hosts over an insecure network. X11 connections and
+arbitrary TCP/IP ports can also be forwarded over the secure channel.
+
+OpenSSH is OpenBSD's version of the last free version of SSH, bringing
+it up to date in terms of security and features, as well as removing
+all patented algorithms to separate libraries.
 
 This package includes the core files necessary for both the OpenSSH
 client and server. To make this package useful, you should also
 install openssh-clients, openssh-server, or both.
 
 %description clients
-OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
-
-This package includes the clients necessary to make encrypted
-connections to SSH protocol servers.  You'll also need to install the
-openssh package on OpenSSH clients.
+OpenSSH is a free version of SSH (Secure SHell), a program for logging
+into and executing commands on a remote machine. This package includes
+the clients necessary to make encrypted connections to SSH servers.
+You'll also need to install the openssh package on OpenSSH clients.
 
 %description server
-OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
-
-This package contains the secure shell daemon (sshd). The sshd daemon
-allows SSH clients to securely connect to your SSH server. You also
-need to have the openssh package installed.
+OpenSSH is a free version of SSH (Secure SHell), a program for logging
+into and executing commands on a remote machine. This package contains
+the secure shell daemon (sshd). The sshd daemon allows SSH clients to
+securely connect to your SSH server. You also need to have the openssh
+package installed.
 
 %description askpass
-OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
-
-This package contains an X11 passphrase dialog for OpenSSH.
+OpenSSH is a free version of SSH (Secure SHell), a program for logging
+into and executing commands on a remote machine. This package contains
+an X11 passphrase dialog for OpenSSH.
 
 %description askpass-gnome
-OpenSSH is OpenBSD's SSH (Secure SHell) protocol implementation.
-
-This package contains an X11 passphrase dialog for OpenSSH and the
-GNOME GUI desktop environment.
+OpenSSH is a free version of SSH (Secure SHell), a program for logging
+into and executing commands on a remote machine. This package contains
+an X11 passphrase dialog for OpenSSH and the GNOME GUI desktop
+environment.
 
 %prep
 
@@ -148,38 +165,41 @@ GNOME GUI desktop environment.
 %endif
 
 %build
-
-%define _sysconfdir /etc/ssh
-
-EXTRA_OPTS=""
-
-%if %{scard}
-       EXTRA_OPTS="$EXTRA_OPTS --with-smartcard"
-%endif
-
-%if %{noip6}
-       EXTRA_OPTS="$EXTRA_OPTS --with-ipv4-default "
+%if %{rescue}
+CFLAGS="$RPM_OPT_FLAGS -Os"; export CFLAGS
 %endif
 
 %configure \
+       --sysconfdir=%{_sysconfdir}/ssh \
        --libexecdir=%{_libexecdir}/openssh \
        --datadir=%{_datadir}/openssh \
-       --with-pam \
        --with-tcp-wrappers \
-       --with-rsh=/usr/bin/rsh \
-       --with-default-path=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin \
-       $EXTRA_OPTS
+       --with-rsh=%{_bindir}/rsh \
+       --with-default-path=/usr/local/bin:/bin:/usr/bin \
+       --with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \
+       --with-privsep-path=%{_var}/empty/sshd \
+%if %{scard}
+       --with-smartcard \
+%endif
+%if %{noip6}
+       --with-ipv4-default \
+%endif
+%if %{rescue}
+       --without-pam --with-md5-passwords
+%else
+       --with-pam --with-kerberos5=/usr/kerberos
+%endif
+
 
 %if %{static_libcrypto}
-perl -pi -e "s|-lcrypto|/usr/lib/libcrypto.a|g" Makefile
+perl -pi -e "s|-lcrypto|%{_libdir}/libcrypto.a|g" Makefile
 %endif
 
 make
 
 %if ! %{no_x11_askpass}
 pushd x11-ssh-askpass-%{aversion}
-%configure \
-        --libexecdir=%{_libexecdir}/openssh
+%configure --libexecdir=%{_libexecdir}/openssh
 xmkmf -a
 make
 popd
@@ -187,7 +207,7 @@ popd
 
 %if ! %{no_gnome_askpass}
 pushd contrib
-gcc -O -g `gnome-config --cflags gnome gnomeui` \
+gcc $RPM_OPT_FLAGS `gnome-config --cflags gnome gnomeui` \
         gnome-ssh-askpass.c -o gnome-ssh-askpass \
         `gnome-config --libs gnome gnomeui`
 popd
@@ -195,58 +215,98 @@ popd
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{makeinstall} \
-       libexecdir=$RPM_BUILD_ROOT%{_libexecdir}/openssh \
-       datadir=$RPM_BUILD_ROOT%{_datadir}/openssh \
-       DESTDIR=/ # Hack to disable key generation
+mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/ssh
+mkdir -p -m755 $RPM_BUILD_ROOT%{_libexecdir}/openssh
+mkdir -p -m755 $RPM_BUILD_ROOT%{_var}/empty/sshd
 
+make install DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT/etc/pam.d/
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
-%if %{redhat7}
-install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
+%if %{build6x}
+install -m644 contrib/redhat/sshd.pam.old $RPM_BUILD_ROOT/etc/pam.d/sshd
 %else
-install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
+install -m644 contrib/redhat/sshd.pam     $RPM_BUILD_ROOT/etc/pam.d/sshd
 %endif
 install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
 
 %if ! %{no_x11_askpass}
 install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/x11-ssh-askpass
-ln -s /usr/libexec/openssh/x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/ssh-askpass
+ln -s x11-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/ssh-askpass
 %endif
 
 %if ! %{no_gnome_askpass}
 install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome-ssh-askpass
 %endif
 
+install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
+install -m 755 contrib/redhat/gnome-ssh-askpass.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
+install -m 755 contrib/redhat/gnome-ssh-askpass.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
+
 perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%triggerun server -- ssh-server
+if [ "$1" != 0 -a -r /var/run/sshd.pid ] ; then
+       touch /var/run/sshd.restart
+fi
+
+%triggerun server -- openssh-server < 2.5.0p1
+# Count the number of HostKey and HostDsaKey statements we have.
+gawk   'BEGIN {IGNORECASE=1}
+        /^hostkey/ || /^hostdsakey/ {sawhostkey = sawhostkey + 1}
+        END {exit sawhostkey}' /etc/ssh/sshd_config
+# And if we only found one, we know the client was relying on the old default
+# behavior, which loaded the the SSH2 DSA host key when HostDsaKey wasn't
+# specified.  Now that HostKey is used for both SSH1 and SSH2 keys, specifying
+# one nullifies the default, which would have loaded both.
+if [ $? -eq 1 ] ; then
+       echo HostKey /etc/ssh/ssh_host_rsa_key >> /etc/ssh/sshd_config
+       echo HostKey /etc/ssh/ssh_host_dsa_key >> /etc/ssh/sshd_config
+fi
+
+%triggerpostun server -- ssh-server
+if [ "$1" != 0 ] ; then
+       /sbin/chkconfig --add sshd
+       if test -f /var/run/sshd.restart ; then
+               rm -f /var/run/sshd.restart
+               /sbin/service sshd start > /dev/null 2>&1 || :
+       fi
+fi
+
+%pre server
+%{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null || :
+%{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \
+       -g sshd -M -r sshd 2>/dev/null || :
+
 %post server
 /sbin/chkconfig --add sshd
-if test -r /var/run/sshd.pid ; then
-       /etc/rc.d/init.d/sshd restart >&2
-fi
+
+%postun server
+/sbin/service sshd condrestart > /dev/null 2>&1 || :
 
 %preun server
-if [ "$1" = 0 ] ; then
-       /etc/rc.d/init.d/sshd stop >&2
+if [ "$1" = 0 ]
+then
+       /sbin/service sshd stop > /dev/null 2>&1 || :
        /sbin/chkconfig --del sshd
 fi
 
 %files
 %defattr(-,root,root)
 %doc CREDITS ChangeLog INSTALL LICENCE OVERVIEW README* RFC* TODO WARNING*
-%attr(0755,root,root) %{_bindir}/ssh-keygen
 %attr(0755,root,root) %{_bindir}/scp
-%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
 %attr(0644,root,root) %{_mandir}/man1/scp.1*
-%attr(0755,root,root) %dir %{_sysconfdir}
-%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/moduli
+%attr(0755,root,root) %dir %{_sysconfdir}/ssh
+%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli
+%if ! %{rescue}
+%attr(0755,root,root) %{_bindir}/ssh-keygen
+%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
 %attr(0755,root,root) %dir %{_libexecdir}/openssh
+%endif
 %if %{scard}
 %attr(0755,root,root) %dir %{_datadir}/openssh
 %attr(0644,root,root) %{_datadir}/openssh/Ssh.bin
@@ -255,29 +315,34 @@ fi
 %files clients
 %defattr(-,root,root)
 %attr(4755,root,root) %{_bindir}/ssh
+%attr(0644,root,root) %{_mandir}/man1/ssh.1*
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config
+%attr(-,root,root) %{_bindir}/slogin
+%attr(-,root,root) %{_mandir}/man1/slogin.1*
+%if ! %{rescue}
 %attr(0755,root,root) %{_bindir}/ssh-agent
 %attr(0755,root,root) %{_bindir}/ssh-add
 %attr(0755,root,root) %{_bindir}/ssh-keyscan
 %attr(0755,root,root) %{_bindir}/sftp
-%attr(0644,root,root) %{_mandir}/man1/ssh.1*
 %attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*
 %attr(0644,root,root) %{_mandir}/man1/ssh-add.1*
 %attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
 %attr(0644,root,root) %{_mandir}/man1/sftp.1*
-%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config
-%attr(-,root,root) %{_bindir}/slogin
-%attr(-,root,root) %{_mandir}/man1/slogin.1*
+%endif
 
+%if ! %{rescue}
 %files server
 %defattr(-,root,root)
+%dir %attr(0111,root,root) %{_var}/empty/sshd
 %attr(0755,root,root) %{_sbindir}/sshd
 %attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
 %attr(0644,root,root) %{_mandir}/man8/sshd.8*
 %attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
-#%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
-%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
+%attr(0755,root,root) %dir %{_sysconfdir}/ssh
+%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
 %attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
 %attr(0755,root,root) %config /etc/rc.d/init.d/sshd
+%endif
 
 %if ! %{no_x11_askpass}
 %files askpass
@@ -292,44 +357,389 @@ fi
 %if ! %{no_gnome_askpass}
 %files askpass-gnome
 %defattr(-,root,root)
+%attr(0755,root,root) %config %{_sysconfdir}/profile.d/gnome-ssh-askpass.*
 %attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
 %endif
 
 %changelog
-* Mon Oct 18 2000 Damien Miller <djm@mindrot.org>
-- Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the 
-  Redhat 7.0 spec file
-* Tue Sep 05 2000 Damien Miller <djm@mindrot.org>
-- Use RPM configure macro
-* Tue Aug 08 2000 Damien Miller <djm@mindrot.org>
-- Some surgery to sshd.init (generate keys at runtime)
-- Cleanup of groups and removal of keygen calls
-* Wed Jul 12 2000 Damien Miller <djm@mindrot.org>
-- Make building of X11-askpass and gnome-askpass optional
-* Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
-- Glob manpages to catch compressed files
+* Fri May 10 2002 Damien Miller <djm@mindrot.org>
+- Merge in spec changes from RedHat, reorgansie a little
+- Add Privsep user, group and directory
+
+* Thu Mar  7 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1p1-2
+- bump and grind (through the build system)
+
+* Thu Mar  7 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1p1-1
+- require sharutils for building (mindrot #137)
+- require db1-devel only when building for 6.x (#55105), which probably won't
+  work anyway (3.1 requires OpenSSL 0.9.6 to build), but what the heck
+- require pam-devel by file (not by package name) again
+- add Markus's patch to compile with OpenSSL 0.9.5a (from
+  http://bugzilla.mindrot.org/show_bug.cgi?id=141) and apply it if we're
+  building for 6.x
+
+* Thu Mar  7 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1p1-0
+- update to 3.1p1
+
+* Tue Mar  5 2002 Nalin Dahyabhai <nalin@redhat.com> SNAP-20020305
+- update to SNAP-20020305
+- drop debug patch, fixed upstream
+
+* Wed Feb 20 2002 Nalin Dahyabhai <nalin@redhat.com> SNAP-20020220
+- update to SNAP-20020220 for testing purposes (you've been warned, if there's
+  anything to be warned about, gss patches won't apply, I don't mind)
+
+* Wed Feb 13 2002 Nalin Dahyabhai <nalin@redhat.com> 3.0.2p1-3
+- add patches from Simon Wilkinson and Nicolas Williams for GSSAPI key
+  exchange, authentication, and named key support
+
+* Wed Jan 23 2002 Nalin Dahyabhai <nalin@redhat.com> 3.0.2p1-2
+- remove dependency on db1-devel, which has just been swallowed up whole
+  by gnome-libs-devel
+
+* Sun Dec 29 2001 Nalin Dahyabhai <nalin@redhat.com>
+- adjust build dependencies so that build6x actually works right (fix
+  from Hugo van der Kooij)
+
+* Tue Dec  4 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0.2p1-1
+- update to 3.0.2p1
+
+* Fri Nov 16 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0.1p1-1
+- update to 3.0.1p1
+
+* Tue Nov 13 2001 Nalin Dahyabhai <nalin@redhat.com>
+- update to current CVS (not for use in distribution)
+
+* Thu Nov  8 2001 Nalin Dahyabhai <nalin@redhat.com> 3.0p1-1
+- merge some of Damien Miller <djm@mindrot.org> changes from the upstream
+  3.0p1 spec file and init script
+
+* Wed Nov  7 2001 Nalin Dahyabhai <nalin@redhat.com>
+- update to 3.0p1
+- update to x11-ssh-askpass 1.2.4.1
+- change build dependency on a file from pam-devel to the pam-devel package
+- replace primes with moduli
+
+* Thu Sep 27 2001 Nalin Dahyabhai <nalin@redhat.com> 2.9p2-9
+- incorporate fix from Markus Friedl's advisory for IP-based authorization bugs
+
+* Thu Sep 13 2001 Bernhard Rosenkraenzer <bero@redhat.com> 2.9p2-8
+- Merge changes to rescue build from current sysadmin survival cd
+
+* Thu Sep  6 2001 Nalin Dahyabhai <nalin@redhat.com> 2.9p2-7
+- fix scp's server's reporting of file sizes, and build with the proper
+  preprocessor define to get large-file capable open(), stat(), etc.
+  (sftp has been doing this correctly all along) (#51827)
+- configure without --with-ipv4-default on RHL 7.x and newer (#45987,#52247)
+- pull cvs patch to fix support for /etc/nologin for non-PAM logins (#47298)
+- mark profile.d scriptlets as config files (#42337)
+- refer to Jason Stone's mail for zsh workaround for exit-hanging quasi-bug
+- change a couple of log() statements to debug() statements (#50751)
+- pull cvs patch to add -t flag to sshd (#28611)
+- clear fd_sets correctly (one bit per FD, not one byte per FD) (#43221)
+
+* Mon Aug 20 2001 Nalin Dahyabhai <nalin@redhat.com> 2.9p2-6
+- add db1-devel as a BuildPrerequisite (noted by Hans Ecke)
+
+* Thu Aug 16 2001 Nalin Dahyabhai <nalin@redhat.com>
+- pull cvs patch to fix remote port forwarding with protocol 2
+
+* Thu Aug  9 2001 Nalin Dahyabhai <nalin@redhat.com>
+- pull cvs patch to add session initialization to no-pty sessions
+- pull cvs patch to not cut off challengeresponse auth needlessly
+- refuse to do X11 forwarding if xauth isn't there, handy if you enable
+  it by default on a system that doesn't have X installed (#49263)
+
+* Wed Aug  8 2001 Nalin Dahyabhai <nalin@redhat.com>
+- don't apply patches to code we don't intend to build (spotted by Matt Galgoci)
+
+* Mon Aug  6 2001 Nalin Dahyabhai <nalin@redhat.com>
+- pass OPTIONS correctly to initlog (#50151)
+
+* Wed Jul 25 2001 Nalin Dahyabhai <nalin@redhat.com>
+- switch to x11-ssh-askpass 1.2.2
+
+* Wed Jul 11 2001 Nalin Dahyabhai <nalin@redhat.com>
+- rebuild in new environment
+
+* Mon Jun 25 2001 Nalin Dahyabhai <nalin@redhat.com>
+- disable the gssapi patch
+
+* Mon Jun 18 2001 Nalin Dahyabhai <nalin@redhat.com>
+- update to 2.9p2
+- refresh to a new version of the gssapi patch
+
+* Thu Jun  7 2001 Nalin Dahyabhai <nalin@redhat.com>
+- change Copyright: BSD to License: BSD
+- add Markus Friedl's unverified patch for the cookie file deletion problem
+  so that we can verify it
+- drop patch to check if xauth is present (was folded into cookie patch)
+- don't apply gssapi patches for the errata candidate
+- clear supplemental groups list at startup
+
+* Fri May 25 2001 Nalin Dahyabhai <nalin@redhat.com>
+- fix an error parsing the new default sshd_config
+- add a fix from Markus Friedl (via openssh-unix-dev) for ssh-keygen not
+  dealing with comments right
+
+* Thu May 24 2001 Nalin Dahyabhai <nalin@redhat.com>
+- add in Simon Wilkinson's GSSAPI patch to give it some testing in-house,
+  to be removed before the next beta cycle because it's a big departure
+  from the upstream version
+
+* Thu May  3 2001 Nalin Dahyabhai <nalin@redhat.com>
+- finish marking strings in the init script for translation
+- modify init script to source /etc/sysconfig/sshd and pass $OPTIONS to sshd
+  at startup (change merged from openssh.com init script, originally by
+  Pekka Savola)
+- refuse to do X11 forwarding if xauth isn't there, handy if you enable
+  it by default on a system that doesn't have X installed
+
+* Wed May  2 2001 Nalin Dahyabhai <nalin@redhat.com>
+- update to 2.9
+- drop various patches that came from or went upstream or to or from CVS
+
+* Wed Apr 18 2001 Nalin Dahyabhai <nalin@redhat.com>
+- only require initscripts 5.00 on 6.2 (reported by Peter Bieringer)
+
+* Sun Apr  8 2001 Preston Brown <pbrown@redhat.com>
+- remove explicit openssl requirement, fixes builddistro issue
+- make initscript stop() function wait until sshd really dead to avoid 
+  races in condrestart
+
+* Mon Apr  2 2001 Nalin Dahyabhai <nalin@redhat.com>
+- mention that challengereponse supports PAM, so disabling password doesn't
+  limit users to pubkey and rsa auth (#34378)
+- bypass the daemon() function in the init script and call initlog directly,
+  because daemon() won't start a daemon it detects is already running (like
+  open connections)
+- require the version of openssl we had when we were built
+
+* Fri Mar 23 2001 Nalin Dahyabhai <nalin@redhat.com>
+- make do_pam_setcred() smart enough to know when to establish creds and
+  when to reinitialize them
+- add in a couple of other fixes from Damien for inclusion in the errata
+
+* Thu Mar 22 2001 Nalin Dahyabhai <nalin@redhat.com>
+- update to 2.5.2p2
+- call setcred() again after initgroups, because the "creds" could actually
+  be group memberships
+
+* Tue Mar 20 2001 Nalin Dahyabhai <nalin@redhat.com>
+- update to 2.5.2p1 (includes endianness fixes in the rijndael implementation)
+- don't enable challenge-response by default until we find a way to not
+  have too many userauth requests (we may make up to six pubkey and up to
+  three password attempts as it is)
+- remove build dependency on rsh to match openssh.com's packages more closely
+
+* Sat Mar  3 2001 Nalin Dahyabhai <nalin@redhat.com>
+- remove dependency on openssl -- would need to be too precise
+
+* Fri Mar  2 2001 Nalin Dahyabhai <nalin@redhat.com>
+- rebuild in new environment
+
+* Mon Feb 26 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Revert the patch to move pam_open_session.
+- Init script and spec file changes from Pekka Savola. (#28750)
+- Patch sftp to recognize '-o protocol' arguments. (#29540)
+
+* Thu Feb 22 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Chuck the closing patch.
+- Add a trigger to add host keys for protocol 2 to the config file, now that
+  configuration file syntax requires us to specify it with HostKey if we
+  specify any other HostKey values, which we do.
+
+* Tue Feb 20 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Redo patch to move pam_open_session after the server setuid()s to the user.
+- Rework the nopam patch to use be picked up by autoconf.
+
+* Mon Feb 19 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Update for 2.5.1p1.
+- Add init script mods from Pekka Savola.
+- Tweak the init script to match the CVS contrib script more closely.
+- Redo patch to ssh-add to try to adding both identity and id_dsa to also try
+  adding id_rsa.
+
+* Fri Feb 16 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Update for 2.5.0p1.
+- Use $RPM_OPT_FLAGS instead of -O when building gnome-ssh-askpass
+- Resync with parts of Damien Miller's openssh.spec from CVS, including
+  update of x11 askpass to 1.2.0.
+- Only require openssl (don't prereq) because we generate keys in the init
+  script now.
+
+* Tue Feb 13 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Don't open a PAM session until we've forked and become the user (#25690).
+- Apply Andrew Bartlett's patch for letting pam_authenticate() know which
+  host the user is attempting a login from.
+- Resync with parts of Damien Miller's openssh.spec from CVS.
+- Don't expose KbdInt responses in debug messages (from CVS).
+- Detect and handle errors in rsa_{public,private}_decrypt (from CVS).
+
+* Wed Feb  7 2001 Trond Eivind Glomsrxd <teg@redhat.com>
+- i18n-tweak to initscript.
+
+* Tue Jan 23 2001 Nalin Dahyabhai <nalin@redhat.com>
+- More gettextizing.
+- Close all files after going into daemon mode (needs more testing).
+- Extract patch from CVS to handle auth banners (in the client).
+- Extract patch from CVS to handle compat weirdness.
+
+* Fri Jan 19 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Finish with the gettextizing.
+
+* Thu Jan 18 2001 Nalin Dahyabhai <nalin@redhat.com>
+- Fix a bug in auth2-pam.c (#23877)
+- Gettextize the init script.
+
+* Wed Dec 20 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Incorporate a switch for using PAM configs for 6.x, just in case.
+
+* Tue Dec  5 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Incorporate Bero's changes for a build specifically for rescue CDs.
+
+* Wed Nov 29 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Don't treat pam_setcred() failure as fatal unless pam_authenticate() has
+  succeeded, to allow public-key authentication after a failure with "none"
+  authentication.  (#21268)
+
+* Tue Nov 28 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to x11-askpass 1.1.1. (#21301)
+- Don't second-guess fixpaths, which causes paths to get fixed twice. (#21290)
+
+* Mon Nov 27 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Merge multiple PAM text messages into subsequent prompts when possible when
+  doing keyboard-interactive authentication.
+
+* Sun Nov 26 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Disable the built-in MD5 password support.  We're using PAM.
+- Take a crack at doing keyboard-interactive authentication with PAM, and
+  enable use of it in the default client configuration so that the client
+  will try it when the server disallows password authentication.
+- Build with debugging flags.  Build root policies strip all binaries anyway.
+
+* Tue Nov 21 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Use DESTDIR instead of %%makeinstall.
+- Remove /usr/X11R6/bin from the path-fixing patch.
+
+* Mon Nov 20 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Add the primes file from the latest snapshot to the main package (#20884).
+- Add the dev package to the prereq list (#19984).
+- Remove the default path and mimic login's behavior in the server itself.
+
+* Fri Nov 17 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Resync with conditional options in Damien Miller's .spec file for an errata.
+- Change libexecdir from %%{_libexecdir}/ssh to %%{_libexecdir}/openssh.
+
+* Tue Nov  7 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to OpenSSH 2.3.0p1.
+- Update to x11-askpass 1.1.0.
+- Enable keyboard-interactive authentication.
+
+* Mon Oct 30 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to ssh-askpass-x11 1.0.3.
+- Change authentication related messages to be private (#19966).
+
+* Tue Oct 10 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Patch ssh-keygen to be able to list signatures for DSA public key files
+  it generates.
+
+* Thu Oct  5 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Add BuildPreReq on /usr/include/security/pam_appl.h to be sure we always
+  build PAM authentication in.
+- Try setting SSH_ASKPASS if gnome-ssh-askpass is installed.
+- Clean out no-longer-used patches.
+- Patch ssh-add to try to add both identity and id_dsa, and to error only
+  when neither exists.
+
+* Mon Oct  2 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update x11-askpass to 1.0.2. (#17835)
+- Add BuildPreReqs for /bin/login and /usr/bin/rsh so that configure will
+  always find them in the right place. (#17909)
+- Set the default path to be the same as the one supplied by /bin/login, but
+  add /usr/X11R6/bin. (#17909)
+- Try to handle obsoletion of ssh-server more cleanly.  Package names
+  are different, but init script name isn't. (#17865)
+
+* Wed Sep  6 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to 2.2.0p1. (#17835)
+- Tweak the init script to allow proper restarting. (#18023)
+
+* Wed Aug 23 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to 20000823 snapshot.
+- Change subpackage requirements from %%{version} to %%{version}-%%{release}
+- Back out the pipe patch.
+
+* Mon Jul 17 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to 2.1.1p4, which includes fixes for config file parsing problems.
+- Move the init script back.
+- Add Damien's quick fix for wackiness.
+
+* Wed Jul 12 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to 2.1.1p3, which includes fixes for X11 forwarding and strtok().
+
+* Thu Jul  6 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Move condrestart to server postun.
+- Move key generation to init script.
+- Actually use the right patch for moving the key generation to the init script.
+- Clean up the init script a bit.
+
+* Wed Jul  5 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Fix X11 forwarding, from mail post by Chan Shih-Ping Richard.
+
+* Sun Jul  2 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to 2.1.1p2.
+- Use of strtok() considered harmful.
+
+* Sat Jul  1 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Get the build root out of the man pages.
+
+* Thu Jun 29 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Add and use condrestart support in the init script.
+- Add newer initscripts as a prereq.
+
+* Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Build in new environment (release 2)
+- Move -clients subpackage to Applications/Internet group
+
+* Fri Jun  9 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Update to 2.2.1p1
+
+* Sat Jun  3 2000 Nalin Dahyabhai <nalin@redhat.com>
+- Patch to build with neither RSA nor RSAref.
+- Miscellaneous FHS-compliance tweaks.
+- Fix for possibly-compressed man pages.
+
 * Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
 - Updated for new location
 - Updated for new gnome-ssh-askpass build
+
 * Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
 - Added Jim Knoble's <jmknoble@pobox.com> askpass
+
 * Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
 - Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
+
 * Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
 - Added 'Obsoletes' directives
+
 * Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
 - Use make install
 - Subpackages
+
 * Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
 - Added links for slogin
 - Fixed perms on manpages
+
 * Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
 - Renamed init script
+
 * Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
 - Back to old binary names
+
 * Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
 - Use autoconf
 - New binary names
+
 * Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
 - Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
-
index 86b040cda0e1588dd14c117abf0aa4b15145d1fc..4ee8630c3954eb1711d5f4c03a7ece5f2678f116 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-
+#
 # Init file for OpenSSH server daemon
 #
 # chkconfig: 2345 55 25
 # source function library
 . /etc/rc.d/init.d/functions
 
+# pull in sysconfig settings
 [ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
 
 RETVAL=0
+prog="sshd"
 
 # Some functions to make the below more readable
 KEYGEN=/usr/bin/ssh-keygen
+SSHD=/usr/sbin/sshd
 RSA1_KEY=/etc/ssh/ssh_host_key
 RSA_KEY=/etc/ssh/ssh_host_rsa_key
 DSA_KEY=/etc/ssh/ssh_host_dsa_key
 PID_FILE=/var/run/sshd.pid
-my_success() {
-  local msg
-  if [ $# -gt 1 ]; then
-    msg="$2"
-  else
-    msg="done"
-  fi
-  case "`type -type success`" in
-    function)
-      success "$1"
-    ;;
-    *)
-      echo -n "${msg}"
-    ;;
-  esac
-}
-my_failure() {
-  local msg
-  if [ $# -gt 1 ]; then
-    msg="$2"
-  else
-    msg="FAILED"
-  fi
-  case "`type -type failure`" in
-    function)
-      failure "$1"
-    ;;
-    *)
-      echo -n "${msg}"
-    ;;
-  esac
-}
+
 do_rsa1_keygen() {
-       if ! test -f $RSA1_KEY ; then
-               echo -n "Generating SSH1 RSA host key: "
+       if [ ! -s $RSA1_KEY ]; then
+               echo -n $"Generating SSH1 RSA host key: "
                if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
-                       my_success "RSA1 key generation"
+                       chmod 600 $RSA1_KEY
+                       chmod 644 $RSA1_KEY.pub
+                       success $"RSA1 key generation"
                        echo
                else
-                       my_failure "RSA1 key generation"
+                       failure $"RSA1 key generation"
                        echo
                        exit 1
                fi
        fi
 }
+
 do_rsa_keygen() {
-       if ! test -f $RSA_KEY ; then
-               echo -n "Generating SSH2 RSA host key: "
+       if [ ! -s $RSA_KEY ]; then
+               echo -n $"Generating SSH2 RSA host key: "
                if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
-                       my_success "RSA key generation"
+                       chmod 600 $RSA_KEY
+                       chmod 644 $RSA_KEY.pub
+                       success $"RSA key generation"
                        echo
                else
-                       my_failure "RSA key generation"
+                       failure $"RSA key generation"
                        echo
                        exit 1
                fi
        fi
 }
+
 do_dsa_keygen() {
-       if ! test -f $DSA_KEY ; then
-               echo -n "Generating SSH2 DSA host key: "
+       if [ ! -s $DSA_KEY ]; then
+               echo -n $"Generating SSH2 DSA host key: "
                if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
-                       my_success "DSA key generation"
+                       chmod 600 $DSA_KEY
+                       chmod 644 $DSA_KEY.pub
+                       success $"DSA key generation"
                        echo
                else
-                       my_failure "DSA key generation"
+                       failure $"DSA key generation"
                        echo
                        exit 1
                fi
        fi
 }
-do_restart_sanity_check() {
-       sshd -t
+
+do_restart_sanity_check()
+{
+       $SSHD -t
        RETVAL=$?
        if [ ! "$RETVAL" = 0 ]; then
-               my_failure "Configuration file or keys"
+               failure $"Configuration file or keys are invalid"
                echo
-               exit $RETVAL
        fi
 }
 
+start()
+{
+       # Create keys if necessary
+       do_rsa1_keygen
+       do_rsa_keygen
+       do_dsa_keygen
+
+       echo -n $"Starting $prog:"
+       initlog -c "$SSHD $OPTIONS" && success || failure
+       RETVAL=$?
+       [ "$RETVAL" = 0 ] && touch /var/lock/subsys/sshd
+       echo
+}
+
+stop()
+{
+       echo -n $"Stopping $prog:"
+       killproc $SSHD -TERM
+       RETVAL=$?
+       [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/sshd
+       echo
+}
+
+reload()
+{
+       echo -n $"Reloading $prog:"
+       killproc $SSHD -HUP
+       RETVAL=$?
+       echo
+}
 
 case "$1" in
        start)
-               # Create keys if necessary
-               do_rsa1_keygen;
-               do_rsa_keygen;
-               do_dsa_keygen;
-               
-               echo -n "Starting sshd: "
-               if [ ! -f $PID_FILE ] ; then
-                       sshd $OPTIONS
-                       RETVAL=$?
-                       if [ "$RETVAL" = "0" ] ; then
-                               my_success "sshd startup" "sshd"
-                               touch /var/lock/subsys/sshd
-                       else
-                               my_failure "sshd startup" ""
-                       fi
-               fi
-               echo
+               start
                ;;
        stop)
-               echo -n "Shutting down sshd: "
-               if [ -f $PID_FILE ] ; then
-                       killproc sshd
-                       RETVAL=$?
-                       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd
-               fi
-               echo
+               stop
                ;;
        restart)
-               do_restart_sanity_check
-               $0 stop
-               $0 start
-               RETVAL=$?
+               stop
+               start
+               ;;
+       reload)
+               reload
                ;;
        condrestart)
                if [ -f /var/lock/subsys/sshd ] ; then
                        do_restart_sanity_check
-                       $0 stop
-                       $0 start
-                       RETVAL=$?
+                       if [ "$RETVAL" = 0 ] ; then
+                               stop
+                               # avoid race
+                               sleep 3
+                               start
+                       fi
                fi
                ;;
        status)
-               status sshd
+               status $SSHD
                RETVAL=$?
                ;;
        *)
-               echo "Usage: sshd {start|stop|restart|status|condrestart}"
-               exit 1
-               ;;
+               echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
+               RETVAL=1
 esac
-
 exit $RETVAL
index 26dcb34d9e944401738a49b8ad243c9c9f815de8..d2ab073fcef8a6a4a4dfc8c4453ff6b277030505 100644 (file)
@@ -1,8 +1,8 @@
 #%PAM-1.0
-auth       required     /lib/security/pam_pwdb.so shadow nodelay
+auth       required     /lib/security/pam_stack.so service=system-auth
 auth       required     /lib/security/pam_nologin.so
-account    required     /lib/security/pam_pwdb.so
-password   required     /lib/security/pam_cracklib.so
-password   required     /lib/security/pam_pwdb.so shadow nullok use_authtok
-session    required     /lib/security/pam_pwdb.so
+account    required     /lib/security/pam_stack.so service=system-auth
+password   required     /lib/security/pam_stack.so service=system-auth
+session    required     /lib/security/pam_stack.so service=system-auth
 session    required     /lib/security/pam_limits.so
+session    optional     /lib/security/pam_console.so
index 558524997f3753f9154d6f89b4d0cd7d2f2f3ca8..9b0a46e29aed788138c6d542482913554b26e252 100644 (file)
@@ -1,6 +1,7 @@
 The following is a new package build script for Solaris.   This is being
 introduced into OpenSSH 3.0 and above in hopes of simplifying the build
-process.  
+process.  As of 3.1p2 the script should work on all platforms that have
+SVR4 style package tools.
 
 The build process is called a 'dummy install'.. Which means the software does
 a  "make install-nokeys DESTDIR=[fakeroot]".  This way all manpages should
@@ -11,7 +12,8 @@ Directions:
 
 1. make -F Makefile.in distprep  (Only if you are getting from the CVS tree)
 2. ./configure --with-pam [..any other options you want..]
-3. cd contrib/solaris; ./buildpkg.sh
+3. look at the top of contrib/solaris/buildpkg.sh for the configurable options.
+4. ./contrib/solaris/buildpkg.sh
 
 If all goes well you should have a solaris package ready to be installed.
 
@@ -20,9 +22,3 @@ openssh-unix-dev@mindrot.org and I will try to assist you as best as I can.
 
 - Ben Lindstrom
 
-TODO:
-- Expand to cover all sysvr4 family of OSes
-- Clean things up a bit more.  
-- Detect if sshd is running and refuse to start.
-- SHOULD check for existing sshd_config nor ssh_config (does not currently).
-  [Post install script?  Ugh.. Nasty]
index 05abb22368db690b9df1e7f145f8751b61ba751e..1be6ed8d1dcb8fadbd5a71ee67d9932dbbf7d979 100755 (executable)
 #!/bin/sh
 #
-# Fake Root Solaris Build System - Prototype
+# Fake Root Solaris/SVR4/SVR5 Build System - Prototype
 #
 # The following code has been provide under Public Domain License.  I really
 # don't care what you use it for.  Just as long as you don't complain to me
 # nor my employer if you break it. - Ben Lindstrom (mouring@eviladmin.org)
 # 
 umask 022
+#
+# Options for building the package
+# You can create a config.local with your customized options
+#
+# uncommenting TEST_DIR and using configure--prefix=/var/tmp and 
+# PKGNAME=tOpenSSH should allow testing a package without interfering
+# with a real OpenSSH package on a system.
+#TEST_DIR=/var/tmp     # leave commented out for production build
 PKGNAME=OpenSSH
+SYSVINIT_NAME=opensshd
+MAKE=${MAKE:="make"}
+# uncomment these next two as needed
+#PERMIT_ROOT_LOGIN=no
+#X11_FORWARDING=yes
+# list of system directories we do NOT want to change owner/group/perms
+# when installing our package
+SYSTEM_DIR="/etc       \
+/etc/init.d            \
+/etc/rcS.d             \
+/etc/rc0.d             \
+/etc/rc1.d             \
+/etc/rc2.d             \
+/etc/opt               \
+/opt                   \
+/opt/bin               \
+/usr                   \
+/usr/bin               \
+/usr/lib               \
+/usr/sbin              \
+/usr/share             \
+/usr/share/man         \
+/usr/share/man/man1    \
+/usr/share/man/man8    \
+/usr/local             \
+/usr/local/bin         \
+/usr/local/etc         \
+/usr/local/libexec     \
+/usr/local/man         \
+/usr/local/man/man1    \
+/usr/local/man/man8    \
+/usr/local/sbin                \
+/usr/local/share       \
+/var                   \
+/var/opt               \
+/var/run               \
+/var/tmp               \
+/tmp"
 
-## Extract common info requires for the 'info' part of the package.
-VERSION=`tail -1 ../../version.h | sed -e 's/.*_\([0-9]\)/\1/g' | sed 's/\"$//'`
-ARCH=`uname -p`
+# We may need to buiild as root so we make sure PATH is set up
+# only set the path if it's not set already
+[ -d /usr/local/bin ]  &&  {
+       echo $PATH | grep ":/usr/local/bin"  > /dev/null 2>&1
+       [ $? -ne 0 ] && PATH=$PATH:/usr/local/bin
+}
+[ -d /usr/ccs/bin ]  &&  {
+       echo $PATH | grep ":/usr/ccs/bin"  > /dev/null 2>&1
+       [ $? -ne 0 ] && PATH=$PATH:/usr/ccs/bin
+}
+export PATH
+#
+
+[ -f Makefile ]  ||  {
+       echo "Please run this script from your build directory"
+       exit 1
+}
+
+# we will look for config.local to override the above options
+[ -s ./config.local ]  &&  . ./config.local
 
 ## Start by faking root install 
 echo "Faking root install..."
 START=`pwd`
+OPENSSHD_IN=`dirname $0`/opensshd.in
 FAKE_ROOT=$START/package
+[ -d $FAKE_ROOT ]  &&  rm -fr $FAKE_ROOT
 mkdir $FAKE_ROOT
-cd ../..
-make install-nokeys DESTDIR=$FAKE_ROOT
+${MAKE} install-nokeys DESTDIR=$FAKE_ROOT
+if [ $? -gt 0 ]
+then
+       echo "Fake root install failed, stopping."
+       exit 1
+fi
 
 ## Fill in some details, like prefix and sysconfdir
-ETCDIR=`grep "^sysconfdir=" Makefile | sed 's/sysconfdir=//'`
-PREFIX=`grep "^prefix=" Makefile | cut -d = -f 2`        
-PIDDIR=`grep "^piddir=" Makefile | cut -d = -f 2`        
-cd $FAKE_ROOT
+for confvar in prefix exec_prefix bindir sbindir libexecdir datadir mandir sysconfdir piddir
+do
+        eval $confvar=`grep "^$confvar=" Makefile | cut -d = -f 2`
+done
 
-## Setup our run level stuff while we are at it.
-mkdir -p $FAKE_ROOT/etc/init.d
-mkdir -p $FAKE_ROOT/etc/rcS.d
-mkdir -p $FAKE_ROOT/etc/rc0.d
-mkdir -p $FAKE_ROOT/etc/rc1.d
-mkdir -p $FAKE_ROOT/etc/rc2.d
+## Extract common info requires for the 'info' part of the package.
+VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//'`
 
+UNAME_S=`uname -s`
+case ${UNAME_S} in
+       SunOS)  UNAME_S=Solaris
+               ARCH=`uname -p`
+               RCS_D=yes
+               DEF_MSG="(default: n)"
+               ;;
+       *)      ARCH=`uname -m` ;;
+esac
+
+## Setup our run level stuff while we are at it.
+mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d
 
 ## setup our initscript correctly
-sed -e "s#%%configDir%%#$ETCDIR#g"             \
-    -e "s#%%openSSHDir%%#$PREFIX#g"    \
-    -e "s#%%pidDir%%#$PIDDIR#g"        \
-       ../opensshd.in  > $FAKE_ROOT/etc/init.d/opensshd
-chmod 711 $FAKE_ROOT/etc/init.d/opensshd
+sed -e "s#%%configDir%%#${sysconfdir}#g"       \
+    -e "s#%%openSSHDir%%#$prefix#g"            \
+    -e "s#%%pidDir%%#${piddir}#g"              \
+       ${OPENSSHD_IN}  > $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME}
+chmod 744 $FAKE_ROOT${TEST_DIR}/etc/init.d/${SYSVINIT_NAME}
 
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rcS.d/K30opensshd
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rc0.d/K30opensshd
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rc1.d/K30opensshd
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rc2.d/S98opensshd
+[ "${PERMIT_ROOT_LOGIN}" = no ]  &&  \
+       perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \
+               $FAKE_ROOT/${sysconfdir}/sshd_config
+[ "${X11_FORWARDING}" = yes ]  &&  \
+       perl -p -i -e "s/#X11Forwarding no/X11Forwarding yes/" \
+               $FAKE_ROOT/${sysconfdir}/sshd_config
+# fix PrintMotd
+perl -p -i -e "s/#PrintMotd yes/PrintMotd no/" \
+       $FAKE_ROOT/${sysconfdir}/sshd_config
 
+# We don't want to overwrite config files on multiple installs
+mv $FAKE_ROOT/${sysconfdir}/ssh_config $FAKE_ROOT/${sysconfdir}/ssh_config.default
+mv $FAKE_ROOT/${sysconfdir}/sshd_config $FAKE_ROOT/${sysconfdir}/sshd_config.default
+[ -f $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds ]  &&  \
+mv $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds.default
+
+cd $FAKE_ROOT
 
 ## Ok, this is outright wrong, but it will work.  I'm tired of pkgmk
 ## whining.
@@ -58,28 +147,159 @@ done
 echo "Building pkginfo file..."
 cat > pkginfo << _EOF
 PKG=$PKGNAME
-NAME=OpenSSH Portable for Solaris
+NAME="OpenSSH Portable for ${UNAME_S}"
 DESC="Secure Shell remote access utility; replaces telnet and rlogin/rsh."
 VENDOR="OpenSSH Portable Team - http://www.openssh.com/portable.html"
-BASEDIR=$FAKE_ROOT
 ARCH=$ARCH
 VERSION=$VERSION
-CATEGORY=Security
+CATEGORY="Security,application"
 BASEDIR=/
+CLASSES="none"
+_EOF
+
+## Build preinstall file
+echo "Building preinstall file..."
+cat > preinstall << _EOF
+#! /sbin/sh
+#
+[ "\${PRE_INS_STOP}" = "yes" ]  &&  ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop
+exit 0
 _EOF
 
+## Build postinstall file
+echo "Building postinstall file..."
+cat > postinstall << _EOF
+#! /sbin/sh
+#
+[ -f ${sysconfdir}/ssh_config ]  ||  \\
+       cp -p ${sysconfdir}/ssh_config.default ${sysconfdir}/ssh_config
+[ -f ${sysconfdir}/sshd_config ]  ||  \\
+       cp -p ${sysconfdir}/sshd_config.default ${sysconfdir}/sshd_config
+[ -f ${sysconfdir}/ssh_prng_cmds.default ]  &&  {
+       [ -f ${sysconfdir}/ssh_prng_cmds ]  ||  \\
+       cp -p ${sysconfdir}/ssh_prng_cmds.default ${sysconfdir}/ssh_prng_cmds
+}
+
+# make rc?.d dirs only if we are doing a test install
+[ -n "${TEST_DIR}" ]  &&  {
+       [ "$RCS_D" = yes ]  &&  mkdir -p ${TEST_DIR}/etc/rcS.d
+       mkdir -p ${TEST_DIR}/etc/rc0.d
+       mkdir -p ${TEST_DIR}/etc/rc1.d
+       mkdir -p ${TEST_DIR}/etc/rc2.d
+}
+
+if [ "\${USE_SYM_LINKS}" = yes ]
+then
+       [ "$RCS_D" = yes ]  &&  \
+installf ${PKGNAME} $TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
+       installf ${PKGNAME} $TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
+       installf ${PKGNAME} $TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
+       installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
+else
+       [ "$RCS_D" = yes ]  &&  \
+installf ${PKGNAME} $TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
+       installf ${PKGNAME} $TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
+       installf ${PKGNAME} $TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
+       installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
+fi
+
+# If piddir doesn't exist we add it. (Ie. --with-pid-dir=/var/opt/ssh)
+[ -d $piddir ]  ||  installf ${PKGNAME} $TEST_DIR$piddir d 755 root sys
+
+installf -f ${PKGNAME}
+
+[ "\${POST_INS_START}" = "yes" ]  &&  ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start
+exit 0
+_EOF
+
+## Build preremove file
+echo "Building preremove file..."
+cat > preremove << _EOF
+#! /sbin/sh
+#
+${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} stop
+exit 0
+_EOF
+
+## Build request file
+echo "Building request file..."
+cat > request << _EOF
+trap 'exit 3' 15
+USE_SYM_LINKS=no
+PRE_INS_STOP=no
+POST_INS_START=no
+# Use symbolic links?
+ans=\`ckyorn -d n \
+-p "Do you want symbolic links for the start/stop scripts? ${DEF_MSG}"\` || exit \$?
+case \$ans in
+       [y,Y]*) USE_SYM_LINKS=yes ;;
+esac
+
+# determine if should restart the daemon
+if [ -s ${piddir}/sshd.pid  -a  -f ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} ]
+then
+       ans=\`ckyorn -d n \
+-p "Should the running sshd daemon be restarted? ${DEF_MSG}"\` || exit \$?
+       case \$ans in
+               [y,Y]*) PRE_INS_STOP=yes
+                       POST_INS_START=yes
+                       ;;
+       esac
+
+else
+
+# determine if we should start sshd
+       ans=\`ckyorn -d n \
+-p "Start the sshd daemon after installing this package? ${DEF_MSG}"\` || exit \$?
+       case \$ans in
+               [y,Y]*) POST_INS_START=yes ;;
+       esac
+fi
+
+# make parameters available to installation service,
+# and so to any other packaging scripts
+cat >\$1 <<!
+USE_SYM_LINKS='\$USE_SYM_LINKS'
+PRE_INS_STOP='\$PRE_INS_STOP'
+POST_INS_START='\$POST_INS_START'
+!
+exit 0
+
+_EOF
+
+## Build space file
+echo "Building space file..."
+cat > space << _EOF
+# extra space required by start/stop links added by installf in postinstall
+$TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME} 0 1
+$TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME} 0 1
+$TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME} 0 1
+_EOF
+[ "$RCS_D" = yes ]  &&  \
+echo "$TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME} 0 1" >> space
+
 ## Next Build our prototype
 echo "Building prototype file..."
-find . | egrep -v "prototype|pkginfo" | sort | pkgproto $PROTO_ARGS | \
-       awk '
-            BEGIN { print "i pkginfo" }        
-           { $5="root"; $6="sys"; }
-           { print; }' > prototype
+cat >mk-proto.awk << _EOF
+           BEGIN { print "i pkginfo"; print "i preinstall"; \\
+                   print "i postinstall"; print "i preremove"; \\
+                   print "i request"; print "i space"; \\
+                   split("$SYSTEM_DIR",sys_files); }
+           {
+            for (dir in sys_files) { if ( \$3 != sys_files[dir] )
+                    { \$5="root"; \$6="sys"; }
+               else
+                    { \$4="?"; \$5="?"; \$6="?"; break;}
+           } }
+           { print; }
+_EOF
+find . | egrep -v "prototype|pkginfo|mk-proto.awk" | sort | \
+       pkgproto $PROTO_ARGS | nawk -f mk-proto.awk > prototype
 
 ## Step back a directory and now build the package.
 echo "Building package.."
 cd ..
-pkgmk -d . -f $FAKE_ROOT/prototype -o
+pkgmk -d ${FAKE_ROOT} -f $FAKE_ROOT/prototype -o
+echo | pkgtrans -os ${FAKE_ROOT} ${START}/$PKGNAME-$UNAME_S-$ARCH-$VERSION.pkg
 rm -rf $FAKE_ROOT
-echo | pkgtrans -os . $PKGNAME-$ARCH-$VERSION.pkg
-rm -rf $PKGNAME
+
index 88b0e81cf5a981a84c025c6e20c3bbbbfd01bc6f..3262a97068c58d3900e426e06f31a2f7a2a3ecdf 100644 (file)
@@ -1,6 +1,6 @@
 Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
 Name: openssh
-Version: 3.1p1
+Version: 3.2.2p1
 URL: http://www.openssh.com/
 Release: 1
 Source0: openssh-%{version}.tar.gz
@@ -168,7 +168,7 @@ fi
 %files
 %defattr(-,root,root)
 %doc ChangeLog OVERVIEW README* 
-%doc RFC.nroff TODO CREDITS LICENSE
+%doc RFC.nroff TODO CREDITS LICENCE
 %attr(0755,root,root) %dir /etc/ssh
 %attr(0644,root,root) %config /etc/ssh/ssh_config
 %attr(0600,root,root) %config /etc/ssh/sshd_config
index 4caea9b2c77255aafbfd1c4568609cd1513b8b8b..f1e30e4dad5c9627f877829c83ade850d53d5b04 100644 (file)
@@ -3,58 +3,6 @@
 
 /* $Id$ */
 
-/* Necessary headers */
-
-#include <sys/types.h> /* For [u]intxx_t */
-#include <sys/socket.h> /* For SHUT_XXXX */
-#include <sys/param.h> /* For MAXPATHLEN and roundup() */
-#include <netinet/in_systm.h> /* For typedefs */
-#include <netinet/in.h> /* For IPv6 macros */
-#include <netinet/ip.h> /* For IPTOS macros */
-#ifdef HAVE_SYS_UN_H
-# include <sys/un.h> /* For sockaddr_un */
-#endif
-#ifdef HAVE_SYS_BITYPES_H
-# include <sys/bitypes.h> /* For u_intXX_t */
-#endif
-#ifdef HAVE_PATHS_H
-# include <paths.h> /* For _PATH_XXX */
-#endif
-#ifdef HAVE_LIMITS_H
-# include <limits.h> /* For PATH_MAX */
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h> /* For timersub */
-#endif
-#ifdef HAVE_MAILLOCK_H
-# include <maillock.h> /* For _PATH_MAILDIR */
-#endif
-#ifdef HAVE_SYS_CDEFS_H
-# include <sys/cdefs.h> /* For __P() */
-#endif
-#ifdef HAVE_SYS_SYSMACROS_H
-# include <sys/sysmacros.h> /* For MIN, MAX, etc */
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h> /* For S_* constants and macros */
-#endif
-#ifdef HAVE_NEXT
-#  include <libc.h>
-#endif
-
-#include <unistd.h> /* For STDIN_FILENO, etc */
-#include <termios.h> /* Struct winsize */
-#include <fcntl.h> /* For O_NONBLOCK */
-#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
-
-/* *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively */
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_LOGIN_H
-# include <login.h>
-#endif
-
 
 /* Constants */
 
@@ -136,6 +84,14 @@ enum
 # define S_IRWXO                       0000007 /* read, write, execute */
 #endif /* S_IXUSR */
 
+#if !defined(MAP_ANON) && defined(MAP_ANONYMOUS)
+#define MAP_ANON MAP_ANONYMOUS
+#endif
+
+#ifndef MAP_FAILED
+# define MAP_FAILED ((void *)-1)
+#endif
+
 /* *-*-nto-qnx doesn't define this constant in the system headers */
 #ifdef MISSING_NFDBITS
 # define       NFDBITS (8 * sizeof(unsigned long))
@@ -437,8 +393,33 @@ struct winsize {
 # define howmany(x,y)  (((x)+((y)-1))/(y))
 #endif
 
+#ifndef OSSH_ALIGNBYTES
+#define OSSH_ALIGNBYTES        (sizeof(int) - 1)
+#endif
+#ifndef __CMSG_ALIGN
+#define        __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES)
+#endif
+
+/* Length of the contents of a control message of length len */
+#ifndef CMSG_LEN
+#define        CMSG_LEN(len)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+#endif
+
+/* Length of the space taken up by a padded control message of length len */
+#ifndef CMSG_SPACE
+#define        CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
+#endif
+
 /* Function replacement / compatibility hacks */
 
+#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO))
+# define HAVE_GETADDRINFO
+#endif
+
+#ifndef HAVE_GETOPT_OPTRESET
+#define getopt(ac, av, o)  BSDgetopt(ac, av, o)
+#endif
+
 /* In older versions of libpam, pam_strerror takes a single argument */
 #ifdef HAVE_OLD_PAM
 # define PAM_STRERROR(a,b) pam_strerror((b))
@@ -466,14 +447,6 @@ struct winsize {
 # define memmove(s1, s2, n) bcopy((s2), (s1), (n))
 #endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */
 
-#if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
-# define atexit(a) on_exit(a, NULL)
-#else
-# if defined(HAVE_XATEXIT)
-#  define atexit(a) xatexit(a)
-# endif /* defined(HAVE_XATEXIT) */
-#endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */
-
 #if defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX)
 #  define USE_VHANGUP
 #endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */
@@ -487,6 +460,12 @@ struct winsize {
 # define OPENSSL_free(x) Free(x)
 #endif
 
+#if defined(HAVE___func__)
+#  define __FUNCTION__ __func__
+#elif !defined(HAVE___FUNCTION__)
+#  define __FUNCTION__ ""
+#endif
+
 /*
  * Define this to use pipes instead of socketpairs for communicating with the
  * client program.  Socketpairs do not seem to work on all systems.
@@ -500,27 +479,6 @@ struct winsize {
  ** login recorder definitions
  **/
 
-/* preprocess */
-
-#ifdef HAVE_UTMP_H
-#  ifdef HAVE_TIME_IN_UTMP
-#    include <time.h>
-#  endif
-#  include <utmp.h>
-#endif
-#ifdef HAVE_UTMPX_H
-#  ifdef HAVE_TV_IN_UTMPX
-#    include <sys/time.h>
-#  endif
-#  include <utmpx.h>
-#endif
-#ifdef HAVE_LASTLOG_H
-#  include <lastlog.h>
-#endif
-#ifdef HAVE_PATHS_H
-#  include <paths.h>
-#endif
-
 /* FIXME: put default paths back in */
 #ifndef UTMP_FILE
 #  ifdef _PATH_UTMP
@@ -579,11 +537,6 @@ struct winsize {
 #  define USE_LASTLOG
 #endif
 
-/* which type of time to use? (api.c) */
-#ifdef HAVE_SYS_TIME_H
-#  define USE_TIMEVAL
-#endif
-
 /** end of login recorder definitions */
 
 #endif /* _DEFINES_H */
index 9de292112b4329e3eca9df42d26447b5ea568856..578ffbeb35812b6a160c9e4735afec6571fff20a 100644 (file)
@@ -61,19 +61,21 @@ seed_rng(void)
        pid_t pid;
        int ret;
        unsigned char buf[RANDOM_SEED_SIZE];
+       mysig_t old_sigchld;
 
        if (RAND_status() == 1) {
                debug3("RNG is ready, skipping seeding");
                return;
        }
 
-       debug3("Seeing PRNG from %s", SSH_RAND_HELPER);
+       debug3("Seeding PRNG from %s", SSH_RAND_HELPER);
 
        if ((devnull = open("/dev/null", O_RDWR)) == -1)
                fatal("Couldn't open /dev/null: %s", strerror(errno));
        if (pipe(p) == -1)
                fatal("pipe: %s", strerror(errno));
 
+       old_sigchld = mysignal(SIGCHLD, SIG_DFL);
        if ((pid = fork()) == -1)
                fatal("Couldn't fork: %s", strerror(errno));
        if (pid == 0) {
@@ -85,9 +87,10 @@ seed_rng(void)
                close(devnull);
 
                if (original_uid != original_euid && 
-                   setuid(original_uid) == -1) {
-                       fprintf(stderr, "(rand child) setuid: %s\n", 
-                           strerror(errno));
+                   ( seteuid(getuid()) == -1 || 
+                     setuid(original_uid) == -1) ) {
+                       fprintf(stderr, "(rand child) setuid(%d): %s\n", 
+                           original_uid, strerror(errno));
                        _exit(1);
                }
                
@@ -113,6 +116,7 @@ seed_rng(void)
        if (waitpid(pid, &ret, 0) == -1)
               fatal("Couldn't wait for ssh-rand-helper completion: %s", 
                   strerror(errno));
+       mysignal(SIGCHLD, old_sigchld);
 
        /* We don't mind if the child exits upon a SIGPIPE */
        if (!WIFEXITED(ret) && 
index 4740418a75ae5ea795af02fd7f3dbcfb4d7fca6d..e20d7a5191354bab6752f355a24cb7a91e2d724f 100644 (file)
@@ -21,21 +21,10 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 
 #include "config.h"
 
-#include "openbsd-compat/bsd-nextstep.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/wait.h>
-#include <sys/resource.h>
-
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-
 #include <stdio.h>
 #include <ctype.h>
 #include <errno.h>
-#include <fcntl.h>
+#include <fcntl.h> /* For O_NONBLOCK */
 #include <signal.h>
 #include <stdlib.h>
 #include <string.h>
@@ -46,14 +35,11 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #include <dirent.h>
 
 #ifdef HAVE_LIMITS_H
-# include <limits.h>
+# include <limits.h> /* For PATH_MAX */
 #endif
 #ifdef HAVE_GETOPT_H
 # include <getopt.h>
 #endif
-#ifndef HAVE_GETOPT_OPTRESET
-#define getopt(ac, av, o)  BSDgetopt(ac, av, o)
-#endif
 #ifdef HAVE_BSTRING_H
 # include <bstring.h>
 #endif
@@ -70,37 +56,105 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #ifdef HAVE_ENDIAN_H
 # include <endian.h>
 #endif
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
+#ifdef HAVE_TTYENT_H
+# include <ttyent.h>
+#endif
+#ifdef HAVE_UTIME_H
+# include <utime.h>
+#endif
+#ifdef HAVE_MAILLOCK_H
+# include <maillock.h> /* For _PATH_MAILDIR */
+#endif
+#ifdef HAVE_NEXT
+#  include <libc.h>
+#endif
+#include <unistd.h> /* For STDIN_FILENO, etc */
+#include <termios.h> /* Struct winsize */
+
+/*
+ *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
+ */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_LOGIN_H
+# include <login.h>
+#endif
+
+#ifdef HAVE_UTMP_H
+#  include <utmp.h>
+#endif
+#ifdef HAVE_UTMPX_H
+#  ifdef HAVE_TV_IN_UTMPX
+#    include <sys/time.h>
+#  endif
+#  include <utmpx.h>
+#endif
+#ifdef HAVE_LASTLOG_H
+#  include <lastlog.h>
 #endif
+#ifdef HAVE_PATHS_H
+#  include <paths.h> /* For _PATH_XXX */
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/wait.h>
 #ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+# include <sys/time.h> /* For timersub */
+#endif
+#include <sys/resource.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
 #endif
 #ifdef HAVE_SYS_BSDTTY_H
 # include <sys/bsdtty.h>
 #endif
-#ifdef HAVE_TTYENT_H
-# include <ttyent.h>
+#include <sys/param.h> /* For MAXPATHLEN and roundup() */
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h> /* For sockaddr_un */
 #endif
-#ifdef USE_PAM
-# include <security/pam_appl.h>
+#ifdef HAVE_SYS_BITYPES_H
+# include <sys/bitypes.h> /* For u_intXX_t */
+#endif
+#ifdef HAVE_SYS_CDEFS_H
+# include <sys/cdefs.h> /* For __P() */
 #endif
-#ifdef HAVE_POLL_H
-# include <poll.h>
-#else
-# ifdef HAVE_SYS_POLL_H
-#  include <sys/poll.h>
-# endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h> /* For S_* constants and macros */
 #endif
 #ifdef HAVE_SYS_SYSMACROS_H
-# include <sys/sysmacros.h>
+# include <sys/sysmacros.h> /* For MIN, MAX, etc */
 #endif
-#ifdef HAVE_UTIME_H
-# include <utime.h>
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h> /* for MAP_ANONYMOUS */
+#endif
+
+#include <netinet/in_systm.h> /* For typedefs */
+#include <netinet/in.h> /* For IPv6 macros */
+#include <netinet/ip.h> /* For IPTOS macros */
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#ifdef HAVE_RPC_TYPES_H
+# include <rpc/types.h> /* For INADDR_LOOPBACK */
 #endif
+#ifdef USE_PAM
+# include <security/pam_appl.h>
+#endif
+#ifdef HAVE_READPASSPHRASE_H
+# include <readpassphrase.h>
+#endif
+
+#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
+
+#include "defines.h"
+
 #include "version.h"
 #include "openbsd-compat/openbsd-compat.h"
 #include "openbsd-compat/bsd-cygwin_util.h"
+#include "openbsd-compat/bsd-nextstep.h"
+
 #include "entropy.h"
 
 #endif /* INCLUDES_H */
index bf8fd95b4a289a3f0ea0bffdc0ced3d88f8b1509..d079ab0e388a98e83e4cbb79d89543ed068ec9de 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kex.c,v 1.47 2002/02/28 15:46:33 markus Exp $");
+RCSID("$OpenBSD: kex.c,v 1.50 2002/05/15 15:47:49 mouring Exp $");
 
 #include <openssl/crypto.h>
 
@@ -40,9 +40,15 @@ RCSID("$OpenBSD: kex.c,v 1.47 2002/02/28 15:46:33 markus Exp $");
 #include "mac.h"
 #include "match.h"
 #include "dispatch.h"
+#include "monitor.h"
 
 #define KEX_COOKIE_LEN 16
 
+/* Use privilege separation for sshd */
+int use_privsep;
+struct monitor *pmonitor;
+
+
 /* prototype */
 static void kex_kexinit_finish(Kex *);
 static void kex_choose_conf(Kex *);
@@ -51,16 +57,15 @@ static void kex_choose_conf(Kex *);
 static void
 kex_prop2buf(Buffer *b, char *proposal[PROPOSAL_MAX])
 {
-       u_int32_t rand = 0;
        int i;
 
        buffer_clear(b);
-       for (i = 0; i < KEX_COOKIE_LEN; i++) {
-               if (i % 4 == 0)
-                       rand = arc4random();
-               buffer_put_char(b, rand & 0xff);
-               rand >>= 8;
-       }
+       /*
+        * add a dummy cookie, the cookie will be overwritten by
+        * kex_send_kexinit(), each time a kexinit is set
+        */
+       for (i = 0; i < KEX_COOKIE_LEN; i++)
+               buffer_put_char(b, 0);
        for (i = 0; i < PROPOSAL_MAX; i++)
                buffer_put_cstring(b, proposal[i]);
        buffer_put_char(b, 0);                  /* first_kex_packet_follows */
@@ -146,6 +151,10 @@ kex_finish(Kex *kex)
 void
 kex_send_kexinit(Kex *kex)
 {
+       u_int32_t rand = 0;
+       u_char *cookie;
+       int i;
+
        if (kex == NULL) {
                error("kex_send_kexinit: no kex, cannot rekey");
                return;
@@ -155,6 +164,17 @@ kex_send_kexinit(Kex *kex)
                return;
        }
        kex->done = 0;
+
+       /* generate a random cookie */
+       if (buffer_len(&kex->my) < KEX_COOKIE_LEN)
+               fatal("kex_send_kexinit: kex proposal too short");
+       cookie = buffer_ptr(&kex->my);
+       for (i = 0; i < KEX_COOKIE_LEN; i++) {
+               if (i % 4 == 0)
+                       rand = arc4random();
+               cookie[i] = rand;
+               rand >>= 8;
+       }
        packet_start(SSH2_MSG_KEXINIT);
        packet_put_raw(buffer_ptr(&kex->my), buffer_len(&kex->my));
        packet_send();
index 755bf332aa40b52ddd26abc31a82e626a4a63a58..2d3523a36339403db18c7da00226073942b4ddbf 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kex.h,v 1.29 2002/02/14 23:41:01 markus Exp $ */
+/*     $OpenBSD: kex.h,v 1.30 2002/03/18 17:50:31 provos Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
@@ -111,6 +111,7 @@ struct Kex {
        char    *server_version_string;
        int     (*verify_host_key)(Key *);
        Key     *(*load_host_key)(int);
+       int     (*host_key_index)(Key *);
 };
 
 Kex    *kex_setup(char *[PROPOSAL_MAX]);
index eaf497ca7f1d8ff20628fddca017a58a5c160e47..1e91e2550228134df0a7567149a8a4119e870f4e 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kexdh.c,v 1.17 2002/02/28 15:46:33 markus Exp $");
+RCSID("$OpenBSD: kexdh.c,v 1.18 2002/03/18 17:50:31 provos Exp $");
 
 #include <openssl/crypto.h>
 #include <openssl/bn.h>
@@ -37,6 +37,7 @@ RCSID("$OpenBSD: kexdh.c,v 1.17 2002/02/28 15:46:33 markus Exp $");
 #include "packet.h"
 #include "dh.h"
 #include "ssh2.h"
+#include "monitor_wrap.h"
 
 static u_char *
 kex_dh_hash(
@@ -275,7 +276,7 @@ kexdh_server(Kex *kex)
 
        /* sign H */
        /* XXX hashlen depends on KEX */
-       key_sign(server_host_key, &signature, &slen, hash, 20);
+       PRIVSEP(key_sign(server_host_key, &signature, &slen, hash, 20));
 
        /* destroy_sensitive_data(); */
 
index 61896e6ed467685a995c175aa016b7cc051d7b8f..2d4a58153151753d56e9cd24e025ad4897bd212a 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kexgex.c,v 1.20 2002/02/28 15:46:33 markus Exp $");
+RCSID("$OpenBSD: kexgex.c,v 1.22 2002/03/24 17:27:03 stevesk Exp $");
 
 #include <openssl/bn.h>
 
@@ -38,6 +38,7 @@ RCSID("$OpenBSD: kexgex.c,v 1.20 2002/02/28 15:46:33 markus Exp $");
 #include "dh.h"
 #include "ssh2.h"
 #include "compat.h"
+#include "monitor_wrap.h"
 
 static u_char *
 kexgex_hash(
@@ -259,7 +260,7 @@ kexgex_server(Kex *kex)
 {
        BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
        Key *server_host_key;
-       DH *dh = dh;
+       DH *dh;
        u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
        u_int sbloblen, klen, kout, slen;
        int min = -1, max = -1, nbits = -1, type;
@@ -296,7 +297,8 @@ kexgex_server(Kex *kex)
                fatal("DH_GEX_REQUEST, bad parameters: %d !< %d !< %d",
                    min, nbits, max);
 
-       dh = choose_dh(min, nbits, max);
+       /* Contact privileged parent */
+       dh = PRIVSEP(choose_dh(min, nbits, max));
        if (dh == NULL)
                packet_disconnect("Protocol error: no matching DH grp found");
 
@@ -379,7 +381,7 @@ kexgex_server(Kex *kex)
 
        /* sign H */
        /* XXX hashlen depends on KEX */
-       key_sign(server_host_key, &signature, &slen, hash, 20);
+       PRIVSEP(key_sign(server_host_key, &signature, &slen, hash, 20));
 
        /* destroy_sensitive_data(); */
 
@@ -390,6 +392,7 @@ kexgex_server(Kex *kex)
        packet_put_bignum2(dh->pub_key);        /* f */
        packet_put_string(signature, slen);
        packet_send();
+
        xfree(signature);
        xfree(server_host_key_blob);
        /* have keys, free DH */
index cda91571affd8c4168746459d2a8139cd29ae34c..1ce0a87a33bdedf23aebb915ec3307fd2c7e25fe 100644 (file)
@@ -32,7 +32,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: key.c,v 1.41 2002/02/28 15:46:33 markus Exp $");
+RCSID("$OpenBSD: key.c,v 1.43 2002/03/19 10:49:35 markus Exp $");
 
 #include <openssl/evp.h>
 
@@ -801,3 +801,46 @@ key_verify(
                break;
        }
 }
+
+/* Converts a private to a public key */
+
+Key *
+key_demote(Key *k)
+{
+       Key *pk;
+
+       pk = xmalloc(sizeof(*pk));
+       pk->type = k->type;
+       pk->flags = k->flags;
+       pk->dsa = NULL;
+       pk->rsa = NULL;
+
+       switch (k->type) {
+       case KEY_RSA1:
+       case KEY_RSA:
+               if ((pk->rsa = RSA_new()) == NULL)
+                       fatal("key_demote: RSA_new failed");
+               if ((pk->rsa->e = BN_dup(k->rsa->e)) == NULL)
+                       fatal("key_demote: BN_dup failed");
+               if ((pk->rsa->n = BN_dup(k->rsa->n)) == NULL)
+                       fatal("key_demote: BN_dup failed");
+               break;
+       case KEY_DSA:
+               if ((pk->dsa = DSA_new()) == NULL)
+                       fatal("key_demote: DSA_new failed");
+               if ((pk->dsa->p = BN_dup(k->dsa->p)) == NULL)
+                       fatal("key_demote: BN_dup failed");
+               if ((pk->dsa->q = BN_dup(k->dsa->q)) == NULL)
+                       fatal("key_demote: BN_dup failed");
+               if ((pk->dsa->g = BN_dup(k->dsa->g)) == NULL)
+                       fatal("key_demote: BN_dup failed");
+               if ((pk->dsa->pub_key = BN_dup(k->dsa->pub_key)) == NULL)
+                       fatal("key_demote: BN_dup failed");
+               break;
+       default:
+               fatal("key_free: bad key type %d", k->type);
+               break;
+       }
+
+       return (pk);
+}
index a2257731aef55cd9170262e0d0537e79a4745098..8d1fa412672d9342f0572952d6f41ec2719438c0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: key.h,v 1.18 2002/02/24 19:14:59 markus Exp $ */
+/*     $OpenBSD: key.h,v 1.19 2002/03/18 17:23:31 markus Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
@@ -58,6 +58,7 @@ struct Key {
 Key    *key_new(int);
 Key    *key_new_private(int);
 void    key_free(Key *);
+Key    *key_demote(Key *);
 int     key_equal(Key *, Key *);
 char   *key_fingerprint(Key *, enum fp_type, enum fp_rep);
 char   *key_type(Key *);
index 1805f3ee836ec1f67f543c5687fda0cd801b6364..7aa102545fcaa3c260ae7daeada7f015626f31a9 100644 (file)
@@ -564,6 +564,11 @@ line_abbrevname(char *dst, const char *src, int dstsize)
        if (strncmp(src, "/dev/", 5) == 0)
                src += 5;
 
+#ifdef WITH_ABBREV_NO_TTY
+       if (strncmp(src, "tty", 3) == 0)
+               src += 3;
+#endif
+
        len = strlen(src);
 
        if (len > 0) {
index fddb2e09d06df313cb55a4ea71ff1e5605dc602a..928fc5d7a33488c8a0abc7bf5088ebd3c9878086 100644 (file)
@@ -318,11 +318,13 @@ sub ParseMacro # ($line)
 
                if (/^Nm$/)
                {
-                       $name = shift @words
+                       my $n = $name;
+                       $n = shift @words
                                if (@words > 0);
+                       $name = $n unless $name;
                        $retval .= ".br\n"
                                if ($synopsis);
-                       $retval .= "\\fB$name\\fP";
+                       $retval .= "\\fB$n\\fP";
                        $nospace = 1
                                if (! $nospace && $words[0] =~ m/^[\.,]/);
                        next;
index 668fd60d3bb7883a66bb5228ad39266a9e659108..3b4b879676f497b3b2d322af55b8ac66f57a0fef 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: misc.h,v 1.11 2002/01/24 21:09:25 stevesk Exp $       */
+/*     $OpenBSD: misc.h,v 1.12 2002/03/19 10:49:35 markus Exp $        */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -26,9 +26,9 @@ struct passwd *pwcopy(struct passwd *);
 
 typedef struct arglist arglist;
 struct arglist {
-        char    **list;
-        int     num;
-        int     nalloc;
+       char    **list;
+       int     num;
+       int     nalloc;
 };
 void    addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
 
diff --git a/openssh/monitor.c b/openssh/monitor.c
new file mode 100644 (file)
index 0000000..1e23d91
--- /dev/null
@@ -0,0 +1,1503 @@
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2002 Markus Friedl <markus@openbsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+RCSID("$OpenBSD: monitor.c,v 1.11 2002/05/15 15:47:49 mouring Exp $");
+
+#include <openssl/dh.h>
+
+#ifdef SKEY
+#include <skey.h>
+#endif
+
+#include "ssh.h"
+#include "auth.h"
+#include "kex.h"
+#include "dh.h"
+#include "zlib.h"
+#include "packet.h"
+#include "auth-options.h"
+#include "sshpty.h"
+#include "channels.h"
+#include "session.h"
+#include "sshlogin.h"
+#include "canohost.h"
+#include "log.h"
+#include "servconf.h"
+#include "monitor.h"
+#include "monitor_mm.h"
+#include "monitor_wrap.h"
+#include "monitor_fdpass.h"
+#include "xmalloc.h"
+#include "misc.h"
+#include "buffer.h"
+#include "bufaux.h"
+#include "compat.h"
+#include "ssh2.h"
+#include "mpaux.h"
+
+/* Imports */
+extern ServerOptions options;
+extern u_int utmp_len;
+extern Newkeys *current_keys[];
+extern z_stream incoming_stream;
+extern z_stream outgoing_stream;
+extern u_char session_id[];
+extern Buffer input, output;
+extern Buffer auth_debug;
+extern int auth_debug_init;
+
+/* State exported from the child */
+
+struct {
+       z_stream incoming;
+       z_stream outgoing;
+       u_char *keyin;
+       u_int keyinlen;
+       u_char *keyout;
+       u_int keyoutlen;
+       u_char *ivin;
+       u_int ivinlen;
+       u_char *ivout;
+       u_int ivoutlen;
+       int ssh1cipher;
+       int ssh1protoflags;
+       u_char *input;
+       u_int ilen;
+       u_char *output;
+       u_int olen;
+} child_state;
+
+/* Functions on the montior that answer unprivileged requests */
+
+int mm_answer_moduli(int, Buffer *);
+int mm_answer_sign(int, Buffer *);
+int mm_answer_pwnamallow(int, Buffer *);
+int mm_answer_auth2_read_banner(int, Buffer *);
+int mm_answer_authserv(int, Buffer *);
+int mm_answer_authpassword(int, Buffer *);
+int mm_answer_bsdauthquery(int, Buffer *);
+int mm_answer_bsdauthrespond(int, Buffer *);
+int mm_answer_skeyquery(int, Buffer *);
+int mm_answer_skeyrespond(int, Buffer *);
+int mm_answer_keyallowed(int, Buffer *);
+int mm_answer_keyverify(int, Buffer *);
+int mm_answer_pty(int, Buffer *);
+int mm_answer_pty_cleanup(int, Buffer *);
+int mm_answer_term(int, Buffer *);
+int mm_answer_rsa_keyallowed(int, Buffer *);
+int mm_answer_rsa_challenge(int, Buffer *);
+int mm_answer_rsa_response(int, Buffer *);
+int mm_answer_sesskey(int, Buffer *);
+int mm_answer_sessid(int, Buffer *);
+
+#ifdef USE_PAM
+int mm_answer_pam_start(int, Buffer *);
+#endif
+
+static Authctxt *authctxt;
+static BIGNUM *ssh1_challenge = NULL;  /* used for ssh1 rsa auth */
+
+/* local state for key verify */
+static u_char *key_blob = NULL;
+static u_int key_bloblen = 0;
+static int key_blobtype = MM_NOKEY;
+static u_char *hostbased_cuser = NULL;
+static u_char *hostbased_chost = NULL;
+static char *auth_method = "unknown";
+
+struct mon_table {
+       enum monitor_reqtype type;
+       int flags;
+       int (*f)(int, Buffer *);
+};
+
+#define MON_ISAUTH     0x0004  /* Required for Authentication */
+#define MON_AUTHDECIDE 0x0008  /* Decides Authentication */
+#define MON_ONCE       0x0010  /* Disable after calling */
+
+#define MON_AUTH       (MON_ISAUTH|MON_AUTHDECIDE)
+
+#define MON_PERMIT     0x1000  /* Request is permitted */
+
+struct mon_table mon_dispatch_proto20[] = {
+    {MONITOR_REQ_MODULI, MON_ONCE, mm_answer_moduli},
+    {MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign},
+    {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow},
+    {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv},
+    {MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner},
+    {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
+#ifdef USE_PAM
+    {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
+#endif
+#ifdef BSD_AUTH
+    {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
+    {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond},
+#endif
+#ifdef SKEY
+    {MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery},
+    {MONITOR_REQ_SKEYRESPOND, MON_AUTH, mm_answer_skeyrespond},
+#endif
+    {MONITOR_REQ_KEYALLOWED, MON_ISAUTH, mm_answer_keyallowed},
+    {MONITOR_REQ_KEYVERIFY, MON_AUTH, mm_answer_keyverify},
+    {0, 0, NULL}
+};
+
+struct mon_table mon_dispatch_postauth20[] = {
+    {MONITOR_REQ_MODULI, 0, mm_answer_moduli},
+    {MONITOR_REQ_SIGN, 0, mm_answer_sign},
+    {MONITOR_REQ_PTY, 0, mm_answer_pty},
+    {MONITOR_REQ_PTYCLEANUP, 0, mm_answer_pty_cleanup},
+    {MONITOR_REQ_TERM, 0, mm_answer_term},
+    {0, 0, NULL}
+};
+
+struct mon_table mon_dispatch_proto15[] = {
+    {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow},
+    {MONITOR_REQ_SESSKEY, MON_ONCE, mm_answer_sesskey},
+    {MONITOR_REQ_SESSID, MON_ONCE, mm_answer_sessid},
+    {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
+    {MONITOR_REQ_RSAKEYALLOWED, MON_ISAUTH, mm_answer_rsa_keyallowed},
+    {MONITOR_REQ_KEYALLOWED, MON_ISAUTH, mm_answer_keyallowed},
+    {MONITOR_REQ_RSACHALLENGE, MON_ONCE, mm_answer_rsa_challenge},
+    {MONITOR_REQ_RSARESPONSE, MON_ONCE|MON_AUTHDECIDE, mm_answer_rsa_response},
+#ifdef USE_PAM
+    {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
+#endif
+#ifdef BSD_AUTH
+    {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
+    {MONITOR_REQ_BSDAUTHRESPOND, MON_AUTH,mm_answer_bsdauthrespond},
+#endif
+#ifdef SKEY
+    {MONITOR_REQ_SKEYQUERY, MON_ISAUTH, mm_answer_skeyquery},
+    {MONITOR_REQ_SKEYRESPOND, MON_AUTH, mm_answer_skeyrespond},
+#endif
+#ifdef USE_PAM
+    {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
+#endif
+    {0, 0, NULL}
+};
+
+struct mon_table mon_dispatch_postauth15[] = {
+    {MONITOR_REQ_PTY, MON_ONCE, mm_answer_pty},
+    {MONITOR_REQ_PTYCLEANUP, MON_ONCE, mm_answer_pty_cleanup},
+    {MONITOR_REQ_TERM, 0, mm_answer_term},
+    {0, 0, NULL}
+};
+
+struct mon_table *mon_dispatch;
+
+/* Specifies if a certain message is allowed at the moment */
+
+static void
+monitor_permit(struct mon_table *ent, enum monitor_reqtype type, int permit)
+{
+       while (ent->f != NULL) {
+               if (ent->type == type) {
+                       ent->flags &= ~MON_PERMIT;
+                       ent->flags |= permit ? MON_PERMIT : 0;
+                       return;
+               }
+               ent++;
+       }
+}
+
+static void
+monitor_permit_authentications(int permit)
+{
+       struct mon_table *ent = mon_dispatch;
+
+       while (ent->f != NULL) {
+               if (ent->flags & MON_AUTH) {
+                       ent->flags &= ~MON_PERMIT;
+                       ent->flags |= permit ? MON_PERMIT : 0;
+               }
+               ent++;
+       }
+}
+
+Authctxt *
+monitor_child_preauth(struct monitor *pmonitor)
+{
+       struct mon_table *ent;
+       int authenticated = 0;
+
+       debug3("preauth child monitor started");
+
+       if (compat20) {
+               mon_dispatch = mon_dispatch_proto20;
+
+               /* Permit requests for moduli and signatures */
+               monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
+               monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
+       } else {
+               mon_dispatch = mon_dispatch_proto15;
+
+               monitor_permit(mon_dispatch, MONITOR_REQ_SESSKEY, 1);
+       }
+
+       authctxt = authctxt_new();
+
+       /* The first few requests do not require asynchronous access */
+       while (!authenticated) {
+               authenticated = monitor_read(pmonitor, mon_dispatch, &ent);
+               if (authenticated) {
+                       if (!(ent->flags & MON_AUTHDECIDE))
+                               fatal("%s: unexpected authentication from %d",
+                                   __FUNCTION__, ent->type);
+                       if (authctxt->pw->pw_uid == 0 &&
+                           !auth_root_allowed(auth_method))
+                               authenticated = 0;
+#ifdef USE_PAM
+                       if (!do_pam_account(authctxt->pw->pw_name, NULL))
+                               authenticated = 0;
+#endif
+               }
+
+               if (ent->flags & MON_AUTHDECIDE) {
+                       auth_log(authctxt, authenticated, auth_method,
+                           compat20 ? " ssh2" : "");
+                       if (!authenticated)
+                               authctxt->failures++;
+               }
+       }
+
+       if (!authctxt->valid)
+               fatal("%s: authenticated invalid user", __FUNCTION__);
+
+       debug("%s: %s has been authenticated by privileged process",
+           __FUNCTION__, authctxt->user);
+
+       mm_get_keystate(pmonitor);
+
+       return (authctxt);
+}
+
+void
+monitor_child_postauth(struct monitor *pmonitor)
+{
+       if (compat20) {
+               mon_dispatch = mon_dispatch_postauth20;
+
+               /* Permit requests for moduli and signatures */
+               monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
+               monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
+               monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
+
+       } else {
+               mon_dispatch = mon_dispatch_postauth15;
+               monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
+       }
+       if (!no_pty_flag) {
+               monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1);
+               monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1);
+       }
+
+       for (;;)
+               monitor_read(pmonitor, mon_dispatch, NULL);
+}
+
+void
+monitor_sync(struct monitor *pmonitor)
+{
+       /* The member allocation is not visible, so sync it */
+       mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback);
+}
+
+int
+monitor_read(struct monitor *pmonitor, struct mon_table *ent,
+    struct mon_table **pent)
+{
+       Buffer m;
+       int ret;
+       u_char type;
+
+       buffer_init(&m);
+
+       mm_request_receive(pmonitor->m_sendfd, &m);
+       type = buffer_get_char(&m);
+
+       debug3("%s: checking request %d", __FUNCTION__, type);
+
+       while (ent->f != NULL) {
+               if (ent->type == type)
+                       break;
+               ent++;
+       }
+
+       if (ent->f != NULL) {
+               if (!(ent->flags & MON_PERMIT))
+                       fatal("%s: unpermitted request %d", __FUNCTION__,
+                           type);
+               ret = (*ent->f)(pmonitor->m_sendfd, &m);
+               buffer_free(&m);
+
+               /* The child may use this request only once, disable it */
+               if (ent->flags & MON_ONCE) {
+                       debug2("%s: %d used once, disabling now", __FUNCTION__,
+                           type);
+                       ent->flags &= ~MON_PERMIT;
+               }
+
+               if (pent != NULL)
+                       *pent = ent;
+
+               return ret;
+       }
+
+       fatal("%s: unsupported request: %d", __FUNCTION__, type);
+
+       /* NOTREACHED */
+       return (-1);
+}
+
+/* allowed key state */
+static int
+monitor_allowed_key(u_char *blob, u_int bloblen)
+{
+       /* make sure key is allowed */
+       if (key_blob == NULL || key_bloblen != bloblen ||
+           memcmp(key_blob, blob, key_bloblen))
+               return (0);
+       return (1);
+}
+
+static void
+monitor_reset_key_state(void)
+{
+       /* reset state */
+       if (key_blob != NULL)
+               xfree(key_blob);
+       if (hostbased_cuser != NULL)
+               xfree(hostbased_cuser);
+       if (hostbased_chost != NULL)
+               xfree(hostbased_chost);
+       key_blob = NULL;
+       key_bloblen = 0;
+       key_blobtype = MM_NOKEY;
+       hostbased_cuser = NULL;
+       hostbased_chost = NULL;
+}
+
+int
+mm_answer_moduli(int socket, Buffer *m)
+{
+       DH *dh;
+       int min, want, max;
+
+       min = buffer_get_int(m);
+       want = buffer_get_int(m);
+       max = buffer_get_int(m);
+
+       debug3("%s: got parameters: %d %d %d",
+           __FUNCTION__, min, want, max);
+       /* We need to check here, too, in case the child got corrupted */
+       if (max < min || want < min || max < want)
+               fatal("%s: bad parameters: %d %d %d",
+                   __FUNCTION__, min, want, max);
+
+       buffer_clear(m);
+
+       dh = choose_dh(min, want, max);
+       if (dh == NULL) {
+               buffer_put_char(m, 0);
+               return (0);
+       } else {
+               /* Send first bignum */
+               buffer_put_char(m, 1);
+               buffer_put_bignum2(m, dh->p);
+               buffer_put_bignum2(m, dh->g);
+
+               DH_free(dh);
+       }
+       mm_request_send(socket, MONITOR_ANS_MODULI, m);
+       return (0);
+}
+
+int
+mm_answer_sign(int socket, Buffer *m)
+{
+       Key *key;
+       u_char *p;
+       u_char *signature;
+       u_int siglen, datlen;
+       int keyid;
+
+       debug3("%s", __FUNCTION__);
+
+       keyid = buffer_get_int(m);
+       p = buffer_get_string(m, &datlen);
+
+       if (datlen != 20)
+               fatal("%s: data length incorrect: %d", __FUNCTION__, datlen);
+
+       if ((key = get_hostkey_by_index(keyid)) == NULL)
+               fatal("%s: no hostkey from index %d", __FUNCTION__, keyid);
+       if (key_sign(key, &signature, &siglen, p, datlen) < 0)
+               fatal("%s: key_sign failed", __FUNCTION__);
+
+       debug3("%s: signature %p(%d)", __FUNCTION__, signature, siglen);
+
+       buffer_clear(m);
+       buffer_put_string(m, signature, siglen);
+
+       xfree(p);
+       xfree(signature);
+
+       mm_request_send(socket, MONITOR_ANS_SIGN, m);
+
+       /* Turn on permissions for getpwnam */
+       monitor_permit(mon_dispatch, MONITOR_REQ_PWNAM, 1);
+
+       return (0);
+}
+
+/* Retrieves the password entry and also checks if the user is permitted */
+
+int
+mm_answer_pwnamallow(int socket, Buffer *m)
+{
+       char *login;
+       struct passwd *pwent;
+       int allowed = 0;
+
+       debug3("%s", __FUNCTION__);
+
+       if (authctxt->attempt++ != 0)
+               fatal("%s: multiple attempts for getpwnam", __FUNCTION__);
+
+       login = buffer_get_string(m, NULL);
+
+       pwent = getpwnamallow(login);
+
+       authctxt->user = xstrdup(login);
+       setproctitle("%s [priv]", pwent ? login : "unknown");
+       xfree(login);
+
+       buffer_clear(m);
+
+       if (pwent == NULL) {
+               buffer_put_char(m, 0);
+               goto out;
+       }
+
+       allowed = 1;
+       authctxt->pw = pwent;
+       authctxt->valid = 1;
+
+       buffer_put_char(m, 1);
+       buffer_put_string(m, pwent, sizeof(struct passwd));
+       buffer_put_cstring(m, pwent->pw_name);
+       buffer_put_cstring(m, "*");
+       buffer_put_cstring(m, pwent->pw_gecos);
+#ifdef HAVE_PW_CLASS_IN_PASSWD
+       buffer_put_cstring(m, pwent->pw_class);
+#endif
+       buffer_put_cstring(m, pwent->pw_dir);
+       buffer_put_cstring(m, pwent->pw_shell);
+
+ out:
+       debug3("%s: sending MONITOR_ANS_PWNAM: %d", __FUNCTION__, allowed);
+       mm_request_send(socket, MONITOR_ANS_PWNAM, m);
+
+       /* For SSHv1 allow authentication now */
+       if (!compat20)
+               monitor_permit_authentications(1);
+       else {
+               /* Allow service/style information on the auth context */
+               monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1);
+               monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
+       }
+
+#ifdef USE_PAM
+       monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
+#endif
+
+       return (0);
+}
+
+int mm_answer_auth2_read_banner(int socket, Buffer *m)
+{
+       char *banner;
+
+       buffer_clear(m);
+       banner = auth2_read_banner();
+       buffer_put_cstring(m, banner != NULL ? banner : "");
+       mm_request_send(socket, MONITOR_ANS_AUTH2_READ_BANNER, m);
+
+       if (banner != NULL)
+               free(banner);
+
+       return (0);
+}
+
+int
+mm_answer_authserv(int socket, Buffer *m)
+{
+       monitor_permit_authentications(1);
+
+       authctxt->service = buffer_get_string(m, NULL);
+       authctxt->style = buffer_get_string(m, NULL);
+       debug3("%s: service=%s, style=%s",
+           __FUNCTION__, authctxt->service, authctxt->style);
+
+       if (strlen(authctxt->style) == 0) {
+               xfree(authctxt->style);
+               authctxt->style = NULL;
+       }
+
+       return (0);
+}
+
+int
+mm_answer_authpassword(int socket, Buffer *m)
+{
+       static int call_count;
+       char *passwd;
+       int authenticated, plen;
+
+       passwd = buffer_get_string(m, &plen);
+       /* Only authenticate if the context is valid */
+       authenticated = authctxt->valid && auth_password(authctxt, passwd);
+       memset(passwd, 0, strlen(passwd));
+       xfree(passwd);
+
+       buffer_clear(m);
+       buffer_put_int(m, authenticated);
+
+       debug3("%s: sending result %d", __FUNCTION__, authenticated);
+       mm_request_send(socket, MONITOR_ANS_AUTHPASSWORD, m);
+
+       call_count++;
+       if (plen == 0 && call_count == 1)
+               auth_method = "none";
+       else
+               auth_method = "password";
+
+       /* Causes monitor loop to terminate if authenticated */
+       return (authenticated);
+}
+
+#ifdef BSD_AUTH
+int
+mm_answer_bsdauthquery(int socket, Buffer *m)
+{
+       char *name, *infotxt;
+       u_int numprompts;
+       u_int *echo_on;
+       char **prompts;
+       int res;
+
+       res = bsdauth_query(authctxt, &name, &infotxt, &numprompts,
+           &prompts, &echo_on);
+
+       buffer_clear(m);
+       buffer_put_int(m, res);
+       if (res != -1)
+               buffer_put_cstring(m, prompts[0]);
+
+       debug3("%s: sending challenge res: %d", __FUNCTION__, res);
+       mm_request_send(socket, MONITOR_ANS_BSDAUTHQUERY, m);
+
+       if (res != -1) {
+               xfree(name);
+               xfree(infotxt);
+               xfree(prompts);
+               xfree(echo_on);
+       }
+
+       return (0);
+}
+
+int
+mm_answer_bsdauthrespond(int socket, Buffer *m)
+{
+       char *response;
+       int authok;
+
+       if (authctxt->as == 0)
+               fatal("%s: no bsd auth session", __FUNCTION__);
+
+       response = buffer_get_string(m, NULL);
+       authok = auth_userresponse(authctxt->as, response, 0);
+       authctxt->as = NULL;
+       debug3("%s: <%s> = <%d>", __FUNCTION__, response, authok);
+       xfree(response);
+
+       buffer_clear(m);
+       buffer_put_int(m, authok);
+
+       debug3("%s: sending authenticated: %d", __FUNCTION__, authok);
+       mm_request_send(socket, MONITOR_ANS_BSDAUTHRESPOND, m);
+
+       auth_method = "bsdauth";
+
+       return (authok != 0);
+}
+#endif
+
+#ifdef SKEY
+int
+mm_answer_skeyquery(int socket, Buffer *m)
+{
+       struct skey skey;
+       char challenge[1024];
+       int res;
+
+       res = skeychallenge(&skey, authctxt->user, challenge);
+
+       buffer_clear(m);
+       buffer_put_int(m, res);
+       if (res != -1)
+               buffer_put_cstring(m, challenge);
+
+       debug3("%s: sending challenge res: %d", __FUNCTION__, res);
+       mm_request_send(socket, MONITOR_ANS_SKEYQUERY, m);
+
+       return (0);
+}
+
+int
+mm_answer_skeyrespond(int socket, Buffer *m)
+{
+       char *response;
+       int authok;
+
+       response = buffer_get_string(m, NULL);
+
+       authok = (authctxt->valid &&
+           skey_haskey(authctxt->pw->pw_name) == 0 &&
+           skey_passcheck(authctxt->pw->pw_name, response) != -1);
+
+       xfree(response);
+
+       buffer_clear(m);
+       buffer_put_int(m, authok);
+
+       debug3("%s: sending authenticated: %d", __FUNCTION__, authok);
+       mm_request_send(socket, MONITOR_ANS_SKEYRESPOND, m);
+
+       auth_method = "skey";
+
+       return (authok != 0);
+}
+#endif
+
+#ifdef USE_PAM
+int
+mm_answer_pam_start(int socket, Buffer *m)
+{
+       char *user;
+       
+       user = buffer_get_string(m, NULL);
+
+       start_pam(user);
+
+       xfree(user);
+
+       return (0);
+}
+#endif
+
+static void
+mm_append_debug(Buffer *m)
+{
+       if (auth_debug_init && buffer_len(&auth_debug)) {
+               debug3("%s: Appending debug messages for child", __FUNCTION__);
+               buffer_append(m, buffer_ptr(&auth_debug),
+                   buffer_len(&auth_debug));
+               buffer_clear(&auth_debug);
+       }
+}
+
+int
+mm_answer_keyallowed(int socket, Buffer *m)
+{
+       Key *key;
+       u_char *cuser, *chost, *blob;
+       u_int bloblen;
+       enum mm_keytype type = 0;
+       int allowed = 0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       type = buffer_get_int(m);
+       cuser = buffer_get_string(m, NULL);
+       chost = buffer_get_string(m, NULL);
+       blob = buffer_get_string(m, &bloblen);
+
+       key = key_from_blob(blob, bloblen);
+
+       if ((compat20 && type == MM_RSAHOSTKEY) ||
+           (!compat20 && type != MM_RSAHOSTKEY))
+               fatal("%s: key type and protocol mismatch", __FUNCTION__);
+
+       debug3("%s: key_from_blob: %p", __FUNCTION__, key);
+
+       if (key != NULL && authctxt->pw != NULL) {
+               switch(type) {
+               case MM_USERKEY:
+                       allowed = user_key_allowed(authctxt->pw, key);
+                       break;
+               case MM_HOSTKEY:
+                       allowed = hostbased_key_allowed(authctxt->pw,
+                           cuser, chost, key);
+                       break;
+               case MM_RSAHOSTKEY:
+                       key->type = KEY_RSA1; /* XXX */
+                       allowed = auth_rhosts_rsa_key_allowed(authctxt->pw,
+                           cuser, chost, key);
+                       break;
+               default:
+                       fatal("%s: unknown key type %d", __FUNCTION__, type);
+                       break;
+               }
+               key_free(key);
+       }
+
+       /* clear temporarily storage (used by verify) */
+       monitor_reset_key_state();
+
+       if (allowed) {
+               /* Save temporarily for comparison in verify */
+               key_blob = blob;
+               key_bloblen = bloblen;
+               key_blobtype = type;
+               hostbased_cuser = cuser;
+               hostbased_chost = chost;
+       }
+
+       debug3("%s: key %p is %s",
+           __FUNCTION__, key, allowed ? "allowed" : "disallowed");
+
+       buffer_clear(m);
+       buffer_put_int(m, allowed);
+
+       mm_append_debug(m);
+
+       mm_request_send(socket, MONITOR_ANS_KEYALLOWED, m);
+
+       if (type == MM_RSAHOSTKEY)
+               monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
+
+       return (0);
+}
+
+static int
+monitor_valid_userblob(u_char *data, u_int datalen)
+{
+       Buffer b;
+       u_char *p;
+       u_int len;
+       int fail = 0;
+       int session_id2_len = 20 /*XXX should get from [net] */;
+
+       buffer_init(&b);
+       buffer_append(&b, data, datalen);
+
+       if (datafellows & SSH_OLD_SESSIONID) {
+               buffer_consume(&b, session_id2_len);
+       } else {
+               xfree(buffer_get_string(&b, &len));
+               if (len != session_id2_len)
+                       fail++;
+       }
+       if (buffer_get_char(&b) != SSH2_MSG_USERAUTH_REQUEST)
+               fail++;
+       p = buffer_get_string(&b, NULL);
+       if (strcmp(authctxt->user, p) != 0) {
+               log("wrong user name passed to monitor: expected %s != %.100s",
+                   authctxt->user, p);
+               fail++;
+       }
+       xfree(p);
+       buffer_skip_string(&b);
+       if (datafellows & SSH_BUG_PKAUTH) {
+               if (!buffer_get_char(&b))
+                       fail++;
+       } else {
+               p = buffer_get_string(&b, NULL);
+               if (strcmp("publickey", p) != 0)
+                       fail++;
+               xfree(p);
+               if (!buffer_get_char(&b))
+                       fail++;
+               buffer_skip_string(&b);
+       }
+       buffer_skip_string(&b);
+       if (buffer_len(&b) != 0)
+               fail++;
+       buffer_free(&b);
+       return (fail == 0);
+}
+
+static int
+monitor_valid_hostbasedblob(u_char *data, u_int datalen, u_char *cuser,
+    u_char *chost)
+{
+       Buffer b;
+       u_char *p;
+       u_int len;
+       int fail = 0;
+       int session_id2_len = 20 /*XXX should get from [net] */;
+
+       buffer_init(&b);
+       buffer_append(&b, data, datalen);
+
+       xfree(buffer_get_string(&b, &len));
+       if (len != session_id2_len)
+               fail++;
+       if (buffer_get_char(&b) != SSH2_MSG_USERAUTH_REQUEST)
+               fail++;
+       p = buffer_get_string(&b, NULL);
+       if (strcmp(authctxt->user, p) != 0) {
+               log("wrong user name passed to monitor: expected %s != %.100s",
+                   authctxt->user, p);
+               fail++;
+       }
+       xfree(p);
+       buffer_skip_string(&b); /* service */
+       p = buffer_get_string(&b, NULL);
+       if (strcmp(p, "hostbased") != 0)
+               fail++;
+       xfree(p);
+       buffer_skip_string(&b); /* pkalg */
+       buffer_skip_string(&b); /* pkblob */
+
+       /* verify client host, strip trailing dot if necessary */
+       p = buffer_get_string(&b, NULL);
+       if (((len = strlen(p)) > 0) && p[len - 1] == '.')
+               p[len - 1] = '\0';
+       if (strcmp(p, chost) != 0)
+               fail++;
+       xfree(p);
+
+       /* verify client user */
+       p = buffer_get_string(&b, NULL);
+       if (strcmp(p, cuser) != 0)
+               fail++;
+       xfree(p);
+
+       if (buffer_len(&b) != 0)
+               fail++;
+       buffer_free(&b);
+       return (fail == 0);
+}
+
+int
+mm_answer_keyverify(int socket, Buffer *m)
+{
+       Key *key;
+       u_char *signature, *data, *blob;
+       u_int signaturelen, datalen, bloblen;
+       int verified = 0;
+       int valid_data = 0;
+
+       blob = buffer_get_string(m, &bloblen);
+       signature = buffer_get_string(m, &signaturelen);
+       data = buffer_get_string(m, &datalen);
+
+       if (hostbased_cuser == NULL || hostbased_chost == NULL ||
+         !monitor_allowed_key(blob, bloblen))
+               fatal("%s: bad key, not previously allowed", __FUNCTION__);
+
+       key = key_from_blob(blob, bloblen);
+       if (key == NULL)
+               fatal("%s: bad public key blob", __FUNCTION__);
+
+       switch (key_blobtype) {
+       case MM_USERKEY:
+               valid_data = monitor_valid_userblob(data, datalen);
+               break;
+       case MM_HOSTKEY:
+               valid_data = monitor_valid_hostbasedblob(data, datalen,
+                   hostbased_cuser, hostbased_chost);
+               break;
+       default:
+               valid_data = 0;
+               break;
+       }
+       if (!valid_data)
+               fatal("%s: bad signature data blob", __FUNCTION__);
+
+       verified = key_verify(key, signature, signaturelen, data, datalen);
+       debug3("%s: key %p signature %s",
+           __FUNCTION__, key, verified ? "verified" : "unverified");
+
+       key_free(key);
+       xfree(blob);
+       xfree(signature);
+       xfree(data);
+
+       monitor_reset_key_state();
+
+       buffer_clear(m);
+       buffer_put_int(m, verified);
+       mm_request_send(socket, MONITOR_ANS_KEYVERIFY, m);
+
+       auth_method = "publickey";
+
+       return (verified);
+}
+
+static void
+mm_record_login(Session *s, struct passwd *pw)
+{
+       socklen_t fromlen;
+       struct sockaddr_storage from;
+
+       /*
+        * Get IP address of client. If the connection is not a socket, let
+        * the address be 0.0.0.0.
+        */
+       memset(&from, 0, sizeof(from));
+       if (packet_connection_is_on_socket()) {
+               fromlen = sizeof(from);
+               if (getpeername(packet_get_connection_in(),
+                       (struct sockaddr *) & from, &fromlen) < 0) {
+                       debug("getpeername: %.100s", strerror(errno));
+                       fatal_cleanup();
+               }
+       }
+       /* Record that there was a login on that tty from the remote host. */
+       record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid,
+           get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping),
+           (struct sockaddr *)&from);
+}
+
+static void
+mm_session_close(Session *s)
+{
+       debug3("%s: session %d pid %d", __FUNCTION__, s->self, s->pid);
+       if (s->ttyfd != -1) {
+               debug3("%s: tty %s ptyfd %d",  __FUNCTION__, s->tty, s->ptyfd);
+               fatal_remove_cleanup(session_pty_cleanup2, (void *)s);
+               session_pty_cleanup2(s);
+       }
+       s->used = 0;
+}
+
+int
+mm_answer_pty(int socket, Buffer *m)
+{
+       extern struct monitor *pmonitor;
+       Session *s;
+       int res, fd0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_clear(m);
+       s = session_new();
+       if (s == NULL)
+               goto error;
+       s->authctxt = authctxt;
+       s->pw = authctxt->pw;
+       s->pid = pmonitor->m_pid;
+       res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty));
+       if (res == 0)
+               goto error;
+       fatal_add_cleanup(session_pty_cleanup2, (void *)s);
+       pty_setowner(authctxt->pw, s->tty);
+
+       buffer_put_int(m, 1);
+       buffer_put_cstring(m, s->tty);
+       mm_request_send(socket, MONITOR_ANS_PTY, m);
+
+       mm_send_fd(socket, s->ptyfd);
+       mm_send_fd(socket, s->ttyfd);
+
+       /* We need to trick ttyslot */
+       if (dup2(s->ttyfd, 0) == -1)
+               fatal("%s: dup2", __FUNCTION__);
+
+       mm_record_login(s, authctxt->pw);
+
+       /* Now we can close the file descriptor again */
+       close(0);
+
+       /* make sure nothing uses fd 0 */
+       if ((fd0 = open(_PATH_DEVNULL, O_RDONLY)) < 0)
+               fatal("%s: open(/dev/null): %s", __FUNCTION__, strerror(errno));
+       if (fd0 != 0)
+               error("%s: fd0 %d != 0", __FUNCTION__, fd0);
+
+       /* slave is not needed */
+       close(s->ttyfd);
+       s->ttyfd = s->ptyfd;
+       /* no need to dup() because nobody closes ptyfd */
+       s->ptymaster = s->ptyfd;
+
+       debug3("%s: tty %s ptyfd %d",  __FUNCTION__, s->tty, s->ttyfd);
+
+       return (0);
+
+ error:
+       if (s != NULL)
+               mm_session_close(s);
+       buffer_put_int(m, 0);
+       mm_request_send(socket, MONITOR_ANS_PTY, m);
+       return (0);
+}
+
+int
+mm_answer_pty_cleanup(int socket, Buffer *m)
+{
+       Session *s;
+       char *tty;
+
+       debug3("%s entering", __FUNCTION__);
+
+       tty = buffer_get_string(m, NULL);
+       if ((s = session_by_tty(tty)) != NULL)
+               mm_session_close(s);
+       buffer_clear(m);
+       xfree(tty);
+       return (0);
+}
+
+int
+mm_answer_sesskey(int socket, Buffer *m)
+{
+       BIGNUM *p;
+       int rsafail;
+
+       /* Turn off permissions */
+       monitor_permit(mon_dispatch, MONITOR_REQ_SESSKEY, 1);
+
+       if ((p = BN_new()) == NULL)
+               fatal("%s: BN_new", __FUNCTION__);
+
+       buffer_get_bignum2(m, p);
+
+       rsafail = ssh1_session_key(p);
+
+       buffer_clear(m);
+       buffer_put_int(m, rsafail);
+       buffer_put_bignum2(m, p);
+
+       BN_clear_free(p);
+
+       mm_request_send(socket, MONITOR_ANS_SESSKEY, m);
+
+       /* Turn on permissions for sessid passing */
+       monitor_permit(mon_dispatch, MONITOR_REQ_SESSID, 1);
+
+       return (0);
+}
+
+int
+mm_answer_sessid(int socket, Buffer *m)
+{
+       int i;
+
+       debug3("%s entering", __FUNCTION__);
+
+       if (buffer_len(m) != 16)
+               fatal("%s: bad ssh1 session id", __FUNCTION__);
+       for (i = 0; i < 16; i++)
+               session_id[i] = buffer_get_char(m);
+
+       /* Turn on permissions for getpwnam */
+       monitor_permit(mon_dispatch, MONITOR_REQ_PWNAM, 1);
+
+       return (0);
+}
+
+int
+mm_answer_rsa_keyallowed(int socket, Buffer *m)
+{
+       BIGNUM *client_n;
+       Key *key = NULL;
+       u_char *blob = NULL;
+       u_int blen = 0;
+       int allowed = 0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       if (authctxt->valid) {
+               if ((client_n = BN_new()) == NULL)
+                       fatal("%s: BN_new", __FUNCTION__);
+               buffer_get_bignum2(m, client_n);
+               allowed = auth_rsa_key_allowed(authctxt->pw, client_n, &key);
+               BN_clear_free(client_n);
+       }
+       buffer_clear(m);
+       buffer_put_int(m, allowed);
+
+       /* clear temporarily storage (used by generate challenge) */
+       monitor_reset_key_state();
+
+       if (allowed && key != NULL) {
+               key->type = KEY_RSA;    /* cheat for key_to_blob */
+               if (key_to_blob(key, &blob, &blen) == 0)
+                       fatal("%s: key_to_blob failed", __FUNCTION__);
+               buffer_put_string(m, blob, blen);
+
+               /* Save temporarily for comparison in verify */
+               key_blob = blob;
+               key_bloblen = blen;
+               key_blobtype = MM_RSAUSERKEY;
+               key_free(key);
+       }
+
+       mm_append_debug(m);
+
+       mm_request_send(socket, MONITOR_ANS_RSAKEYALLOWED, m);
+
+       monitor_permit(mon_dispatch, MONITOR_REQ_RSACHALLENGE, allowed);
+       monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 0);
+       return (0);
+}
+
+int
+mm_answer_rsa_challenge(int socket, Buffer *m)
+{
+       Key *key = NULL;
+       u_char *blob;
+       u_int blen;
+
+       debug3("%s entering", __FUNCTION__);
+
+       if (!authctxt->valid)
+               fatal("%s: authctxt not valid", __FUNCTION__);
+       blob = buffer_get_string(m, &blen);
+       if (!monitor_allowed_key(blob, blen))
+               fatal("%s: bad key, not previously allowed", __FUNCTION__);
+       if (key_blobtype != MM_RSAUSERKEY && key_blobtype != MM_RSAHOSTKEY)
+               fatal("%s: key type mismatch", __FUNCTION__);
+       if ((key = key_from_blob(blob, blen)) == NULL)
+               fatal("%s: received bad key", __FUNCTION__);
+
+       if (ssh1_challenge)
+               BN_clear_free(ssh1_challenge);
+       ssh1_challenge = auth_rsa_generate_challenge(key);
+
+       buffer_clear(m);
+       buffer_put_bignum2(m, ssh1_challenge);
+
+       debug3("%s sending reply", __FUNCTION__);
+       mm_request_send(socket, MONITOR_ANS_RSACHALLENGE, m);
+
+       monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 1);
+       return (0);
+}
+
+int
+mm_answer_rsa_response(int socket, Buffer *m)
+{
+       Key *key = NULL;
+       u_char *blob, *response;
+       u_int blen, len;
+       int success;
+
+       debug3("%s entering", __FUNCTION__);
+
+       if (!authctxt->valid)
+               fatal("%s: authctxt not valid", __FUNCTION__);
+       if (ssh1_challenge == NULL)
+               fatal("%s: no ssh1_challenge", __FUNCTION__);
+
+       blob = buffer_get_string(m, &blen);
+       if (!monitor_allowed_key(blob, blen))
+               fatal("%s: bad key, not previously allowed", __FUNCTION__);
+       if (key_blobtype != MM_RSAUSERKEY && key_blobtype != MM_RSAHOSTKEY)
+               fatal("%s: key type mismatch: %d", __FUNCTION__, key_blobtype);
+       if ((key = key_from_blob(blob, blen)) == NULL)
+               fatal("%s: received bad key", __FUNCTION__);
+       response = buffer_get_string(m, &len);
+       if (len != 16)
+               fatal("%s: received bad response to challenge", __FUNCTION__);
+       success = auth_rsa_verify_response(key, ssh1_challenge, response);
+
+       key_free(key);
+       xfree(response);
+
+       auth_method = key_blobtype == MM_RSAUSERKEY ? "rsa" : "rhosts-rsa";
+
+       /* reset state */
+       BN_clear_free(ssh1_challenge);
+       ssh1_challenge = NULL;
+       monitor_reset_key_state();
+
+       buffer_clear(m);
+       buffer_put_int(m, success);
+       mm_request_send(socket, MONITOR_ANS_RSARESPONSE, m);
+
+       return (success);
+}
+
+int
+mm_answer_term(int socket, Buffer *req)
+{
+       extern struct monitor *pmonitor;
+       int res, status;
+
+       debug3("%s: tearing down sessions", __FUNCTION__);
+
+       /* The child is terminating */
+       session_destroy_all(&mm_session_close);
+
+       while (waitpid(pmonitor->m_pid, &status, 0) == -1)
+               if (errno != EINTR)
+                       exit(1);
+
+       res = WIFEXITED(status) ? WEXITSTATUS(status) : 1;
+
+       /* Terminate process */
+       exit (res);
+}
+
+void
+monitor_apply_keystate(struct monitor *pmonitor)
+{
+       if (compat20) {
+               set_newkeys(MODE_IN);
+               set_newkeys(MODE_OUT);
+       } else {
+               u_char key[SSH_SESSION_KEY_LENGTH];
+
+               memset(key, 'a', sizeof(key));
+               packet_set_protocol_flags(child_state.ssh1protoflags);
+               packet_set_encryption_key(key, SSH_SESSION_KEY_LENGTH,
+                   child_state.ssh1cipher);
+       }
+
+       packet_set_keycontext(MODE_OUT, child_state.keyout);
+       xfree(child_state.keyout);
+       packet_set_keycontext(MODE_IN, child_state.keyin);
+       xfree(child_state.keyin);
+
+       if (!compat20) {
+               packet_set_iv(MODE_OUT, child_state.ivout);
+               xfree(child_state.ivout);
+               packet_set_iv(MODE_IN, child_state.ivin);
+               xfree(child_state.ivin);
+       }
+
+       memcpy(&incoming_stream, &child_state.incoming,
+           sizeof(incoming_stream));
+       memcpy(&outgoing_stream, &child_state.outgoing,
+           sizeof(outgoing_stream));
+
+       /* Update with new address */
+       mm_init_compression(pmonitor->m_zlib);
+
+       /* Network I/O buffers */
+       /* XXX inefficient for large buffers, need: buffer_init_from_string */
+       buffer_clear(&input);
+       buffer_append(&input, child_state.input, child_state.ilen);
+       memset(child_state.input, 0, child_state.ilen);
+       xfree(child_state.input);
+
+       buffer_clear(&output);
+       buffer_append(&output, child_state.output, child_state.olen);
+       memset(child_state.output, 0, child_state.olen);
+       xfree(child_state.output);
+}
+
+static Kex *
+mm_get_kex(Buffer *m)
+{
+       Kex *kex;
+       void *blob;
+       u_int bloblen;
+
+       kex = xmalloc(sizeof(*kex));
+       memset(kex, 0, sizeof(*kex));
+       kex->session_id = buffer_get_string(m, &kex->session_id_len);
+       kex->we_need = buffer_get_int(m);
+       kex->server = 1;
+       kex->hostkey_type = buffer_get_int(m);
+       kex->kex_type = buffer_get_int(m);
+       blob = buffer_get_string(m, &bloblen);
+       buffer_init(&kex->my);
+       buffer_append(&kex->my, blob, bloblen);
+       xfree(blob);
+       blob = buffer_get_string(m, &bloblen);
+       buffer_init(&kex->peer);
+       buffer_append(&kex->peer, blob, bloblen);
+       xfree(blob);
+       kex->done = 1;
+       kex->flags = buffer_get_int(m);
+       kex->client_version_string = buffer_get_string(m, NULL);
+       kex->server_version_string = buffer_get_string(m, NULL);
+       kex->load_host_key=&get_hostkey_by_type;
+       kex->host_key_index=&get_hostkey_index;
+
+       return (kex);
+}
+
+/* This function requries careful sanity checking */
+
+void
+mm_get_keystate(struct monitor *pmonitor)
+{
+       Buffer m;
+       u_char *blob, *p;
+       u_int bloblen, plen;
+
+       debug3("%s: Waiting for new keys", __FUNCTION__);
+
+       buffer_init(&m);
+       mm_request_receive_expect(pmonitor->m_sendfd, MONITOR_REQ_KEYEXPORT, &m);
+       if (!compat20) {
+               child_state.ssh1protoflags = buffer_get_int(&m);
+               child_state.ssh1cipher = buffer_get_int(&m);
+               child_state.ivout = buffer_get_string(&m,
+                   &child_state.ivoutlen);
+               child_state.ivin = buffer_get_string(&m, &child_state.ivinlen);
+               goto skip;
+       } else {
+               /* Get the Kex for rekeying */
+               *pmonitor->m_pkex = mm_get_kex(&m);
+       }
+
+       blob = buffer_get_string(&m, &bloblen);
+       current_keys[MODE_OUT] = mm_newkeys_from_blob(blob, bloblen);
+       xfree(blob);
+
+       debug3("%s: Waiting for second key", __FUNCTION__);
+       blob = buffer_get_string(&m, &bloblen);
+       current_keys[MODE_IN] = mm_newkeys_from_blob(blob, bloblen);
+       xfree(blob);
+
+       /* Now get sequence numbers for the packets */
+       packet_set_seqnr(MODE_OUT, buffer_get_int(&m));
+       packet_set_seqnr(MODE_IN, buffer_get_int(&m));
+
+ skip:
+       /* Get the key context */
+       child_state.keyout = buffer_get_string(&m, &child_state.keyoutlen);
+       child_state.keyin  = buffer_get_string(&m, &child_state.keyinlen);
+
+       debug3("%s: Getting compression state", __FUNCTION__);
+       /* Get compression state */
+       p = buffer_get_string(&m, &plen);
+       if (plen != sizeof(child_state.outgoing))
+               fatal("%s: bad request size", __FUNCTION__);
+       memcpy(&child_state.outgoing, p, sizeof(child_state.outgoing));
+       xfree(p);
+
+       p = buffer_get_string(&m, &plen);
+       if (plen != sizeof(child_state.incoming))
+               fatal("%s: bad request size", __FUNCTION__);
+       memcpy(&child_state.incoming, p, sizeof(child_state.incoming));
+       xfree(p);
+
+       /* Network I/O buffers */
+       debug3("%s: Getting Network I/O buffers", __FUNCTION__);
+       child_state.input = buffer_get_string(&m, &child_state.ilen);
+       child_state.output = buffer_get_string(&m, &child_state.olen);
+
+       buffer_free(&m);
+}
+
+
+/* Allocation functions for zlib */
+void *
+mm_zalloc(struct mm_master *mm, u_int ncount, u_int size)
+{
+       void *address;
+
+       address = mm_malloc(mm, size * ncount);
+
+       return (address);
+}
+
+void
+mm_zfree(struct mm_master *mm, void *address)
+{
+       mm_free(mm, address);
+}
+
+void
+mm_init_compression(struct mm_master *mm)
+{
+       outgoing_stream.zalloc = (alloc_func)mm_zalloc;
+       outgoing_stream.zfree = (free_func)mm_zfree;
+       outgoing_stream.opaque = mm;
+
+       incoming_stream.zalloc = (alloc_func)mm_zalloc;
+       incoming_stream.zfree = (free_func)mm_zfree;
+       incoming_stream.opaque = mm;
+}
+
+/* XXX */
+
+#define FD_CLOSEONEXEC(x) do { \
+       if (fcntl(x, F_SETFD, 1) == -1) \
+               fatal("fcntl(%d, F_SETFD)", x); \
+} while (0)
+
+static void
+monitor_socketpair(int *pair)
+{
+#ifdef HAVE_SOCKETPAIR
+       if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
+               fatal("%s: socketpair", __FUNCTION__);
+#else
+       fatal("%s: UsePrivilegeSeparation=yes not supported",
+           __FUNCTION__);
+#endif
+       FD_CLOSEONEXEC(pair[0]);
+       FD_CLOSEONEXEC(pair[1]);
+}
+
+#define MM_MEMSIZE     65536
+
+struct monitor *
+monitor_init(void)
+{
+       struct monitor *mon;
+       int pair[2];
+
+       mon = xmalloc(sizeof(*mon));
+
+       monitor_socketpair(pair);
+
+       mon->m_recvfd = pair[0];
+       mon->m_sendfd = pair[1];
+
+       /* Used to share zlib space across processes */
+       mon->m_zback = mm_create(NULL, MM_MEMSIZE);
+       mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE);
+
+       /* Compression needs to share state across borders */
+       mm_init_compression(mon->m_zlib);
+
+       return mon;
+}
+
+void
+monitor_reinit(struct monitor *mon)
+{
+       int pair[2];
+
+       monitor_socketpair(pair);
+
+       mon->m_recvfd = pair[0];
+       mon->m_sendfd = pair[1];
+}
diff --git a/openssh/monitor.h b/openssh/monitor.h
new file mode 100644 (file)
index 0000000..b5db999
--- /dev/null
@@ -0,0 +1,82 @@
+/*     $OpenBSD: monitor.h,v 1.4 2002/05/12 23:53:45 djm Exp $ */
+
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MONITOR_H_
+#define _MONITOR_H_
+
+enum monitor_reqtype {
+       MONITOR_REQ_MODULI, MONITOR_ANS_MODULI,
+       MONITOR_REQ_FREE, MONITOR_REQ_AUTHSERV,
+       MONITOR_REQ_SIGN, MONITOR_ANS_SIGN,
+       MONITOR_REQ_PWNAM, MONITOR_ANS_PWNAM,
+       MONITOR_REQ_AUTH2_READ_BANNER, MONITOR_ANS_AUTH2_READ_BANNER,
+       MONITOR_REQ_AUTHPASSWORD, MONITOR_ANS_AUTHPASSWORD,
+       MONITOR_REQ_BSDAUTHQUERY, MONITOR_ANS_BSDAUTHQUERY,
+       MONITOR_REQ_BSDAUTHRESPOND, MONITOR_ANS_BSDAUTHRESPOND,
+       MONITOR_REQ_SKEYQUERY, MONITOR_ANS_SKEYQUERY,
+       MONITOR_REQ_SKEYRESPOND, MONITOR_ANS_SKEYRESPOND,
+       MONITOR_REQ_KEYALLOWED, MONITOR_ANS_KEYALLOWED,
+       MONITOR_REQ_KEYVERIFY, MONITOR_ANS_KEYVERIFY,
+       MONITOR_REQ_KEYEXPORT,
+       MONITOR_REQ_PTY, MONITOR_ANS_PTY,
+       MONITOR_REQ_PTYCLEANUP,
+       MONITOR_REQ_SESSKEY, MONITOR_ANS_SESSKEY,
+       MONITOR_REQ_SESSID,
+       MONITOR_REQ_RSAKEYALLOWED, MONITOR_ANS_RSAKEYALLOWED,
+       MONITOR_REQ_RSACHALLENGE, MONITOR_ANS_RSACHALLENGE,
+       MONITOR_REQ_RSARESPONSE, MONITOR_ANS_RSARESPONSE,
+       MONITOR_REQ_PAM_START,
+       MONITOR_REQ_TERM,
+};
+
+struct mm_master;
+struct monitor {
+       int                      m_recvfd;
+       int                      m_sendfd;
+       struct mm_master        *m_zback;
+       struct mm_master        *m_zlib;
+       struct Kex              **m_pkex;
+       int                      m_pid;
+};
+
+struct monitor *monitor_init(void);
+void monitor_reinit(struct monitor *);
+void monitor_sync(struct monitor *);
+
+struct Authctxt;
+struct Authctxt *monitor_child_preauth(struct monitor *);
+void monitor_child_postauth(struct monitor *);
+
+struct mon_table;
+int monitor_read(struct monitor*, struct mon_table *, struct mon_table **);
+
+/* Prototypes for request sending and receiving */
+void mm_request_send(int, enum monitor_reqtype, Buffer *);
+void mm_request_receive(int, Buffer *);
+void mm_request_receive_expect(int, enum monitor_reqtype, Buffer *);
+
+#endif /* _MONITOR_H_ */
diff --git a/openssh/monitor_fdpass.c b/openssh/monitor_fdpass.c
new file mode 100644 (file)
index 0000000..fb97171
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2001 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+RCSID("$OpenBSD: monitor_fdpass.c,v 1.2 2002/03/24 17:53:16 stevesk Exp $");
+
+#include <sys/uio.h>
+
+#include "log.h"
+#include "monitor_fdpass.h"
+
+void
+mm_send_fd(int socket, int fd)
+{
+#if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
+       struct msghdr msg;
+       struct iovec vec;
+       char ch = '\0';
+       int n;
+#if !defined(HAVE_ACCRIGHTS_IN_MSGHDR) || \
+       (defined(HAVE_ACCRIGHTS_IN_MSGHDR) && defined(HAVE_CONTROL_IN_MSGHDR))
+       char tmp[CMSG_SPACE(sizeof(int))];
+       struct cmsghdr *cmsg;
+#endif
+
+       memset(&msg, 0, sizeof(msg));
+#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR)
+       msg.msg_accrights = (caddr_t)&fd;
+       msg.msg_accrightslen = sizeof(fd);
+#else
+       msg.msg_control = (caddr_t)tmp;
+       msg.msg_controllen = CMSG_LEN(sizeof(int));
+       cmsg = CMSG_FIRSTHDR(&msg);
+       cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+       cmsg->cmsg_level = SOL_SOCKET;
+       cmsg->cmsg_type = SCM_RIGHTS;
+       *(int *)CMSG_DATA(cmsg) = fd;
+#endif
+
+       vec.iov_base = &ch;
+       vec.iov_len = 1;
+       msg.msg_iov = &vec;
+       msg.msg_iovlen = 1;
+
+       if ((n = sendmsg(socket, &msg, 0)) == -1)
+               fatal("%s: sendmsg(%d): %s", __FUNCTION__, fd,
+                   strerror(errno));
+       if (n != 1)
+               fatal("%s: sendmsg: expected sent 1 got %d",
+                   __FUNCTION__, n);
+#else
+       fatal("%s: UsePrivilegeSeparation=yes not supported",
+           __FUNCTION__);
+#endif
+}
+
+int
+mm_receive_fd(int socket)
+{
+#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
+       struct msghdr msg;
+       struct iovec vec;
+       char ch;
+       int fd, n;
+#if !defined(HAVE_ACCRIGHTS_IN_MSGHDR) || \
+       (defined(HAVE_ACCRIGHTS_IN_MSGHDR) && defined(HAVE_CONTROL_IN_MSGHDR))
+       char tmp[CMSG_SPACE(sizeof(int))];
+       struct cmsghdr *cmsg;
+#endif
+
+       memset(&msg, 0, sizeof(msg));
+       vec.iov_base = &ch;
+       vec.iov_len = 1;
+       msg.msg_iov = &vec;
+       msg.msg_iovlen = 1;
+#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR)
+       msg.msg_accrights = (caddr_t)&fd;
+       msg.msg_accrightslen = sizeof(fd);
+#else
+       msg.msg_control = tmp;
+       msg.msg_controllen = sizeof(tmp);
+#endif
+
+       if ((n = recvmsg(socket, &msg, 0)) == -1)
+               fatal("%s: recvmsg: %s", __FUNCTION__, strerror(errno));
+       if (n != 1)
+               fatal("%s: recvmsg: expected received 1 got %d",
+                   __FUNCTION__, n);
+
+#if defined(HAVE_ACCRIGHTS_IN_MSGHDR) && !defined(HAVE_CONTROL_IN_MSGHDR)
+       if (msg.msg_accrightslen != sizeof(fd))
+               fatal("%s: no fd", __FUNCTION__);
+#else
+       cmsg = CMSG_FIRSTHDR(&msg);
+       if (cmsg->cmsg_type != SCM_RIGHTS)
+               fatal("%s: expected type %d got %d", __FUNCTION__,
+                   SCM_RIGHTS, cmsg->cmsg_type);
+       fd = (*(int *)CMSG_DATA(cmsg));
+#endif
+       return fd;
+#else
+       fatal("%s: UsePrivilegeSeparation=yes not supported",
+           __FUNCTION__);
+#endif
+}
diff --git a/openssh/monitor_fdpass.h b/openssh/monitor_fdpass.h
new file mode 100644 (file)
index 0000000..cb12c41
--- /dev/null
@@ -0,0 +1,34 @@
+/*      $OpenBSD: monitor_fdpass.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $     */
+
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MM_FDPASS_H_
+#define _MM_FDPASS_H_
+
+void mm_send_fd(int, int);
+int mm_receive_fd(int);
+
+#endif /* _MM_FDPASS_H_ */
diff --git a/openssh/monitor_mm.c b/openssh/monitor_mm.c
new file mode 100644 (file)
index 0000000..993925e
--- /dev/null
@@ -0,0 +1,341 @@
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+RCSID("$OpenBSD: monitor_mm.c,v 1.4 2002/03/25 20:12:10 stevesk Exp $");
+
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
+#include "ssh.h"
+#include "xmalloc.h"
+#include "log.h"
+#include "monitor_mm.h"
+
+static int
+mm_compare(struct mm_share *a, struct mm_share *b)
+{
+       return ((char *)a->address - (char *)b->address);
+}
+
+RB_GENERATE(mmtree, mm_share, next, mm_compare)
+
+static struct mm_share *
+mm_make_entry(struct mm_master *mm, struct mmtree *head,
+    void *address, size_t size)
+{
+       struct mm_share *tmp, *tmp2;
+
+       if (mm->mmalloc == NULL)
+               tmp = xmalloc(sizeof(struct mm_share));
+       else
+               tmp = mm_xmalloc(mm->mmalloc, sizeof(struct mm_share));
+       tmp->address = address;
+       tmp->size = size;
+
+       tmp2 = RB_INSERT(mmtree, head, tmp);
+       if (tmp2 != NULL)
+               fatal("mm_make_entry(%p): double address %p->%p(%lu)",
+                   mm, tmp2, address, (u_long)size);
+
+       return (tmp);
+}
+
+/* Creates a shared memory area of a certain size */
+
+struct mm_master *
+mm_create(struct mm_master *mmalloc, size_t size)
+{
+       void *address;
+       struct mm_master *mm;
+
+       if (mmalloc == NULL)
+               mm = xmalloc(sizeof(struct mm_master));
+       else
+               mm = mm_xmalloc(mmalloc, sizeof(struct mm_master));
+
+       /*
+        * If the memory map has a mm_master it can be completely
+        * shared including authentication between the child
+        * and the client.
+        */
+       mm->mmalloc = mmalloc;
+
+#if  defined(HAVE_MMAP) && defined(MAP_ANON)
+       address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_ANON|MAP_SHARED,
+           -1, 0);
+       if (address == MAP_FAILED)
+               fatal("mmap(%lu)", (u_long)size);
+#else
+       fatal("%s: UsePrivilegeSeparation=yes not supported",
+           __FUNCTION__);
+#endif
+
+       mm->address = address;
+       mm->size = size;
+
+       RB_INIT(&mm->rb_free);
+       RB_INIT(&mm->rb_allocated);
+
+       mm_make_entry(mm, &mm->rb_free, address, size);
+
+       return (mm);
+}
+
+/* Frees either the allocated or the free list */
+
+static void
+mm_freelist(struct mm_master *mmalloc, struct mmtree *head)
+{
+       struct mm_share *mms, *next;
+
+       for (mms = RB_ROOT(head); mms; mms = next) {
+               next = RB_NEXT(mmtree, head, mms);
+               RB_REMOVE(mmtree, head, mms);
+               if (mmalloc == NULL)
+                       xfree(mms);
+               else
+                       mm_free(mmalloc, mms);
+       }
+}
+
+/* Destroys a memory mapped area */
+
+void
+mm_destroy(struct mm_master *mm)
+{
+       mm_freelist(mm->mmalloc, &mm->rb_free);
+       mm_freelist(mm->mmalloc, &mm->rb_allocated);
+
+#ifdef HAVE_MMAP
+       if (munmap(mm->address, mm->size) == -1)
+               fatal("munmap(%p, %lu)", mm->address, (u_long)mm->size);
+#else
+       fatal("%s: UsePrivilegeSeparation=yes not supported",
+           __FUNCTION__);
+#endif
+       if (mm->mmalloc == NULL)
+               xfree(mm);
+       else
+               mm_free(mm->mmalloc, mm);
+}
+
+void *
+mm_xmalloc(struct mm_master *mm, size_t size)
+{
+       void *address;
+
+       address = mm_malloc(mm, size);
+       if (address == NULL)
+               fatal("%s: mm_malloc(%lu)", __FUNCTION__, (u_long)size);
+       return (address);
+}
+
+
+/* Allocates data from a memory mapped area */
+
+void *
+mm_malloc(struct mm_master *mm, size_t size)
+{
+       struct mm_share *mms, *tmp;
+
+       if (size == 0)
+               fatal("mm_malloc: try to allocate 0 space");
+
+       size = ((size + MM_MINSIZE - 1) / MM_MINSIZE) * MM_MINSIZE;
+
+       RB_FOREACH(mms, mmtree, &mm->rb_free) {
+               if (mms->size >= size)
+                       break;
+       }
+
+       if (mms == NULL)
+               return (NULL);
+
+       /* Debug */
+       memset(mms->address, 0xd0, size);
+
+       tmp = mm_make_entry(mm, &mm->rb_allocated, mms->address, size);
+
+       /* Does not change order in RB tree */
+       mms->size -= size;
+       mms->address = (u_char *)mms->address + size;
+
+       if (mms->size == 0) {
+               RB_REMOVE(mmtree, &mm->rb_free, mms);
+               if (mm->mmalloc == NULL)
+                       xfree(mms);
+               else
+                       mm_free(mm->mmalloc, mms);
+       }
+
+       return (tmp->address);
+}
+
+/* Frees memory in a memory mapped area */
+
+void
+mm_free(struct mm_master *mm, void *address)
+{
+       struct mm_share *mms, *prev, tmp;
+
+       tmp.address = address;
+       mms = RB_FIND(mmtree, &mm->rb_allocated, &tmp);
+       if (mms == NULL)
+               fatal("mm_free(%p): can not find %p", mm, address);
+
+       /* Debug */
+       memset(mms->address, 0xd0, mms->size);
+
+       /* Remove from allocated list and insert in free list */
+       RB_REMOVE(mmtree, &mm->rb_allocated, mms);
+       if (RB_INSERT(mmtree, &mm->rb_free, mms) != NULL)
+               fatal("mm_free(%p): double address %p", mm, address);
+
+       /* Find previous entry */
+       prev = mms;
+       if (RB_LEFT(prev, next)) {
+               prev = RB_LEFT(prev, next);
+               while (RB_RIGHT(prev, next))
+                       prev = RB_RIGHT(prev, next);
+       } else {
+               if (RB_PARENT(prev, next) &&
+                   (prev == RB_RIGHT(RB_PARENT(prev, next), next)))
+                       prev = RB_PARENT(prev, next);
+               else {
+                       while (RB_PARENT(prev, next) &&
+                           (prev == RB_LEFT(RB_PARENT(prev, next), next)))
+                               prev = RB_PARENT(prev, next);
+                       prev = RB_PARENT(prev, next);
+               }
+       }
+
+       /* Check if range does not overlap */
+       if (prev != NULL && MM_ADDRESS_END(prev) > address)
+               fatal("mm_free: memory corruption: %p(%lu) > %p",
+                   prev->address, (u_long)prev->size, address);
+
+       /* See if we can merge backwards */
+       if (prev != NULL && MM_ADDRESS_END(prev) == address) {
+               prev->size += mms->size;
+               RB_REMOVE(mmtree, &mm->rb_free, mms);
+               if (mm->mmalloc == NULL)
+                       xfree(mms);
+               else
+                       mm_free(mm->mmalloc, mms);
+       } else
+               prev = mms;
+
+       if (prev == NULL)
+               return;
+
+       /* Check if we can merge forwards */
+       mms = RB_NEXT(mmtree, &mm->rb_free, prev);
+       if (mms == NULL)
+               return;
+
+       if (MM_ADDRESS_END(prev) > mms->address)
+               fatal("mm_free: memory corruption: %p < %p(%lu)",
+                   mms->address, prev->address, (u_long)prev->size);
+       if (MM_ADDRESS_END(prev) != mms->address)
+               return;
+
+       prev->size += mms->size;
+       RB_REMOVE(mmtree, &mm->rb_free, mms);
+
+       if (mm->mmalloc == NULL)
+               xfree(mms);
+       else
+               mm_free(mm->mmalloc, mms);
+}
+
+static void
+mm_sync_list(struct mmtree *oldtree, struct mmtree *newtree,
+    struct mm_master *mm, struct mm_master *mmold)
+{
+       struct mm_master *mmalloc = mm->mmalloc;
+       struct mm_share *mms, *new;
+
+       /* Sync free list */
+       RB_FOREACH(mms, mmtree, oldtree) {
+               /* Check the values */
+               mm_memvalid(mmold, mms, sizeof(struct mm_share));
+               mm_memvalid(mm, mms->address, mms->size);
+
+               new = mm_xmalloc(mmalloc, sizeof(struct mm_share));
+               memcpy(new, mms, sizeof(struct mm_share));
+               RB_INSERT(mmtree, newtree, new);
+       }
+}
+
+void
+mm_share_sync(struct mm_master **pmm, struct mm_master **pmmalloc)
+{
+       struct mm_master *mm;
+       struct mm_master *mmalloc;
+       struct mm_master *mmold;
+       struct mmtree rb_free, rb_allocated;
+
+       debug3("%s: Share sync", __FUNCTION__);
+
+       mm = *pmm;
+       mmold = mm->mmalloc;
+       mm_memvalid(mmold, mm, sizeof(*mm));
+
+       mmalloc = mm_create(NULL, mm->size);
+       mm = mm_xmalloc(mmalloc, sizeof(struct mm_master));
+       memcpy(mm, *pmm, sizeof(struct mm_master));
+       mm->mmalloc = mmalloc;
+
+       rb_free = mm->rb_free;
+       rb_allocated = mm->rb_allocated;
+
+       RB_INIT(&mm->rb_free);
+       RB_INIT(&mm->rb_allocated);
+
+       mm_sync_list(&rb_free, &mm->rb_free, mm, mmold);
+       mm_sync_list(&rb_allocated, &mm->rb_allocated, mm, mmold);
+
+       mm_destroy(mmold);
+
+       *pmm = mm;
+       *pmmalloc = mmalloc;
+
+       debug3("%s: Share sync end", __FUNCTION__);
+}
+
+void
+mm_memvalid(struct mm_master *mm, void *address, size_t size)
+{
+       void *end = (u_char *)address + size;
+
+       if (address < mm->address)
+               fatal("mm_memvalid: address too small: %p", address);
+       if (end < address)
+               fatal("mm_memvalid: end < address: %p < %p", end, address);
+       if (end > (void *)((u_char *)mm->address + mm->size))
+               fatal("mm_memvalid: address too large: %p", address);
+}
diff --git a/openssh/monitor_mm.h b/openssh/monitor_mm.h
new file mode 100644 (file)
index 0000000..c0af432
--- /dev/null
@@ -0,0 +1,66 @@
+/*      $OpenBSD: monitor_mm.h,v 1.2 2002/03/26 03:24:01 stevesk Exp $  */
+
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MM_H_
+#define _MM_H_
+#include "openbsd-compat/tree.h"
+
+struct mm_share {
+       RB_ENTRY(mm_share) next;
+       void *address;
+       size_t size;
+};
+
+struct mm_master {
+       RB_HEAD(mmtree, mm_share) rb_free;
+       struct mmtree rb_allocated;
+       void *address;
+       size_t size;
+
+       struct mm_master *mmalloc;      /* Used to completely share */
+
+       int write;              /* used to writing to other party */
+       int read;               /* used for reading from other party */
+};
+
+RB_PROTOTYPE(mmtree, mm_share, next, mm_compare)
+
+#define MM_MINSIZE             128
+
+#define MM_ADDRESS_END(x)      (void *)((u_char *)(x)->address + (x)->size)
+
+struct mm_master *mm_create(struct mm_master *, size_t);
+void mm_destroy(struct mm_master *);
+
+void mm_share_sync(struct mm_master **, struct mm_master **);
+
+void *mm_malloc(struct mm_master *, size_t);
+void *mm_xmalloc(struct mm_master *, size_t);
+void mm_free(struct mm_master *, void *);
+
+void mm_memvalid(struct mm_master *, void *, size_t);
+#endif /* _MM_H_ */
diff --git a/openssh/monitor_wrap.c b/openssh/monitor_wrap.c
new file mode 100644 (file)
index 0000000..c5e3fb9
--- /dev/null
@@ -0,0 +1,931 @@
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * Copyright 2002 Markus Friedl <markus@openbsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+RCSID("$OpenBSD: monitor_wrap.c,v 1.7 2002/05/15 15:47:49 mouring Exp $");
+
+#include <openssl/bn.h>
+#include <openssl/dh.h>
+
+#include "ssh.h"
+#include "dh.h"
+#include "kex.h"
+#include "auth.h"
+#include "buffer.h"
+#include "bufaux.h"
+#include "packet.h"
+#include "mac.h"
+#include "log.h"
+#include "zlib.h"
+#include "monitor.h"
+#include "monitor_wrap.h"
+#include "xmalloc.h"
+#include "atomicio.h"
+#include "monitor_fdpass.h"
+#include "getput.h"
+
+#include "auth.h"
+#include "channels.h"
+#include "session.h"
+
+/* Imports */
+extern int compat20;
+extern Newkeys *newkeys[];
+extern z_stream incoming_stream;
+extern z_stream outgoing_stream;
+extern struct monitor *pmonitor;
+extern Buffer input, output;
+
+void
+mm_request_send(int socket, enum monitor_reqtype type, Buffer *m)
+{
+       u_char buf[5];
+       u_int mlen = buffer_len(m);
+
+       debug3("%s entering: type %d", __FUNCTION__, type);
+
+       PUT_32BIT(buf, mlen + 1);
+       buf[4] = (u_char) type;         /* 1st byte of payload is mesg-type */
+       if (atomicio(write, socket, buf, sizeof(buf)) != sizeof(buf))
+               fatal("%s: write", __FUNCTION__);
+       if (atomicio(write, socket, buffer_ptr(m), mlen) != mlen)
+               fatal("%s: write", __FUNCTION__);
+}
+
+void
+mm_request_receive(int socket, Buffer *m)
+{
+       u_char buf[4];
+       ssize_t res;
+       u_int msg_len;
+
+       debug3("%s entering", __FUNCTION__);
+
+       res = atomicio(read, socket, buf, sizeof(buf));
+       if (res != sizeof(buf)) {
+               if (res == 0)
+                       fatal_cleanup();
+               fatal("%s: read: %ld", __FUNCTION__, (long)res);
+       }
+       msg_len = GET_32BIT(buf);
+       if (msg_len > 256 * 1024)
+               fatal("%s: read: bad msg_len %d", __FUNCTION__, msg_len);
+       buffer_clear(m);
+       buffer_append_space(m, msg_len);
+       res = atomicio(read, socket, buffer_ptr(m), msg_len);
+       if (res != msg_len)
+               fatal("%s: read: %ld != msg_len", __FUNCTION__, (long)res);
+}
+
+void
+mm_request_receive_expect(int socket, enum monitor_reqtype type, Buffer *m)
+{
+       u_char rtype;
+
+       debug3("%s entering: type %d", __FUNCTION__, type);
+
+       mm_request_receive(socket, m);
+       rtype = buffer_get_char(m);
+       if (rtype != type)
+               fatal("%s: read: rtype %d != type %d", __FUNCTION__,
+                   rtype, type);
+}
+
+DH *
+mm_choose_dh(int min, int nbits, int max)
+{
+       BIGNUM *p, *g;
+       int success = 0;
+       Buffer m;
+
+       buffer_init(&m);
+       buffer_put_int(&m, min);
+       buffer_put_int(&m, nbits);
+       buffer_put_int(&m, max);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_MODULI, &m);
+
+       debug3("%s: waiting for MONITOR_ANS_MODULI", __FUNCTION__);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_MODULI, &m);
+
+       success = buffer_get_char(&m);
+       if (success == 0)
+               fatal("%s: MONITOR_ANS_MODULI failed", __FUNCTION__);
+
+       if ((p = BN_new()) == NULL)
+               fatal("%s: BN_new failed", __FUNCTION__);
+       if ((g = BN_new()) == NULL)
+               fatal("%s: BN_new failed", __FUNCTION__);
+       buffer_get_bignum2(&m, p);
+       buffer_get_bignum2(&m, g);
+
+       debug3("%s: remaining %d", __FUNCTION__, buffer_len(&m));
+       buffer_free(&m);
+
+       return (dh_new_group(g, p));
+}
+
+int
+mm_key_sign(Key *key, u_char **sigp, u_int *lenp, u_char *data, u_int datalen)
+{
+       Kex *kex = *pmonitor->m_pkex;
+       Buffer m;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       buffer_put_int(&m, kex->host_key_index(key));
+       buffer_put_string(&m, data, datalen);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SIGN, &m);
+
+       debug3("%s: waiting for MONITOR_ANS_SIGN", __FUNCTION__);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_SIGN, &m);
+       *sigp  = buffer_get_string(&m, lenp);
+       buffer_free(&m);
+
+       return (0);
+}
+
+struct passwd *
+mm_getpwnamallow(const char *login)
+{
+       Buffer m;
+       struct passwd *pw;
+       u_int pwlen;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       buffer_put_cstring(&m, login);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PWNAM, &m);
+
+       debug3("%s: waiting for MONITOR_ANS_PWNAM", __FUNCTION__);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PWNAM, &m);
+
+       if (buffer_get_char(&m) == 0) {
+               buffer_free(&m);
+               return (NULL);
+       }
+       pw = buffer_get_string(&m, &pwlen);
+       if (pwlen != sizeof(struct passwd))
+               fatal("%s: struct passwd size mismatch", __FUNCTION__);
+       pw->pw_name = buffer_get_string(&m, NULL);
+       pw->pw_passwd = buffer_get_string(&m, NULL);
+       pw->pw_gecos = buffer_get_string(&m, NULL);
+#ifdef HAVE_PW_CLASS_IN_PASSWD
+       pw->pw_class = buffer_get_string(&m, NULL);
+#endif
+       pw->pw_dir = buffer_get_string(&m, NULL);
+       pw->pw_shell = buffer_get_string(&m, NULL);
+       buffer_free(&m);
+
+       return (pw);
+}
+
+char* mm_auth2_read_banner(void)
+{
+       Buffer m;
+       char *banner;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTH2_READ_BANNER, &m);
+       buffer_clear(&m);
+
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTH2_READ_BANNER, &m);
+       banner = buffer_get_string(&m, NULL);
+       buffer_free(&m);
+       
+       return (banner);
+}
+
+/* Inform the privileged process about service and style */
+
+void
+mm_inform_authserv(char *service, char *style)
+{
+       Buffer m;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       buffer_put_cstring(&m, service);
+       buffer_put_cstring(&m, style ? style : "");
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m);
+
+       buffer_free(&m);
+}
+
+/* Do the password authentication */
+int
+mm_auth_password(Authctxt *authctxt, char *password)
+{
+       Buffer m;
+       int authenticated = 0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       buffer_put_cstring(&m, password);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHPASSWORD, &m);
+
+       debug3("%s: waiting for MONITOR_ANS_AUTHPASSWORD", __FUNCTION__);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_AUTHPASSWORD, &m);
+
+       authenticated = buffer_get_int(&m);
+
+       buffer_free(&m);
+
+       debug3("%s: user %sauthenticated",
+           __FUNCTION__, authenticated ? "" : "not ");
+       return (authenticated);
+}
+
+int
+mm_user_key_allowed(struct passwd *pw, Key *key)
+{
+       return (mm_key_allowed(MM_USERKEY, NULL, NULL, key));
+}
+
+int
+mm_hostbased_key_allowed(struct passwd *pw, char *user, char *host,
+    Key *key)
+{
+       return (mm_key_allowed(MM_HOSTKEY, user, host, key));
+}
+
+int
+mm_auth_rhosts_rsa_key_allowed(struct passwd *pw, char *user,
+    char *host, Key *key)
+{
+       int ret;
+
+       key->type = KEY_RSA; /* XXX hack for key_to_blob */
+       ret = mm_key_allowed(MM_RSAHOSTKEY, user, host, key);
+       key->type = KEY_RSA1;
+       return (ret);
+}
+
+static void
+mm_send_debug(Buffer *m)
+{
+       char *msg;
+
+       while (buffer_len(m)) {
+               msg = buffer_get_string(m, NULL);
+               debug3("%s: Sending debug: %s", __FUNCTION__, msg);
+               packet_send_debug("%s", msg);
+               xfree(msg);
+       }
+}
+
+int
+mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key)
+{
+       Buffer m;
+       u_char *blob;
+       u_int len;
+       int allowed = 0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       /* Convert the key to a blob and the pass it over */
+       if (!key_to_blob(key, &blob, &len))
+               return (0);
+
+       buffer_init(&m);
+       buffer_put_int(&m, type);
+       buffer_put_cstring(&m, user ? user : "");
+       buffer_put_cstring(&m, host ? host : "");
+       buffer_put_string(&m, blob, len);
+       xfree(blob);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KEYALLOWED, &m);
+
+       debug3("%s: waiting for MONITOR_ANS_KEYALLOWED", __FUNCTION__);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_KEYALLOWED, &m);
+
+       allowed = buffer_get_int(&m);
+
+       /* Send potential debug messages */
+       mm_send_debug(&m);
+
+       buffer_free(&m);
+
+       return (allowed);
+}
+
+/*
+ * This key verify needs to send the key type along, because the
+ * privileged parent makes the decision if the key is allowed
+ * for authentication.
+ */
+
+int
+mm_key_verify(Key *key, u_char *sig, u_int siglen, u_char *data, u_int datalen)
+{
+       Buffer m;
+       u_char *blob;
+       u_int len;
+       int verified = 0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       /* Convert the key to a blob and the pass it over */
+       if (!key_to_blob(key, &blob, &len))
+               return (0);
+
+       buffer_init(&m);
+       buffer_put_string(&m, blob, len);
+       buffer_put_string(&m, sig, siglen);
+       buffer_put_string(&m, data, datalen);
+       xfree(blob);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KEYVERIFY, &m);
+
+       debug3("%s: waiting for MONITOR_ANS_KEYVERIFY", __FUNCTION__);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_KEYVERIFY, &m);
+
+       verified = buffer_get_int(&m);
+
+       buffer_free(&m);
+
+       return (verified);
+}
+
+/* Export key state after authentication */
+Newkeys *
+mm_newkeys_from_blob(u_char *blob, int blen)
+{
+       Buffer b;
+       u_int len;
+       Newkeys *newkey = NULL;
+       Enc *enc;
+       Mac *mac;
+       Comp *comp;
+
+       debug3("%s: %p(%d)", __FUNCTION__, blob, blen);
+#ifdef DEBUG_PK
+       dump_base64(stderr, blob, blen);
+#endif
+       buffer_init(&b);
+       buffer_append(&b, blob, blen);
+
+       newkey = xmalloc(sizeof(*newkey));
+       enc = &newkey->enc;
+       mac = &newkey->mac;
+       comp = &newkey->comp;
+
+       /* Enc structure */
+       enc->name = buffer_get_string(&b, NULL);
+       buffer_get(&b, &enc->cipher, sizeof(enc->cipher));
+       enc->enabled = buffer_get_int(&b);
+       enc->block_size = buffer_get_int(&b);
+       enc->key = buffer_get_string(&b, &enc->key_len);
+       enc->iv = buffer_get_string(&b, &len);
+       if (len != enc->block_size)
+               fatal("%s: bad ivlen: expected %d != %d", __FUNCTION__,
+                   enc->block_size, len);
+
+       if (enc->name == NULL || cipher_by_name(enc->name) != enc->cipher)
+               fatal("%s: bad cipher name %s or pointer %p", __FUNCTION__,
+                   enc->name, enc->cipher);
+
+       /* Mac structure */
+       mac->name = buffer_get_string(&b, NULL);
+       if (mac->name == NULL || mac_init(mac, mac->name) == -1)
+               fatal("%s: can not init mac %s", __FUNCTION__, mac->name);
+       mac->enabled = buffer_get_int(&b);
+       mac->key = buffer_get_string(&b, &len);
+       if (len > mac->key_len)
+               fatal("%s: bad mac key lenght: %d > %d", __FUNCTION__, len,
+                   mac->key_len);
+       mac->key_len = len;
+
+       /* Comp structure */
+       comp->type = buffer_get_int(&b);
+       comp->enabled = buffer_get_int(&b);
+       comp->name = buffer_get_string(&b, NULL);
+
+       len = buffer_len(&b);
+       if (len != 0)
+               error("newkeys_from_blob: remaining bytes in blob %d", len);
+       buffer_free(&b);
+       return (newkey);
+}
+
+int
+mm_newkeys_to_blob(int mode, u_char **blobp, u_int *lenp)
+{
+       Buffer b;
+       int len;
+       u_char *buf;
+       Enc *enc;
+       Mac *mac;
+       Comp *comp;
+       Newkeys *newkey = newkeys[mode];
+
+       debug3("%s: converting %p", __FUNCTION__, newkey);
+
+       if (newkey == NULL) {
+               error("%s: newkey == NULL", __FUNCTION__);
+               return 0;
+       }
+       enc = &newkey->enc;
+       mac = &newkey->mac;
+       comp = &newkey->comp;
+
+       buffer_init(&b);
+       /* Enc structure */
+       buffer_put_cstring(&b, enc->name);
+       /* The cipher struct is constant and shared, you export pointer */
+       buffer_append(&b, &enc->cipher, sizeof(enc->cipher));
+       buffer_put_int(&b, enc->enabled);
+       buffer_put_int(&b, enc->block_size);
+       buffer_put_string(&b, enc->key, enc->key_len);
+       packet_get_keyiv(mode, enc->iv, enc->block_size);
+       buffer_put_string(&b, enc->iv, enc->block_size);
+
+       /* Mac structure */
+       buffer_put_cstring(&b, mac->name);
+       buffer_put_int(&b, mac->enabled);
+       buffer_put_string(&b, mac->key, mac->key_len);
+
+       /* Comp structure */
+       buffer_put_int(&b, comp->type);
+       buffer_put_int(&b, comp->enabled);
+       buffer_put_cstring(&b, comp->name);
+
+       len = buffer_len(&b);
+       buf = xmalloc(len);
+       memcpy(buf, buffer_ptr(&b), len);
+       memset(buffer_ptr(&b), 0, len);
+       buffer_free(&b);
+       if (lenp != NULL)
+               *lenp = len;
+       if (blobp != NULL)
+               *blobp = buf;
+       return len;
+}
+
+static void
+mm_send_kex(Buffer *m, Kex *kex)
+{
+       buffer_put_string(m, kex->session_id, kex->session_id_len);
+       buffer_put_int(m, kex->we_need);
+       buffer_put_int(m, kex->hostkey_type);
+       buffer_put_int(m, kex->kex_type);
+       buffer_put_string(m, buffer_ptr(&kex->my), buffer_len(&kex->my));
+       buffer_put_string(m, buffer_ptr(&kex->peer), buffer_len(&kex->peer));
+       buffer_put_int(m, kex->flags);
+       buffer_put_cstring(m, kex->client_version_string);
+       buffer_put_cstring(m, kex->server_version_string);
+}
+
+void
+mm_send_keystate(struct monitor *pmonitor)
+{
+       Buffer m;
+       u_char *blob, *p;
+       u_int bloblen, plen;
+
+       buffer_init(&m);
+
+       if (!compat20) {
+               u_char iv[24];
+               int ivlen;
+
+               buffer_put_int(&m, packet_get_protocol_flags());
+
+               buffer_put_int(&m, packet_get_ssh1_cipher());
+
+               debug3("%s: Sending ssh1 IV", __FUNCTION__);
+               ivlen = packet_get_keyiv_len(MODE_OUT);
+               packet_get_keyiv(MODE_OUT, iv, ivlen);
+               buffer_put_string(&m, iv, ivlen);
+               ivlen = packet_get_keyiv_len(MODE_OUT);
+               packet_get_keyiv(MODE_IN, iv, ivlen);
+               buffer_put_string(&m, iv, ivlen);
+               goto skip;
+       } else {
+               /* Kex for rekeying */
+               mm_send_kex(&m, *pmonitor->m_pkex);
+       }
+
+       debug3("%s: Sending new keys: %p %p",
+           __FUNCTION__, newkeys[MODE_OUT], newkeys[MODE_IN]);
+
+       /* Keys from Kex */
+       if (!mm_newkeys_to_blob(MODE_OUT, &blob, &bloblen))
+               fatal("%s: conversion of newkeys failed", __FUNCTION__);
+
+       buffer_put_string(&m, blob, bloblen);
+       xfree(blob);
+
+       if (!mm_newkeys_to_blob(MODE_IN, &blob, &bloblen))
+               fatal("%s: conversion of newkeys failed", __FUNCTION__);
+
+       buffer_put_string(&m, blob, bloblen);
+       xfree(blob);
+
+       buffer_put_int(&m, packet_get_seqnr(MODE_OUT));
+       buffer_put_int(&m, packet_get_seqnr(MODE_IN));
+
+       debug3("%s: New keys have been sent", __FUNCTION__);
+ skip:
+       /* More key context */
+       plen = packet_get_keycontext(MODE_OUT, NULL);
+       p = xmalloc(plen+1);
+       packet_get_keycontext(MODE_OUT, p);
+       buffer_put_string(&m, p, plen);
+       xfree(p);
+
+       plen = packet_get_keycontext(MODE_IN, NULL);
+       p = xmalloc(plen+1);
+       packet_get_keycontext(MODE_IN, p);
+       buffer_put_string(&m, p, plen);
+       xfree(p);
+
+       /* Compression state */
+       debug3("%s: Sending compression state", __FUNCTION__);
+       buffer_put_string(&m, &outgoing_stream, sizeof(outgoing_stream));
+       buffer_put_string(&m, &incoming_stream, sizeof(incoming_stream));
+
+       /* Network I/O buffers */
+       buffer_put_string(&m, buffer_ptr(&input), buffer_len(&input));
+       buffer_put_string(&m, buffer_ptr(&output), buffer_len(&output));
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KEYEXPORT, &m);
+       debug3("%s: Finished sending state", __FUNCTION__);
+
+       buffer_free(&m);
+}
+
+int
+mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
+{
+       Buffer m;
+       u_char *p;
+       int success = 0;
+
+       buffer_init(&m);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PTY, &m);
+
+       debug3("%s: waiting for MONITOR_ANS_PTY", __FUNCTION__);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PTY, &m);
+
+       success = buffer_get_int(&m);
+       if (success == 0) {
+               debug3("%s: pty alloc failed", __FUNCTION__);
+               buffer_free(&m);
+               return (0);
+       }
+       p = buffer_get_string(&m, NULL);
+       buffer_free(&m);
+
+       strlcpy(namebuf, p, namebuflen); /* Possible truncation */
+       xfree(p);
+
+       *ptyfd = mm_receive_fd(pmonitor->m_recvfd);
+       *ttyfd = mm_receive_fd(pmonitor->m_recvfd);
+
+       /* Success */
+       return (1);
+}
+
+void
+mm_session_pty_cleanup2(void *session)
+{
+       Session *s = session;
+       Buffer m;
+
+       if (s->ttyfd == -1)
+               return;
+       buffer_init(&m);
+       buffer_put_cstring(&m, s->tty);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PTYCLEANUP, &m);
+       buffer_free(&m);
+
+       /* closed dup'ed master */
+       if (close(s->ptymaster) < 0)
+               error("close(s->ptymaster): %s", strerror(errno));
+
+       /* unlink pty from session */
+       s->ttyfd = -1;
+}
+
+#ifdef USE_PAM
+void
+mm_start_pam(char *user)
+{
+       Buffer m;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       buffer_put_cstring(&m, user);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_START, &m);
+
+       buffer_free(&m);
+}
+#endif /* USE_PAM */
+
+/* Request process termination */
+
+void
+mm_terminate(void)
+{
+       Buffer m;
+
+       buffer_init(&m);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_TERM, &m);
+       buffer_free(&m);
+}
+
+int
+mm_ssh1_session_key(BIGNUM *num)
+{
+       int rsafail;
+       Buffer m;
+
+       buffer_init(&m);
+       buffer_put_bignum2(&m, num);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SESSKEY, &m);
+
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_SESSKEY, &m);
+
+       rsafail = buffer_get_int(&m);
+       buffer_get_bignum2(&m, num);
+
+       buffer_free(&m);
+
+       return (rsafail);
+}
+
+static void
+mm_chall_setup(char **name, char **infotxt, u_int *numprompts,
+    char ***prompts, u_int **echo_on)
+{
+       *name       = xstrdup("");
+       *infotxt    = xstrdup("");
+       *numprompts = 1;
+       *prompts = xmalloc(*numprompts * sizeof(char*));
+       *echo_on = xmalloc(*numprompts * sizeof(u_int));
+       (*echo_on)[0] = 0;
+}
+
+int
+mm_bsdauth_query(void *ctx, char **name, char **infotxt,
+   u_int *numprompts, char ***prompts, u_int **echo_on)
+{
+       Buffer m;
+       int res;
+       char *challenge;
+
+       debug3("%s: entering", __FUNCTION__);
+
+       buffer_init(&m);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_BSDAUTHQUERY, &m);
+
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_BSDAUTHQUERY,
+           &m);
+       res = buffer_get_int(&m);
+       if (res == -1) {
+               debug3("%s: no challenge", __FUNCTION__);
+               buffer_free(&m);
+               return (-1);
+       }
+
+       /* Get the challenge, and format the response */
+       challenge  = buffer_get_string(&m, NULL);
+       buffer_free(&m);
+
+       mm_chall_setup(name, infotxt, numprompts, prompts, echo_on);
+       (*prompts)[0] = challenge;
+
+       debug3("%s: received challenge: %s", __FUNCTION__, challenge);
+
+       return (0);
+}
+
+int
+mm_bsdauth_respond(void *ctx, u_int numresponses, char **responses)
+{
+       Buffer m;
+       int authok;
+
+       debug3("%s: entering", __FUNCTION__);
+       if (numresponses != 1)
+               return (-1);
+
+       buffer_init(&m);
+       buffer_put_cstring(&m, responses[0]);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_BSDAUTHRESPOND, &m);
+
+       mm_request_receive_expect(pmonitor->m_recvfd,
+           MONITOR_ANS_BSDAUTHRESPOND, &m);
+
+       authok = buffer_get_int(&m);
+       buffer_free(&m);
+
+       return ((authok == 0) ? -1 : 0);
+}
+
+int
+mm_skey_query(void *ctx, char **name, char **infotxt,
+   u_int *numprompts, char ***prompts, u_int **echo_on)
+{
+       Buffer m;
+       int len, res;
+       char *p, *challenge;
+
+       debug3("%s: entering", __FUNCTION__);
+
+       buffer_init(&m);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SKEYQUERY, &m);
+
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_SKEYQUERY,
+           &m);
+       res = buffer_get_int(&m);
+       if (res == -1) {
+               debug3("%s: no challenge", __FUNCTION__);
+               buffer_free(&m);
+               return (-1);
+       }
+
+       /* Get the challenge, and format the response */
+       challenge  = buffer_get_string(&m, NULL);
+       buffer_free(&m);
+
+       debug3("%s: received challenge: %s", __FUNCTION__, challenge);
+
+       mm_chall_setup(name, infotxt, numprompts, prompts, echo_on);
+
+       len = strlen(challenge) + strlen(SKEY_PROMPT) + 1;
+       p = xmalloc(len);
+       strlcpy(p, challenge, len);
+       strlcat(p, SKEY_PROMPT, len);
+       (*prompts)[0] = p;
+       xfree(challenge);
+
+       return (0);
+}
+
+int
+mm_skey_respond(void *ctx, u_int numresponses, char **responses)
+{
+       Buffer m;
+       int authok;
+
+       debug3("%s: entering", __FUNCTION__);
+       if (numresponses != 1)
+               return (-1);
+
+       buffer_init(&m);
+       buffer_put_cstring(&m, responses[0]);
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SKEYRESPOND, &m);
+
+       mm_request_receive_expect(pmonitor->m_recvfd,
+           MONITOR_ANS_SKEYRESPOND, &m);
+
+       authok = buffer_get_int(&m);
+       buffer_free(&m);
+
+       return ((authok == 0) ? -1 : 0);
+}
+
+void
+mm_ssh1_session_id(u_char session_id[16])
+{
+       Buffer m;
+       int i;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       for (i = 0; i < 16; i++)
+               buffer_put_char(&m, session_id[i]);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SESSID, &m);
+       buffer_free(&m);
+}
+
+int
+mm_auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
+{
+       Buffer m;
+       Key *key;
+       u_char *blob;
+       u_int blen;
+       int allowed = 0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       buffer_init(&m);
+       buffer_put_bignum2(&m, client_n);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSAKEYALLOWED, &m);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSAKEYALLOWED, &m);
+
+       allowed = buffer_get_int(&m);
+
+       if (allowed && rkey != NULL) {
+               blob = buffer_get_string(&m, &blen);
+               if ((key = key_from_blob(blob, blen)) == NULL)
+                       fatal("%s: key_from_blob failed", __FUNCTION__);
+               *rkey = key;
+               xfree(blob);
+       }
+       mm_send_debug(&m);
+       buffer_free(&m);
+
+       return (allowed);
+}
+
+BIGNUM *
+mm_auth_rsa_generate_challenge(Key *key)
+{
+       Buffer m;
+       BIGNUM *challenge;
+       u_char *blob;
+       u_int blen;
+
+       debug3("%s entering", __FUNCTION__);
+
+       if ((challenge = BN_new()) == NULL)
+               fatal("%s: BN_new failed", __FUNCTION__);
+
+       key->type = KEY_RSA;    /* XXX cheat for key_to_blob */
+       if (key_to_blob(key, &blob, &blen) == 0)
+               fatal("%s: key_to_blob failed", __FUNCTION__);
+       key->type = KEY_RSA1;
+
+       buffer_init(&m);
+       buffer_put_string(&m, blob, blen);
+       xfree(blob);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSACHALLENGE, &m);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSACHALLENGE, &m);
+
+       buffer_get_bignum2(&m, challenge);
+       buffer_free(&m);
+
+       return (challenge);
+}
+
+int
+mm_auth_rsa_verify_response(Key *key, BIGNUM *p, u_char response[16])
+{
+       Buffer m;
+       u_char *blob;
+       u_int blen;
+       int success = 0;
+
+       debug3("%s entering", __FUNCTION__);
+
+       key->type = KEY_RSA;    /* XXX cheat for key_to_blob */
+       if (key_to_blob(key, &blob, &blen) == 0)
+               fatal("%s: key_to_blob failed", __FUNCTION__);
+       key->type = KEY_RSA1;
+
+       buffer_init(&m);
+       buffer_put_string(&m, blob, blen);
+       buffer_put_string(&m, response, 16);
+       xfree(blob);
+
+       mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSARESPONSE, &m);
+       mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSARESPONSE, &m);
+
+       success = buffer_get_int(&m);
+       buffer_free(&m);
+
+       return (success);
+}
diff --git a/openssh/monitor_wrap.h b/openssh/monitor_wrap.h
new file mode 100644 (file)
index 0000000..ce72124
--- /dev/null
@@ -0,0 +1,92 @@
+/*     $OpenBSD: monitor_wrap.h,v 1.5 2002/05/12 23:53:45 djm Exp $    */
+
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _MM_WRAP_H_
+#define _MM_WRAP_H_
+#include "key.h"
+#include "buffer.h"
+
+extern int use_privsep;
+#define PRIVSEP(x)     (use_privsep ? mm_##x : x)
+
+enum mm_keytype {MM_NOKEY, MM_HOSTKEY, MM_USERKEY, MM_RSAHOSTKEY, MM_RSAUSERKEY};
+
+struct monitor;
+struct mm_master;
+struct passwd;
+struct Authctxt;
+
+DH *mm_choose_dh(int, int, int);
+int mm_key_sign(Key *, u_char **, u_int *, u_char *, u_int);
+void mm_inform_authserv(char *, char *);
+struct passwd *mm_getpwnamallow(const char *);
+char* mm_auth2_read_banner(void);
+int mm_auth_password(struct Authctxt *, char *);
+int mm_key_allowed(enum mm_keytype, char *, char *, Key *);
+int mm_user_key_allowed(struct passwd *, Key *);
+int mm_hostbased_key_allowed(struct passwd *, char *, char *, Key *);
+int mm_auth_rhosts_rsa_key_allowed(struct passwd *, char *, char *, Key *);
+int mm_key_verify(Key *, u_char *, u_int, u_char *, u_int);
+int mm_auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **);
+int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *);
+BIGNUM *mm_auth_rsa_generate_challenge(Key *);
+
+#ifdef USE_PAM
+void mm_start_pam(char *);
+#endif
+
+void mm_terminate(void);
+int mm_pty_allocate(int *, int *, char *, int);
+void mm_session_pty_cleanup2(void *);
+
+/* SSHv1 interfaces */
+void mm_ssh1_session_id(u_char *);
+int mm_ssh1_session_key(BIGNUM *);
+
+/* Key export functions */
+struct Newkeys *mm_newkeys_from_blob(u_char *, int);
+int mm_newkeys_to_blob(int, u_char **, u_int *);
+
+void monitor_apply_keystate(struct monitor *);
+void mm_get_keystate(struct monitor *);
+void mm_send_keystate(struct monitor*);
+
+/* bsdauth */
+int mm_bsdauth_query(void *, char **, char **, u_int *, char ***, u_int **);
+int mm_bsdauth_respond(void *, u_int, char **);
+
+/* skey */
+int mm_skey_query(void *, char **, char **, u_int *, char ***, u_int **);
+int mm_skey_respond(void *, u_int, char **);
+
+/* zlib allocation hooks */
+
+void *mm_zalloc(struct mm_master *, u_int, u_int);
+void mm_zfree(struct mm_master *, void *);
+void mm_init_compression(struct mm_master *);
+
+#endif /* _MM_H_ */
index 1caf04a4eeb8826cd12b50b8935fff58aa458ef3..62f5cfb655ec3cc83403f3daf8615521631cba7e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: myproposal.h,v 1.13 2002/01/21 22:30:12 markus Exp $  */
+/*     $OpenBSD: myproposal.h,v 1.14 2002/04/03 09:26:11 markus Exp $  */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -27,7 +27,7 @@
 #define        KEX_DEFAULT_PK_ALG      "ssh-rsa,ssh-dss"
 #define        KEX_DEFAULT_ENCRYPT \
        "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour," \
-       "aes192-cbc,aes256-cbc"
+       "aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se"
 #define        KEX_DEFAULT_MAC \
        "hmac-md5,hmac-sha1,hmac-ripemd160," \
        "hmac-ripemd160@openssh.com," \
index fc8e7f18de6d6ee2bba07c2c3d619795d5cdace3..db38de6acff62fc6c241be307aca78ac752285ef 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: nchan.c,v 1.44 2002/01/21 23:27:10 markus Exp $");
+RCSID("$OpenBSD: nchan.c,v 1.45 2002/03/25 21:13:51 markus Exp $");
 
 #include "ssh1.h"
 #include "ssh2.h"
@@ -302,6 +302,7 @@ static void
 chan_rcvd_eof2(Channel *c)
 {
        debug("channel %d: rcvd eof", c->self);
+       c->flags |= CHAN_EOF_RCVD;
        if (c->ostate == CHAN_OUTPUT_OPEN)
                chan_set_ostate(c, CHAN_OUTPUT_WAIT_DRAIN);
 }
@@ -330,6 +331,7 @@ chan_send_eof2(Channel *c)
                packet_start(SSH2_MSG_CHANNEL_EOF);
                packet_put_int(c->remote_id);
                packet_send();
+               c->flags |= CHAN_EOF_SENT;
                break;
        default:
                error("channel %d: cannot send eof for istate %d",
@@ -365,7 +367,8 @@ chan_rcvd_ieof(Channel *c)
        else
                chan_rcvd_ieof1(c);
        if (c->ostate == CHAN_OUTPUT_WAIT_DRAIN &&
-           buffer_len(&c->output) == 0)
+           buffer_len(&c->output) == 0 && 
+           !CHANNEL_EFD_OUTPUT_ACTIVE(c))
                chan_obuf_empty(c);
 }
 void
@@ -404,39 +407,30 @@ chan_is_dead(Channel *c, int send)
                debug("channel %d: is dead", c->self);
                return 1;
        }
-       /*
-        * we have to delay the close message if the efd (for stderr) is
-        * still active
-        */
-       if (((c->extended_usage != CHAN_EXTENDED_IGNORE) &&
-           buffer_len(&c->extended) > 0)
-#if 0
-           || ((c->extended_usage == CHAN_EXTENDED_READ) &&
-           c->efd != -1)
-#endif
-           ) {
-               debug2("channel %d: active efd: %d len %d type %s",
-                   c->self, c->efd, buffer_len(&c->extended),
-                   c->extended_usage==CHAN_EXTENDED_READ ?
-                   "read": "write");
-       } else {
-               if (!(c->flags & CHAN_CLOSE_SENT)) {
-                       if (send) {
-                               chan_send_close2(c);
-                       } else {
-                               /* channel would be dead if we sent a close */
-                               if (c->flags & CHAN_CLOSE_RCVD) {
-                                       debug("channel %d: almost dead",
-                                           c->self);
-                                       return 1;
-                               }
+       if ((datafellows & SSH_BUG_EXTEOF) &&
+           c->extended_usage == CHAN_EXTENDED_WRITE &&
+           c->efd != -1 &&
+           buffer_len(&c->extended) > 0) {
+                debug2("channel %d: active efd: %d len %d",
+                    c->self, c->efd, buffer_len(&c->extended));
+               return 0;
+       }
+       if (!(c->flags & CHAN_CLOSE_SENT)) {
+               if (send) {
+                       chan_send_close2(c);
+               } else {
+                       /* channel would be dead if we sent a close */
+                       if (c->flags & CHAN_CLOSE_RCVD) {
+                               debug("channel %d: almost dead",
+                                   c->self);
+                               return 1;
                        }
                }
-               if ((c->flags & CHAN_CLOSE_SENT) &&
-                   (c->flags & CHAN_CLOSE_RCVD)) {
-                       debug("channel %d: is dead", c->self);
-                       return 1;
-               }
+       }
+       if ((c->flags & CHAN_CLOSE_SENT) &&
+           (c->flags & CHAN_CLOSE_RCVD)) {
+               debug("channel %d: is dead", c->self);
+               return 1;
        }
        return 0;
 }
index 4fcfc6ec7d2a7330ba143c173704acd030748f86..25a559be006bf2d55b800b5783926b0f2895e941 100644 (file)
@@ -48,7 +48,7 @@ unsigned int arc4random(void)
        static int first_time = 1;
 
        if (rc4_ready <= 0) {
-               if (!first_time)
+               if (first_time)
                        seed_rng();
                first_time = 0;
                arc4random_stir();
index fa76641c8c6a6807a1a0cce4519978b633eeb9c9..b673d1ff7624bf427ab5b94dcd4f6f6022ddbc14 100644 (file)
@@ -1,14 +1,41 @@
-/*
- * XXX: license?
- */
-
-/*
- * The modules contains code to support cray t3e and sv1 computers.
- * It is here to minimize the modifcations to the openssh base code.
+/* 
+ * $Id$
+ *
+ * bsd-cray.c
+ *
+ * Copyright (c) 2002, Cray Inc.  (Wendy Palm <wendyp@cray.com>)
+ * Significant portions provided by 
+ *          Wayne Schroeder, SDSC <schroeder@sdsc.edu>
+ *          William Jones, UTexas <jones@tacc.utexas.edu>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Created: Apr 22 16.34:00 2002 wp
+ *
+ * This file contains functions required for proper execution
+ * on UNICOS systems.
+ *
  */
 
 #ifdef _CRAY
-
 #include <udb.h>
 #include <tmpdir.h>
 #include <unistd.h>
index ef36652e4d58b13327dae5a805fe61acda41e25d..8a331138e078a697ce92287188bb89213067be39 100644 (file)
@@ -1,3 +1,39 @@
+/* 
+ * $Id$
+ *
+ * bsd-cray.h
+ *
+ * Copyright (c) 2002, Cray Inc.  (Wendy Palm <wendyp@cray.com>)
+ * Significant portions provided by 
+ *          Wayne Schroeder, SDSC <schroeder@sdsc.edu>
+ *          William Jones, UTexas <jones@tacc.utexas.edu>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Created: Apr 22 16.34:00 2002 wp
+ *
+ * This file contains functions required for proper execution
+ * on UNICOS systems.
+ *
+ */
 #ifndef _BSD_CRAY_H
 #define _BSD_CRAY_H
 
index f56ad7c5b4c6857520321326769a5b3caabae71c..6f4f3169f435454bb94f63e15e9790b835f27f2a 100644 (file)
@@ -1,11 +1,27 @@
 /*
- *
  * cygwin_util.c
  *
- * Author: Corinna Vinschen <vinschen@cygnus.com>
+ * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
  *
- * Copyright (c) 2000 Corinna Vinschen <vinschen@cygnus.com>, Duisburg, Germany
- *                    All rights reserved
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * Created: Sat Sep 02 12:17:00 2000 cv
  *
index a87aeee3f17821518b2fd0e294edc4f35db5b44e..8ff590ce6fe9fd0bffa0f619a820ed41d3c29af7 100644 (file)
@@ -1,11 +1,29 @@
+/* $Id$ */
+
 /*
- *
  * cygwin_util.c
  *
- * Author: Corinna Vinschen <vinschen@cygnus.com>
+ * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com>
  *
- * Copyright (c) 2000 Corinna Vinschen <vinschen@cygnus.com>, Duisburg, Germany
- *                    All rights reserved
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * Created: Sat Sep 02 12:17:00 2000 cv
  *
@@ -13,8 +31,6 @@
  * binary mode on Windows systems.
  */
 
-/* $Id$ */
-
 #ifndef _BSD_CYGWIN_UTIL_H
 #define _BSD_CYGWIN_UTIL_H
 
index d87d56218c8a856c39e185f3ca62b0295b45a604..dae90122b0137955cb28d6c7b43adbaad7362de9 100644 (file)
@@ -99,3 +99,22 @@ int utimes(char *filename, struct timeval *tvp)
        return(utime(filename, &ub));
 }
 #endif 
+
+#ifndef HAVE_TRUNCATE
+int truncate (const char *path, off_t length)
+{
+       int fd, ret, saverrno;
+
+       fd = open(path, O_WRONLY);
+       if (fd < 0)
+               return -1;
+
+       ret = ftruncate(fd, length);
+       saverrno = errno;
+       (void) close (fd);
+       if (ret == -1)
+               errno = saverrno;
+       return(ret);
+}
+#endif /* HAVE_TRUNCATE */
+
index 3a855266a6b305c290ce3f7c535ab94f27fd8b09..5872a5b6f84d08453440b2891b5b73acaee86c5e 100644 (file)
@@ -72,5 +72,8 @@ struct timeval {
 int utimes(char *filename, struct timeval *tvp);
 #endif /* HAVE_UTIMES */
 
+#ifndef HAVE_TRUNCATE
+int truncate (const char *path, off_t length);
+#endif /* HAVE_TRUNCATE */
 
 #endif /* _BSD_MISC_H */
index c85bb240c53dcfa1b8feb22373354b2d101d3265..176fe31741c3f47386152efe365d9b320d87142c 100644 (file)
  *     @(#)queue.h     8.5 (Berkeley) 8/20/94
  */
 
-#ifndef        _SYS_QUEUE_H_
-#define        _SYS_QUEUE_H_
+#ifndef        _FAKE_QUEUE_H_
+#define        _FAKE_QUEUE_H_
+
+/*
+ * Ignore all <sys/queue.h> since older platforms have broken/incomplete
+ * <sys/queue.h> that are too hard to work around.
+ */
+#undef SLIST_HEAD
+#undef SLIST_HEAD_INITIALIZER
+#undef SLIST_ENTRY
+#undef SLIST_FIRST
+#undef SLIST_END
+#undef SLIST_EMPTY
+#undef SLIST_NEXT
+#undef SLIST_FOREACH
+#undef SLIST_INIT
+#undef SLIST_INSERT_AFTER
+#undef SLIST_INSERT_HEAD
+#undef SLIST_REMOVE_HEAD
+#undef SLIST_REMOVE
+#undef LIST_HEAD
+#undef LIST_HEAD_INITIALIZER
+#undef LIST_ENTRY
+#undef LIST_FIRST
+#undef LIST_END
+#undef LIST_EMPTY
+#undef LIST_NEXT
+#undef LIST_FOREACH
+#undef LIST_INIT
+#undef LIST_INSERT_AFTER
+#undef LIST_INSERT_BEFORE
+#undef LIST_INSERT_HEAD
+#undef LIST_REMOVE
+#undef LIST_REPLACE
+#undef SIMPLEQ_HEAD
+#undef SIMPLEQ_HEAD_INITIALIZER
+#undef SIMPLEQ_ENTRY
+#undef SIMPLEQ_FIRST
+#undef SIMPLEQ_END
+#undef SIMPLEQ_EMPTY
+#undef SIMPLEQ_NEXT
+#undef SIMPLEQ_FOREACH
+#undef SIMPLEQ_INIT
+#undef SIMPLEQ_INSERT_HEAD
+#undef SIMPLEQ_INSERT_TAIL
+#undef SIMPLEQ_INSERT_AFTER
+#undef SIMPLEQ_REMOVE_HEAD
+#undef TAILQ_HEAD
+#undef TAILQ_HEAD_INITIALIZER
+#undef TAILQ_ENTRY
+#undef TAILQ_FIRST
+#undef TAILQ_END
+#undef TAILQ_NEXT
+#undef TAILQ_LAST
+#undef TAILQ_PREV
+#undef TAILQ_EMPTY
+#undef TAILQ_FOREACH
+#undef TAILQ_FOREACH_REVERSE
+#undef TAILQ_INIT
+#undef TAILQ_INSERT_HEAD
+#undef TAILQ_INSERT_TAIL
+#undef TAILQ_INSERT_AFTER
+#undef TAILQ_INSERT_BEFORE
+#undef TAILQ_REMOVE
+#undef TAILQ_REPLACE
+#undef CIRCLEQ_HEAD
+#undef CIRCLEQ_HEAD_INITIALIZER
+#undef CIRCLEQ_ENTRY
+#undef CIRCLEQ_FIRST
+#undef CIRCLEQ_LAST
+#undef CIRCLEQ_END
+#undef CIRCLEQ_NEXT
+#undef CIRCLEQ_PREV
+#undef CIRCLEQ_EMPTY
+#undef CIRCLEQ_FOREACH
+#undef CIRCLEQ_FOREACH_REVERSE
+#undef CIRCLEQ_INIT
+#undef CIRCLEQ_INSERT_AFTER
+#undef CIRCLEQ_INSERT_BEFORE
+#undef CIRCLEQ_INSERT_HEAD
+#undef CIRCLEQ_INSERT_TAIL
+#undef CIRCLEQ_REMOVE
+#undef CIRCLEQ_REPLACE
 
 /*
  * This file defines five types of data structures: singly-linked lists, 
@@ -500,4 +581,4 @@ struct {                                                            \
                (elm2)->field.cqe_prev->field.cqe_next = (elm2);        \
 } while (0)
 
-#endif /* !_SYS_QUEUE_H_ */
+#endif /* !_FAKE_QUEUE_H_ */
index 79f8ed4f7737008b49ad10093c53787c5d17e891..540cfead1b7c8fa6e1b32cb93d24b1b9177d37d8 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef _FAKE_SOCKET_H
 #define _FAKE_SOCKET_H
 
-#include "config.h"
+#include "includes.h"
 #include "sys/types.h"
 
 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
index 18e31e7f6c72122fc42d016b614ddf67196f63a4..1fc001da60aa5a3d8800be5cf47e1d9fd9000f7d 100644 (file)
@@ -55,7 +55,7 @@
  * --Copyright--
  */
 
-#include "config.h"
+#include "includes.h"
 
 #if !defined(HAVE_INET_ATON)
 
index 7687710373458434caad7c52036d1a39d92c077e..8c2f5f8416863647c944583def02f81fa0370721 100644 (file)
@@ -165,7 +165,6 @@ restart:
        errno = save_errno;
        return(nr == -1 ? NULL : buf);
 }
-#endif /* HAVE_READPASSPHRASE */
   
 #if 0
 char *
@@ -179,6 +178,6 @@ getpass(const char *prompt)
 
 static void handler(int s)
 {
-
        signo = s;
 }
+#endif /* HAVE_READPASSPHRASE */
diff --git a/openssh/openbsd-compat/tree.h b/openssh/openbsd-compat/tree.h
new file mode 100644 (file)
index 0000000..30b4a85
--- /dev/null
@@ -0,0 +1,667 @@
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef        _SYS_TREE_H_
+#define        _SYS_TREE_H_
+
+/*
+ * This file defines data structures for different types of trees:
+ * splay trees and red-black trees.
+ *
+ * A splay tree is a self-organizing data structure.  Every operation
+ * on the tree causes a splay to happen.  The splay moves the requested
+ * node to the root of the tree and partly rebalances it.
+ *
+ * This has the benefit that request locality causes faster lookups as
+ * the requested nodes move to the top of the tree.  On the other hand,
+ * every lookup causes memory writes.
+ *
+ * The Balance Theorem bounds the total access time for m operations
+ * and n inserts on an initially empty tree as O((m + n)lg n).  The
+ * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
+ *
+ * A red-black tree is a binary search tree with the node color as an
+ * extra attribute.  It fulfills a set of conditions:
+ *     - every search path from the root to a leaf consists of the
+ *       same number of black nodes,
+ *     - each red node (except for the root) has a black parent,
+ *     - each leaf node is black.
+ *
+ * Every operation on a red-black tree is bounded as O(lg n).
+ * The maximum height of a red-black tree is 2lg (n+1).
+ */
+
+#define SPLAY_HEAD(name, type)                                         \
+struct name {                                                          \
+       struct type *sph_root; /* root of the tree */                   \
+}
+
+#define SPLAY_INITIALIZER(root)                                                \
+       { NULL }
+
+#define SPLAY_INIT(root) do {                                          \
+       (root)->sph_root = NULL;                                        \
+} while (0)
+
+#define SPLAY_ENTRY(type)                                              \
+struct {                                                               \
+       struct type *spe_left; /* left element */                       \
+       struct type *spe_right; /* right element */                     \
+}
+
+#define SPLAY_LEFT(elm, field)         (elm)->field.spe_left
+#define SPLAY_RIGHT(elm, field)                (elm)->field.spe_right
+#define SPLAY_ROOT(head)               (head)->sph_root
+#define SPLAY_EMPTY(head)              (SPLAY_ROOT(head) == NULL)
+
+/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
+#define SPLAY_ROTATE_RIGHT(head, tmp, field) do {                      \
+       SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field);  \
+       SPLAY_RIGHT(tmp, field) = (head)->sph_root;                     \
+       (head)->sph_root = tmp;                                         \
+} while (0)
+       
+#define SPLAY_ROTATE_LEFT(head, tmp, field) do {                       \
+       SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field);  \
+       SPLAY_LEFT(tmp, field) = (head)->sph_root;                      \
+       (head)->sph_root = tmp;                                         \
+} while (0)
+
+#define SPLAY_LINKLEFT(head, tmp, field) do {                          \
+       SPLAY_LEFT(tmp, field) = (head)->sph_root;                      \
+       tmp = (head)->sph_root;                                         \
+       (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);         \
+} while (0)
+
+#define SPLAY_LINKRIGHT(head, tmp, field) do {                         \
+       SPLAY_RIGHT(tmp, field) = (head)->sph_root;                     \
+       tmp = (head)->sph_root;                                         \
+       (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);        \
+} while (0)
+
+#define SPLAY_ASSEMBLE(head, node, left, right, field) do {            \
+       SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
+       SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
+       SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
+       SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
+} while (0)
+
+/* Generates prototypes and inline functions */
+
+#define SPLAY_PROTOTYPE(name, type, field, cmp)                                \
+void name##_SPLAY(struct name *, struct type *);                       \
+void name##_SPLAY_MINMAX(struct name *, int);                          \
+                                                                       \
+static __inline void                                                   \
+name##_SPLAY_INSERT(struct name *head, struct type *elm)               \
+{                                                                      \
+    if (SPLAY_EMPTY(head)) {                                           \
+           SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL;    \
+    } else {                                                           \
+           int __comp;                                                 \
+           name##_SPLAY(head, elm);                                    \
+           __comp = (cmp)(elm, (head)->sph_root);                      \
+           if(__comp < 0) {                                            \
+                   SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
+                   SPLAY_RIGHT(elm, field) = (head)->sph_root;         \
+                   SPLAY_LEFT((head)->sph_root, field) = NULL;         \
+           } else if (__comp > 0) {                                    \
+                   SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
+                   SPLAY_LEFT(elm, field) = (head)->sph_root;          \
+                   SPLAY_RIGHT((head)->sph_root, field) = NULL;        \
+           } else                                                      \
+                   return;                                             \
+    }                                                                  \
+    (head)->sph_root = (elm);                                          \
+}                                                                      \
+                                                                       \
+static __inline void                                                   \
+name##_SPLAY_REMOVE(struct name *head, struct type *elm)               \
+{                                                                      \
+       struct type *__tmp;                                             \
+       if (SPLAY_EMPTY(head))                                          \
+               return;                                                 \
+       name##_SPLAY(head, elm);                                        \
+       if ((cmp)(elm, (head)->sph_root) == 0) {                        \
+               if (SPLAY_LEFT((head)->sph_root, field) == NULL) {      \
+                       (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
+               } else {                                                \
+                       __tmp = SPLAY_RIGHT((head)->sph_root, field);   \
+                       (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
+                       name##_SPLAY(head, elm);                        \
+                       SPLAY_RIGHT((head)->sph_root, field) = __tmp;   \
+               }                                                       \
+       }                                                               \
+}                                                                      \
+                                                                       \
+/* Finds the node with the same key as elm */                          \
+static __inline struct type *                                          \
+name##_SPLAY_FIND(struct name *head, struct type *elm)                 \
+{                                                                      \
+       if (SPLAY_EMPTY(head))                                          \
+               return(NULL);                                           \
+       name##_SPLAY(head, elm);                                        \
+       if ((cmp)(elm, (head)->sph_root) == 0)                          \
+               return (head->sph_root);                                \
+       return (NULL);                                                  \
+}                                                                      \
+                                                                       \
+static __inline struct type *                                          \
+name##_SPLAY_NEXT(struct name *head, struct type *elm)                 \
+{                                                                      \
+       name##_SPLAY(head, elm);                                        \
+       if (SPLAY_RIGHT(elm, field) != NULL) {                          \
+               elm = SPLAY_RIGHT(elm, field);                          \
+               while (SPLAY_LEFT(elm, field) != NULL) {                \
+                       elm = SPLAY_LEFT(elm, field);                   \
+               }                                                       \
+       } else                                                          \
+               elm = NULL;                                             \
+       return (elm);                                                   \
+}                                                                      \
+                                                                       \
+static __inline struct type *                                          \
+name##_SPLAY_MIN_MAX(struct name *head, int val)                       \
+{                                                                      \
+       name##_SPLAY_MINMAX(head, val);                                 \
+        return (SPLAY_ROOT(head));                                     \
+}
+
+/* Main splay operation.
+ * Moves node close to the key of elm to top
+ */
+#define SPLAY_GENERATE(name, type, field, cmp)                         \
+void name##_SPLAY(struct name *head, struct type *elm)                 \
+{                                                                      \
+       struct type __node, *__left, *__right, *__tmp;                  \
+       int __comp;                                                     \
+\
+       SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+       __left = __right = &__node;                                     \
+\
+       while ((__comp = (cmp)(elm, (head)->sph_root))) {               \
+               if (__comp < 0) {                                       \
+                       __tmp = SPLAY_LEFT((head)->sph_root, field);    \
+                       if (__tmp == NULL)                              \
+                               break;                                  \
+                       if ((cmp)(elm, __tmp) < 0){                     \
+                               SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+                               if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+                                       break;                          \
+                       }                                               \
+                       SPLAY_LINKLEFT(head, __right, field);           \
+               } else if (__comp > 0) {                                \
+                       __tmp = SPLAY_RIGHT((head)->sph_root, field);   \
+                       if (__tmp == NULL)                              \
+                               break;                                  \
+                       if ((cmp)(elm, __tmp) > 0){                     \
+                               SPLAY_ROTATE_LEFT(head, __tmp, field);  \
+                               if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+                                       break;                          \
+                       }                                               \
+                       SPLAY_LINKRIGHT(head, __left, field);           \
+               }                                                       \
+       }                                                               \
+       SPLAY_ASSEMBLE(head, &__node, __left, __right, field);          \
+}                                                                      \
+                                                                       \
+/* Splay with either the minimum or the maximum element                        \
+ * Used to find minimum or maximum element in tree.                    \
+ */                                                                    \
+void name##_SPLAY_MINMAX(struct name *head, int __comp) \
+{                                                                      \
+       struct type __node, *__left, *__right, *__tmp;                  \
+\
+       SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+       __left = __right = &__node;                                     \
+\
+       while (1) {                                                     \
+               if (__comp < 0) {                                       \
+                       __tmp = SPLAY_LEFT((head)->sph_root, field);    \
+                       if (__tmp == NULL)                              \
+                               break;                                  \
+                       if (__comp < 0){                                \
+                               SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+                               if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+                                       break;                          \
+                       }                                               \
+                       SPLAY_LINKLEFT(head, __right, field);           \
+               } else if (__comp > 0) {                                \
+                       __tmp = SPLAY_RIGHT((head)->sph_root, field);   \
+                       if (__tmp == NULL)                              \
+                               break;                                  \
+                       if (__comp > 0) {                               \
+                               SPLAY_ROTATE_LEFT(head, __tmp, field);  \
+                               if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+                                       break;                          \
+                       }                                               \
+                       SPLAY_LINKRIGHT(head, __left, field);           \
+               }                                                       \
+       }                                                               \
+       SPLAY_ASSEMBLE(head, &__node, __left, __right, field);          \
+}
+
+#define SPLAY_NEGINF   -1
+#define SPLAY_INF      1
+
+#define SPLAY_INSERT(name, x, y)       name##_SPLAY_INSERT(x, y)
+#define SPLAY_REMOVE(name, x, y)       name##_SPLAY_REMOVE(x, y)
+#define SPLAY_FIND(name, x, y)         name##_SPLAY_FIND(x, y)
+#define SPLAY_NEXT(name, x, y)         name##_SPLAY_NEXT(x, y)
+#define SPLAY_MIN(name, x)             (SPLAY_EMPTY(x) ? NULL  \
+                                       : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
+#define SPLAY_MAX(name, x)             (SPLAY_EMPTY(x) ? NULL  \
+                                       : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
+
+#define SPLAY_FOREACH(x, name, head)                                   \
+       for ((x) = SPLAY_MIN(name, head);                               \
+            (x) != NULL;                                               \
+            (x) = SPLAY_NEXT(name, head, x))
+
+/* Macros that define a red-back tree */
+#define RB_HEAD(name, type)                                            \
+struct name {                                                          \
+       struct type *rbh_root; /* root of the tree */                   \
+}
+
+#define RB_INITIALIZER(root)                                           \
+       { NULL }
+
+#define RB_INIT(root) do {                                             \
+       (root)->rbh_root = NULL;                                        \
+} while (0)
+
+#define RB_BLACK       0
+#define RB_RED         1
+#define RB_ENTRY(type)                                                 \
+struct {                                                               \
+       struct type *rbe_left;          /* left element */              \
+       struct type *rbe_right;         /* right element */             \
+       struct type *rbe_parent;        /* parent element */            \
+       int rbe_color;                  /* node color */                \
+}
+
+#define RB_LEFT(elm, field)            (elm)->field.rbe_left
+#define RB_RIGHT(elm, field)           (elm)->field.rbe_right
+#define RB_PARENT(elm, field)          (elm)->field.rbe_parent
+#define RB_COLOR(elm, field)           (elm)->field.rbe_color
+#define RB_ROOT(head)                  (head)->rbh_root
+#define RB_EMPTY(head)                 (RB_ROOT(head) == NULL)
+
+#define RB_SET(elm, parent, field) do {                                        \
+       RB_PARENT(elm, field) = parent;                                 \
+       RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL;              \
+       RB_COLOR(elm, field) = RB_RED;                                  \
+} while (0)
+
+#define RB_SET_BLACKRED(black, red, field) do {                                \
+       RB_COLOR(black, field) = RB_BLACK;                              \
+       RB_COLOR(red, field) = RB_RED;                                  \
+} while (0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp, field) do {                     \
+       (tmp) = RB_RIGHT(elm, field);                                   \
+       if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) {             \
+               RB_PARENT(RB_LEFT(tmp, field), field) = (elm);          \
+       }                                                               \
+       RB_AUGMENT(elm);                                                \
+       if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) {          \
+               if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))     \
+                       RB_LEFT(RB_PARENT(elm, field), field) = (tmp);  \
+               else                                                    \
+                       RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+               RB_AUGMENT(RB_PARENT(elm, field));                      \
+       } else                                                          \
+               (head)->rbh_root = (tmp);                               \
+       RB_LEFT(tmp, field) = (elm);                                    \
+       RB_PARENT(elm, field) = (tmp);                                  \
+       RB_AUGMENT(tmp);                                                \
+} while (0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp, field) do {                    \
+       (tmp) = RB_LEFT(elm, field);                                    \
+       if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) {             \
+               RB_PARENT(RB_RIGHT(tmp, field), field) = (elm);         \
+       }                                                               \
+       RB_AUGMENT(elm);                                                \
+       if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) {          \
+               if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))     \
+                       RB_LEFT(RB_PARENT(elm, field), field) = (tmp);  \
+               else                                                    \
+                       RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+               RB_AUGMENT(RB_PARENT(elm, field));                      \
+       } else                                                          \
+               (head)->rbh_root = (tmp);                               \
+       RB_RIGHT(tmp, field) = (elm);                                   \
+       RB_PARENT(elm, field) = (tmp);                                  \
+       RB_AUGMENT(tmp);                                                \
+} while (0)
+
+/* Generates prototypes and inline functions */
+#define RB_PROTOTYPE(name, type, field, cmp)                           \
+void name##_RB_INSERT_COLOR(struct name *, struct type *);     \
+void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
+void name##_RB_REMOVE(struct name *, struct type *);                   \
+struct type *name##_RB_INSERT(struct name *, struct type *);           \
+struct type *name##_RB_FIND(struct name *, struct type *);             \
+struct type *name##_RB_NEXT(struct name *, struct type *);             \
+struct type *name##_RB_MINMAX(struct name *, int);                     \
+                                                                       \
+
+/* Main rb operation.
+ * Moves node close to the key of elm to top
+ */
+#define RB_GENERATE(name, type, field, cmp)                            \
+void                                                                   \
+name##_RB_INSERT_COLOR(struct name *head, struct type *elm)            \
+{                                                                      \
+       struct type *parent, *gparent, *tmp;                            \
+       while ((parent = RB_PARENT(elm, field)) &&                      \
+           RB_COLOR(parent, field) == RB_RED) {                        \
+               gparent = RB_PARENT(parent, field);                     \
+               if (parent == RB_LEFT(gparent, field)) {                \
+                       tmp = RB_RIGHT(gparent, field);                 \
+                       if (tmp && RB_COLOR(tmp, field) == RB_RED) {    \
+                               RB_COLOR(tmp, field) = RB_BLACK;        \
+                               RB_SET_BLACKRED(parent, gparent, field);\
+                               elm = gparent;                          \
+                               continue;                               \
+                       }                                               \
+                       if (RB_RIGHT(parent, field) == elm) {           \
+                               RB_ROTATE_LEFT(head, parent, tmp, field);\
+                               tmp = parent;                           \
+                               parent = elm;                           \
+                               elm = tmp;                              \
+                       }                                               \
+                       RB_SET_BLACKRED(parent, gparent, field);        \
+                       RB_ROTATE_RIGHT(head, gparent, tmp, field);     \
+               } else {                                                \
+                       tmp = RB_LEFT(gparent, field);                  \
+                       if (tmp && RB_COLOR(tmp, field) == RB_RED) {    \
+                               RB_COLOR(tmp, field) = RB_BLACK;        \
+                               RB_SET_BLACKRED(parent, gparent, field);\
+                               elm = gparent;                          \
+                               continue;                               \
+                       }                                               \
+                       if (RB_LEFT(parent, field) == elm) {            \
+                               RB_ROTATE_RIGHT(head, parent, tmp, field);\
+                               tmp = parent;                           \
+                               parent = elm;                           \
+                               elm = tmp;                              \
+                       }                                               \
+                       RB_SET_BLACKRED(parent, gparent, field);        \
+                       RB_ROTATE_LEFT(head, gparent, tmp, field);      \
+               }                                                       \
+       }                                                               \
+       RB_COLOR(head->rbh_root, field) = RB_BLACK;                     \
+}                                                                      \
+                                                                       \
+void                                                                   \
+name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
+{                                                                      \
+       struct type *tmp;                                               \
+       while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) &&     \
+           elm != RB_ROOT(head)) {                                     \
+               if (RB_LEFT(parent, field) == elm) {                    \
+                       tmp = RB_RIGHT(parent, field);                  \
+                       if (RB_COLOR(tmp, field) == RB_RED) {           \
+                               RB_SET_BLACKRED(tmp, parent, field);    \
+                               RB_ROTATE_LEFT(head, parent, tmp, field);\
+                               tmp = RB_RIGHT(parent, field);          \
+                       }                                               \
+                       if ((RB_LEFT(tmp, field) == NULL ||             \
+                           RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+                           (RB_RIGHT(tmp, field) == NULL ||            \
+                           RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+                               RB_COLOR(tmp, field) = RB_RED;          \
+                               elm = parent;                           \
+                               parent = RB_PARENT(elm, field);         \
+                       } else {                                        \
+                               if (RB_RIGHT(tmp, field) == NULL ||     \
+                                   RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
+                                       struct type *oleft;             \
+                                       if ((oleft = RB_LEFT(tmp, field)))\
+                                               RB_COLOR(oleft, field) = RB_BLACK;\
+                                       RB_COLOR(tmp, field) = RB_RED;  \
+                                       RB_ROTATE_RIGHT(head, tmp, oleft, field);\
+                                       tmp = RB_RIGHT(parent, field);  \
+                               }                                       \
+                               RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+                               RB_COLOR(parent, field) = RB_BLACK;     \
+                               if (RB_RIGHT(tmp, field))               \
+                                       RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
+                               RB_ROTATE_LEFT(head, parent, tmp, field);\
+                               elm = RB_ROOT(head);                    \
+                               break;                                  \
+                       }                                               \
+               } else {                                                \
+                       tmp = RB_LEFT(parent, field);                   \
+                       if (RB_COLOR(tmp, field) == RB_RED) {           \
+                               RB_SET_BLACKRED(tmp, parent, field);    \
+                               RB_ROTATE_RIGHT(head, parent, tmp, field);\
+                               tmp = RB_LEFT(parent, field);           \
+                       }                                               \
+                       if ((RB_LEFT(tmp, field) == NULL ||             \
+                           RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+                           (RB_RIGHT(tmp, field) == NULL ||            \
+                           RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+                               RB_COLOR(tmp, field) = RB_RED;          \
+                               elm = parent;                           \
+                               parent = RB_PARENT(elm, field);         \
+                       } else {                                        \
+                               if (RB_LEFT(tmp, field) == NULL ||      \
+                                   RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
+                                       struct type *oright;            \
+                                       if ((oright = RB_RIGHT(tmp, field)))\
+                                               RB_COLOR(oright, field) = RB_BLACK;\
+                                       RB_COLOR(tmp, field) = RB_RED;  \
+                                       RB_ROTATE_LEFT(head, tmp, oright, field);\
+                                       tmp = RB_LEFT(parent, field);   \
+                               }                                       \
+                               RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+                               RB_COLOR(parent, field) = RB_BLACK;     \
+                               if (RB_LEFT(tmp, field))                \
+                                       RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
+                               RB_ROTATE_RIGHT(head, parent, tmp, field);\
+                               elm = RB_ROOT(head);                    \
+                               break;                                  \
+                       }                                               \
+               }                                                       \
+       }                                                               \
+       if (elm)                                                        \
+               RB_COLOR(elm, field) = RB_BLACK;                        \
+}                                                                      \
+                                                                       \
+void                                                                   \
+name##_RB_REMOVE(struct name *head, struct type *elm)                  \
+{                                                                      \
+       struct type *child, *parent;                                    \
+       int color;                                                      \
+       if (RB_LEFT(elm, field) == NULL)                                \
+               child = RB_RIGHT(elm, field);                           \
+       else if (RB_RIGHT(elm, field) == NULL)                          \
+               child = RB_LEFT(elm, field);                            \
+       else {                                                          \
+               struct type *old = elm, *left;                          \
+               elm = RB_RIGHT(elm, field);                             \
+               while ((left = RB_LEFT(elm, field)))                    \
+                       elm = left;                                     \
+               child = RB_RIGHT(elm, field);                           \
+               parent = RB_PARENT(elm, field);                         \
+               color = RB_COLOR(elm, field);                           \
+               if (child)                                              \
+                       RB_PARENT(child, field) = parent;               \
+               if (parent) {                                           \
+                       if (RB_LEFT(parent, field) == elm)              \
+                               RB_LEFT(parent, field) = child;         \
+                       else                                            \
+                               RB_RIGHT(parent, field) = child;        \
+                       RB_AUGMENT(parent);                             \
+               } else                                                  \
+                       RB_ROOT(head) = child;                          \
+               if (RB_PARENT(elm, field) == old)                       \
+                       parent = elm;                                   \
+               (elm)->field = (old)->field;                            \
+               if (RB_PARENT(old, field)) {                            \
+                       if (RB_LEFT(RB_PARENT(old, field), field) == old)\
+                               RB_LEFT(RB_PARENT(old, field), field) = elm;\
+                       else                                            \
+                               RB_RIGHT(RB_PARENT(old, field), field) = elm;\
+                       RB_AUGMENT(RB_PARENT(old, field));              \
+               } else                                                  \
+                       RB_ROOT(head) = elm;                            \
+               RB_PARENT(RB_LEFT(old, field), field) = elm;            \
+               if (RB_RIGHT(old, field))                               \
+                       RB_PARENT(RB_RIGHT(old, field), field) = elm;   \
+               if (parent) {                                           \
+                       left = parent;                                  \
+                       do {                                            \
+                               RB_AUGMENT(left);                       \
+                       } while ((left = RB_PARENT(left, field)));      \
+               }                                                       \
+               goto color;                                             \
+       }                                                               \
+       parent = RB_PARENT(elm, field);                                 \
+       color = RB_COLOR(elm, field);                                   \
+       if (child)                                                      \
+               RB_PARENT(child, field) = parent;                       \
+       if (parent) {                                                   \
+               if (RB_LEFT(parent, field) == elm)                      \
+                       RB_LEFT(parent, field) = child;                 \
+               else                                                    \
+                       RB_RIGHT(parent, field) = child;                \
+               RB_AUGMENT(parent);                                     \
+       } else                                                          \
+               RB_ROOT(head) = child;                                  \
+color:                                                                 \
+       if (color == RB_BLACK)                                          \
+               name##_RB_REMOVE_COLOR(head, parent, child);            \
+}                                                                      \
+                                                                       \
+/* Inserts a node into the RB tree */                                  \
+struct type *                                                          \
+name##_RB_INSERT(struct name *head, struct type *elm)                  \
+{                                                                      \
+       struct type *tmp;                                               \
+       struct type *parent = NULL;                                     \
+       int comp = 0;                                                   \
+       tmp = RB_ROOT(head);                                            \
+       while (tmp) {                                                   \
+               parent = tmp;                                           \
+               comp = (cmp)(elm, parent);                              \
+               if (comp < 0)                                           \
+                       tmp = RB_LEFT(tmp, field);                      \
+               else if (comp > 0)                                      \
+                       tmp = RB_RIGHT(tmp, field);                     \
+               else                                                    \
+                       return (tmp);                                   \
+       }                                                               \
+       RB_SET(elm, parent, field);                                     \
+       if (parent != NULL) {                                           \
+               if (comp < 0)                                           \
+                       RB_LEFT(parent, field) = elm;                   \
+               else                                                    \
+                       RB_RIGHT(parent, field) = elm;                  \
+               RB_AUGMENT(parent);                                     \
+       } else                                                          \
+               RB_ROOT(head) = elm;                                    \
+       name##_RB_INSERT_COLOR(head, elm);                              \
+       return (NULL);                                                  \
+}                                                                      \
+                                                                       \
+/* Finds the node with the same key as elm */                          \
+struct type *                                                          \
+name##_RB_FIND(struct name *head, struct type *elm)                    \
+{                                                                      \
+       struct type *tmp = RB_ROOT(head);                               \
+       int comp;                                                       \
+       while (tmp) {                                                   \
+               comp = cmp(elm, tmp);                                   \
+               if (comp < 0)                                           \
+                       tmp = RB_LEFT(tmp, field);                      \
+               else if (comp > 0)                                      \
+                       tmp = RB_RIGHT(tmp, field);                     \
+               else                                                    \
+                       return (tmp);                                   \
+       }                                                               \
+       return (NULL);                                                  \
+}                                                                      \
+                                                                       \
+struct type *                                                          \
+name##_RB_NEXT(struct name *head, struct type *elm)                    \
+{                                                                      \
+       if (RB_RIGHT(elm, field)) {                                     \
+               elm = RB_RIGHT(elm, field);                             \
+               while (RB_LEFT(elm, field))                             \
+                       elm = RB_LEFT(elm, field);                      \
+       } else {                                                        \
+               if (RB_PARENT(elm, field) &&                            \
+                   (elm == RB_LEFT(RB_PARENT(elm, field), field)))     \
+                       elm = RB_PARENT(elm, field);                    \
+               else {                                                  \
+                       while (RB_PARENT(elm, field) &&                 \
+                           (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
+                               elm = RB_PARENT(elm, field);            \
+                       elm = RB_PARENT(elm, field);                    \
+               }                                                       \
+       }                                                               \
+       return (elm);                                                   \
+}                                                                      \
+                                                                       \
+struct type *                                                          \
+name##_RB_MINMAX(struct name *head, int val)                           \
+{                                                                      \
+       struct type *tmp = RB_ROOT(head);                               \
+       struct type *parent = NULL;                                     \
+       while (tmp) {                                                   \
+               parent = tmp;                                           \
+               if (val < 0)                                            \
+                       tmp = RB_LEFT(tmp, field);                      \
+               else                                                    \
+                       tmp = RB_RIGHT(tmp, field);                     \
+       }                                                               \
+       return (parent);                                                \
+}
+
+#define RB_NEGINF      -1
+#define RB_INF 1
+
+#define RB_INSERT(name, x, y)  name##_RB_INSERT(x, y)
+#define RB_REMOVE(name, x, y)  name##_RB_REMOVE(x, y)
+#define RB_FIND(name, x, y)    name##_RB_FIND(x, y)
+#define RB_NEXT(name, x, y)    name##_RB_NEXT(x, y)
+#define RB_MIN(name, x)                name##_RB_MINMAX(x, RB_NEGINF)
+#define RB_MAX(name, x)                name##_RB_MINMAX(x, RB_INF)
+
+#define RB_FOREACH(x, name, head)                                      \
+       for ((x) = RB_MIN(name, head);                                  \
+            (x) != NULL;                                               \
+            (x) = name##_RB_NEXT(head, x))
+
+#endif /* _SYS_TREE_H_ */
index 045d5a10556d7a8b8f840482f8800849c6bf5cab..258085d29193d5ee27efcaf9e3c7ba8cbb116e3c 100644 (file)
@@ -37,7 +37,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.90 2002/02/27 21:23:13 stevesk Exp $");
+RCSID("$OpenBSD: packet.c,v 1.93 2002/03/24 16:01:13 markus Exp $");
 
 #include "xmalloc.h"
 #include "buffer.h"
@@ -86,10 +86,10 @@ static CipherContext receive_context;
 static CipherContext send_context;
 
 /* Buffer for raw input data from the socket. */
-static Buffer input;
+Buffer input;
 
 /* Buffer for raw output data going to the socket. */
-static Buffer output;
+Buffer output;
 
 /* Buffer for the partial outgoing packet being constructed. */
 static Buffer outgoing_packet;
@@ -115,6 +115,8 @@ static int interactive_mode = 0;
 
 /* Session key information for Encryption and MAC */
 Newkeys *newkeys[MODE_MAX];
+static u_int32_t read_seqnr = 0;
+static u_int32_t send_seqnr = 0;
 
 /* roundup current message to extra_pad bytes */
 static u_char extra_pad = 0;
@@ -171,6 +173,99 @@ packet_connection_is_on_socket(void)
        return 1;
 }
 
+/*
+ * Exports an IV from the CipherContext required to export the key
+ * state back from the unprivileged child to the privileged parent
+ * process.
+ */
+
+void
+packet_get_keyiv(int mode, u_char *iv, u_int len)
+{
+       CipherContext *cc;
+
+       if (mode == MODE_OUT)
+               cc = &send_context;
+       else
+               cc = &receive_context;
+
+       cipher_get_keyiv(cc, iv, len);
+}
+
+int
+packet_get_keycontext(int mode, u_char *dat)
+{
+       CipherContext *cc;
+
+       if (mode == MODE_OUT)
+               cc = &send_context;
+       else
+               cc = &receive_context;
+
+       return (cipher_get_keycontext(cc, dat));
+}
+
+void
+packet_set_keycontext(int mode, u_char *dat)
+{
+       CipherContext *cc;
+
+       if (mode == MODE_OUT)
+               cc = &send_context;
+       else
+               cc = &receive_context;
+
+       cipher_set_keycontext(cc, dat);
+}
+
+int
+packet_get_keyiv_len(int mode)
+{
+       CipherContext *cc;
+
+       if (mode == MODE_OUT)
+               cc = &send_context;
+       else
+               cc = &receive_context;
+
+       return (cipher_get_keyiv_len(cc));
+}
+void
+packet_set_iv(int mode, u_char *dat)
+{
+       CipherContext *cc;
+
+       if (mode == MODE_OUT)
+               cc = &send_context;
+       else
+               cc = &receive_context;
+
+       cipher_set_keyiv(cc, dat);
+}
+int
+packet_get_ssh1_cipher()
+{
+       return (cipher_get_number(receive_context.cipher));
+}
+
+
+u_int32_t
+packet_get_seqnr(int mode)
+{
+       return (mode == MODE_IN ? read_seqnr : send_seqnr);
+}
+
+void
+packet_set_seqnr(int mode, u_int32_t seqnr)
+{
+       if (mode == MODE_IN)
+               read_seqnr = seqnr;
+       else if (mode == MODE_OUT)
+               send_seqnr = seqnr;
+       else
+               fatal("%s: bad mode %d", __FUNCTION__, mode);
+}
+
 /* returns 1 if connection is via ipv4 */
 
 int
@@ -182,9 +277,14 @@ packet_connection_is_ipv4(void)
        memset(&to, 0, sizeof(to));
        if (getsockname(connection_out, (struct sockaddr *)&to, &tolen) < 0)
                return 0;
-       if (to.ss_family != AF_INET)
-               return 0;
-       return 1;
+       if (to.ss_family == AF_INET)
+               return 1;
+#ifdef IPV4_IN_IPV6
+       if (to.ss_family == AF_INET6 && 
+           IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&to)->sin6_addr))
+               return 1;
+#endif
+       return 0;
 }
 
 /* Sets the connection into non-blocking mode. */
@@ -433,7 +533,7 @@ packet_send1(void)
         */
 }
 
-static void
+void
 set_newkeys(int mode)
 {
        Enc *enc;
@@ -477,8 +577,9 @@ set_newkeys(int mode)
        DBG(debug("cipher_init_context: %d", mode));
        cipher_init(cc, enc->cipher, enc->key, enc->key_len,
            enc->iv, enc->block_size, encrypt);
-       memset(enc->iv,  0, enc->block_size);
-       memset(enc->key, 0, enc->key_len);
+       /* Deleting the keys does not gain extra security */
+       /* memset(enc->iv,  0, enc->block_size);
+          memset(enc->key, 0, enc->key_len); */
        if (comp->type != 0 && comp->enabled == 0) {
                packet_init_compression();
                if (mode == MODE_OUT)
@@ -495,7 +596,6 @@ set_newkeys(int mode)
 static void
 packet_send2(void)
 {
-       static u_int32_t seqnr = 0;
        u_char type, *cp, *macbuf = NULL;
        u_char padlen, pad;
        u_int packet_length = 0;
@@ -549,7 +649,7 @@ packet_send2(void)
                /* will wrap if extra_pad+padlen > 255 */
                extra_pad  = roundup(extra_pad, block_size);
                pad = extra_pad - ((len + padlen) % extra_pad);
-               debug("packet_send2: adding %d (len %d padlen %d extra_pad %d)",
+               debug3("packet_send2: adding %d (len %d padlen %d extra_pad %d)",
                    pad, len, padlen, extra_pad);
                padlen += pad;
                extra_pad = 0;
@@ -576,10 +676,10 @@ packet_send2(void)
 
        /* compute MAC over seqnr and packet(length fields, payload, padding) */
        if (mac && mac->enabled) {
-               macbuf = mac_compute(mac, seqnr,
+               macbuf = mac_compute(mac, send_seqnr,
                    buffer_ptr(&outgoing_packet),
                    buffer_len(&outgoing_packet));
-               DBG(debug("done calc MAC out #%d", seqnr));
+               DBG(debug("done calc MAC out #%d", send_seqnr));
        }
        /* encrypt packet and append to output buffer. */
        cp = buffer_append_space(&output, buffer_len(&outgoing_packet));
@@ -593,7 +693,7 @@ packet_send2(void)
        buffer_dump(&output);
 #endif
        /* increment sequence number for outgoing packets */
-       if (++seqnr == 0)
+       if (++send_seqnr == 0)
                log("outgoing seqnr wraps around");
        buffer_clear(&outgoing_packet);
 
@@ -783,7 +883,6 @@ packet_read_poll1(void)
 static int
 packet_read_poll2(u_int32_t *seqnr_p)
 {
-       static u_int32_t seqnr = 0;
        static u_int packet_length = 0;
        u_int padlen, need;
        u_char *macbuf, *cp, type;
@@ -845,17 +944,17 @@ packet_read_poll2(u_int32_t *seqnr_p)
         * increment sequence number for incoming packet
         */
        if (mac && mac->enabled) {
-               macbuf = mac_compute(mac, seqnr,
+               macbuf = mac_compute(mac, read_seqnr,
                    buffer_ptr(&incoming_packet),
                    buffer_len(&incoming_packet));
                if (memcmp(macbuf, buffer_ptr(&input), mac->mac_len) != 0)
                        packet_disconnect("Corrupted MAC on input.");
-               DBG(debug("MAC #%d ok", seqnr));
+               DBG(debug("MAC #%d ok", read_seqnr));
                buffer_consume(&input, mac->mac_len);
        }
        if (seqnr_p != NULL)
-               *seqnr_p = seqnr;
-       if (++seqnr == 0)
+               *seqnr_p = read_seqnr;
+       if (++read_seqnr == 0)
                log("incoming seqnr wraps around");
 
        /* get padlen */
index d6bf2aab484f8cb173fc04a76ed30804358b3c7b..151ca74a10f7e00587c028223fb32baadb9bc899 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: packet.h,v 1.33 2002/03/04 17:27:39 stevesk Exp $     */
+/*     $OpenBSD: packet.h,v 1.34 2002/03/18 17:16:38 markus Exp $      */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -56,6 +56,16 @@ void *packet_get_string(u_int *length_ptr);
 void     packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2)));
 void     packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2)));
 
+void    set_newkeys(int mode);
+int     packet_get_keyiv_len(int);
+void    packet_get_keyiv(int, u_char *, u_int);
+int     packet_get_keycontext(int, u_char *);
+void    packet_set_keycontext(int, u_char *);
+u_int32_t packet_get_seqnr(int);
+void    packet_set_seqnr(int, u_int32_t);
+int     packet_get_ssh1_cipher(void);
+void    packet_set_iv(int, u_char *);
+
 void     packet_write_poll(void);
 void     packet_write_wait(void);
 int      packet_have_data_to_write(void);
index 002c313a5d1d767d1602cd0a1e68975ec5498b66..691293c33d999efcd875bb39a11f008ca6aa4f72 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pathnames.h,v 1.11 2002/02/09 17:37:34 deraadt Exp $  */
+/*     $OpenBSD: pathnames.h,v 1.12 2002/03/19 03:03:43 stevesk Exp $  */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
 #ifndef _PATH_SFTP_SERVER
 #define _PATH_SFTP_SERVER              "/usr/libexec/sftp-server"
 #endif
+
+/* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */
+#ifndef _PATH_PRIVSEP_CHROOT_DIR
+#define _PATH_PRIVSEP_CHROOT_DIR       "/var/empty"
+#endif
+
 #ifndef _PATH_LS
 #define _PATH_LS                       "ls"
 #endif
index e60435736e56f7ec64cf6dc5ea62bb08bf93e393..019d7a3f99628956b4ede1ae4178ed5b1e10ffd7 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 1999 Dug Song.  All rights reserved.
+ * Copyright (c) 2002 Markus Friedl.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #include "includes.h"
 #include "uuencode.h"
 
-RCSID("$OpenBSD: radix.c,v 1.17 2001/11/19 19:02:16 mpech Exp $");
+RCSID("$OpenBSD: radix.c,v 1.20 2002/04/23 12:58:26 markus Exp $");
 
 #ifdef AFS
 #include <krb.h>
 
 #include <radix.h>
+#include "bufaux.h"
 
-typedef u_char my_u_char;
-typedef u_int my_u_int32_t;
-typedef u_short my_u_short;
-
-/* Nasty macros from BIND-4.9.2 */
-
-#define GETSHORT(s, cp) { \
-       my_u_char *t_cp = (my_u_char *)(cp); \
-       (s) = (((my_u_short)t_cp[0]) << 8) \
-           | (((my_u_short)t_cp[1])) \
-           ; \
-       (cp) += 2; \
-}
-
-#define GETLONG(l, cp) { \
-       my_u_char *t_cp = (my_u_char *)(cp); \
-       (l) = (((my_u_int32_t)t_cp[0]) << 24) \
-           | (((my_u_int32_t)t_cp[1]) << 16) \
-           | (((my_u_int32_t)t_cp[2]) << 8) \
-           | (((my_u_int32_t)t_cp[3])) \
-           ; \
-       (cp) += 4; \
-}
-
-#define PUTSHORT(s, cp) { \
-       my_u_short t_s = (my_u_short)(s); \
-       my_u_char *t_cp = (my_u_char *)(cp); \
-       *t_cp++ = t_s >> 8; \
-       *t_cp   = t_s; \
-       (cp) += 2; \
-}
+int
+creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen)
+{
+       Buffer b;
+       int ret;
 
-#define PUTLONG(l, cp) { \
-       my_u_int32_t t_l = (my_u_int32_t)(l); \
-       my_u_char *t_cp = (my_u_char *)(cp); \
-       *t_cp++ = t_l >> 24; \
-       *t_cp++ = t_l >> 16; \
-       *t_cp++ = t_l >> 8; \
-       *t_cp   = t_l; \
-       (cp) += 4; \
-}
+       buffer_init(&b);
 
-#define GETSTRING(s, p, p_l) {                 \
-    char *p_targ = (p) + p_l;          \
-    char *s_c = (s);                   \
-    char *p_c = (p);                   \
-    while (*p_c && (p_c < p_targ)) {           \
-       *s_c++ = *p_c++;                        \
-    }                                          \
-    if (p_c == p_targ) {                       \
-       return 1;                               \
-    }                                          \
-    *s_c = *p_c++;                             \
-    (p_l) = (p_l) - (p_c - (p));               \
-    (p) = p_c;                                 \
-}
+       buffer_put_char(&b, 1); /* version */
 
+       buffer_append(&b, creds->service, strlen(creds->service));
+       buffer_put_char(&b, '\0');
+       buffer_append(&b, creds->instance, strlen(creds->instance));
+       buffer_put_char(&b, '\0');
+       buffer_append(&b, creds->realm, strlen(creds->realm));
+       buffer_put_char(&b, '\0');
+       buffer_append(&b, creds->pname, strlen(creds->pname));
+       buffer_put_char(&b, '\0');
+       buffer_append(&b, creds->pinst, strlen(creds->pinst));
+       buffer_put_char(&b, '\0');
 
-int
-creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen)
-{
-       char *p, *s;
-       int len;
-       char temp[2048];
-
-       p = temp;
-       *p++ = 1;               /* version */
-       s = creds->service;
-       while (*s)
-               *p++ = *s++;
-       *p++ = *s;
-       s = creds->instance;
-       while (*s)
-               *p++ = *s++;
-       *p++ = *s;
-       s = creds->realm;
-       while (*s)
-               *p++ = *s++;
-       *p++ = *s;
-
-       s = creds->pname;
-       while (*s)
-               *p++ = *s++;
-       *p++ = *s;
-       s = creds->pinst;
-       while (*s)
-               *p++ = *s++;
-       *p++ = *s;
        /* Null string to repeat the realm. */
-       *p++ = '\0';
-
-       PUTLONG(creds->issue_date, p);
-       {
-               u_int endTime;
-               endTime = (u_int) krb_life_to_time(creds->issue_date,
-                                                         creds->lifetime);
-               PUTLONG(endTime, p);
-       }
+       buffer_put_char(&b, '\0');
 
-       memcpy(p, &creds->session, sizeof(creds->session));
-       p += sizeof(creds->session);
+       buffer_put_int(&b, creds->issue_date);
+       buffer_put_int(&b, krb_life_to_time(creds->issue_date,
+           creds->lifetime));
+       buffer_append(&b, creds->session, sizeof(creds->session));
+       buffer_put_short(&b, creds->kvno);
 
-       PUTSHORT(creds->kvno, p);
-       PUTLONG(creds->ticket_st.length, p);
+       /* 32 bit size + data */
+       buffer_put_string(&b, creds->ticket_st.dat, creds->ticket_st.length);
 
-       memcpy(p, creds->ticket_st.dat, creds->ticket_st.length);
-       p += creds->ticket_st.length;
-       len = p - temp;
+       ret = uuencode(buffer_ptr(&b), buffer_len(&b), (char *)buf, buflen);
 
-       return (uuencode((u_char *)temp, len, (char *)buf, buflen));
+       buffer_free(&b);
+       return ret;
 }
 
+#define GETSTRING(b, t, tlen) \
+       do { \
+               int i, found = 0; \
+               for (i = 0; i < tlen; i++) { \
+                       if (buffer_len(b) == 0) \
+                               goto done; \
+                       t[i] = buffer_get_char(b); \
+                       if (t[i] == '\0') { \
+                               found = 1; \
+                               break; \
+                       } \
+               } \
+               if (!found) \
+                       goto done; \
+       } while(0)
+
 int
 radix_to_creds(const char *buf, CREDENTIALS *creds)
 {
+       Buffer b;
+       char c, version, *space, *p;
+       u_int endTime;
+       int len, blen, ret;
 
-       char *p;
-       int len, tl;
-       char version;
-       char temp[2048];
+       ret = 0;
+       blen = strlen(buf);
 
-       len = uudecode(buf, (u_char *)temp, sizeof(temp));
-       if (len < 0)
+       /* sanity check for size */
+       if (blen > 8192)
                return 0;
 
-       p = temp;
+       buffer_init(&b);
+       space = buffer_append_space(&b, blen);
 
        /* check version and length! */
+       len = uudecode(buf, space, blen);
        if (len < 1)
-               return 0;
-       version = *p;
-       p++;
-       len--;
-
-       GETSTRING(creds->service, p, len);
-       GETSTRING(creds->instance, p, len);
-       GETSTRING(creds->realm, p, len);
+               goto done;
 
-       GETSTRING(creds->pname, p, len);
-       GETSTRING(creds->pinst, p, len);
-       /* Ignore possibly different realm. */
-       while (*p && len)
-               p++, len--;
-       if (len == 0)
-               return 0;
-       p++, len--;
-
-       /* Enough space for remaining fixed-length parts? */
-       if (len < (4 + 4 + sizeof(creds->session) + 2 + 4))
-               return 0;
+       version = buffer_get_char(&b);
 
-       GETLONG(creds->issue_date, p);
-       len -= 4;
-       {
-               u_int endTime;
-               GETLONG(endTime, p);
-               len -= 4;
-               creds->lifetime = krb_time_to_life(creds->issue_date, endTime);
-       }
-
-       memcpy(&creds->session, p, sizeof(creds->session));
-       p += sizeof(creds->session);
-       len -= sizeof(creds->session);
-
-       GETSHORT(creds->kvno, p);
-       len -= 2;
-       GETLONG(creds->ticket_st.length, p);
-       len -= 4;
-
-       tl = creds->ticket_st.length;
-       if (tl < 0 || tl > len || tl > sizeof(creds->ticket_st.dat))
-               return 0;
+       GETSTRING(&b, creds->service, sizeof creds->service);
+       GETSTRING(&b, creds->instance, sizeof creds->instance);
+       GETSTRING(&b, creds->realm, sizeof creds->realm);
+       GETSTRING(&b, creds->pname, sizeof creds->pname);
+       GETSTRING(&b, creds->pinst, sizeof creds->pinst);
 
-       memcpy(creds->ticket_st.dat, p, tl);
-       p += tl;
-       len -= tl;
+       if (buffer_len(&b) == 0)
+               goto done;
 
-       return 1;
+       /* Ignore possibly different realm. */
+       while (buffer_len(&b) > 0 && (c = buffer_get_char(&b)) != '\0')
+               ;
+
+       if (buffer_len(&b) == 0)
+               goto done;
+
+       creds->issue_date = buffer_get_int(&b);
+
+       endTime = buffer_get_int(&b);
+       creds->lifetime = krb_time_to_life(creds->issue_date, endTime);
+
+       len = buffer_len(&b);
+       if (len < sizeof(creds->session))
+               goto done;
+       memcpy(&creds->session, buffer_ptr(&b), sizeof(creds->session));
+       buffer_consume(&b, sizeof(creds->session));
+
+       creds->kvno = buffer_get_short(&b);
+
+       p = buffer_get_string(&b, &len);
+       if (len < 0 || len > sizeof(creds->ticket_st.dat))
+               goto done;
+       memcpy(&creds->ticket_st.dat, p, len);
+       creds->ticket_st.length = len;
+       
+       ret = 1;
+done:
+       buffer_free(&b);
+       return ret;
 }
 #endif /* AFS */
index b4421ade04dccb4b9eba43b06d54b823c3ed44cd..96b7e84b44fcee486b4f6e1e54defdd339ab5128 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: readpass.c,v 1.26 2002/02/13 00:39:15 markus Exp $");
+RCSID("$OpenBSD: readpass.c,v 1.27 2002/03/26 15:58:46 markus Exp $");
 
 #include "xmalloc.h"
 #include "readpass.h"
@@ -118,8 +118,11 @@ read_passphrase(const char *prompt, int flags)
                return ssh_askpass(askpass, prompt);
        }
 
-       if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL)
+       if (readpassphrase(prompt, buf, sizeof buf, rppflags) == NULL) {
+               if (flags & RP_ALLOW_EOF)
+                       return NULL;
                return xstrdup("");
+       }
 
        ret = xstrdup(buf);
        memset(buf, 'x', sizeof buf);
index 229973c68adde12b03af8d298e805bbcc3b71078..a45d32f2a76b0a25b9a46f47094cdf5fc4b19feb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: readpass.h,v 1.6 2001/06/26 17:27:24 markus Exp $     */
+/*     $OpenBSD: readpass.h,v 1.7 2002/03/26 15:58:46 markus Exp $     */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -14,5 +14,6 @@
 
 #define RP_ECHO                        0x0001
 #define RP_ALLOW_STDIN         0x0002
+#define RP_ALLOW_EOF           0x0004
 
 char   *read_passphrase(const char *, int);
diff --git a/openssh/regress/Makefile b/openssh/regress/Makefile
new file mode 100644 (file)
index 0000000..26224cd
--- /dev/null
@@ -0,0 +1,73 @@
+#      $OpenBSD: Makefile,v 1.13 2002/04/01 22:15:08 markus Exp $
+
+REGRESSTARGETS=        t1 t2 t3 t4 t5 t6 t7
+
+CLEANFILES+=   t2.out t6.out1 t6.out2 t7.out t7.out.pub 
+
+LTESTS=        connect \
+               proxy-connect \
+               connect-privsep \
+               proto-version \
+               proto-mismatch \
+               exit-status \
+               transfer \
+               stderr-data \
+               stderr-after-eof \
+               broken-pipe \
+               try-ciphers \
+               yes-head \
+               agent \
+               keyscan \
+               sftp \
+               forwarding
+
+USER!=         id -un
+CLEANFILES+=   authorized_keys_${USER} known_hosts pidfile \
+               ssh_config ssh_proxy sshd_config sshd_proxy \
+               rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
+               rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
+               ls.copy
+
+#LTESTS+=      ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
+
+t1:
+       ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
+
+t2:
+       cat ${.CURDIR}/rsa_openssh.prv > t2.out
+       chmod 600 t2.out
+       ssh-keygen -yf t2.out | diff - ${.CURDIR}/rsa_openssh.pub
+
+t3:
+       ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub |\
+               ssh-keygen -if /dev/stdin |\
+               diff - ${.CURDIR}/rsa_openssh.pub
+
+t4:
+       ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\
+               awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
+
+t5:
+       ssh-keygen -Bf ${.CURDIR}/rsa_openssh.pub |\
+               awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
+
+t6:
+       ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > t6.out1
+       ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > t6.out2
+       chmod 600 t6.out1
+       ssh-keygen -yf t6.out1 | diff - t6.out2
+
+t7.out:
+       ssh-keygen -q -t rsa -N '' -f $@
+
+t7: t7.out
+       ssh-keygen -lf t7.out > /dev/null
+       ssh-keygen -Bf t7.out > /dev/null
+
+.for t in ${LTESTS}
+REGRESSTARGETS+=t-${t}
+t-${t}:
+       sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/${t}.sh
+.endfor
+
+.include "bsd.regress.mk"
diff --git a/openssh/regress/agent.sh b/openssh/regress/agent.sh
new file mode 100644 (file)
index 0000000..7e9b4cb
--- /dev/null
@@ -0,0 +1,75 @@
+#      $OpenBSD: agent.sh,v 1.6 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="simple agent test"
+
+SSH_AUTH_SOCK=/nonexistant ${SSHADD} -l > /dev/null 2>&1
+if [ $? -ne 2 ]; then
+       fail "ssh-add -l did not fail with exit code 2"
+fi
+
+trace "start agent"
+eval `${SSHAGENT} -s` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+       fail "could not start ssh-agent: exit code $r"
+else
+       ${SSHADD} -l > /dev/null 2>&1
+       if [ $? -ne 1 ]; then
+               fail "ssh-add -l did not fail with exit code 1"
+       fi
+       trace "overwrite authorized keys"
+       echo -n > $OBJ/authorized_keys_$USER
+       for t in rsa rsa1; do
+               # generate user key for agent
+               rm -f $OBJ/$t-agent
+               ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t-agent ||\
+                        fail "ssh-keygen for $t-agent failed"
+               # add to authorized keys
+               cat $OBJ/$t-agent.pub >> $OBJ/authorized_keys_$USER
+               # add privat key to agent
+               ${SSHADD} $OBJ/$t-agent > /dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh-add did succeed exit code 0"
+               fi
+       done
+       ${SSHADD} -l > /dev/null 2>&1
+       if [ $? -ne 0 ]; then
+               fail "ssh-add -l failed: exit code $?"
+       fi
+       # the same for full pubkey output
+       ${SSHADD} -L > /dev/null 2>&1
+       if [ $? -ne 0 ]; then
+               fail "ssh-add -L failed: exit code $?"
+       fi
+
+       trace "simple connect via agent"
+       for p in 1 2; do
+               ${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p
+               if [ $? -ne 5$p ]; then
+                       fail "ssh connect with protocol $p failed (exit code $?)"
+               fi
+       done
+
+       trace "agent forwarding"
+       for p in 1 2; do
+               ${SSH} -A -$p -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "ssh-add -l via agent fwd proto $p failed (exit code $?)"
+               fi
+               ${SSH} -A -$p -F $OBJ/ssh_proxy somehost \
+                       "${SSH} -$p -F $OBJ/ssh_proxy somehost exit 5$p"
+               if [ $? -ne 5$p ]; then
+                       fail "agent fwd proto $p failed (exit code $?)"
+               fi
+       done
+
+       trace "delete all agent keys"
+       ${SSHADD} -D > /dev/null 2>&1
+       if [ $? -ne 0 ]; then
+               fail "ssh-add -D failed: exit code $?"
+       fi
+
+       trace "kill agent"
+       ${SSHAGENT} -k > /dev/null
+fi
diff --git a/openssh/regress/authorized_keys_root b/openssh/regress/authorized_keys_root
new file mode 100644 (file)
index 0000000..3285371
--- /dev/null
@@ -0,0 +1,2 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAt6ttBacbgvLPsF1VWWfT51t55/5Mj62Xp8EaoH5SNSaLiGIgrrja077lKEept75U4uKFUYU5JJX9GPE9A7Y43LXv+/A6Jm4rEj/U0s4H8tf0UmzVC3t6xh0sRK0hYVNILyoHnIAgdY8CmOiybw7p6DxJY8MRAehD3n9+kFcachU= root@xenon
+1024 35 132789427207755621599908461558918671787816692978751485815532032934821830960131244604702969298486352138126114080367609979552547448841583955126231410604842765726397407176910594168641969541792069550006878863592030567875913190224374005367884774859544943329148178663694126456638431428703289837638970464685771819219 root@xenon
diff --git a/openssh/regress/broken-pipe.sh b/openssh/regress/broken-pipe.sh
new file mode 100644 (file)
index 0000000..c08c849
--- /dev/null
@@ -0,0 +1,15 @@
+#      $OpenBSD: broken-pipe.sh,v 1.4 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="broken pipe test"
+
+for p in 1 2; do
+       trace "protocol $p"
+       for i in 1 2 3 4; do
+               ${SSH} -$p -F $OBJ/ssh_config_config nexthost echo $i 2> /dev/null | true
+               r=$?
+               if [ $r -ne 0 ]; then
+                       fail "broken pipe returns $r for protocol $p"
+               fi
+       done
+done
diff --git a/openssh/regress/bsd.regress.mk b/openssh/regress/bsd.regress.mk
new file mode 100644 (file)
index 0000000..9b8011a
--- /dev/null
@@ -0,0 +1,79 @@
+#      $OpenBSD: bsd.regress.mk,v 1.9 2002/02/17 01:10:15 marc Exp $
+# No man pages for regression tests.
+NOMAN=
+
+# No installation.
+install:
+
+# If REGRESSTARGETS is defined and PROG is not defined, set NOPROG
+.if defined(REGRESSTARGETS) && !defined(PROG)
+NOPROG=
+.endif
+
+.include <bsd.prog.mk>
+
+.MAIN: all
+all: regress
+
+# XXX - Need full path to REGRESSLOG, otherwise there will be much pain.
+
+REGRESSLOG?=/dev/null
+REGRESSNAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///}
+
+.if defined(PROG) && !empty(PROG)
+run-regress-${PROG}: ${PROG}
+       ./${PROG}
+.endif
+
+.if !defined(REGRESSTARGETS)
+REGRESSTARGETS=run-regress-${PROG}
+.  if defined(REGRESSSKIP)
+REGRESSSKIPTARGETS=run-regress-${PROG}
+.  endif
+.endif
+
+REGRESSSKIPSLOW?=no
+
+#.if (${REGRESSSKIPSLOW:L} == "yes") && defined(REGRESSSLOWTARGETS)
+
+.if (${REGRESSSKIPSLOW} == "yes") && defined(REGRESSSLOWTARGETS)
+REGRESSSKIPTARGETS+=${REGRESSSLOWTARGETS}
+.endif
+
+.if defined(REGRESSROOTTARGETS)
+ROOTUSER!=id -g
+SUDO?=
+. if (${ROOTUSER} != 0) && empty(SUDO)
+REGRESSSKIPTARGETS+=${REGRESSROOTTARGETS}
+. endif
+.endif
+
+REGRESSSKIPTARGETS?=
+
+regress:
+.for RT in ${REGRESSTARGETS} 
+.  if ${REGRESSSKIPTARGETS:M${RT}}
+       @echo -n "SKIP " >> ${REGRESSLOG}
+.  else
+# XXX - we need a better method to see if a test fails due to timeout or just
+#       normal failure.
+.   if !defined(REGRESSMAXTIME)
+       @if cd ${.CURDIR} && ${MAKE} ${RT}; then \
+           echo -n "SUCCESS " >> ${REGRESSLOG} ; \
+       else \
+           echo -n "FAIL " >> ${REGRESSLOG} ; \
+           echo FAILED ; \
+       fi
+.   else
+       @if cd ${.CURDIR} && (ulimit -t ${REGRESSMAXTIME} ; ${MAKE} ${RT}); then \
+           echo -n "SUCCESS " >> ${REGRESSLOG} ; \
+       else \
+           echo -n "FAIL (possible timeout) " >> ${REGRESSLOG} ; \
+           echo FAILED ; \
+       fi
+.   endif
+.  endif
+       @echo ${REGRESSNAME}/${RT:S/^run-regress-//} >> ${REGRESSLOG}
+.endfor
+
+.PHONY: regress
diff --git a/openssh/regress/connect-privsep.sh b/openssh/regress/connect-privsep.sh
new file mode 100644 (file)
index 0000000..d23cadb
--- /dev/null
@@ -0,0 +1,13 @@
+#      $OpenBSD: connect-privsep.sh,v 1.1 2002/03/21 21:45:07 markus Exp $
+#      Placed in the Public Domain.
+
+tid="proxy connect with privsep"
+
+echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy
+
+for p in 1 2; do
+       ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
+       if [ $? -ne 0 ]; then
+               fail "ssh privsep+proxyconnect protocol $p failed"
+       fi
+done
diff --git a/openssh/regress/connect.sh b/openssh/regress/connect.sh
new file mode 100644 (file)
index 0000000..2186fa6
--- /dev/null
@@ -0,0 +1,13 @@
+#      $OpenBSD: connect.sh,v 1.4 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="simple connect"
+
+start_sshd
+
+for p in 1 2; do
+       ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh connect with protocol $p failed"
+       fi
+done
diff --git a/openssh/regress/copy.1 b/openssh/regress/copy.1
new file mode 100755 (executable)
index 0000000..92d4d20
Binary files /dev/null and b/openssh/regress/copy.1 differ
diff --git a/openssh/regress/copy.2 b/openssh/regress/copy.2
new file mode 100755 (executable)
index 0000000..92d4d20
Binary files /dev/null and b/openssh/regress/copy.2 differ
diff --git a/openssh/regress/dsa_ssh2.prv b/openssh/regress/dsa_ssh2.prv
new file mode 100644 (file)
index 0000000..c93b403
--- /dev/null
@@ -0,0 +1,14 @@
+---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----
+Subject: ssh-keygen test
+Comment: "1024-bit dsa, Tue Jan 08 2002 22:00:23 +0100"
+P2/56wAAAgIAAAAmZGwtbW9kcHtzaWdue2RzYS1uaXN0LXNoYTF9LGRoe3BsYWlufX0AAA
+AEbm9uZQAAAcQAAAHAAAAAAAAABACwUfm3AxZTut3icBmwCcD48nY64HzuELlQ+vEqjIcR
+Lo49es/DQTeLNQ+kdKRCfouosGNv0WqxRtF0tUsWdXxS37oHGa4QPugBdHRd7YlZGZv8kg
+x7FsoepY7v7E683/97dv2zxL3AGagTEzWr7fl0yPexAaZoDvtQrrjX44BLmwAABACWQkvv
+MxnD8eFkS1konFfMJ1CkuRfTN34CBZ6dY7VTSGemy4QwtFdMKmoufD0eKgy3p5WOeWCYKt
+F4FhjHKZk/aaxFjjIbtkrnlvXg64QI11dSZyBN6/ViQkHPSkUDF+A6AAEhrNbQbAFSvao1
+kTvNtPCtL0AkUIduEMzGQfLCTAAAAKDeC043YVo9Zo0zAEeIA4uZh4LBCQAAA/9aj7Y5ik
+ehygJ4qTDSlVypsPuV+n59tMS0e2pfrSG87yf5r94AKBmJeho5OO6wYaXCxsVB7AFbSUD6
+75AK8mHF4v1/+7SWKk5f8xlMCMSPZ9K0+j/W1d/q2qkhnnDZolOHDomLA+U00i5ya/jnTV
+zyDPWLFpWK8u3xGBPAYX324gAAAKDHFvooRnaXdZbeWGTTqmgHB1GU9A==
+---- END SSH2 ENCRYPTED PRIVATE KEY ----
diff --git a/openssh/regress/dsa_ssh2.pub b/openssh/regress/dsa_ssh2.pub
new file mode 100644 (file)
index 0000000..215d73b
--- /dev/null
@@ -0,0 +1,13 @@
+---- BEGIN SSH2 PUBLIC KEY ----
+Subject: ssh-keygen test
+Comment: "1024-bit dsa, Tue Jan 08 2002 22:00:23 +0100"
+AAAAB3NzaC1kc3MAAACBALBR+bcDFlO63eJwGbAJwPjydjrgfO4QuVD68SqMhxEujj16z8
+NBN4s1D6R0pEJ+i6iwY2/RarFG0XS1SxZ1fFLfugcZrhA+6AF0dF3tiVkZm/ySDHsWyh6l
+ju/sTrzf/3t2/bPEvcAZqBMTNavt+XTI97EBpmgO+1CuuNfjgEubAAAAFQDeC043YVo9Zo
+0zAEeIA4uZh4LBCQAAAIEAlkJL7zMZw/HhZEtZKJxXzCdQpLkX0zd+AgWenWO1U0hnpsuE
+MLRXTCpqLnw9HioMt6eVjnlgmCrReBYYxymZP2msRY4yG7ZK55b14OuECNdXUmcgTev1Yk
+JBz0pFAxfgOgABIazW0GwBUr2qNZE7zbTwrS9AJFCHbhDMxkHywkwAAACAWo+2OYpHocoC
+eKkw0pVcqbD7lfp+fbTEtHtqX60hvO8n+a/eACgZiXoaOTjusGGlwsbFQewBW0lA+u+QCv
+JhxeL9f/u0lipOX/MZTAjEj2fStPo/1tXf6tqpIZ5w2aJThw6JiwPlNNIucmv4501c8gz1
+ixaVivLt8RgTwGF99uI=
+---- END SSH2 PUBLIC KEY ----
diff --git a/openssh/regress/exit-status.sh b/openssh/regress/exit-status.sh
new file mode 100644 (file)
index 0000000..56b78a6
--- /dev/null
@@ -0,0 +1,24 @@
+#      $OpenBSD: exit-status.sh,v 1.6 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="remote exit status"
+
+for p in 1 2; do
+       for s in 0 1 4 5 44; do
+               trace "proto $p status $s"
+               verbose "test $tid: proto $p status $s"
+               ${SSH} -$p -F $OBJ/ssh_proxy otherhost exit $s
+               r=$?
+               if [ $r -ne $s ]; then
+                       fail "exit code mismatch for protocol $p: $r != $s"
+               fi
+
+               # same with early close of stdout/err
+               ${SSH} -$p -F $OBJ/ssh_proxy -n otherhost \
+                       exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\'
+               r=$?
+               if [ $r -ne $s ]; then
+                       fail "exit code (with sleep) mismatch for protocol $p: $r != $s"
+               fi
+       done
+done
diff --git a/openssh/regress/forwarding.sh b/openssh/regress/forwarding.sh
new file mode 100644 (file)
index 0000000..7b281c0
--- /dev/null
@@ -0,0 +1,33 @@
+#      $OpenBSD: forwarding.sh,v 1.4 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="local and remote forwarding"
+
+start_sshd
+
+base=33
+last=$PORT
+fwd=""
+for j in 0 1 2; do
+       for i in 0 1 2; do
+               a=$base$j$i
+               b=`expr $a + 50`
+               c=$last
+               # fwd chain: $a -> $b -> $c
+               fwd="$fwd -L$a:127.0.0.1:$b -R$b:127.0.0.1:$c"
+               last=$a
+       done
+done
+for p in 1 2; do
+       q=`expr 3 - $p`
+       trace "start forwarding, fork to background"
+       ${SSH} -$p -F $OBJ/ssh_config -f $fwd somehost sleep 10
+
+       trace "transfer over forwarded channels and check result"
+       ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \
+               somehost cat /bin/ls > $OBJ/ls.copy
+       test -f $OBJ/ls.copy                    || fail "failed copy /bin/ls"
+       cmp /bin/ls $OBJ/ls.copy                || fail "corrupted copy of /bin/ls"
+
+       sleep 10
+done
diff --git a/openssh/regress/keyscan.sh b/openssh/regress/keyscan.sh
new file mode 100644 (file)
index 0000000..33f14f0
--- /dev/null
@@ -0,0 +1,19 @@
+#      $OpenBSD: keyscan.sh,v 1.3 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="keyscan"
+
+# remove DSA hostkey
+rm -f ${OBJ}/host.dsa
+
+start_sshd
+
+for t in rsa1 rsa dsa; do
+       trace "keyscan type $t"
+       ${SSHKEYSCAN} -t $t -p $PORT 127.0.0.1 127.0.0.1 127.0.0.1 \
+               > /dev/null 2>&1
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh-keyscan -t $t failed with: $r"
+       fi
+done
diff --git a/openssh/regress/proto-mismatch.sh b/openssh/regress/proto-mismatch.sh
new file mode 100644 (file)
index 0000000..fb521f2
--- /dev/null
@@ -0,0 +1,19 @@
+#      $OpenBSD: proto-mismatch.sh,v 1.3 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="protocol version mismatch"
+
+mismatch ()
+{
+       server=$1
+       client=$2
+       banner=`echo ${client} | ${SSHD} -o "Protocol=${server}" -i -f ${OBJ}/sshd_proxy`
+       r=$?
+       trace "sshd prints ${banner}"
+       if [ $r -ne 255 ]; then
+               fail "sshd prints ${banner} and accepts connect with version ${client}"
+       fi
+}
+
+mismatch       2       SSH-1.5-HALLO
+mismatch       1       SSH-2.0-HALLO
diff --git a/openssh/regress/proto-version.sh b/openssh/regress/proto-version.sh
new file mode 100644 (file)
index 0000000..7dc616f
--- /dev/null
@@ -0,0 +1,34 @@
+#      $OpenBSD: proto-version.sh,v 1.3 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="sshd version with different protocol combinations"
+
+# we just start sshd in inetd mode and check the banner
+check_version ()
+{
+       version=$1
+       expect=$2
+       banner=`echo -n | ${SSHD} -o "Protocol=${version}" -i -f ${OBJ}/sshd_proxy`
+       case ${banner} in
+       SSH-1.99-*)
+               proto=199
+               ;;
+       SSH-2.0-*)
+               proto=20
+               ;;
+       SSH-1.5-*)
+               proto=15
+               ;;
+       *)
+               proto=0
+               ;;
+       esac
+       if [ ${expect} -ne ${proto} ]; then
+               fail "wrong protocol version ${banner} for ${version}"
+       fi
+}
+
+check_version  2,1     199
+check_version  1,2     199
+check_version  2       20
+check_version  1       15
diff --git a/openssh/regress/proxy-connect.sh b/openssh/regress/proxy-connect.sh
new file mode 100644 (file)
index 0000000..bf1940f
--- /dev/null
@@ -0,0 +1,11 @@
+#      $OpenBSD: proxy-connect.sh,v 1.4 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="proxy connect"
+
+for p in 1 2; do
+       ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
+       if [ $? -ne 0 ]; then
+               fail "ssh proxyconnect protocol $p failed"
+       fi
+done
diff --git a/openssh/regress/rsa_openssh.prv b/openssh/regress/rsa_openssh.prv
new file mode 100644 (file)
index 0000000..2675555
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICWgIBAAKBgQDsilwKcaKN6wSMNd1WgQ9+HRqQEkD0kCTVttrazGu0OhBU3Uko
++dFD1Ip0CxdXmN25JQWxOYF7h/Ocu8P3jzv3RTX87xKR0YzlXTLX+SLtF/ySebS3
+xWPrlfRUDhh03hR5V+8xxvvy9widPYKw/oItwGSueOsEq1LTczCDv2dAjQIDAQAB
+An8nH5VzvHkMbSqJ6eOYDsVwomRvYbH5IEaYl1x6VATITNvAu9kUdQ4NsSpuMc+7
+Jj9gKZvmO1y2YCKc0P/iO+i/eV0L+yQh1Rw18jQZll+12T+LZrKRav03YNvMx0gN
+wqWY48Kt6hv2/N/ebQzKRe79+D0t2cTh92hT7xENFLIBAkEBGnoGKFjAUkJCwO1V
+mzpUqMHpRZVOrqP9hUmPjzNJ5oBPFGe4+h1hoSRFOAzaNuZt8ssbqaLCkzB8bfzj
+qhZqAQJBANZekuUpp8iBLeLSagw5FkcPwPzq6zfExbhvsZXb8Bo/4SflNs4JHXwI
+7SD9Z8aJLvM4uQ/5M70lblDMQ40i3o0CQQDIJvBYBFL5tlOgakq/O7yi+wt0L5BZ
+9H79w5rCSAA0IHRoK/qI1urHiHC3f3vbbLk5UStfrqEaND/mm0shyNIBAkBLsYdC
+/ctt5Bc0wUGK4Vl5bBmj9LtrrMJ4FpBpLwj/69BwCuKoK9XKZ0h73p6XHveCEGRg
+PIlFX4MtaoLrwgU9AkBV2k4dgIws+X8YX65EsyyFjnlDqX4x0nSOjQB1msIKfHBr
+dh5XLDBTTCxnKhMJ0Yx/opgOvf09XHBFwaQntR5i
+-----END RSA PRIVATE KEY-----
diff --git a/openssh/regress/rsa_openssh.pub b/openssh/regress/rsa_openssh.pub
new file mode 100644 (file)
index 0000000..b504730
--- /dev/null
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDsilwKcaKN6wSMNd1WgQ9+HRqQEkD0kCTVttrazGu0OhBU3Uko+dFD1Ip0CxdXmN25JQWxOYF7h/Ocu8P3jzv3RTX87xKR0YzlXTLX+SLtF/ySebS3xWPrlfRUDhh03hR5V+8xxvvy9widPYKw/oItwGSueOsEq1LTczCDv2dAjQ==
diff --git a/openssh/regress/rsa_ssh2.prv b/openssh/regress/rsa_ssh2.prv
new file mode 100644 (file)
index 0000000..1ece3d7
--- /dev/null
@@ -0,0 +1,16 @@
+---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----
+Subject: ssh-keygen test
+Comment: "1024-bit rsa, Sat Jun 23 2001 12:21:26 -0400"
+P2/56wAAAi4AAAA3aWYtbW9kbntzaWdue3JzYS1wa2NzMS1zaGExfSxlbmNyeXB0e3JzYS
+1wa2NzMXYyLW9hZXB9fQAAAARub25lAAAB3wAAAdsAAAARAQABAAAD9icflXO8eQxtKonp
+45gOxXCiZG9hsfkgRpiXXHpUBMhM28C72RR1Dg2xKm4xz7smP2Apm+Y7XLZgIpzQ/+I76L
+95XQv7JCHVHDXyNBmWX7XZP4tmspFq/Tdg28zHSA3CpZjjwq3qG/b8395tDMpF7v34PS3Z
+xOH3aFPvEQ0UsgEAAAQA7IpcCnGijesEjDXdVoEPfh0akBJA9JAk1bba2sxrtDoQVN1JKP
+nRQ9SKdAsXV5jduSUFsTmBe4fznLvD948790U1/O8SkdGM5V0y1/ki7Rf8knm0t8Vj65X0
+VA4YdN4UeVfvMcb78vcInT2CsP6CLcBkrnjrBKtS03Mwg79nQI0AAAH/VdpOHYCMLPl/GF
++uRLMshY55Q6l+MdJ0jo0AdZrCCnxwa3YeVywwU0wsZyoTCdGMf6KYDr39PVxwRcGkJ7Ue
+YgAAAgDWXpLlKafIgS3i0moMORZHD8D86us3xMW4b7GV2/AaP+En5TbOCR18CO0g/WfGiS
+7zOLkP+TO9JW5QzEONIt6NAAACAQEaegYoWMBSQkLA7VWbOlSowelFlU6uo/2FSY+PM0nm
+gE8UZ7j6HWGhJEU4DNo25m3yyxuposKTMHxt/OOqFmoB
+---- END SSH2 ENCRYPTED PRIVATE KEY ----
+---
diff --git a/openssh/regress/runtests.sh b/openssh/regress/runtests.sh
new file mode 100755 (executable)
index 0000000..9808eb8
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+TEST_SSH_SSH=../ssh
+TEST_SSH_SSHD=../sshd
+TEST_SSH_SSHAGENT=../ssh-agent
+TEST_SSH_SSHADD=../ssh-add
+TEST_SSH_SSHKEYGEN=../ssh-keygen
+TEST_SSH_SSHKEYSCAN=../ssh-keyscan
+TEST_SSH_SFTP=../sftp
+TEST_SSH_SFTPSERVER=../sftp-server
+
+pmake
+
diff --git a/openssh/regress/sftp.sh b/openssh/regress/sftp.sh
new file mode 100644 (file)
index 0000000..e8d4731
--- /dev/null
@@ -0,0 +1,29 @@
+#      $OpenBSD: sftp.sh,v 1.2 2002/03/27 22:39:52 markus Exp $
+#      Placed in the Public Domain.
+
+tid="basic sftp put/get"
+
+DATA=/bin/ls
+COPY=${OBJ}/copy
+
+BUFFERSIZE="5 1000 32000 64000"
+REQUESTS="1 2 10"
+
+for B in ${BUFFERSIZE}; do
+       for R in ${REQUESTS}; do
+                verbose "test $tid: buffer_size $B num_requests $R"
+               rm -f ${COPY}.1 ${COPY}.2
+               ${SFTP} -P ${SFTPSERVER} -B $B -R $R -b /dev/stdin \
+               > /dev/null 2>&1 << EOF
+               version
+               get $DATA ${COPY}.1
+               put $DATA ${COPY}.2
+EOF
+               r=$?
+               if [ $r -ne 0 ]; then
+                       fail "sftp failed with $r"
+               fi
+               cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
+               cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
+       done
+done
diff --git a/openssh/regress/ssh-com-client.sh b/openssh/regress/ssh-com-client.sh
new file mode 100644 (file)
index 0000000..84b0b47
--- /dev/null
@@ -0,0 +1,127 @@
+#      $OpenBSD: ssh-com-client.sh,v 1.3 2002/04/10 08:45:30 markus Exp $
+#      Placed in the Public Domain.
+
+tid="connect with ssh.com client"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.1.0
+       2.2.0
+       2.3.0
+       2.3.1
+       2.4.0
+       3.0.0
+       3.1.0"
+
+# 2.0.10 2.0.12 2.0.13 don't like the test setup
+
+# setup authorized keys
+SRC=`dirname ${SCRIPT}`
+cp ${SRC}/dsa_ssh2.prv ${OBJ}/id.com
+chmod 600 ${OBJ}/id.com
+${SSHKEYGEN} -i -f ${OBJ}/id.com       > $OBJ/id.openssh
+chmod 600 ${OBJ}/id.openssh
+${SSHKEYGEN} -y -f ${OBJ}/id.openssh   > $OBJ/authorized_keys_$USER
+${SSHKEYGEN} -e -f ${OBJ}/id.openssh   > $OBJ/id.com.pub
+echo IdKey ${OBJ}/id.com > ${OBJ}/id.list
+
+# we need a DSA host key
+t=dsa
+rm -f                             ${OBJ}/$t ${OBJ}/$t.pub
+${SSHKEYGEN} -q -N '' -t $t -f   ${OBJ}/$t
+$SUDO cp $OBJ/$t $OBJ/host.$t
+echo HostKey $OBJ/host.$t >> $OBJ/sshd_config
+
+# add hostkeys to known hosts
+mkdir -p ${OBJ}/${USER}/hostkeys
+HK=${OBJ}/${USER}/hostkeys/key_${PORT}_127.0.0.1
+${SSHKEYGEN} -e -f ${OBJ}/rsa.pub > ${HK}.ssh-rsa.pub
+${SSHKEYGEN} -e -f ${OBJ}/dsa.pub > ${HK}.ssh-dss.pub
+
+cat > ${OBJ}/ssh2_config << EOF
+*:
+       QuietMode                       yes
+       StrictHostKeyChecking           yes
+       Port                            ${PORT}
+       User                            ${USER}
+       Host                            127.0.0.1
+       IdentityFile                    ${OBJ}/id.list
+       RandomSeedFile                  ${OBJ}/random_seed
+        UserConfigDirectory             ${OBJ}/%U
+       AuthenticationSuccessMsg        no
+       BatchMode                       yes
+       ForwardX11                      no
+EOF
+
+# we need a real server (no ProxyConnect option)
+start_sshd
+
+DATA=/bin/ls
+COPY=${OBJ}/copy
+rm -f ${COPY}
+
+# go for it
+for v in ${VERSIONS}; do
+       ssh2=${TEST_COMBASE}/${v}/ssh2
+       if [ ! -x ${ssh2} ]; then
+               continue
+       fi
+       verbose "ssh2 ${v}"
+       key=ssh-dss
+       skipcat=0
+        case $v in
+        2.1.*|2.3.0)
+                skipcat=1
+                ;;
+        3.0.*)
+                key=ssh-rsa
+                ;;
+        esac
+       cp ${HK}.$key.pub ${HK}.pub
+
+       # check exit status
+       ${ssh2} -q -F ${OBJ}/ssh2_config somehost exit 42
+       r=$?
+        if [ $r -ne 42 ]; then
+                fail "ssh2 ${v} exit code test failed (got $r, expected 42)"
+        fi
+
+       # data transfer
+       rm -f ${COPY}
+       ${ssh2} -F ${OBJ}/ssh2_config somehost cat ${DATA} > ${COPY}
+        if [ $? -ne 0 ]; then
+                fail "ssh2 ${v} cat test (receive) failed"
+        fi
+       cmp ${DATA} ${COPY}     || fail "ssh2 ${v} cat test (receive) data mismatch"
+
+       # data transfer, again
+       if [ $skipcat -eq 0 ]; then
+               rm -f ${COPY}
+               cat ${DATA} | \
+                       ${ssh2} -F ${OBJ}/ssh2_config host "cat > ${COPY}"
+               if [ $? -ne 0 ]; then
+                       fail "ssh2 ${v} cat test (send) failed"
+               fi
+               cmp ${DATA} ${COPY}     || \
+                       fail "ssh2 ${v} cat test (send) data mismatch"
+       fi
+
+       # no stderr after eof
+       rm -f ${COPY}
+       ${ssh2} -F ${OBJ}/ssh2_config somehost \
+               exec sh -c \'"exec > /dev/null; sleep 1; echo bla 1>&2; exit 0"\' \
+               2> /dev/null
+        if [ $? -ne 0 ]; then
+                fail "ssh2 ${v} stderr test failed"
+        fi
+done
+
+rm -rf ${OBJ}/${USER}
+for i in ssh2_config random_seed dsa.pub dsa host.dsa \
+    id.list id.com id.com.pub id.openssh; do
+       rm -f ${OBJ}/$i
+done
diff --git a/openssh/regress/ssh-com-keygen.sh b/openssh/regress/ssh-com-keygen.sh
new file mode 100644 (file)
index 0000000..90ba2fc
--- /dev/null
@@ -0,0 +1,67 @@
+#      $OpenBSD: ssh-com-keygen.sh,v 1.1 2002/03/27 22:40:27 markus Exp $
+#      Placed in the Public Domain.
+
+tid="ssh.com key import"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.0.10
+       2.0.12
+       2.0.13
+       2.1.0
+       2.2.0
+       2.3.0
+       2.3.1
+       2.4.0
+       3.0.0
+       3.1.0"
+
+COMPRV=${OBJ}/comkey
+COMPUB=${COMPRV}.pub
+OPENSSHPRV=${OBJ}/opensshkey
+OPENSSHPUB=${OPENSSHPRV}.pub
+
+# go for it
+for v in ${VERSIONS}; do
+       keygen=${TEST_COMBASE}/${v}/ssh-keygen2
+       if [ ! -x ${keygen} ]; then
+               continue
+       fi
+       types="dss"
+        case $v in
+        2.3.1|3.*)
+                types="$types rsa"
+                ;;
+        esac
+       for t in $types; do
+               verbose "ssh-keygen $v/$t"
+               rm -f $COMPRV $COMPUB $OPENSSHPRV $OPENSSHPUB
+               ${keygen} -q -P -t $t ${COMPRV} > /dev/null 2>&1
+               if [ $? -ne 0 ]; then
+                       fail "${keygen} -t $t failed"
+                       continue
+               fi
+               ${SSHKEYGEN} -if ${COMPUB} > ${OPENSSHPUB}
+               if [ $? -ne 0 ]; then
+                       fail "import public key ($v/$t) failed"
+                       continue
+               fi
+               ${SSHKEYGEN} -if ${COMPRV} > ${OPENSSHPRV}
+               if [ $? -ne 0 ]; then
+                       fail "import private key ($v/$t) failed"
+                       continue
+               fi
+               chmod 600 ${OPENSSHPRV}
+               ${SSHKEYGEN} -yf ${OPENSSHPRV} |\
+                       diff - ${OPENSSHPUB}
+               if [ $? -ne 0 ]; then
+                       fail "public keys ($v/$t) differ"
+               fi
+       done
+done
+
+rm -f $COMPRV $COMPUB $OPENSSHPRV $OPENSSHPUB
diff --git a/openssh/regress/ssh-com-sftp.sh b/openssh/regress/ssh-com-sftp.sh
new file mode 100644 (file)
index 0000000..231efa1
--- /dev/null
@@ -0,0 +1,54 @@
+#      $OpenBSD: ssh-com-sftp.sh,v 1.2 2002/04/10 08:45:30 markus Exp $
+#      Placed in the Public Domain.
+
+tid="basic sftp put/get with ssh.com server"
+
+DATA=/bin/ls
+COPY=${OBJ}/copy
+
+BUFFERSIZE="5 1000 32000 64000"
+REQUESTS="1 2 10"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.0.10
+       2.0.12
+       2.0.13
+       2.1.0
+       2.2.0
+       2.3.0
+       2.3.1
+       2.4.0
+       3.0.0
+       3.1.0"
+
+# go for it
+for v in ${VERSIONS}; do
+       server=${TEST_COMBASE}/${v}/sftp-server2
+       if [ ! -x ${server} ]; then
+               continue
+       fi
+       verbose "sftp-server $v"
+       for B in ${BUFFERSIZE}; do
+               for R in ${REQUESTS}; do
+                       verbose "test $tid: buffer_size $B num_requests $R"
+                       rm -f ${COPY}.1 ${COPY}.2
+                       ${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \
+                       > /dev/null 2>&1 << EOF
+                       version
+                       get $DATA ${COPY}.1
+                       put $DATA ${COPY}.2
+EOF
+                       r=$?
+                       if [ $r -ne 0 ]; then
+                               fail "sftp failed with $r"
+                       fi
+                       cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
+                       cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
+               done
+       done
+done
diff --git a/openssh/regress/ssh-com.sh b/openssh/regress/ssh-com.sh
new file mode 100644 (file)
index 0000000..6a199fa
--- /dev/null
@@ -0,0 +1,112 @@
+#      $OpenBSD: ssh-com.sh,v 1.3 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="connect to ssh.com server"
+
+#TEST_COMBASE=/path/to/ssh/com/binaries
+if [ "X${TEST_COMBASE}" = "X" ]; then
+       fatal '$TEST_COMBASE is not set'
+fi
+
+VERSIONS="
+       2.0.12
+       2.0.13
+       2.1.0
+       2.2.0
+       2.3.0
+       2.3.1
+       2.4.0
+       3.0.0
+       3.1.0"
+# 2.0.10 does not support UserConfigDirectory
+
+SRC=`dirname ${SCRIPT}`
+
+# ssh.com
+cat << EOF > $OBJ/sshd2_config
+*:
+       # Port and ListenAdress are not used.
+       QuietMode                       yes
+       Port                            4343
+       ListenAddress                   127.0.0.1
+       UserConfigDirectory             ${OBJ}/%U
+       Ciphers                         AnyCipher
+       PubKeyAuthentication            yes
+       #AllowedAuthentications         publickey
+       AuthorizationFile               authorization
+       HostKeyFile                     ${SRC}/dsa_ssh2.prv
+       PublicHostKeyFile               ${SRC}/dsa_ssh2.pub
+       RandomSeedFile                  ${OBJ}/random_seed
+       MaxConnections                  0 
+       PermitRootLogin                 yes
+       VerboseMode                     no
+       CheckMail                       no
+       Ssh1Compatibility               no
+EOF
+
+# create client config 
+sed "s/HostKeyAlias.*/HostKeyAlias ssh2-localhost-with-alias/" \
+       < $OBJ/ssh_config > $OBJ/ssh_config_com
+
+# we need a DSA key for
+rm -f                             ${OBJ}/dsa ${OBJ}/dsa.pub
+${SSHKEYGEN} -q -N '' -t dsa -f          ${OBJ}/dsa
+
+# setup userdir, try rsa first
+mkdir -p ${OBJ}/${USER}
+cp /dev/null ${OBJ}/${USER}/authorization
+for t in rsa dsa; do
+       ${SSHKEYGEN} -e -f ${OBJ}/$t.pub        >  ${OBJ}/${USER}/$t.com
+       echo Key $t.com                 >> ${OBJ}/${USER}/authorization
+       echo IdentityFile ${OBJ}/$t     >> ${OBJ}/ssh_config_com
+done
+
+# convert and append DSA hostkey
+(
+       echo -n 'ssh2-localhost-with-alias,127.0.0.1,::1 '
+       ${SSHKEYGEN} -if ${SRC}/dsa_ssh2.pub
+) >> $OBJ/known_hosts
+
+# go for it
+for v in ${VERSIONS}; do
+       sshd2=${TEST_COMBASE}/${v}/sshd2
+       if [ ! -x ${sshd2} ]; then
+               continue
+       fi
+       trace "sshd2 ${v}"
+       PROXY="proxycommand ${sshd2} -qif ${OBJ}/sshd2_config 2> /dev/null"
+       ${SSH} -qF ${OBJ}/ssh_config_com -o "${PROXY}" dummy exit 0
+        if [ $? -ne 0 ]; then
+                fail "ssh connect to sshd2 ${v} failed"
+        fi
+
+       ciphers="3des-cbc blowfish-cbc arcfour"
+       macs="hmac-md5"
+       case $v in
+       2.4.*)
+               ciphers="$ciphers cast128-cbc"
+               macs="$macs hmac-sha1 hmac-sha1-96 hmac-md5-96"
+               ;;
+       3.*)
+               ciphers="$ciphers aes128-cbc cast128-cbc"
+               macs="$macs hmac-sha1 hmac-sha1-96 hmac-md5-96"
+               ;;
+       esac
+       #ciphers="3des-cbc"
+       for m in $macs; do
+       for c in $ciphers; do
+               trace "sshd2 ${v} cipher $c mac $m"
+               verbose "test ${tid}: sshd2 ${v} cipher $c mac $m"
+               ${SSH} -c $c -m $m -qF ${OBJ}/ssh_config_com -o "${PROXY}" dummy exit 0
+               if [ $? -ne 0 ]; then
+                       fail "ssh connect to sshd2 ${v} with $c/$m failed"
+               fi
+       done
+       done
+done
+
+rm -rf ${OBJ}/${USER}
+for i in sshd_config_proxy ssh_config_proxy random_seed \
+       sshd2_config dsa.pub dsa ssh_config_com; do
+       rm -f ${OBJ}/$i
+done
diff --git a/openssh/regress/stderr-after-eof.sh b/openssh/regress/stderr-after-eof.sh
new file mode 100644 (file)
index 0000000..bebd700
--- /dev/null
@@ -0,0 +1,30 @@
+#      $OpenBSD: stderr-after-eof.sh,v 1.1 2002/03/23 16:38:09 markus Exp $
+#      Placed in the Public Domain.
+
+tid="stderr data after eof"
+
+DATA=/etc/motd
+DATA=${OBJ}/data
+COPY=${OBJ}/copy
+
+MD5=md5sum
+
+# setup data
+rm -f ${DATA} ${COPY}
+cp /dev/null ${DATA}
+for i in 1 2 3 4 5 6; do
+       (date;echo $i) | $MD5 >> ${DATA}
+done
+
+${SSH} -2 -F $OBJ/ssh_proxy otherhost \
+       exec sh -c \'"exec > /dev/null; sleep 2; cat ${DATA} 1>&2 $s"\' \
+       2> ${COPY}
+r=$?
+if [ $r -ne 0 ]; then
+       fail "ssh failed with exit code $r"
+fi
+egrep 'Disconnecting: Received extended_data after EOF' ${COPY} &&
+       fail "ext data received after eof"
+cmp ${DATA} ${COPY}    || fail "stderr corrupt"
+
+rm -f ${DATA} ${COPY}
diff --git a/openssh/regress/stderr-data.sh b/openssh/regress/stderr-data.sh
new file mode 100644 (file)
index 0000000..0157690
--- /dev/null
@@ -0,0 +1,33 @@
+#      $OpenBSD: stderr-data.sh,v 1.2 2002/03/27 22:39:52 markus Exp $
+#      Placed in the Public Domain.
+
+tid="stderr data transfer"
+
+DATA=/bin/ls
+COPY=${OBJ}/copy
+rm -f ${COPY}
+
+for n in '' -n; do
+for p in 1 2; do
+       verbose "test $tid: proto $p ($n)"
+       ${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
+               exec sh -c \'"exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
+               2> ${COPY}
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh failed with exit code $r"
+       fi
+       cmp ${DATA} ${COPY}     || fail "stderr corrupt"
+       rm -f ${COPY}
+
+       ${SSH} $n -$p -F $OBJ/ssh_proxy otherhost \
+               exec sh -c \'"echo a; exec > /dev/null; sleep 3; cat ${DATA} 1>&2 $s"\' \
+               > /dev/null 2> ${COPY}
+       r=$?
+       if [ $r -ne 0 ]; then
+               fail "ssh failed with exit code $r"
+       fi
+       cmp ${DATA} ${COPY}     || fail "stderr corrupt"
+       rm -f ${COPY}
+done
+done
diff --git a/openssh/regress/t4.ok b/openssh/regress/t4.ok
new file mode 100644 (file)
index 0000000..8c4942b
--- /dev/null
@@ -0,0 +1 @@
+3b:dd:44:e9:49:18:84:95:f1:e7:33:6b:9d:93:b1:36
diff --git a/openssh/regress/t5.ok b/openssh/regress/t5.ok
new file mode 100644 (file)
index 0000000..bd622f3
--- /dev/null
@@ -0,0 +1 @@
+xokes-lylis-byleh-zebib-kalus-bihas-tevah-haroz-suhar-foved-noxex
diff --git a/openssh/regress/test-exec.sh b/openssh/regress/test-exec.sh
new file mode 100644 (file)
index 0000000..a7a8ddb
--- /dev/null
@@ -0,0 +1,224 @@
+#      $OpenBSD: test-exec.sh,v 1.14 2002/04/15 15:19:48 markus Exp $
+#      Placed in the Public Domain.
+
+PORT=4242
+USER=`id -un`
+SUDO=
+#SUDO=sudo
+
+OBJ=$1
+if [ "x$OBJ" = "x" ]; then
+       echo '$OBJ not defined'
+       exit 2
+fi
+if [ ! -d $OBJ ]; then
+       echo "not a directory: $OBJ"
+       exit 2
+fi
+SCRIPT=$2
+if [ "x$SCRIPT" = "x" ]; then
+       echo '$SCRIPT not defined'
+       exit 2
+fi
+if [ ! -f $SCRIPT ]; then
+       echo "not a file: $SCRIPT"
+       exit 2
+fi
+if sh -n $SCRIPT; then
+       true
+else
+       echo "syntax error in $SCRIPT"
+       exit 2
+fi
+unset SSH_AUTH_SOCK
+
+# defaults
+SSH=ssh
+SSHD=sshd
+SSHAGENT=ssh-agent
+SSHADD=ssh-add
+SSHKEYGEN=ssh-keygen
+SSHKEYSCAN=ssh-keyscan
+SFTP=sftp
+SFTPSERVER=/usr/libexec/openssh/sftp-server
+
+if [ "x$TEST_SSH_SSH" != "x" ]; then
+       SSH=${TEST_SSH_SSH}
+fi
+if [ "x$TEST_SSH_SSHD" != "x" ]; then
+       SSHD=${TEST_SSH_SSHD}
+fi
+if [ "x$TEST_SSH_SSHAGENT" != "x" ]; then
+       SSHAGENT=${TEST_SSH_SSHAGENT}
+fi
+if [ "x$TEST_SSH_SSHADD" != "x" ]; then
+       SSHADD=${TEST_SSH_SSHADD}
+fi
+if [ "x$TEST_SSH_SSHKEYGEN" != "x" ]; then
+       SSHKEYGEN=${TEST_SSH_SSHKEYGEN}
+fi
+if [ "x$TEST_SSH_SSHKEYSCAN" != "x" ]; then
+       SSHKEYSCAN=${TEST_SSH_SSHKEYSCAN}
+fi
+if [ "x$TEST_SSH_SFTP" != "x" ]; then
+       SFTP=${TEST_SSH_SFTP}
+fi
+if [ "x$TEST_SSH_SFTPSERVER" != "x" ]; then
+       SFTPSERVER=${TEST_SSH_SFTPSERVER}
+fi
+
+# these should be used in tests
+export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER
+#echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER
+
+# helper
+cleanup ()
+{
+       if [ -f $PIDFILE ]; then
+               pid=`cat $PIDFILE`
+               if [ "X$pid" = "X" ]; then
+                       echo no sshd running
+               else
+                       if [ $pid -lt 2 ]; then
+                               echo bad pid for ssd: $pid
+                       else
+                               $SUDO kill $pid
+                       fi
+               fi
+       fi
+}
+
+trace ()
+{
+       if [ "X$TEST_SSH_TRACE" = "Xyes" ]; then
+               echo "$@"
+       fi
+}
+
+verbose ()
+{
+       if [ "X$TEST_SSH_QUIET" != "Xyes" ]; then
+               echo "$@"
+       fi
+}
+
+
+fail ()
+{
+       RESULT=1
+       echo "$@"
+}
+
+fatal ()
+{
+       echo -n "FATAL: "
+       fail "$@"
+       cleanup
+       exit $RESULT
+}
+
+RESULT=0
+PIDFILE=$OBJ/pidfile
+
+trap fatal 3 2
+
+# create server config
+cat << EOF > $OBJ/sshd_config
+       Port                    $PORT
+       ListenAddress           127.0.0.1
+       #ListenAddress          ::1
+       PidFile                 $PIDFILE
+       AuthorizedKeysFile      $OBJ/authorized_keys_%u
+       LogLevel                QUIET
+EOF
+
+# server config for proxy connects
+cp $OBJ/sshd_config $OBJ/sshd_proxy
+
+# allow group-writable directories in proxy-mode
+echo 'StrictModes no' >> $OBJ/sshd_proxy
+
+# create client config
+cat << EOF > $OBJ/ssh_config
+Host *
+       Hostname                127.0.0.1
+       HostKeyAlias            localhost-with-alias
+       Port                    $PORT
+       User                    $USER
+       GlobalKnownHostsFile    $OBJ/known_hosts
+       UserKnownHostsFile      $OBJ/known_hosts
+       RSAAuthentication       yes
+       PubkeyAuthentication    yes
+       ChallengeResponseAuthentication no
+       HostbasedAuthentication no
+       PasswordAuthentication  no
+       RhostsAuthentication    no
+       RhostsRSAAuthentication no
+       BatchMode               yes
+       StrictHostKeyChecking   yes
+EOF
+
+rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER
+
+trace "generate keys"
+for t in rsa rsa1; do
+       # generate user key
+       rm -f $OBJ/$t
+       ${SSHKEYGEN} -q -N '' -t $t  -f $OBJ/$t ||\
+               fail "ssh-keygen for $t failed"
+
+       # known hosts file for client
+       (
+               echo -n 'localhost-with-alias,127.0.0.1,::1 '
+               cat $OBJ/$t.pub
+       ) >> $OBJ/known_hosts
+
+       # setup authorized keys
+       cat $OBJ/$t.pub >> $OBJ/authorized_keys_$USER
+       echo IdentityFile $OBJ/$t >> $OBJ/ssh_config
+
+       # use key as host key, too
+       $SUDO cp $OBJ/$t $OBJ/host.$t
+       echo HostKey $OBJ/host.$t >> $OBJ/sshd_config
+
+       # don't use SUDO for proxy connect
+       echo HostKey $OBJ/$t >> $OBJ/sshd_proxy
+done
+chmod 644 $OBJ/authorized_keys_$USER
+
+# create a proxy version of the client config
+(
+       cat $OBJ/ssh_config
+       echo proxycommand ${SSHD} -i -f $OBJ/sshd_proxy
+) > $OBJ/ssh_proxy
+
+# check proxy config
+${SSHD} -t -f $OBJ/sshd_proxy  || fatal "sshd_proxy broken"
+
+start_sshd ()
+{
+       # start sshd
+       $SUDO ${SSHD} -f $OBJ/sshd_config -t    || fatal "sshd_config broken"
+       $SUDO ${SSHD} -f $OBJ/sshd_config
+
+       trace "wait for sshd"
+       i=0;
+       while [ ! -f $PIDFILE -a $i -lt 5 ]; do
+               i=`expr $i + 1`
+               sleep $i
+       done
+
+       test -f $PIDFILE || fatal "no sshd running on port $PORT"
+}
+
+# source test body
+. $SCRIPT
+
+# kill sshd
+cleanup
+if [ $RESULT -eq 0 ]; then
+       verbose ok $tid
+else
+       echo failed $tid
+fi
+exit $RESULT
diff --git a/openssh/regress/transfer.sh b/openssh/regress/transfer.sh
new file mode 100644 (file)
index 0000000..31cdc0c
--- /dev/null
@@ -0,0 +1,29 @@
+#      $OpenBSD: transfer.sh,v 1.1 2002/03/27 00:03:37 markus Exp $
+#      Placed in the Public Domain.
+
+tid="transfer data"
+
+DATA=/bin/ls
+COPY=${OBJ}/copy
+
+for p in 1 2; do
+       verbose "$tid: proto $p"
+       rm -f ${COPY}
+       ${SSH} -n -q -$p -F $OBJ/ssh_proxy somehost cat ${DATA} > ${COPY}
+       if [ $? -ne 0 ]; then
+               fail "ssh cat $DATA failed"
+       fi
+       cmp ${DATA} ${COPY}             || fail "corrupted copy"
+
+       for s in 10 100 1k 32k 64k 128k 256k; do
+               trace "proto $p dd-size ${s}"
+               rm -f ${COPY}
+               dd if=$DATA obs=${s} 2> /dev/null | \
+                       ${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}"
+               if [ $? -ne 0 ]; then
+                       fail "ssh cat $DATA failed"
+               fi
+               cmp $DATA ${COPY}               || fail "corrupted copy"
+       done
+done
+rm -f ${COPY}
diff --git a/openssh/regress/try-ciphers.sh b/openssh/regress/try-ciphers.sh
new file mode 100644 (file)
index 0000000..161f039
--- /dev/null
@@ -0,0 +1,29 @@
+#      $OpenBSD: try-ciphers.sh,v 1.7 2002/04/03 09:30:01 markus Exp $
+#      Placed in the Public Domain.
+
+tid="try ciphers"
+
+ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour 
+       aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se"
+macs="hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96"
+
+for c in $ciphers; do
+       for m in $macs; do
+               trace "proto 2 cipher $c mac $m"
+               verbose "test $tid: proto 2 cipher $c mac $m"
+               ${SSH} -F $OBJ/ssh_proxy -2 -m $m -c $c somehost true
+               if [ $? -ne 0 ]; then
+                       fail "ssh -2 failed with mac $m cipher $c"
+               fi
+       done
+done
+
+ciphers="3des blowfish"
+for c in $ciphers; do
+       trace "proto 1 cipher $c"
+       verbose "test $tid: proto 1 cipher $c"
+       ${SSH} -F $OBJ/ssh_proxy -1 -c $c somehost true
+       if [ $? -ne 0 ]; then
+               fail "ssh -1 failed with cipher $c"
+       fi
+done
diff --git a/openssh/regress/yes-head.sh b/openssh/regress/yes-head.sh
new file mode 100644 (file)
index 0000000..f213f68
--- /dev/null
@@ -0,0 +1,15 @@
+#      $OpenBSD: yes-head.sh,v 1.4 2002/03/15 13:08:56 markus Exp $
+#      Placed in the Public Domain.
+
+tid="yes pipe head"
+
+for p in 1 2; do
+       lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'yes | head -2000' | (sleep 3 ; wc -l)`
+       if [ $? -ne 0 ]; then
+               fail "yes|head test failed"
+               lines = 0;
+       fi
+       if [ $lines -ne 2000 ]; then
+               fail "yes|head returns $lines lines instead of 2000"
+       fi
+done
index c8ba55e78e3d7536aad2f3349f2ed9c2ab0b5b72..448048ea6c773f59602e8a073da7ba6ee1220eb2 100644 (file)
@@ -25,7 +25,7 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include "config.h"
+#include "includes.h"
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/openssh/scard-opensc.c b/openssh/scard-opensc.c
new file mode 100644 (file)
index 0000000..dd21de3
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * Copyright (c) 2002 Juha Yrjölä.  All rights reserved.
+ * Copyright (c) 2001 Markus Friedl.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "includes.h"
+#if defined(SMARTCARD) && defined(USE_OPENSC)
+
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+
+#include <opensc/opensc.h>
+#include <opensc/pkcs15.h>
+
+#include "key.h"
+#include "log.h"
+#include "xmalloc.h"
+#include "readpass.h"
+#include "scard.h"
+
+#if OPENSSL_VERSION_NUMBER < 0x00907000L && defined(CRYPTO_LOCK_ENGINE)
+#define USE_ENGINE
+#define RSA_get_default_method RSA_get_default_openssl_method
+#else
+#endif
+
+#ifdef USE_ENGINE
+#include <openssl/engine.h>
+#define sc_get_rsa sc_get_engine
+#else
+#define sc_get_rsa sc_get_rsa_method
+#endif
+
+static int sc_reader_id;
+static sc_context_t *ctx = NULL;
+static sc_card_t *card = NULL;
+static sc_pkcs15_card_t *p15card = NULL;
+
+static char *sc_pin = NULL;
+
+struct sc_priv_data
+{
+       struct sc_pkcs15_id cert_id;
+       int ref_count;
+};
+
+void
+sc_close(void)
+{
+       if (p15card) {
+               sc_pkcs15_unbind(p15card);
+               p15card = NULL;
+       }
+       if (card) {
+               sc_disconnect_card(card, 0);
+               card = NULL;
+       }
+       if (ctx) {
+               sc_release_context(ctx);
+               ctx = NULL;
+       }
+}
+
+static int 
+sc_init(void)
+{
+       int r;
+
+       r = sc_establish_context(&ctx, "openssh");
+       if (r)
+               goto err;
+       r = sc_connect_card(ctx->reader[sc_reader_id], 0, &card);
+       if (r)
+               goto err;
+       r = sc_pkcs15_bind(card, &p15card);
+       if (r)
+               goto err;
+       return 0;
+err:
+       sc_close();
+       return r;
+}
+
+/* private key operations */
+
+static int
+sc_prkey_op_init(RSA *rsa, struct sc_pkcs15_object **key_obj_out)
+{
+       int r;
+       struct sc_priv_data *priv;
+       struct sc_pkcs15_object *key_obj;
+       struct sc_pkcs15_prkey_info *key;
+       struct sc_pkcs15_object *pin_obj;
+       struct sc_pkcs15_pin_info *pin;
+
+       priv = (struct sc_priv_data *) RSA_get_app_data(rsa);
+       if (priv == NULL)
+               return -1;
+       if (p15card == NULL) {
+               sc_close();
+               r = sc_init();
+               if (r) {
+                       error("SmartCard init failed: %s", sc_strerror(r));
+                       goto err;
+               }
+       }
+       r = sc_pkcs15_find_prkey_by_id(p15card, &priv->cert_id, &key_obj);
+       if (r) {
+               error("Unable to find private key from SmartCard: %s",
+                     sc_strerror(r));
+               goto err;
+       }
+       key = key_obj->data;
+       r = sc_pkcs15_find_pin_by_auth_id(p15card, &key_obj->auth_id,
+                                         &pin_obj);
+       if (r) {
+               error("Unable to find PIN object from SmartCard: %s",
+                     sc_strerror(r));
+               goto err;
+       }
+       pin = pin_obj->data;
+       r = sc_lock(card);
+       if (r) {
+               error("Unable to lock smartcard: %s", sc_strerror(r));
+               goto err;
+       }
+       if (sc_pin != NULL) {
+               r = sc_pkcs15_verify_pin(p15card, pin, sc_pin,
+                                        strlen(sc_pin));
+               if (r) {
+                       sc_unlock(card);
+                       error("PIN code verification failed: %s",
+                             sc_strerror(r));
+                       goto err;
+               }
+       }
+       *key_obj_out = key_obj;
+       return 0;
+err:
+       sc_close();
+       return -1;
+}
+
+static int
+sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
+    int padding)
+{
+       struct sc_pkcs15_object *key_obj;
+       int r;
+
+       if (padding != RSA_PKCS1_PADDING)
+               return -1;      
+       r = sc_prkey_op_init(rsa, &key_obj);
+       if (r)
+               return -1;
+       r = sc_pkcs15_decipher(p15card, key_obj, 0, from, flen, to, flen);
+       sc_unlock(card);
+       if (r < 0) {
+               error("sc_pkcs15_decipher() failed: %s", sc_strerror(r));
+               goto err;
+       }
+       return r;
+err:
+       sc_close();
+       return -1;
+}
+
+static int
+sc_sign(int type, u_char *m, unsigned int m_len,
+       unsigned char *sigret, unsigned int *siglen, RSA *rsa)
+{
+       struct sc_pkcs15_object *key_obj;
+       int r;
+       unsigned long flags = 0;
+
+       r = sc_prkey_op_init(rsa, &key_obj);
+       if (r)
+               return -1;
+       /* FIXME: length of sigret correct? */
+       /* FIXME: check 'type' and modify flags accordingly */
+       flags = SC_ALGORITHM_RSA_PAD_PKCS1 | SC_ALGORITHM_RSA_HASH_SHA1;
+       r = sc_pkcs15_compute_signature(p15card, key_obj, flags,
+                                       m, m_len, sigret, RSA_size(rsa));
+       sc_unlock(card);
+       if (r < 0) {
+               error("sc_pkcs15_compute_signature() failed: %s",
+                     sc_strerror(r));
+               goto err;
+       }
+       *siglen = r;
+       return 1;
+err:
+       sc_close();
+       return 0;
+}
+
+static int
+sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa,
+    int padding)
+{
+       error("Private key encryption not supported");
+       return -1;
+}
+
+/* called on free */
+
+static int (*orig_finish)(RSA *rsa) = NULL;
+
+static int
+sc_finish(RSA *rsa)
+{
+       struct sc_priv_data *priv;
+
+       priv = RSA_get_app_data(rsa);
+       priv->ref_count--;
+       if (priv->ref_count == 0) {
+               free(priv);
+               sc_close();
+       }
+       if (orig_finish)
+               orig_finish(rsa);
+       return 1;
+}
+
+/* engine for overloading private key operations */
+
+static RSA_METHOD *
+sc_get_rsa_method(void)
+{
+       static RSA_METHOD smart_rsa;
+       const RSA_METHOD *def = RSA_get_default_method();
+
+       /* use the OpenSSL version */
+       memcpy(&smart_rsa, def, sizeof(smart_rsa));
+
+       smart_rsa.name          = "opensc";
+
+       /* overload */
+       smart_rsa.rsa_priv_enc  = sc_private_encrypt;
+       smart_rsa.rsa_priv_dec  = sc_private_decrypt;
+       smart_rsa.rsa_sign      = sc_sign;
+
+       /* save original */
+       orig_finish             = def->finish;
+       smart_rsa.finish        = sc_finish;
+
+       return &smart_rsa;
+}
+
+#ifdef USE_ENGINE
+static ENGINE *
+sc_get_engine(void)
+{
+       static ENGINE *smart_engine = NULL;
+
+       if ((smart_engine = ENGINE_new()) == NULL)
+               fatal("ENGINE_new failed");
+
+       ENGINE_set_id(smart_engine, "opensc");
+       ENGINE_set_name(smart_engine, "OpenSC");
+
+       ENGINE_set_RSA(smart_engine, sc_get_rsa_method());
+       ENGINE_set_DSA(smart_engine, DSA_get_default_openssl_method());
+       ENGINE_set_DH(smart_engine, DH_get_default_openssl_method());
+       ENGINE_set_RAND(smart_engine, RAND_SSLeay());
+       ENGINE_set_BN_mod_exp(smart_engine, BN_mod_exp);
+
+       return smart_engine;
+}
+#endif
+
+static void
+convert_rsa_to_rsa1(Key * in, Key * out)
+{
+       struct sc_priv_data *priv;
+       
+       out->rsa->flags = in->rsa->flags;
+       out->flags = in->flags;
+       RSA_set_method(out->rsa, RSA_get_method(in->rsa));
+       BN_copy(out->rsa->n, in->rsa->n);
+       BN_copy(out->rsa->e, in->rsa->e);
+       priv = RSA_get_app_data(in->rsa);
+       priv->ref_count++;
+       RSA_set_app_data(out->rsa, priv);
+       return;
+}
+
+static int 
+sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj)
+{
+       int r;
+       sc_pkcs15_cert_t *cert = NULL;
+       struct sc_priv_data *priv = NULL;
+       sc_pkcs15_cert_info_t *cinfo = cert_obj->data;
+
+       X509 *x509 = NULL;
+       EVP_PKEY *pubkey = NULL;
+       u8 *p;
+       char *tmp;
+       
+       debug("sc_read_pubkey() with cert id %02X", cinfo->id.value[0]);
+       r = sc_pkcs15_read_certificate(p15card, cinfo, &cert);
+       if (r) {
+               log("Certificate read failed: %s", sc_strerror(r));
+               goto err;
+       }
+       x509 = X509_new();
+       if (x509 == NULL) {
+               r = -1; 
+               goto err;
+       }
+       p = cert->data;
+       if (!d2i_X509(&x509, &p, cert->data_len)) {
+               log("Unable to parse X.509 certificate");
+               r = -1;
+               goto err;
+       }
+       sc_pkcs15_free_certificate(cert);
+       cert = NULL;
+       pubkey = X509_get_pubkey(x509);
+       X509_free(x509);
+       x509 = NULL;
+       if (pubkey->type != EVP_PKEY_RSA) {
+               log("Public key is of unknown type");
+               r = -1;
+               goto err;
+       }
+       k->rsa = EVP_PKEY_get1_RSA(pubkey);
+       EVP_PKEY_free(pubkey);
+
+       k->rsa->flags |= RSA_FLAG_SIGN_VER;
+       RSA_set_method(k->rsa, sc_get_rsa_method());
+       priv = xmalloc(sizeof(struct sc_priv_data));
+       priv->cert_id = cinfo->id;
+       priv->ref_count = 1;
+       RSA_set_app_data(k->rsa, priv);
+
+       k->flags = KEY_FLAG_EXT;
+       tmp = key_fingerprint(k, SSH_FP_MD5, SSH_FP_HEX);
+       debug("fingerprint %d %s", key_size(k), tmp);
+       xfree(tmp);
+       
+       return 0;
+err:
+       if (cert)
+               sc_pkcs15_free_certificate(cert);
+       if (pubkey)
+               EVP_PKEY_free(pubkey);
+       if (x509)
+               X509_free(x509);
+       return r;
+}
+
+Key **
+sc_get_keys(const char *id, const char *pin)
+{
+       Key *k, **keys;
+       int i, r, real_count = 0, key_count;
+       sc_pkcs15_id_t cert_id;
+       sc_pkcs15_object_t *certs[32];
+       char *buf = xstrdup(id), *p;
+
+       debug("sc_get_keys called: id = %s", id);
+
+       if (sc_pin != NULL)
+               xfree(sc_pin);
+       sc_pin = (pin == NULL) ? NULL : xstrdup(pin);
+
+       cert_id.len = 0;
+       if ((p = strchr(buf, ':')) != NULL) {
+               *p = 0;
+               p++;
+               sc_pkcs15_hex_string_to_id(p, &cert_id);
+       }
+       r = sscanf(buf, "%d", &sc_reader_id);
+       xfree(buf);
+       if (r != 1)
+               goto err;
+       if (p15card == NULL) {
+               sc_close();
+               r = sc_init();
+               if (r) {
+                       error("Smartcard init failed: %s", sc_strerror(r));
+                       goto err;
+               }
+       }
+       if (cert_id.len) {
+               r = sc_pkcs15_find_cert_by_id(p15card, &cert_id, &certs[0]);
+               if (r < 0)
+                       goto err;
+               key_count = 1;
+       } else {
+               r = sc_pkcs15_get_objects(p15card, SC_PKCS15_TYPE_CERT_X509,
+                                         certs, 32);
+               if (r == 0) {
+                       log("No certificates found on smartcard");
+                       r = -1;
+                       goto err;
+               } else if (r < 0) {
+                       error("Certificate enumeration failed: %s",
+                             sc_strerror(r));
+                       goto err;
+               }
+               key_count = r;
+       }
+       /* FIXME: only keep entries with a corresponding private key */
+       keys = xmalloc(sizeof(Key *) * (key_count*2+1));
+       for (i = 0; i < key_count; i++) {
+               k = key_new(KEY_RSA);
+               if (k == NULL)
+                       break;
+               r = sc_read_pubkey(k, certs[i]);
+               if (r) {
+                       error("sc_read_pubkey failed: %s", sc_strerror(r));
+                       key_free(k);
+                       continue;
+               }
+               keys[real_count] = k;
+               real_count++;
+               k = key_new(KEY_RSA1);
+               if (k == NULL)
+                       break;
+               convert_rsa_to_rsa1(keys[real_count-1], k);
+               keys[real_count] = k;
+               real_count++;
+       }
+       keys[real_count] = NULL;
+
+       return keys;
+err:
+       sc_close();
+       return NULL;
+}
+
+int
+sc_put_key(Key *prv, const char *id)
+{
+       error("key uploading not yet supported");
+       return -1;
+}
+
+#endif /* SMARTCARD */
index e8319314c681b7d861613ced29ba133fa8126484..db0cc4a80ca2be4a9d7d17abdeb4e7a2245a8f82 100644 (file)
  */
 
 #include "includes.h"
-#ifdef SMARTCARD
-RCSID("$OpenBSD: scard.c,v 1.17 2001/12/27 18:22:16 markus Exp $");
+#if defined(SMARTCARD) && defined(USE_SECTOK)
+RCSID("$OpenBSD: scard.c,v 1.25 2002/03/26 18:46:59 rees Exp $");
 
-#include <openssl/engine.h>
+#include <openssl/evp.h>
 #include <sectok.h>
 
 #include "key.h"
 #include "log.h"
 #include "xmalloc.h"
+#include "readpass.h"
 #include "scard.h"
 
+#if OPENSSL_VERSION_NUMBER < 0x00907000L
+#define USE_ENGINE
+#define RSA_get_default_method RSA_get_default_openssl_method
+#else
+#endif
+
+#ifdef USE_ENGINE
+#include <openssl/engine.h>
+#define sc_get_rsa sc_get_engine
+#else
+#define sc_get_rsa sc_get_rsa_method
+#endif
+
 #define CLA_SSH 0x05
 #define INS_DECRYPT 0x10
 #define INS_GET_KEYLENGTH 0x20
@@ -42,10 +56,17 @@ RCSID("$OpenBSD: scard.c,v 1.17 2001/12/27 18:22:16 markus Exp $");
 
 #define MAX_BUF_SIZE 256
 
+u_char DEFAUT0[] = {0xad, 0x9f, 0x61, 0xfe, 0xfa, 0x20, 0xce, 0x63};
+
 static int sc_fd = -1;
 static char *sc_reader_id = NULL;
+static char *sc_pin = NULL;
 static int cla = 0x00; /* class */
 
+static void sc_mk_digest(const char *pin, u_char *digest);
+static int get_AUT0(u_char *aut0);
+static int try_AUT0(void);
+
 /* interface to libsectok */
 
 static int
@@ -126,8 +147,7 @@ sc_read_pubkey(Key * k)
        n = NULL;
 
        if (sc_fd < 0) {
-               status = sc_init();
-               if (status < 0 )
+               if (sc_init() < 0)
                        goto err;
        }
 
@@ -145,6 +165,12 @@ sc_read_pubkey(Key * k)
        n = xmalloc(len);
        /* get n */
        sectok_apdu(sc_fd, CLA_SSH, INS_GET_PUBKEY, 0, 0, 0, NULL, len, n, &sw);
+
+       if (sw == 0x6982) {
+               if (try_AUT0() < 0)
+                       goto err;
+               sectok_apdu(sc_fd, CLA_SSH, INS_GET_PUBKEY, 0, 0, 0, NULL, len, n, &sw);
+       }
        if (!sectok_swOK(sw)) {
                error("could not obtain public key: %s", sectok_get_sw(sw));
                goto err;
@@ -178,7 +204,8 @@ err:
 /* private key operations */
 
 static int
-sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa, int padding)
+sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
+    int padding)
 {
        u_char *padded = NULL;
        int sw, len, olen, status = -1;
@@ -197,16 +224,15 @@ sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa, int padding)
        len = BN_num_bytes(rsa->n);
        padded = xmalloc(len);
 
-       sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, from, 0, NULL, &sw);
-       if (!sectok_swOK(sw)) {
-               error("sc_private_decrypt: INS_DECRYPT failed: %s",
-                   sectok_get_sw(sw));
-               goto err;
+       sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, from, len, padded, &sw);
+
+       if (sw == 0x6982) {
+               if (try_AUT0() < 0)
+                       goto err;
+               sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, from, len, padded, &sw);
        }
-       sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,
-           len, padded, &sw);
        if (!sectok_swOK(sw)) {
-               error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",
+               error("sc_private_decrypt: INS_DECRYPT failed: %s",
                    sectok_get_sw(sw));
                goto err;
        }
@@ -220,7 +246,8 @@ err:
 }
 
 static int
-sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa, int padding)
+sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa,
+    int padding)
 {
        u_char *padded = NULL;
        int sw, len, status = -1;
@@ -238,20 +265,18 @@ sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa, int padding)
        len = BN_num_bytes(rsa->n);
        padded = xmalloc(len);
 
-       if (RSA_padding_add_PKCS1_type_1(padded, len, from, flen) <= 0) {
+       if (RSA_padding_add_PKCS1_type_1(padded, len, (u_char *)from, flen) <= 0) {
                error("RSA_padding_add_PKCS1_type_1 failed");
                goto err;
        }
-       sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, padded, 0, NULL, &sw);
-       if (!sectok_swOK(sw)) {
-               error("sc_private_decrypt: INS_DECRYPT failed: %s",
-                   sectok_get_sw(sw));
-               goto err;
+       sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, padded, len, to, &sw);
+       if (sw == 0x6982) {
+               if (try_AUT0() < 0)
+                       goto err;
+               sectok_apdu(sc_fd, CLA_SSH, INS_DECRYPT, 0, 0, len, padded, len, to, &sw);
        }
-       sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,
-           len, to, &sw);
        if (!sectok_swOK(sw)) {
-               error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",
+               error("sc_private_encrypt: INS_DECRYPT failed: %s",
                    sectok_get_sw(sw));
                goto err;
        }
@@ -275,31 +300,18 @@ sc_finish(RSA *rsa)
        return 1;
 }
 
-
 /* engine for overloading private key operations */
 
-static ENGINE *smart_engine = NULL;
-static RSA_METHOD smart_rsa =
-{
-       "sectok",
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       0,
-       NULL,
-};
-
-ENGINE *
-sc_get_engine(void)
+static RSA_METHOD *
+sc_get_rsa_method(void)
 {
-       RSA_METHOD *def;
+       static RSA_METHOD smart_rsa;
+       const RSA_METHOD *def = RSA_get_default_method();
+
+       /* use the OpenSSL version */
+       memcpy(&smart_rsa, def, sizeof(smart_rsa));
 
-       def = RSA_get_default_openssl_method();
+       smart_rsa.name          = "sectok";
 
        /* overload */
        smart_rsa.rsa_priv_enc  = sc_private_encrypt;
@@ -309,23 +321,22 @@ sc_get_engine(void)
        orig_finish             = def->finish;
        smart_rsa.finish        = sc_finish;
 
-       /* just use the OpenSSL version */
-       smart_rsa.rsa_pub_enc   = def->rsa_pub_enc;
-       smart_rsa.rsa_pub_dec   = def->rsa_pub_dec;
-       smart_rsa.rsa_mod_exp   = def->rsa_mod_exp;
-       smart_rsa.bn_mod_exp    = def->bn_mod_exp;
-       smart_rsa.init          = def->init;
-       smart_rsa.flags         = def->flags;
-       smart_rsa.app_data      = def->app_data;
-       smart_rsa.rsa_sign      = def->rsa_sign;
-       smart_rsa.rsa_verify    = def->rsa_verify;
+       return &smart_rsa;
+}
+
+#ifdef USE_ENGINE
+static ENGINE *
+sc_get_engine(void)
+{
+       static ENGINE *smart_engine = NULL;
 
        if ((smart_engine = ENGINE_new()) == NULL)
                fatal("ENGINE_new failed");
 
        ENGINE_set_id(smart_engine, "sectok");
        ENGINE_set_name(smart_engine, "libsectok");
-       ENGINE_set_RSA(smart_engine, &smart_rsa);
+
+       ENGINE_set_RSA(smart_engine, sc_get_rsa_method());
        ENGINE_set_DSA(smart_engine, DSA_get_default_openssl_method());
        ENGINE_set_DH(smart_engine, DH_get_default_openssl_method());
        ENGINE_set_RAND(smart_engine, RAND_SSLeay());
@@ -333,6 +344,7 @@ sc_get_engine(void)
 
        return smart_engine;
 }
+#endif
 
 void
 sc_close(void)
@@ -343,16 +355,20 @@ sc_close(void)
        }
 }
 
-Key *
-sc_get_key(const char *id)
+Key **
+sc_get_keys(const char *id, const char *pin)
 {
-       Key *k;
-       int status;
+       Key *k, *n, **keys;
+       int status, nkeys = 2;
 
        if (sc_reader_id != NULL)
                xfree(sc_reader_id);
        sc_reader_id = xstrdup(id);
 
+       if (sc_pin != NULL)
+               xfree(sc_pin);
+       sc_pin = (pin == NULL) ? NULL : xstrdup(pin);
+
        k = key_new(KEY_RSA);
        if (k == NULL) {
                return NULL;
@@ -367,6 +383,175 @@ sc_get_key(const char *id)
                key_free(k);
                return NULL;
        }
-       return k;
+       keys = xmalloc((nkeys+1) * sizeof(Key *));
+
+       n = key_new(KEY_RSA1);
+       BN_copy(n->rsa->n, k->rsa->n);
+       BN_copy(n->rsa->e, k->rsa->e);
+       RSA_set_method(n->rsa, sc_get_rsa());
+       n->flags |= KEY_FLAG_EXT;
+       keys[0] = n;
+
+       n = key_new(KEY_RSA);
+       BN_copy(n->rsa->n, k->rsa->n);
+       BN_copy(n->rsa->e, k->rsa->e);
+       RSA_set_method(n->rsa, sc_get_rsa());
+       n->flags |= KEY_FLAG_EXT;
+       keys[1] = n;
+
+       keys[2] = NULL;
+
+       key_free(k);
+       return keys;
+}
+
+#define NUM_RSA_KEY_ELEMENTS 5+1
+#define COPY_RSA_KEY(x, i) \
+       do { \
+               len = BN_num_bytes(prv->rsa->x); \
+               elements[i] = xmalloc(len); \
+               debug("#bytes %d", len); \
+               if (BN_bn2bin(prv->rsa->x, elements[i]) < 0) \
+                       goto done; \
+       } while (0)
+
+static void
+sc_mk_digest(const char *pin, u_char *digest)
+{
+       const EVP_MD *evp_md = EVP_sha1();
+       EVP_MD_CTX md;
+
+       EVP_DigestInit(&md, evp_md);
+       EVP_DigestUpdate(&md, pin, strlen(pin));
+       EVP_DigestFinal(&md, digest, NULL);
+}
+
+static int
+get_AUT0(u_char *aut0)
+{
+       char *pass;
+
+       pass = read_passphrase("Enter passphrase for smartcard: ", RP_ALLOW_STDIN);
+       if (pass == NULL)
+               return -1;
+       if (!strcmp(pass, "-")) {
+               memcpy(aut0, DEFAUT0, sizeof DEFAUT0);
+               return 0;
+       }
+       sc_mk_digest(pass, aut0);
+       memset(pass, 0, strlen(pass));
+       xfree(pass);
+       return 0;
+}
+
+static int
+try_AUT0(void)
+{
+       u_char aut0[EVP_MAX_MD_SIZE];
+
+       /* permission denied; try PIN if provided */
+       if (sc_pin && strlen(sc_pin) > 0) {
+               sc_mk_digest(sc_pin, aut0);
+               if (cyberflex_verify_AUT0(sc_fd, cla, aut0, 8) < 0) {
+                       error("smartcard passphrase incorrect");
+                       return (-1);
+               }
+       } else {
+               /* try default AUT0 key */
+               if (cyberflex_verify_AUT0(sc_fd, cla, DEFAUT0, 8) < 0) {
+                       /* default AUT0 key failed; prompt for passphrase */
+                       if (get_AUT0(aut0) < 0 ||
+                           cyberflex_verify_AUT0(sc_fd, cla, aut0, 8) < 0) {
+                               error("smartcard passphrase incorrect");
+                               return (-1);
+                       }
+               }
+       }
+       return (0);
+}
+
+int
+sc_put_key(Key *prv, const char *id)
+{
+       u_char *elements[NUM_RSA_KEY_ELEMENTS];
+       u_char key_fid[2];
+       u_char AUT0[EVP_MAX_MD_SIZE];
+       int len, status = -1, i, fd = -1, ret;
+       int sw = 0, cla = 0x00;
+
+       for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++)
+               elements[i] = NULL;
+
+       COPY_RSA_KEY(q, 0);
+       COPY_RSA_KEY(p, 1);
+       COPY_RSA_KEY(iqmp, 2);
+       COPY_RSA_KEY(dmq1, 3);
+       COPY_RSA_KEY(dmp1, 4);
+       COPY_RSA_KEY(n, 5);
+       len = BN_num_bytes(prv->rsa->n);
+       fd = sectok_friendly_open(id, STONOWAIT, &sw);
+       if (fd < 0) {
+               error("sectok_open failed: %s", sectok_get_sw(sw));
+               goto done;
+       }
+       if (! sectok_cardpresent(fd)) {
+               error("smartcard in reader %s not present", id);
+               goto done;
+       }
+       ret = sectok_reset(fd, 0, NULL, &sw);
+       if (ret <= 0) {
+               error("sectok_reset failed: %s", sectok_get_sw(sw));
+               goto done;
+       }
+       if ((cla = cyberflex_inq_class(fd)) < 0) {
+               error("cyberflex_inq_class failed");
+               goto done;
+       }
+       memcpy(AUT0, DEFAUT0, sizeof(DEFAUT0));
+       if (cyberflex_verify_AUT0(fd, cla, AUT0, sizeof(DEFAUT0)) < 0) {
+               if (get_AUT0(AUT0) < 0 ||
+                   cyberflex_verify_AUT0(fd, cla, AUT0, sizeof(DEFAUT0)) < 0) {
+                       memset(AUT0, 0, sizeof(DEFAUT0));
+                       error("smartcard passphrase incorrect");
+                       goto done;
+               }
+       }
+       memset(AUT0, 0, sizeof(DEFAUT0));
+       key_fid[0] = 0x00;
+       key_fid[1] = 0x12;
+       if (cyberflex_load_rsa_priv(fd, cla, key_fid, 5, 8*len, elements,
+           &sw) < 0) {
+               error("cyberflex_load_rsa_priv failed: %s", sectok_get_sw(sw));
+               goto done;
+       }
+       if (!sectok_swOK(sw))
+               goto done;
+       log("cyberflex_load_rsa_priv done");
+       key_fid[0] = 0x73;
+       key_fid[1] = 0x68;
+       if (cyberflex_load_rsa_pub(fd, cla, key_fid, len, elements[5],
+           &sw) < 0) {
+               error("cyberflex_load_rsa_pub failed: %s", sectok_get_sw(sw));
+               goto done;
+       }
+       if (!sectok_swOK(sw))
+               goto done;
+       log("cyberflex_load_rsa_pub done");
+       status = 0;
+
+done:
+       memset(elements[0], '\0', BN_num_bytes(prv->rsa->q));
+       memset(elements[1], '\0', BN_num_bytes(prv->rsa->p));
+       memset(elements[2], '\0', BN_num_bytes(prv->rsa->iqmp));
+       memset(elements[3], '\0', BN_num_bytes(prv->rsa->dmq1));
+       memset(elements[4], '\0', BN_num_bytes(prv->rsa->dmp1));
+       memset(elements[5], '\0', BN_num_bytes(prv->rsa->n));
+
+       for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++)
+               if (elements[i])
+                       xfree(elements[i]);
+       if (fd != -1)
+               sectok_close(fd);
+       return (status);
 }
-#endif /* SMARTCARD */
+#endif /* SMARTCARD && USE_SECTOK */
index 6ca99169b55b843dd1adad444e4e96e6b1a93f2a..c0aa9ed30c284cfa4c93a09c3a47be242d9920b6 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: scard.h,v 1.7 2002/03/04 17:27:39 stevesk Exp $       */
+/*     $OpenBSD: scard.h,v 1.10 2002/03/25 17:34:27 markus Exp $       */
 
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <openssl/engine.h>
-
 #ifndef SCARD_H
 #define SCARD_H
 
+#include "key.h"
+
 #define SCARD_ERROR_FAIL       -1
 #define SCARD_ERROR_NOCARD     -2
 #define SCARD_ERROR_APPLET     -3
 
-Key    *sc_get_key(const char*);
-ENGINE *sc_get_engine(void);
+Key    **sc_get_keys(const char*, const char*);
 void    sc_close(void);
+int     sc_put_key(Key *, const char*);
 
 #endif
index f2d596a6459510262292ccdb60c428923eaad630..07433c191d7e04b72792d03c8fb0b48bcf1e071d 100644 (file)
@@ -11,13 +11,14 @@ VPATH=@srcdir@
 
 all:
 
-Ssh.bin:  Ssh.bin.uu
-       uudecode Ssh.bin.uu
+#Ssh.bin:  Ssh.bin.uu
+#      uudecode Ssh.bin.uu
 
 clean:
-       rm -rf Ssh.bin
+#      rm -rf Ssh.bin
 
-distprep: Ssh.bin
+distprep:
+       uudecode Ssh.bin.uu
 
 distclean: clean
        rm -f Makefile *~
index 83e7769d6458380b2a3ba0f59e697c51c79a524c..1fab48385688c1289b6c8ff473af3c699d91c11a 100644 (file)
@@ -75,7 +75,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.86 2001/12/05 03:56:39 itojun Exp $");
+RCSID("$OpenBSD: scp.c,v 1.88 2002/04/06 18:24:09 mouring Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
@@ -94,14 +94,6 @@ char *__progname;
 /* alarm() interval for updating progress meter */
 #define PROGRESSTIME   1
 
-/* Progress meter bar */
-#define BAR \
-       "************************************************************"\
-       "************************************************************"\
-       "************************************************************"\
-       "************************************************************"
-#define MAX_BARLENGTH (sizeof(BAR) - 1)
-
 /* Visual statistics about files as they are transferred. */
 void progressmeter(int);
 
@@ -782,7 +774,7 @@ sink(argc, argv)
                                cursize = need;
                        }
                        (void) snprintf(namebuf, need, "%s%s%s", targ,
-                           *targ ? "/" : "", cp);
+                           strcmp(targ, "/") ? "/" : "", cp);
                        np = namebuf;
                } else
                        np = targ;
@@ -1116,7 +1108,7 @@ progressmeter(int flag)
        off_t cursize, abbrevsize;
        double elapsed;
        int ratio, barlength, i, remaining;
-       char buf[256];
+       char buf[512];
 
        if (flag == -1) {
                (void) gettimeofday(&start, (struct timezone *) 0);
@@ -1138,11 +1130,18 @@ progressmeter(int flag)
        snprintf(buf, sizeof(buf), "\r%-20.20s %3d%% ", curfile, ratio);
 
        barlength = getttywidth() - 51;
-       barlength = (barlength <= MAX_BARLENGTH)?barlength:MAX_BARLENGTH;
        if (barlength > 0) {
                i = barlength * ratio / 100;
                snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-                        "|%.*s%*s|", i, BAR, barlength - i, "");
+                   "|%.*s%*s|", i,
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************"
+                   "*******************************************************",
+                   barlength - i, "");
        }
        i = 0;
        abbrevsize = cursize;
index 9bbd994ca556417462dee5f9dbfcc79eeb4789b0..5f8e74e331bab5aac38cc6193b5486a591427f37 100644 (file)
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.101 2002/02/04 12:15:25 markus Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.109 2002/05/15 21:02:52 markus Exp $");
 
-#if defined(KRB4) || defined(KRB5)
+#if defined(KRB4)
+#include <krb.h>
+#endif
+#if defined(KRB5)
+#ifdef HEIMDAL
 #include <krb.h>
+#else
+/* Bodge - but then, so is using the kerberos IV KEYFILE to get a Kerberos V
+ * keytab */
+#define KEYFILE "/etc/krb5.keytab"
+#endif
 #endif
 #ifdef AFS
 #include <kafs.h>
@@ -36,6 +45,8 @@ static void add_one_listen_addr(ServerOptions *, char *, u_short);
 
 /* AF_UNSPEC or AF_INET or AF_INET6 */
 extern int IPv4or6;
+/* Use of privilege separation or not */
+extern int use_privsep;
 
 /* Initializes the server options to their default values. */
 
@@ -110,6 +121,9 @@ initialize_server_options(ServerOptions *options)
        options->client_alive_count_max = -1;
        options->authorized_keys_file = NULL;
        options->authorized_keys_file2 = NULL;
+
+       /* Needs to be accessable in many places */
+       use_privsep = -1;
 }
 
 void
@@ -186,7 +200,7 @@ fill_default_server_options(ServerOptions *options)
                options->pubkey_authentication = 1;
 #if defined(KRB4) || defined(KRB5)
        if (options->kerberos_authentication == -1)
-               options->kerberos_authentication = (access(KEYFILE, R_OK) == 0);
+               options->kerberos_authentication = 0;
        if (options->kerberos_or_local_passwd == -1)
                options->kerberos_or_local_passwd = 1;
        if (options->kerberos_ticket_cleanup == -1)
@@ -198,7 +212,7 @@ fill_default_server_options(ServerOptions *options)
 #endif
 #ifdef AFS
        if (options->afs_token_passing == -1)
-               options->afs_token_passing = k_hasafs();
+               options->afs_token_passing = 0;
 #endif
        if (options->password_authentication == -1)
                options->password_authentication = 1;
@@ -235,6 +249,10 @@ fill_default_server_options(ServerOptions *options)
        }
        if (options->authorized_keys_file == NULL)
                options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS;
+
+       /* Turn privilege separation _off_ by default */
+       if (use_privsep == -1)
+               use_privsep = 0;
 }
 
 /* Keyword tokens. */
@@ -267,6 +285,7 @@ typedef enum {
        sBanner, sVerifyReverseMapping, sHostbasedAuthentication,
        sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
        sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
+       sUsePrivilegeSeparation,
        sDeprecated
 } ServerOpCodes;
 
@@ -342,6 +361,7 @@ static struct {
        { "clientalivecountmax", sClientAliveCountMax },
        { "authorizedkeysfile", sAuthorizedKeysFile },
        { "authorizedkeysfile2", sAuthorizedKeysFile2 },
+       { "useprivilegeseparation", sUsePrivilegeSeparation},
        { NULL, sBadOption }
 };
 
@@ -718,6 +738,10 @@ parse_flag:
                intptr = &options->allow_tcp_forwarding;
                goto parse_flag;
 
+       case sUsePrivilegeSeparation:
+               intptr = &use_privsep;
+               goto parse_flag;
+
        case sAllowUsers:
                while ((arg = strdelim(&cp)) && *arg != '\0') {
                        if (options->num_allow_users >= MAX_ALLOW_USERS)
index 3134b222a8c3999d944bbb02591fbee0cda2de54..c4e5b5f42bf388e51103f9248d3ac808a00ded0a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: servconf.h,v 1.54 2002/03/04 17:27:39 stevesk Exp $   */
+/*     $OpenBSD: servconf.h,v 1.57 2002/03/20 19:12:25 stevesk Exp $   */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -130,7 +130,6 @@ typedef struct {
        char   *authorized_keys_file;   /* File containing public keys */
        char   *authorized_keys_file2;
        int     pam_authentication_via_kbd_int;
-
 }       ServerOptions;
 
 void    initialize_server_options(ServerOptions *);
index 46b12ee3d3d73cde2992875d026bb0c865e8e648..38b1cf7ba8074a92cd7f202e2a94ed3e2258a4b7 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: serverloop.c,v 1.98 2002/02/06 14:55:16 markus Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.101 2002/03/30 18:51:15 markus Exp $");
 
 #include "xmalloc.h"
 #include "packet.h"
@@ -318,9 +318,6 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
                tv.tv_usec = 1000 * (max_time_milliseconds % 1000);
                tvp = &tv;
        }
-       if (tvp!=NULL)
-               debug3("tvp!=NULL kid %d mili %d", (int) child_terminated,
-                   max_time_milliseconds);
 
        /* Wait for something to happen, or the timeout to expire. */
        ret = select((*maxfdp)+1, *readsetp, *writesetp, NULL, tvp);
@@ -673,10 +670,10 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
        /* We no longer want our SIGCHLD handler to be called. */
        mysignal(SIGCHLD, SIG_DFL);
 
-       wait_pid = waitpid(-1, &wait_status, 0);
-       if (wait_pid == -1)
-               packet_disconnect("wait: %.100s", strerror(errno));
-       else if (wait_pid != pid)
+       while ((wait_pid = waitpid(-1, &wait_status, 0)) < 0)
+               if (errno != EINTR)
+                       packet_disconnect("wait: %.100s", strerror(errno));
+       if (wait_pid != pid)
                error("Strange, wait returned pid %d, expected %d",
                    wait_pid, pid);
 
@@ -726,8 +723,10 @@ collect_children(void)
        sigaddset(&nset, SIGCHLD);
        sigprocmask(SIG_BLOCK, &nset, &oset);
        if (child_terminated) {
-               while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
-                       session_close_by_pid(pid, status);
+               while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
+                   (pid < 0 && errno == EINTR))
+                       if (pid > 0)
+                               session_close_by_pid(pid, status);
                child_terminated = 0;
        }
        sigprocmask(SIG_SETMASK, &oset, NULL);
@@ -784,7 +783,7 @@ server_loop2(Authctxt *authctxt)
        channel_free_all();
 
        /* free remaining sessions, e.g. remove wtmp entries */
-       session_destroy_all();
+       session_destroy_all(NULL);
 }
 
 static void
index a31ff85d84929e984a906202318af106a5816220..10d803e989c8d747efe44ee54f695f4f8d6310fd 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.128 2002/02/16 00:51:44 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.134 2002/03/29 18:59:31 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -56,6 +56,7 @@ RCSID("$OpenBSD: session.c,v 1.128 2002/02/16 00:51:44 markus Exp $");
 #include "serverloop.h"
 #include "canohost.h"
 #include "session.h"
+#include "monitor_wrap.h"
 
 #ifdef HAVE_CYGWIN
 #include <windows.h>
@@ -63,39 +64,11 @@ RCSID("$OpenBSD: session.c,v 1.128 2002/02/16 00:51:44 markus Exp $");
 #define is_winnt       (GetVersion() < 0x80000000)
 #endif
 
-/* types */
-
-#define TTYSZ 64
-typedef struct Session Session;
-struct Session {
-       int     used;
-       int     self;
-       struct passwd *pw;
-       Authctxt *authctxt;
-       pid_t   pid;
-       /* tty */
-       char    *term;
-       int     ptyfd, ttyfd, ptymaster;
-       int     row, col, xpixel, ypixel;
-       char    tty[TTYSZ];
-       /* X11 */
-       int     display_number;
-       char    *display;
-       int     screen;
-       char    *auth_display;
-       char    *auth_proto;
-       char    *auth_data;
-       int     single_connection;
-       /* proto 2 */
-       int     chanid;
-       int     is_subsystem;
-};
-
 /* func */
 
 Session *session_new(void);
 void   session_set_fds(Session *, int, int, int);
-static void    session_pty_cleanup(void *);
+void   session_pty_cleanup(void *);
 void   session_proctitle(Session *);
 int    session_setup_x11fwd(Session *);
 void   do_exec_pty(Session *, const char *);
@@ -112,7 +85,6 @@ int  check_quietlogin(Session *, const char *);
 static void do_authenticated1(Authctxt *);
 static void do_authenticated2(Authctxt *);
 
-static void session_close(Session *);
 static int session_pty_req(Session *);
 
 /* import */
@@ -136,7 +108,7 @@ char *aixloginmsg;
 #endif /* WITH_AIXAUTHENTICATE */
 
 #ifdef HAVE_LOGIN_CAP
-static login_cap_t *lc;
+login_cap_t *lc;
 #endif
 
 void
@@ -151,18 +123,6 @@ do_authenticated(Authctxt *authctxt)
                close(startup_pipe);
                startup_pipe = -1;
        }
-#if defined(HAVE_LOGIN_CAP) && defined(HAVE_PW_CLASS_IN_PASSWD)
-       if ((lc = login_getclass(authctxt->pw->pw_class)) == NULL) {
-               error("unable to get login class");
-               return;
-       }
-#ifdef BSD_AUTH
-       if (auth_approval(NULL, lc, authctxt->pw->pw_name, "ssh") <= 0) {
-               packet_disconnect("Approval failure for %s",
-                   authctxt->pw->pw_name);
-       }
-#endif
-#endif
 #ifdef WITH_AIXAUTHENTICATE
        /* We don't have a pty yet, so just label the line as "ssh" */
        if (loginsuccess(authctxt->user,
@@ -659,10 +619,8 @@ void
 do_login(Session *s, const char *command)
 {
        char *time_string;
-       char hostname[MAXHOSTNAMELEN];
        socklen_t fromlen;
        struct sockaddr_storage from;
-       time_t last_login_time;
        struct passwd * pw = s->pw;
        pid_t pid = getpid();
 
@@ -680,17 +638,12 @@ do_login(Session *s, const char *command)
                }
        }
 
-       /* Get the time and hostname when the user last logged in. */
-       if (options.print_lastlog) {
-               hostname[0] = '\0';
-               last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,
-                   hostname, sizeof(hostname));
-       }
-
        /* Record that there was a login on that tty from the remote host. */
-       record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
-           get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping),
-           (struct sockaddr *)&from);
+       if (!use_privsep)
+               record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
+                   get_remote_name_or_ip(utmp_len,
+                   options.verify_reverse_mapping),
+                   (struct sockaddr *)&from);
 
 #ifdef USE_PAM
        /*
@@ -715,14 +668,15 @@ do_login(Session *s, const char *command)
                printf("%s\n", aixloginmsg);
 #endif /* WITH_AIXAUTHENTICATE */
 
-       if (options.print_lastlog && last_login_time != 0) {
-               time_string = ctime(&last_login_time);
+       if (options.print_lastlog && s->last_login_time != 0) {
+               time_string = ctime(&s->last_login_time);
                if (strchr(time_string, '\n'))
                        *strchr(time_string, '\n') = 0;
-               if (strcmp(hostname, "") == 0)
+               if (strcmp(s->hostname, "") == 0)
                        printf("Last login: %s\r\n", time_string);
                else
-                       printf("Last login: %s from %s\r\n", time_string, hostname);
+                       printf("Last login: %s from %s\r\n", time_string,
+                           s->hostname);
        }
 
        do_motd();
@@ -917,7 +871,12 @@ do_setup_env(Session *s, const char *shell)
                 * needed for loading shared libraries. So the path better
                 * remains intact here.
                 */
+#  ifdef SUPERUSER_PATH
+               child_set_env(&env, &envsize, "PATH", 
+                   s->pw->pw_uid == 0 ? SUPERUSER_PATH : _PATH_STDPATH);
+#  else 
                child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
+#  endif /* SUPERUSER_PATH */
 # endif /* HAVE_CYGWIN */
 #endif /* HAVE_LOGIN_CAP */
 
@@ -1099,7 +1058,7 @@ do_nologin(struct passwd *pw)
 }
 
 /* Set login name, uid, gid, and groups. */
-static void
+void
 do_setusercontext(struct passwd *pw)
 {
 #ifdef HAVE_CYGWIN
@@ -1154,6 +1113,27 @@ do_setusercontext(struct passwd *pw)
                fatal("Failed to set uids to %u.", (u_int) pw->pw_uid);
 }
 
+static void
+launch_login(struct passwd *pw, const char *hostname)
+{
+       /* Launch login(1). */
+
+       execl("/usr/bin/login", "login", "-h", hostname,
+#ifdef xxxLOGIN_NEEDS_TERM
+                    (s->term ? s->term : "unknown"),
+#endif /* LOGIN_NEEDS_TERM */
+#ifdef LOGIN_NO_ENDOPT
+           "-p", "-f", pw->pw_name, (char *)NULL);
+#else
+           "-p", "-f", "--", pw->pw_name, (char *)NULL);
+#endif
+
+       /* Login couldn't be executed, die. */
+
+       perror("login");
+       exit(1);
+}
+
 /*
  * Performs common processing for the child, such as setting up the
  * environment, closing extra file descriptors, setting the user and group
@@ -1279,18 +1259,8 @@ do_child(Session *s, const char *command)
        signal(SIGPIPE,  SIG_DFL);
 
        if (options.use_login) {
-               /* Launch login(1). */
-
-               execl(LOGIN_PROGRAM, "login", "-h", hostname,
-#ifdef LOGIN_NEEDS_TERM
-                   (s->term ? s->term : "unknown"),
-#endif /* LOGIN_NEEDS_TERM */
-                   "-p", "-f", "--", pw->pw_name, (char *)NULL);
-
-               /* Login couldn't be executed, die. */
-
-               perror("login");
-               exit(1);
+               launch_login(pw, hostname);
+               /* NEVERREACHED */
        }
 
        /* Get the last component of the shell name. */
@@ -1400,6 +1370,22 @@ session_open(Authctxt *authctxt, int chanid)
        return 1;
 }
 
+Session *
+session_by_tty(char *tty)
+{
+       int i;
+       for (i = 0; i < MAX_SESSIONS; i++) {
+               Session *s = &sessions[i];
+               if (s->used && s->ttyfd != -1 && strcmp(s->tty, tty) == 0) {
+                       debug("session_by_tty: session %d tty %s", i, tty);
+                       return s;
+               }
+       }
+       debug("session_by_tty: unknown tty %.100s", tty);
+       session_dump();
+       return NULL;
+}
+
 static Session *
 session_by_channel(int id)
 {
@@ -1457,6 +1443,12 @@ session_pty_req(Session *s)
                packet_disconnect("Protocol error: you already have a pty.");
                return 0;
        }
+       /* Get the time and hostname when the user last logged in. */
+       if (options.print_lastlog) {
+               s->hostname[0] = '\0';
+               s->last_login_time = get_last_login_time(s->pw->pw_uid,
+                   s->pw->pw_name, s->hostname, sizeof(s->hostname));
+       }
 
        s->term = packet_get_string(&len);
 
@@ -1477,7 +1469,7 @@ session_pty_req(Session *s)
 
        /* Allocate a pty and open it. */
        debug("Allocating pty.");
-       if (!pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty))) {
+       if (!PRIVSEP(pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)))) {
                if (s->term)
                        xfree(s->term);
                s->term = NULL;
@@ -1498,7 +1490,8 @@ session_pty_req(Session *s)
         * time in case we call fatal() (e.g., the connection gets closed).
         */
        fatal_add_cleanup(session_pty_cleanup, (void *)s);
-       pty_setowner(s->pw, s->tty);
+       if (!use_privsep)
+               pty_setowner(s->pw, s->tty);
 
        /* Set window size from the packet. */
        pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel);
@@ -1661,8 +1654,8 @@ session_set_fds(Session *s, int fdin, int fdout, int fderr)
  * Function to perform pty cleanup. Also called if we get aborted abnormally
  * (e.g., due to a dropped connection).
  */
-static void
-session_pty_cleanup(void *session)
+void
+session_pty_cleanup2(void *session)
 {
        Session *s = session;
 
@@ -1680,7 +1673,8 @@ session_pty_cleanup(void *session)
                record_logout(s->pid, s->tty, s->pw->pw_name);
 
        /* Release the pseudo-tty. */
-       pty_release(s->tty);
+       if (getuid() == 0)
+               pty_release(s->tty);
 
        /*
         * Close the server side of the socket pairs.  We must do this after
@@ -1688,12 +1682,18 @@ session_pty_cleanup(void *session)
         * while we're still cleaning up.
         */
        if (close(s->ptymaster) < 0)
-               error("close(s->ptymaster): %s", strerror(errno));
+               error("close(s->ptymaster/%d): %s", s->ptymaster, strerror(errno));
 
        /* unlink pty from session */
        s->ttyfd = -1;
 }
 
+void
+session_pty_cleanup(void *session)
+{
+       PRIVSEP(session_pty_cleanup2(session));
+}
+
 static void
 session_exit_message(Session *s, int status)
 {
@@ -1739,7 +1739,7 @@ session_exit_message(Session *s, int status)
        s->chanid = -1;
 }
 
-static void
+void
 session_close(Session *s)
 {
        debug("session_close: session %d pid %d", s->self, s->pid);
@@ -1806,13 +1806,17 @@ session_close_by_channel(int id, void *arg)
 }
 
 void
-session_destroy_all(void)
+session_destroy_all(void (*closefunc)(Session *))
 {
        int i;
        for (i = 0; i < MAX_SESSIONS; i++) {
                Session *s = &sessions[i];
-               if (s->used)
-                       session_close(s);
+               if (s->used) {
+                       if (closefunc != NULL)
+                               closefunc(s);
+                       else
+                               session_close(s);
+               }
        }
 }
 
index ec8284a5f68faf73b3ba8d72cbc42a125bb20ec5..2a7e4b224fd475d2c839497eb90683eda2999a85 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: session.h,v 1.14 2002/02/03 17:53:25 markus Exp $     */
+/*     $OpenBSD: session.h,v 1.17 2002/03/29 18:59:32 markus Exp $     */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
 #ifndef SESSION_H
 #define SESSION_H
 
+#define TTYSZ 64
+typedef struct Session Session;
+struct Session {
+       int     used;
+       int     self;
+       struct passwd *pw;
+       Authctxt *authctxt;
+       pid_t   pid;
+       /* tty */
+       char    *term;
+       int     ptyfd, ttyfd, ptymaster;
+       int     row, col, xpixel, ypixel;
+       char    tty[TTYSZ];
+       /* last login */
+       char    hostname[MAXHOSTNAMELEN];
+       time_t  last_login_time;
+       /* X11 */
+       int     display_number;
+       char    *display;
+       int     screen;
+       char    *auth_display;
+       char    *auth_proto;
+       char    *auth_data;
+       int     single_connection;
+       /* proto 2 */
+       int     chanid;
+       int     is_subsystem;
+};
+
 void    do_authenticated(Authctxt *);
 
 int     session_open(Authctxt*, int);
 int     session_input_channel_req(Channel *, const char *);
 void    session_close_by_pid(pid_t, int);
 void    session_close_by_channel(int, void *);
-void    session_destroy_all(void);
+void    session_destroy_all(void (*)(Session *));
+void    session_pty_cleanup2(void *);
 
+Session        *session_new(void);
+Session        *session_by_tty(char *);
+void    session_close(Session *);
+void    do_setusercontext(struct passwd *);
 #endif
index 17ac14a95e31c8dfe104ec5d6e53106a732ec27f..0d42696ae4459a2e6cf4586c2a035c89e1639999 100644 (file)
 /* XXX: copy between two remote sites */
 
 #include "includes.h"
-RCSID("$OpenBSD: sftp-client.c,v 1.24 2002/02/24 16:57:19 markus Exp $");
+RCSID("$OpenBSD: sftp-client.c,v 1.31 2002/04/06 00:30:08 djm Exp $");
 
-#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
-#include <sys/queue.h>
-#else
 #include "openbsd-compat/fake-queue.h"
-#endif
 
 #include "buffer.h"
 #include "bufaux.h"
@@ -274,7 +270,7 @@ do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests)
 
        /* Some filexfer v.0 servers don't support large packets */
        if (version == 0)
-               ret->transfer_buflen = MAX(ret->transfer_buflen, 20480);
+               ret->transfer_buflen = MIN(ret->transfer_buflen, 20480);
 
        return(ret);
 }
@@ -449,7 +445,7 @@ do_rm(struct sftp_conn *conn, char *path)
        debug2("Sending SSH2_FXP_REMOVE \"%s\"", path);
 
        id = conn->msg_id++;
-       send_string_request(conn->fd_out, id, SSH2_FXP_REMOVE, path, 
+       send_string_request(conn->fd_out, id, SSH2_FXP_REMOVE, path,
            strlen(path));
        status = get_status(conn->fd_in, id);
        if (status != SSH2_FX_OK)
@@ -496,8 +492,8 @@ do_stat(struct sftp_conn *conn, char *path, int quiet)
 
        id = conn->msg_id++;
 
-       send_string_request(conn->fd_out, id, 
-           conn->version == 0 ? SSH2_FXP_STAT_VERSION_0 : SSH2_FXP_STAT, 
+       send_string_request(conn->fd_out, id,
+           conn->version == 0 ? SSH2_FXP_STAT_VERSION_0 : SSH2_FXP_STAT,
            path, strlen(path));
 
        return(get_decode_stat(conn->fd_in, id, quiet));
@@ -512,8 +508,8 @@ do_lstat(struct sftp_conn *conn, char *path, int quiet)
                if (quiet)
                        debug("Server version does not support lstat operation");
                else
-                       error("Server version does not support lstat operation");
-               return(NULL);
+                       log("Server version does not support lstat operation");
+               return(do_stat(conn, path, quiet));
        }
 
        id = conn->msg_id++;
@@ -727,7 +723,7 @@ send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len,
     char *handle, u_int handle_len)
 {
        Buffer msg;
-       
+
        buffer_init(&msg);
        buffer_clear(&msg);
        buffer_put_char(&msg, SSH2_FXP_READ);
@@ -737,7 +733,7 @@ send_read_request(int fd_out, u_int id, u_int64_t offset, u_int len,
        buffer_put_int(&msg, len);
        send_msg(fd_out, &msg);
        buffer_free(&msg);
-}      
+}
 
 int
 do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
@@ -754,7 +750,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
                u_int id;
                u_int len;
                u_int64_t offset;
-               TAILQ_ENTRY(request) tq; 
+               TAILQ_ENTRY(request) tq;
        };
        TAILQ_HEAD(reqhead, request) requests;
        struct request *req;
@@ -820,8 +816,10 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
 
                /* Send some more requests */
                while (num_req < max_req) {
-                       debug3("Request range %llu -> %llu (%d/%d)", 
-                           offset, offset + buflen - 1, num_req, max_req);
+                       debug3("Request range %llu -> %llu (%d/%d)",
+                           (unsigned long long)offset,
+                           (unsigned long long)offset + buflen - 1,
+                           num_req, max_req);
                        req = xmalloc(sizeof(*req));
                        req->id = conn->msg_id++;
                        req->len = buflen;
@@ -829,7 +827,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
                        offset += buflen;
                        num_req++;
                        TAILQ_INSERT_TAIL(&requests, req, tq);
-                       send_read_request(conn->fd_out, req->id, req->offset, 
+                       send_read_request(conn->fd_out, req->id, req->offset,
                            req->len, handle, handle_len);
                }
 
@@ -859,8 +857,9 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
                        break;
                case SSH2_FXP_DATA:
                        data = buffer_get_string(&msg, &len);
-                       debug3("Received data %llu -> %llu", req->offset, 
-                           req->offset + len - 1);
+                       debug3("Received data %llu -> %llu",
+                           (unsigned long long)req->offset,
+                           (unsigned long long)req->offset + len - 1);
                        if (len > req->len)
                                fatal("Received more data than asked for "
                                      "%d > %d", len, req->len);
@@ -880,12 +879,14 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
                        } else {
                                /* Resend the request for the missing data */
                                debug3("Short data block, re-requesting "
-                                   "%llu -> %llu (%2d)", req->offset + len, 
-                                       req->offset + req->len - 1, num_req);
+                                   "%llu -> %llu (%2d)",
+                                   (unsigned long long)req->offset + len,
+                                   (unsigned long long)req->offset +
+                                   req->len - 1, num_req);
                                req->id = conn->msg_id++;
                                req->len -= len;
                                req->offset += len;
-                               send_read_request(conn->fd_out, req->id, 
+                               send_read_request(conn->fd_out, req->id,
                                    req->offset, req->len, handle, handle_len);
                                /* Reduce the request size */
                                if (len < buflen)
@@ -896,7 +897,8 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
                                        /* Only one request at a time
                                         * after the expected EOF */
                                        debug3("Finish at %llu (%2d)",
-                                           offset, num_req);
+                                           (unsigned long long)offset,
+                                           num_req);
                                        max_req = 1;
                                }
                                else if (max_req < conn->num_requests + 1) {
@@ -915,7 +917,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
                fatal("Transfer complete, but requests still in queue");
 
        if (read_error) {
-               error("Couldn't read from remote file \"%s\" : %s", 
+               error("Couldn't read from remote file \"%s\" : %s",
                    remote_path, fx2txt(status));
                do_close(conn, handle, handle_len);
        } else if (write_error) {
@@ -968,7 +970,7 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
                u_int id;
                u_int len;
                u_int64_t offset;
-               TAILQ_ENTRY(outstanding_ack) tq; 
+               TAILQ_ENTRY(outstanding_ack) tq;
        };
        TAILQ_HEAD(ackhead, outstanding_ack) acks;
        struct outstanding_ack *ack;
@@ -1050,19 +1052,21 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
                        buffer_put_string(&msg, data, len);
                        send_msg(conn->fd_out, &msg);
                        debug3("Sent message SSH2_FXP_WRITE I:%d O:%llu S:%u",
-                              id, (u_int64_t)offset, len);
+                              id, (unsigned long long)offset, len);
                } else if (TAILQ_FIRST(&acks) == NULL)
                        break;
 
                if (ack == NULL)
                        fatal("Unexpected ACK %u", id);
 
-               if (id == startid || len == 0 || 
+               if (id == startid || len == 0 ||
                    id - ackid >= conn->num_requests) {
+                       u_int r_id;
+
                        buffer_clear(&msg);
                        get_msg(conn->fd_in, &msg);
                        type = buffer_get_char(&msg);
-                       id = buffer_get_int(&msg);
+                       r_id = buffer_get_int(&msg);
 
                        if (type != SSH2_FXP_STATUS)
                                fatal("Expected SSH2_FXP_STATUS(%d) packet, "
@@ -1073,11 +1077,11 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
 
                        /* Find the request in our queue */
                        for(ack = TAILQ_FIRST(&acks);
-                           ack != NULL && ack->id != id;
+                           ack != NULL && ack->id != r_id;
                            ack = TAILQ_NEXT(ack, tq))
                                ;
                        if (ack == NULL)
-                               fatal("Can't find request for ID %d", id);
+                               fatal("Can't find request for ID %d", r_id);
                        TAILQ_REMOVE(&acks, ack, tq);
 
                        if (status != SSH2_FX_OK) {
@@ -1087,8 +1091,8 @@ do_upload(struct sftp_conn *conn, char *local_path, char *remote_path,
                                close(local_fd);
                                goto done;
                        }
-                       debug3("In write loop, ack for %u %d bytes at %llu", 
-                          ack->id, ack->len, ack->offset);
+                       debug3("In write loop, ack for %u %d bytes at %llu",
+                          ack->id, ack->len, (unsigned long long)ack->offset);
                        ++ackid;
                        free(ack);
                }
index 488b0a80b5bad1a9e809b54b05ee205d6a36af8a..9c754912c224f3942d28319d28bc3a145e9c9a93 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-glob.h,v 1.6 2002/02/13 00:59:23 djm Exp $ */
+/* $OpenBSD: sftp-glob.h,v 1.7 2002/03/19 10:49:35 markus Exp $ */
 
 /*
  * Copyright (c) 2001,2002 Damien Miller.  All rights reserved.
@@ -32,7 +32,7 @@
 #include "sftp-client.h"
 
 int
-remote_glob(struct sftp_conn *, const char *, int, 
+remote_glob(struct sftp_conn *, const char *, int,
     int (*)(const char *, int), glob_t *);
 
 #endif
index 5de93891a70dd19ec88a5bef4df78f24b224a301..5b1d3848e82895e96c4ff91ce28be7c8366eca2f 100644 (file)
@@ -26,7 +26,7 @@
 /* XXX: recursive operations */
 
 #include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.44 2002/02/13 00:59:23 djm Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.46 2002/03/30 18:51:15 markus Exp $");
 
 #include "buffer.h"
 #include "xmalloc.h"
@@ -176,8 +176,9 @@ local_do_shell(const char *args)
                    strerror(errno));
                _exit(1);
        }
-       if (waitpid(pid, &status, 0) == -1)
-               fatal("Couldn't wait for child: %s", strerror(errno));
+       while (waitpid(pid, &status, 0) == -1)
+               if (errno != EINTR)
+                       fatal("Couldn't wait for child: %s", strerror(errno));
        if (!WIFEXITED(status))
                error("Shell exited abormally");
        else if (WEXITSTATUS(status))
@@ -886,8 +887,10 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2)
                                    file2);
 
                        parse_dispatch_command(conn, cmd, &pwd);
+                       xfree(dir);
                        return;
                }
+               xfree(dir);
        }
 #if HAVE_SETVBUF
        setvbuf(stdout, NULL, _IOLBF, 0);
index 045e0766e5777f18c8fd47bddbc247b173d808ce..9a6488fa13971fa9214ba73d5875ffffc1918986 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 
-RCSID("$OpenBSD: sftp.c,v 1.26 2002/02/12 12:32:27 djm Exp $");
+RCSID("$OpenBSD: sftp.c,v 1.29 2002/04/02 17:37:48 markus Exp $");
 
 /* XXX: short-form remote directory listings (like 'ls -C') */
 
@@ -94,7 +94,7 @@ static void
 usage(void)
 {
        extern char *__progname;
-       
+
        fprintf(stderr,
            "usage: %s [-vC1] [-b batchfile] [-o option] [-s subsystem|path] [-B buffer_size]\n"
            "            [-F config] [-P direct server path] [-S program]\n"
@@ -172,7 +172,7 @@ main(int argc, char **argv)
                case 'R':
                        num_requests = strtol(optarg, &cp, 10);
                        if (num_requests == 0 || *cp != '\0')
-                               fatal("Invalid number of requests \"%s\"", 
+                               fatal("Invalid number of requests \"%s\"",
                                    optarg);
                        break;
                case 'h':
@@ -181,6 +181,8 @@ main(int argc, char **argv)
                }
        }
 
+       log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
+
        if (sftp_direct == NULL) {
                if (optind == argc || argc > (optind + 2))
                        usage();
@@ -210,7 +212,6 @@ main(int argc, char **argv)
                        usage();
                }
 
-               log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
                addargs(&args, "-oProtocol %d", sshver);
 
                /* no subsystem if the server-spec contains a '/' */
@@ -218,19 +219,19 @@ main(int argc, char **argv)
                        addargs(&args, "-s");
 
                addargs(&args, "%s", host);
-               addargs(&args, "%s", (sftp_server != NULL ? 
+               addargs(&args, "%s", (sftp_server != NULL ?
                    sftp_server : "sftp"));
                args.list[0] = ssh_program;
 
                fprintf(stderr, "Connecting to %s...\n", host);
-               connect_to_server(ssh_program, args.list, &in, &out, 
+               connect_to_server(ssh_program, args.list, &in, &out,
                    &sshpid);
        } else {
                args.list = NULL;
                addargs(&args, "sftp-server");
 
                fprintf(stderr, "Attaching to %s...\n", sftp_direct);
-               connect_to_server(sftp_direct, args.list, &in, &out, 
+               connect_to_server(sftp_direct, args.list, &in, &out,
                    &sshpid);
        }
 
@@ -246,8 +247,10 @@ main(int argc, char **argv)
        if (infile != stdin)
                fclose(infile);
 
-       if (waitpid(sshpid, NULL, 0) == -1)
-               fatal("Couldn't wait for ssh process: %s", strerror(errno));
+       while (waitpid(sshpid, NULL, 0) == -1)
+               if (errno != EINTR)
+                       fatal("Couldn't wait for ssh process: %s",
+                           strerror(errno));
 
        exit(0);
 }
index b057a089205b09f71d3843a04e3c9fddf2ebb420..d24d761a8db1980fb7c27eee06cb5d52567de2ec 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-add.c,v 1.50 2002/01/29 14:27:57 markus Exp $");
+RCSID("$OpenBSD: ssh-add.c,v 1.53 2002/03/21 22:44:05 rees Exp $");
 
 #include <openssl/evp.h>
 
@@ -62,7 +62,7 @@ extern char *__progname;
 static char *default_files[] = {
        _PATH_SSH_CLIENT_ID_RSA,
        _PATH_SSH_CLIENT_ID_DSA,
-       _PATH_SSH_CLIENT_IDENTITY, 
+       _PATH_SSH_CLIENT_IDENTITY,
        NULL
 };
 
@@ -176,7 +176,13 @@ add_file(AuthenticationConnection *ac, const char *filename)
 static int
 update_card(AuthenticationConnection *ac, int add, const char *id)
 {
-       if (ssh_update_card(ac, add, id)) {
+       char *pin;
+
+       pin = read_passphrase("Enter passphrase for smartcard: ", RP_ALLOW_STDIN);
+       if (pin == NULL)
+               return -1;
+
+       if (ssh_update_card(ac, add, id, pin)) {
                fprintf(stderr, "Card %s: %s\n",
                    add ? "added" : "removed", id);
                return 0;
@@ -310,6 +316,8 @@ main(int argc, char **argv)
        if (argc == 0) {
                char buf[MAXPATHLEN];
                struct passwd *pw;
+               struct stat st;
+               int count = 0;
 
                if ((pw = getpwuid(getuid())) == NULL) {
                        fprintf(stderr, "No user found with uid %u\n",
@@ -319,11 +327,17 @@ main(int argc, char **argv)
                }
 
                for(i = 0; default_files[i]; i++) {
-                       snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, 
+                       snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
                            default_files[i]);
+                       if (stat(buf, &st) < 0)
+                               continue;
                        if (do_file(ac, deleting, buf) == -1)
                                ret = 1;
+                       else
+                               count++;
                }
+               if (count == 0)
+                       ret = 1;
        } else {
                for(i = 0; i < argc; i++) {
                        if (do_file(ac, deleting, argv[i]) == -1)
index 555396fc5e1503ad78d4930d5e1f762e23557823..33596c47a9924342706e26ec8fbfd03a00e6cca0 100644 (file)
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.82 2002/03/04 17:27:39 stevesk Exp $");
-
-#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
-#include <sys/queue.h>
-#else
 #include "openbsd-compat/fake-queue.h"
-#endif
+RCSID("$OpenBSD: ssh-agent.c,v 1.85 2002/04/02 11:49:39 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/md5.h>
@@ -57,7 +52,6 @@ RCSID("$OpenBSD: ssh-agent.c,v 1.82 2002/03/04 17:27:39 stevesk Exp $");
 #include "log.h"
 
 #ifdef SMARTCARD
-#include <openssl/engine.h>
 #include "scard.h"
 #endif
 
@@ -452,48 +446,39 @@ send:
 static void
 process_add_smartcard_key (SocketEntry *e)
 {
+       Identity *id;
        Idtab *tab;
-       Key *n = NULL, *k = NULL;
-       char *sc_reader_id = NULL;
-       int success = 0;
+       Key **keys, *k;
+       char *sc_reader_id = NULL, *pin;
+       int i, version, success = 0;
 
        sc_reader_id = buffer_get_string(&e->input, NULL);
-       k = sc_get_key(sc_reader_id);
+       pin = buffer_get_string(&e->input, NULL);
+       keys = sc_get_keys(sc_reader_id, pin);
        xfree(sc_reader_id);
+       xfree(pin);
 
-       if (k == NULL) {
-               error("sc_get_pubkey failed");
+       if (keys == NULL || keys[0] == NULL) {
+               error("sc_get_keys failed");
                goto send;
        }
-       success = 1;
-
-       tab = idtab_lookup(1);
-       k->type = KEY_RSA1;
-       if (lookup_identity(k, 1) == NULL) {
-               Identity *id = xmalloc(sizeof(Identity));
-               n = key_new(KEY_RSA1);
-               BN_copy(n->rsa->n, k->rsa->n);
-               BN_copy(n->rsa->e, k->rsa->e);
-               RSA_set_method(n->rsa, sc_get_engine());
-               id->key = n;
-               id->comment = xstrdup("rsa1 smartcard");
-               TAILQ_INSERT_TAIL(&tab->idlist, id, next);
-               tab->nentries++;
-       }
-       k->type = KEY_RSA;
-       tab = idtab_lookup(2);
-       if (lookup_identity(k, 2) == NULL) {
-               Identity *id = xmalloc(sizeof(Identity));
-               n = key_new(KEY_RSA);
-               BN_copy(n->rsa->n, k->rsa->n);
-               BN_copy(n->rsa->e, k->rsa->e);
-               RSA_set_method(n->rsa, sc_get_engine());
-               id->key = n;
-               id->comment = xstrdup("rsa smartcard");
-               TAILQ_INSERT_TAIL(&tab->idlist, id, next);
-               tab->nentries++;
+       for (i = 0; keys[i] != NULL; i++) {
+               k = keys[i];
+               version = k->type == KEY_RSA1 ? 1 : 2;
+               tab = idtab_lookup(version);
+               if (lookup_identity(k, version) == NULL) {
+                       id = xmalloc(sizeof(Identity));
+                       id->key = k;
+                       id->comment = xstrdup("smartcard key");
+                       TAILQ_INSERT_TAIL(&tab->idlist, id, next);
+                       tab->nentries++;
+                       success = 1;
+               } else {
+                       key_free(k);
+               }
+               keys[i] = NULL;
        }
-       key_free(k);
+       xfree(keys);
 send:
        buffer_put_int(&e->output, 1);
        buffer_put_char(&e->output,
@@ -503,39 +488,37 @@ send:
 static void
 process_remove_smartcard_key(SocketEntry *e)
 {
-       Key *k = NULL;
-       int success = 0;
-       char *sc_reader_id = NULL;
+       Identity *id;
+       Idtab *tab;
+       Key **keys, *k = NULL;
+       char *sc_reader_id = NULL, *pin;
+       int i, version, success = 0;
 
        sc_reader_id = buffer_get_string(&e->input, NULL);
-       k = sc_get_key(sc_reader_id);
+       pin = buffer_get_string(&e->input, NULL);
+       keys = sc_get_keys(sc_reader_id, pin);
        xfree(sc_reader_id);
+       xfree(pin);
 
-       if (k == NULL) {
-               error("sc_get_pubkey failed");
-       } else {
-               Identity *id;
-               k->type = KEY_RSA1;
-               id = lookup_identity(k, 1);
-               if (id != NULL) {
-                       Idtab *tab = idtab_lookup(1);
-                       TAILQ_REMOVE(&tab->idlist, id, next);
-                       free_identity(id);
+       if (keys == NULL || keys[0] == NULL) {
+               error("sc_get_keys failed");
+               goto send;
+       }
+       for (i = 0; keys[i] != NULL; i++) {
+               k = keys[i];
+               version = k->type == KEY_RSA1 ? 1 : 2;
+               if ((id = lookup_identity(k, version)) != NULL) {
+                       tab = idtab_lookup(version);
+                        TAILQ_REMOVE(&tab->idlist, id, next);
                        tab->nentries--;
-                       success = 1;
-               }
-               k->type = KEY_RSA;
-               id = lookup_identity(k, 2);
-               if (id != NULL) {
-                       Idtab *tab = idtab_lookup(2);
-                       TAILQ_REMOVE(&tab->idlist, id, next);
                        free_identity(id);
-                       tab->nentries--;
                        success = 1;
                }
                key_free(k);
+               keys[i] = NULL;
        }
-
+       xfree(keys);
+send:
        buffer_put_int(&e->output, 1);
        buffer_put_char(&e->output,
            success ? SSH_AGENT_SUCCESS : SSH_AGENT_FAILURE);
@@ -879,7 +862,7 @@ main(int ac, char **av)
        if (ac > 0 && (c_flag || k_flag || s_flag || d_flag))
                usage();
 
-       if (ac == 0 && !c_flag && !k_flag && !s_flag && !d_flag) {
+       if (ac == 0 && !c_flag && !s_flag) {
                shell = getenv("SHELL");
                if (shell != NULL && strncmp(shell + strlen(shell) - 3, "csh", 3) == 0)
                        c_flag = 1;
index 6aff4a444aed1318e961d481ff560409381a8307..250e53e14b1a316665b5645d914c47e3922538aa 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.94 2002/02/25 16:33:27 markus Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.98 2002/03/27 22:21:45 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/pem.h>
@@ -29,8 +29,6 @@ RCSID("$OpenBSD: ssh-keygen.c,v 1.94 2002/02/25 16:33:27 markus Exp $");
 #include "readpass.h"
 
 #ifdef SMARTCARD
-#include <sectok.h>
-#include <openssl/engine.h>
 #include "scard.h"
 #endif
 
@@ -292,6 +290,7 @@ do_convert_from_ssh2(struct passwd *pw)
 {
        Key *k;
        int blen;
+       u_int len;
        char line[1024], *p;
        u_char blob[8096];
        char encoded[8096];
@@ -336,6 +335,12 @@ do_convert_from_ssh2(struct passwd *pw)
                *p = '\0';
                strlcat(encoded, line, sizeof(encoded));
        }
+       len = strlen(encoded);
+       if (((len % 4) == 3) &&
+           (encoded[len-1] == '=') &&
+           (encoded[len-2] == '=') &&
+           (encoded[len-3] == '='))
+               encoded[len-3] = '\0';
        blen = uudecode(encoded, blob, sizeof(blob));
        if (blen < 0) {
                fprintf(stderr, "uudecode failed.\n");
@@ -389,145 +394,47 @@ do_print_public(struct passwd *pw)
 }
 
 #ifdef SMARTCARD
-#define NUM_RSA_KEY_ELEMENTS 5+1
-#define COPY_RSA_KEY(x, i) \
-       do { \
-               len = BN_num_bytes(prv->rsa->x); \
-               elements[i] = xmalloc(len); \
-               debug("#bytes %d", len); \
-               if (BN_bn2bin(prv->rsa->x, elements[i]) < 0) \
-                       goto done; \
-       } while (0)
-
-static int
-get_AUT0(char *aut0)
-{
-       EVP_MD *evp_md = EVP_sha1();
-       EVP_MD_CTX md;
-       char *pass;
-
-       pass = read_passphrase("Enter passphrase for smartcard: ", RP_ALLOW_STDIN);
-       if (pass == NULL)
-               return -1;
-       EVP_DigestInit(&md, evp_md);
-       EVP_DigestUpdate(&md, pass, strlen(pass));
-       EVP_DigestFinal(&md, aut0, NULL);
-       memset(pass, 0, strlen(pass));
-       xfree(pass);
-       return 0;
-}
-
 static void
 do_upload(struct passwd *pw, const char *sc_reader_id)
 {
        Key *prv = NULL;
        struct stat st;
-       u_char *elements[NUM_RSA_KEY_ELEMENTS];
-       u_char key_fid[2];
-       u_char DEFAUT0[] = {0xad, 0x9f, 0x61, 0xfe, 0xfa, 0x20, 0xce, 0x63};
-       u_char AUT0[EVP_MAX_MD_SIZE];
-       int len, status = 1, i, fd = -1, ret;
-       int sw = 0, cla = 0x00;
-
-       for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++)
-               elements[i] = NULL;
+       int ret;
+
        if (!have_identity)
                ask_filename(pw, "Enter file in which the key is");
        if (stat(identity_file, &st) < 0) {
                perror(identity_file);
-               goto done;
+               exit(1);
        }
        prv = load_identity(identity_file);
        if (prv == NULL) {
                error("load failed");
-               goto done;
-       }
-       COPY_RSA_KEY(q, 0);
-       COPY_RSA_KEY(p, 1);
-       COPY_RSA_KEY(iqmp, 2);
-       COPY_RSA_KEY(dmq1, 3);
-       COPY_RSA_KEY(dmp1, 4);
-       COPY_RSA_KEY(n, 5);
-       len = BN_num_bytes(prv->rsa->n);
-       fd = sectok_friendly_open(sc_reader_id, STONOWAIT, &sw);
-       if (fd < 0) {
-               error("sectok_open failed: %s", sectok_get_sw(sw));
-               goto done;
-       }
-       if (! sectok_cardpresent(fd)) {
-               error("smartcard in reader %s not present",
-                   sc_reader_id);
-               goto done;
-       }
-       ret = sectok_reset(fd, 0, NULL, &sw);
-       if (ret <= 0) {
-               error("sectok_reset failed: %s", sectok_get_sw(sw));
-               goto done;
-       }
-       if ((cla = cyberflex_inq_class(fd)) < 0) {
-               error("cyberflex_inq_class failed");
-               goto done;
-       }
-       memcpy(AUT0, DEFAUT0, sizeof(DEFAUT0));
-       if (cyberflex_verify_AUT0(fd, cla, AUT0, sizeof(DEFAUT0)) < 0) {
-               if (get_AUT0(AUT0) < 0 ||
-                   cyberflex_verify_AUT0(fd, cla, AUT0, sizeof(DEFAUT0)) < 0) {
-                       error("cyberflex_verify_AUT0 failed");
-                       goto done;
-               }
-       }
-       key_fid[0] = 0x00;
-       key_fid[1] = 0x12;
-       if (cyberflex_load_rsa_priv(fd, cla, key_fid, 5, 8*len, elements,
-           &sw) < 0) {
-               error("cyberflex_load_rsa_priv failed: %s", sectok_get_sw(sw));
-               goto done;
-       }
-       if (!sectok_swOK(sw))
-               goto done;
-       log("cyberflex_load_rsa_priv done");
-       key_fid[0] = 0x73;
-       key_fid[1] = 0x68;
-       if (cyberflex_load_rsa_pub(fd, cla, key_fid, len, elements[5],
-           &sw) < 0) {
-               error("cyberflex_load_rsa_pub failed: %s", sectok_get_sw(sw));
-               goto done;
+               exit(1);
        }
-       if (!sectok_swOK(sw))
-               goto done;
-       log("cyberflex_load_rsa_pub done");
-       status = 0;
-       log("loading key done");
-done:
-
-       memset(elements[0], '\0', BN_num_bytes(prv->rsa->q));
-       memset(elements[1], '\0', BN_num_bytes(prv->rsa->p));
-       memset(elements[2], '\0', BN_num_bytes(prv->rsa->iqmp));
-       memset(elements[3], '\0', BN_num_bytes(prv->rsa->dmq1));
-       memset(elements[4], '\0', BN_num_bytes(prv->rsa->dmp1));
-       memset(elements[5], '\0', BN_num_bytes(prv->rsa->n));
-
-       if (prv)
-               key_free(prv);
-       for (i = 0; i < NUM_RSA_KEY_ELEMENTS; i++)
-               if (elements[i])
-                       xfree(elements[i]);
-       if (fd != -1)
-               sectok_close(fd);
-       exit(status);
+       ret = sc_put_key(prv, sc_reader_id);
+       key_free(prv);
+       if (ret < 0)
+               exit(1);
+        log("loading key done");
+       exit(0);
 }
 
 static void
 do_download(struct passwd *pw, const char *sc_reader_id)
 {
-       Key *pub = NULL;
+       Key **keys = NULL;
+       int i;
 
-       pub = sc_get_key(sc_reader_id);
-       if (pub == NULL)
+       keys = sc_get_keys(sc_reader_id, NULL);
+       if (keys == NULL)
                fatal("cannot read public key from smartcard");
-       key_write(pub, stdout);
-       key_free(pub);
-       fprintf(stdout, "\n");
+       for (i = 0; keys[i]; i++) {
+               key_write(keys[i], stdout);
+               key_free(keys[i]);
+               fprintf(stdout, "\n");
+       }
+       xfree(keys);
        exit(0);
 }
 #endif /* SMARTCARD */
@@ -947,12 +854,10 @@ main(int ac, char **av)
                do_fingerprint(pw);
        if (change_passphrase)
                do_change_passphrase(pw);
-       if (change_comment)
-               do_change_comment(pw);
        if (convert_to_ssh2)
                do_convert_to_ssh2(pw);
-       if (convert_from_ssh2)
-               do_convert_from_ssh2(pw);
+       if (change_comment)
+               do_change_comment(pw);
        if (print_public)
                do_print_public(pw);
        if (reader_id != NULL) {
@@ -970,6 +875,9 @@ main(int ac, char **av)
        seed_rng();
        arc4random_stir();
 
+       if (convert_from_ssh2)
+               do_convert_from_ssh2(pw);
+
        if (key_type_name == NULL) {
                printf("You must specify a key type (-t).\n");
                usage();
index 824264c32bcd150ed5bef58493d157d0a5bc1163..744f80249434d7460cc4c60186b92e2ca31a85a3 100644 (file)
@@ -9,12 +9,7 @@
 #include "includes.h"
 RCSID("$OpenBSD: ssh-keyscan.c,v 1.35 2002/03/04 18:30:23 stevesk Exp $");
 
-#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
-#include <sys/queue.h>
-#else
 #include "openbsd-compat/fake-queue.h"
-#endif
-#include <errno.h>
 
 #include <openssl/bn.h>
 
diff --git a/openssh/ssh-rand-helper.8 b/openssh/ssh-rand-helper.8
new file mode 100644 (file)
index 0000000..bcf542e
--- /dev/null
@@ -0,0 +1,94 @@
+.\" $Id$
+.\"
+.\" Copyright (c) 2002 Damien Miller.  All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd April 14, 2002
+.Dt SSH-RAND-HELPER 8
+.Os
+.Sh NAME
+.Nm ssh-rand-helper
+.Nd Random number gatherer for OpenSSH
+.Sh SYNOPSIS
+.Nm ssh-rand-hlper
+.Op Fl vxXh
+.Op Fl b Ar bytes
+.Sh DESCRIPTION
+.Nm
+is a small helper program used by 
+.Xr ssh 1 ,
+.Xr ssh-add 1 ,
+.Xr ssh-agent 1 ,
+.Xr ssh-keygen 1 ,
+.Xr ssh-keyscan 1 
+and
+.Xr sshd 8
+to gather random numbers of cryptographic quality if the 
+.Xr openssl 4
+library has not been configured to provide them itself.
+.Pp
+Normally 
+.Nm
+will generate a strong random seed and provide it to the calling
+program via standard output. If standard output is a tty, 
+.Nm
+will instead print the seed in hexidecimal format unless told otherwise.
+.Pp
+.Nm
+will by default gather random numbers from the system commands listed
+in
+.Pa /etc/ssh/ssh_prng_cmds .
+The output of each of the commands listed will be hashed and used to 
+generate a random seed for the calling program. 
+.Nm
+will also store seed files in 
+.Pa ~/.ssh/prng_seed
+between executions.
+.Pp
+Alternately, 
+.Nm
+may be configured at build time to collect random numbers from a 
+EGD/PRNGd server via a unix domain or localhost tcp socket.
+.Pp
+This program is not intended to be run by the end-user, so the few 
+commandline options are for debugging purposes only.
+.Bl -tag -width Ds
+.It Fl b Ar bytes
+Specify the number of random bytes to include in the output.
+.It Fl x
+Output a hexidecimal instead of a binary seed.
+.It Fl X
+Force output of a binary seed, even if standard output is a tty
+.It Fl v
+Turn on debugging message. Multiple
+.Fl v
+options will increase the debugging level.
+.Fl h
+Display a summary of options.
+.El
+.Sh AUTHORS
+Damien Miller <djm@mindrot.org>
+.Sh SEE ALSO
+.Xr ssh 1 ,
+.Xr ssh-add 1 ,
+.Xr ssh-keygen 1 ,
+.Xr sshd 8
index 28ea6591251e4a66017c16402b5d0627911d8a28..72a818f91f03be42f814809216c178fd14003ce6 100644 (file)
@@ -747,38 +747,88 @@ prng_read_commands(char *cmdfilename)
        return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0;
 }
 
+void
+usage(void)
+{
+       fprintf(stderr, "Usage: %s [options]\n", __progname);
+       fprintf(stderr, "  -v          Verbose; display verbose debugging messages.\n");
+       fprintf(stderr, "              Multiple -v increases verbosity.\n");
+       fprintf(stderr, "  -x          Force output in hexidecimal (for debugging)\n");
+       fprintf(stderr, "  -X          Force output in binary\n");
+       fprintf(stderr, "  -b bytes    Number of bytes to output (default %d)\n",
+           OUTPUT_SEED_SIZE);
+}
+
 int 
 main(int argc, char **argv)
 {
-       unsigned char buf[OUTPUT_SEED_SIZE];
-       int ret;
+       unsigned char *buf;
+       int ret, ch, debug_level, output_hex, bytes;
+       extern char *optarg;
+       LogLevel ll;
 
        __progname = get_progname(argv[0]);
-       /* XXX: need some debugging mode */
        log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
 
+       ll = SYSLOG_LEVEL_INFO;
+       debug_level = output_hex = 0;
+       bytes = OUTPUT_SEED_SIZE;
+
+       /* Don't write binary data to a tty, unless we are forced to */
+       if (isatty(STDOUT_FILENO))
+               output_hex = 1;
+       
+       while ((ch = getopt(argc, argv, "vxXhb:")) != -1) {
+               switch (ch) {
+               case 'v':
+                       if (debug_level < 3)
+                               ll = SYSLOG_LEVEL_DEBUG1 + debug_level++;
+                       break;
+               case 'x':
+                       output_hex = 1;
+                       break;
+               case 'X':
+                       output_hex = 0;
+                       break;
+               case 'b':
+                       if ((bytes = atoi(optarg)) <= 0)
+                               fatal("Invalid number of output bytes");
+                       break;
+               case 'h':
+                       usage();
+                       exit(0);
+               default:
+                       error("Invalid commandline option");
+                       usage();
+               }
+       }
+
+       log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
+       
 #ifdef USE_SEED_FILES
        prng_read_seedfile();
 #endif
 
+       buf = xmalloc(bytes);
+
        /*
         * Seed the RNG from wherever we can
         */
         
        /* Take whatever is on the stack, but don't credit it */
-       RAND_add(buf, sizeof(buf), 0);
+       RAND_add(buf, bytes, 0);
 
        debug("Seeded RNG with %i bytes from system calls", 
            (int)stir_from_system());
 
 #ifdef PRNGD_PORT
-       if (get_random_bytes_prngd(buf, sizeof(buf), PRNGD_PORT, NULL) == -1)
+       if (get_random_bytes_prngd(buf, bytes, PRNGD_PORT, NULL) == -1)
                fatal("Entropy collection failed");
-       RAND_add(buf, sizeof(buf), sizeof(buf));
+       RAND_add(buf, bytes, bytes);
 #elif defined(PRNGD_SOCKET)
-       if (get_random_bytes_prngd(buf, sizeof(buf), 0, PRNGD_SOCKET) == -1)
+       if (get_random_bytes_prngd(buf, bytes, 0, PRNGD_SOCKET) == -1)
                fatal("Entropy collection failed");
-       RAND_add(buf, sizeof(buf), sizeof(buf));
+       RAND_add(buf, bytes, bytes);
 #else
        /* Read in collection commands */
        if (prng_read_commands(SSH_PRNG_COMMAND_FILE) == -1)
@@ -798,12 +848,18 @@ main(int argc, char **argv)
        if (!RAND_status())
                fatal("Not enough entropy in RNG");
 
-       RAND_bytes(buf, sizeof(buf));
+       RAND_bytes(buf, bytes);
 
-       ret = atomicio(write, STDOUT_FILENO, buf, sizeof(buf));
+       if (output_hex) {
+               for(ret = 0; ret < bytes; ret++)
+                       printf("%02x", (unsigned char)(buf[ret]));
+               printf("\n");
+       } else
+               ret = atomicio(write, STDOUT_FILENO, buf, bytes);
                
-       memset(buf, '\0', sizeof(buf));
+       memset(buf, '\0', bytes);
+       xfree(buf);
        
-       return ret == sizeof(buf) ? 0 : 1;
+       return ret == bytes ? 0 : 1;
 }
 
index 8e79d4e1d310749269e80341b258c0155de08610..fe4dc1f8dfffbd8da198e126ef63ab636bdec07c 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-rsa.c,v 1.16 2002/02/24 19:14:59 markus Exp $");
+RCSID("$OpenBSD: ssh-rsa.c,v 1.18 2002/04/02 20:11:38 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -35,6 +35,7 @@ RCSID("$OpenBSD: ssh-rsa.c,v 1.16 2002/02/24 19:14:59 markus Exp $");
 #include "key.h"
 #include "ssh-rsa.h"
 #include "compat.h"
+#include "ssh.h"
 
 /* RSASSA-PKCS1-v1_5 (PKCS #1 v2.0 signature) with SHA1 */
 int
@@ -54,10 +55,6 @@ ssh_rsa_sign(
                error("ssh_rsa_sign: no RSA key");
                return -1;
        }
-       if (datafellows & SSH_BUG_SIGBLOB) {
-               error("ssh_rsa_sign: SSH_BUG_SIGBLOB not supported");
-               return -1;
-       }
        nid = (datafellows & SSH_BUG_RSASIGMD5) ? NID_md5 : NID_sha1;
        if ((evp_md = EVP_get_digestbynid(nid)) == NULL) {
                error("ssh_rsa_sign: EVP_get_digestbynid %d failed", nid);
@@ -125,11 +122,7 @@ ssh_rsa_verify(
                error("ssh_rsa_verify: no RSA key");
                return -1;
        }
-       if (datafellows & SSH_BUG_SIGBLOB) {
-               error("ssh_rsa_verify: SSH_BUG_SIGBLOB not supported");
-               return -1;
-       }
-       if (BN_num_bits(key->rsa->n) < 768) {
+       if (BN_num_bits(key->rsa->n) < SSH_RSA_MINIMUM_MODULUS_SIZE) {
                error("ssh_rsa_verify: n too small: %d bits",
                    BN_num_bits(key->rsa->n));
                return -1;
index 43b75dc23edde2779123cad7a716aacba47e2899..46c31406fdb1abc8deac42d984489f297083494e 100644 (file)
@@ -34,7 +34,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: ssh.1,v 1.148 2002/02/18 17:55:20 markus Exp $
+.\" $OpenBSD: ssh.1,v 1.151 2002/05/06 23:34:33 millert Exp $
 .Dd September 25, 1999
 .Dt SSH 1
 .Os
@@ -297,6 +297,12 @@ Background ssh at logout when waiting for forwarded connection / X11 sessions
 to terminate
 .It Cm ~?
 Display a list of escape characters
+.It Cm ~C
+Open command line (only useful for adding port forwardings using the
+.Fl L
+and
+.Fl R
+options)
 .It Cm ~R
 Request rekeying of the connection (only useful for SSH protocol version 2
 and if the peer supports it)
@@ -1445,7 +1451,7 @@ The purpose for
 having this file is to be able to use rhosts authentication with
 .Nm
 without permitting login with
-.Xr rlogin 1
+.Nm rlogin
 or
 .Xr rsh 1 .
 .It Pa /etc/hosts.equiv
@@ -1502,7 +1508,6 @@ created OpenSSH.
 Markus Friedl contributed the support for SSH
 protocol versions 1.5 and 2.0.
 .Sh SEE ALSO
-.Xr rlogin 1 ,
 .Xr rsh 1 ,
 .Xr scp 1 ,
 .Xr sftp 1 ,
@@ -1518,7 +1523,7 @@ protocol versions 1.5 and 2.0.
 .%A T. Rinne
 .%A S. Lehtinen
 .%T "SSH Protocol Architecture"
-.%N draft-ietf-secsh-architecture-09.txt
-.%D July 2001
+.%N draft-ietf-secsh-architecture-12.txt
+.%D January 2002
 .%O work in progress material
 .Re
index 117a0930b0b4ef4529cd9e24e87e1340f24fb8de..afaf20bec9dfcbaef53df523bf94b0a15b7aaa0f 100644 (file)
@@ -13,6 +13,7 @@
  * called by a name other than "ssh" or "Secure Shell".
  *
  * Copyright (c) 1999 Niels Provos.  All rights reserved.
+ * Copyright (c) 2000, 2001, 2002 Markus Friedl.  All rights reserved.
  *
  * Modified to work with SSL by Niels Provos <provos@citi.umich.edu>
  * in Canada (German citizen).
@@ -39,7 +40,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.164 2002/02/14 23:28:00 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.170 2002/04/22 21:04:52 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -70,7 +71,6 @@ RCSID("$OpenBSD: ssh.c,v 1.164 2002/02/14 23:28:00 markus Exp $");
 #include "sshtty.h"
 
 #ifdef SMARTCARD
-#include <openssl/engine.h>
 #include "scard.h"
 #endif
 
@@ -146,6 +146,9 @@ Buffer command;
 /* Should we execute a command or invoke a subsystem? */
 int subsystem_flag = 0;
 
+/* # of replies received for global requests */
+static int client_global_request_id = 0;
+
 /* Prints a help message to the user.  This function never returns. */
 
 static void
@@ -475,7 +478,7 @@ again:
                                /* NOTREACHED */
                        }
                        if ((fwd_port = a2port(sfwd_port)) == 0 ||
-                           (fwd_host_port = a2port(sfwd_host_port)) == 0) {
+                           (fwd_host_port = a2port(sfwd_host_port)) == 0) {
                                fprintf(stderr,
                                    "Bad forwarding port(s) '%s'\n", optarg);
                                exit(1);
@@ -1041,6 +1044,27 @@ client_subsystem_reply(int type, u_int32_t seq, void *ctxt)
                    len, (u_char *)buffer_ptr(&command), id);
 }
 
+void
+client_global_request_reply(int type, u_int32_t seq, void *ctxt)
+{
+       int i;
+
+       i = client_global_request_id++;
+       if (i >= options.num_remote_forwards) {
+               debug("client_global_request_reply: too many replies %d > %d",
+                   i, options.num_remote_forwards);
+               return;
+       }
+       debug("remote forward %s for: listen %d, connect %s:%d",
+           type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure",
+           options.remote_forwards[i].port,
+           options.remote_forwards[i].host,
+           options.remote_forwards[i].host_port);
+       if (type == SSH2_MSG_REQUEST_FAILURE)
+               log("Warning: remote port forwarding failed for listen port %d",
+                   options.remote_forwards[i].port);
+}
+
 /* request pty/x11/agent/tcpfwd/shell for channel */
 static void
 ssh_session2_setup(int id, void *arg)
@@ -1187,40 +1211,29 @@ static void
 load_public_identity_files(void)
 {
        char *filename;
-       Key *public;
        int i = 0;
-
+       Key *public;
 #ifdef SMARTCARD
+       Key **keys;
+
        if (options.smartcard_device != NULL &&
-           options.num_identity_files + 1 < SSH_MAX_IDENTITY_FILES &&
-           (public = sc_get_key(options.smartcard_device)) != NULL ) {
-               Key *new;
-
-               if (options.num_identity_files + 2 > SSH_MAX_IDENTITY_FILES)
-                       options.num_identity_files = SSH_MAX_IDENTITY_FILES - 2;
-               memmove(&options.identity_files[2], &options.identity_files[0],
-                   sizeof(char *) * options.num_identity_files);
-               options.num_identity_files += 2;
-               i = 2;
-
-               /* XXX ssh1 vs ssh2 */
-               new = key_new(KEY_RSA);
-               new->flags = KEY_FLAG_EXT;
-               BN_copy(new->rsa->n, public->rsa->n);
-               BN_copy(new->rsa->e, public->rsa->e);
-               RSA_set_method(new->rsa, sc_get_engine());
-               options.identity_keys[0] = new;
-               options.identity_files[0] = xstrdup("smartcard rsa key");;
-
-               new = key_new(KEY_RSA1);
-               new->flags = KEY_FLAG_EXT;
-               BN_copy(new->rsa->n, public->rsa->n);
-               BN_copy(new->rsa->e, public->rsa->e);
-               RSA_set_method(new->rsa, sc_get_engine());
-               options.identity_keys[1] = new;
-               options.identity_files[1] = xstrdup("smartcard rsa1 key");
-
-               key_free(public);
+           options.num_identity_files < SSH_MAX_IDENTITY_FILES &&
+           (keys = sc_get_keys(options.smartcard_device, NULL)) != NULL ) {
+               int count = 0;
+               for (i = 0; keys[i] != NULL; i++) {
+                       count++;
+                       memmove(&options.identity_files[1], &options.identity_files[0],
+                           sizeof(char *) * (SSH_MAX_IDENTITY_FILES - 1));
+                       memmove(&options.identity_keys[1], &options.identity_keys[0],
+                           sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1));
+                       options.num_identity_files++;
+                       options.identity_keys[0] = keys[i];
+                       options.identity_files[0] = xstrdup("smartcard key");;
+               }
+               if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
+                       options.num_identity_files = SSH_MAX_IDENTITY_FILES;
+               i = count;
+               xfree(keys);
        }
 #endif /* SMARTCARD */
        for (; i < options.num_identity_files; i++) {
index fdf554df0105e55185e0bb17460132899b6b6f13..aac6216b82b6a72b3bef011da269c9e638df5b4e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ssh.h,v 1.64 2002/03/04 17:27:39 stevesk Exp $        */
+/*     $OpenBSD: ssh.h,v 1.69 2002/05/11 20:24:48 stevesk Exp $        */
 
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
 /* Used to identify ``EscapeChar none'' */
 #define SSH_ESCAPECHAR_NONE            -2
 
+/*
+ * unprivileged user when UsePrivilegeSeparation=yes;
+ * sshd will change its privileges to this user and its
+ * primary group.
+ */
+#ifndef SSH_PRIVSEP_USER
+#define SSH_PRIVSEP_USER               "sshd"
+#endif
+
+/* Minimum modulus size (n) for RSA keys. */
+#define SSH_RSA_MINIMUM_MODULUS_SIZE   768
+
 #endif                         /* SSH_H */
index d7722f4b9bf400becf267d73b07121e3b21732f9..d2024a2b7061ebf059a19fe9549daabd34a4c1f7 100644 (file)
@@ -13,7 +13,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshconnect1.c,v 1.48 2002/02/11 16:15:46 markus Exp $");
+RCSID("$OpenBSD: sshconnect1.c,v 1.50 2002/04/21 16:25:06 stevesk Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/md5.h>
@@ -23,6 +23,9 @@ RCSID("$OpenBSD: sshconnect1.c,v 1.48 2002/02/11 16:15:46 markus Exp $");
 #endif
 #ifdef KRB5
 #include <krb5.h>
+#ifndef HEIMDAL
+#define krb5_get_err_text(context,code) error_message(code)
+#endif /* !HEIMDAL */
 #endif
 #ifdef AFS
 #include <kafs.h>
@@ -459,6 +462,8 @@ try_krb4_authentication(void)
 
                /* Get server's response. */
                reply = packet_get_string((u_int *) &auth.length);
+               if (auth.length >= MAX_KTXT_LEN)
+                       fatal("Kerberos v4: Malformed response from server");
                memcpy(auth.dat, reply, auth.length);
                xfree(reply);
 
@@ -519,6 +524,23 @@ try_krb5_authentication(krb5_context *context, krb5_auth_context *auth_context)
                ret = 0;
                goto out;
        }
+       
+       problem = krb5_auth_con_init(*context, auth_context);
+       if (problem) {
+               debug("Kerberos v5: krb5_auth_con_init failed");
+               ret = 0;
+               goto out;
+       }
+
+#ifndef HEIMDAL
+       problem = krb5_auth_con_setflags(*context, *auth_context,
+                                        KRB5_AUTH_CONTEXT_RET_TIME);
+       if (problem) {
+               debug("Keberos v5: krb5_auth_con_setflags failed");
+               ret = 0;
+               goto out;
+       }
+#endif
 
        tkfile = krb5_cc_default_name(*context);
        if (strncmp(tkfile, "FILE:", 5) == 0)
@@ -595,7 +617,11 @@ try_krb5_authentication(krb5_context *context, krb5_auth_context *auth_context)
        if (reply != NULL)
                krb5_free_ap_rep_enc_part(*context, reply);
        if (ap.length > 0)
+#ifdef HEIMDAL
                krb5_data_free(&ap);
+#else
+               krb5_free_data_contents(*context, &ap);
+#endif
 
        return (ret);
 }
@@ -608,7 +634,11 @@ send_krb5_tgt(krb5_context context, krb5_auth_context auth_context)
        krb5_data outbuf;
        krb5_ccache ccache = NULL;
        krb5_creds creds;
+#ifdef HEIMDAL
        krb5_kdc_flags flags;
+#else
+       int forwardable;
+#endif
        const char *remotehost;
 
        memset(&creds, 0, sizeof(creds));
@@ -616,7 +646,13 @@ send_krb5_tgt(krb5_context context, krb5_auth_context auth_context)
 
        fd = packet_get_connection_in();
 
+#ifdef HEIMDAL
        problem = krb5_auth_con_setaddrs_from_fd(context, auth_context, &fd);
+#else
+       problem = krb5_auth_con_genaddrs(context, auth_context, fd,
+                       KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR |
+                       KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR);
+#endif
        if (problem)
                goto out;
 
@@ -628,23 +664,35 @@ send_krb5_tgt(krb5_context context, krb5_auth_context auth_context)
        if (problem)
                goto out;
 
+       remotehost = get_canonical_hostname(1);
+       
+#ifdef HEIMDAL
        problem = krb5_build_principal(context, &creds.server,
            strlen(creds.client->realm), creds.client->realm,
            "krbtgt", creds.client->realm, NULL);
+#else
+       problem = krb5_build_principal(context, &creds.server,
+           creds.client->realm.length, creds.client->realm.data,
+           "host", remotehost, NULL);
+#endif
        if (problem)
                goto out;
 
        creds.times.endtime = 0;
 
+#ifdef HEIMDAL
        flags.i = 0;
        flags.b.forwarded = 1;
        flags.b.forwardable = krb5_config_get_bool(context,  NULL,
            "libdefaults", "forwardable", NULL);
-
-       remotehost = get_canonical_hostname(1);
-
        problem = krb5_get_forwarded_creds(context, auth_context,
            ccache, flags.i, remotehost, &creds, &outbuf);
+#else
+       forwardable = 1;
+       problem = krb5_fwd_tgt_creds(context, auth_context, remotehost,
+           creds.client, creds.server, ccache, forwardable, &outbuf);
+#endif
+
        if (problem)
                goto out;
 
@@ -843,7 +891,7 @@ try_challenge_response_authentication(void)
                        error("Permission denied, please try again.");
                if (options.cipher == SSH_CIPHER_NONE)
                        log("WARNING: Encryption is disabled! "
-                           "Reponse will be transmitted in clear text.");
+                           "Response will be transmitted in clear text.");
                response = read_passphrase(prompt, 0);
                if (strcmp(response, "") == 0) {
                        xfree(response);
index c5b5ee51550c262f40af6bb7aeeb6d9833001c74..1ee92ab0d740d2d9f507415ef82688a3a7da58a9 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.97 2002/02/25 16:33:27 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.99 2002/03/26 15:58:46 markus Exp $");
 
 #include "ssh.h"
 #include "ssh2.h"
@@ -172,6 +172,7 @@ void        input_userauth_banner(int, u_int32_t, void *);
 void   input_userauth_error(int, u_int32_t, void *);
 void   input_userauth_info_req(int, u_int32_t, void *);
 void   input_userauth_pk_ok(int, u_int32_t, void *);
+void   input_userauth_passwd_changereq(int, u_int32_t, void *);
 
 int    userauth_none(Authctxt *);
 int    userauth_pubkey(Authctxt *);
@@ -391,7 +392,7 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
                        debug("no key from blob. pkalg %s", pkalg);
                        break;
                }
-               if (key->type != pktype) { 
+               if (key->type != pktype) {
                        error("input_userauth_pk_ok: type mismatch "
                            "for decoded key (received %d, expected %d)",
                             key->type, pktype);
@@ -439,7 +440,7 @@ int
 userauth_passwd(Authctxt *authctxt)
 {
        static int attempt = 0;
-       char prompt[80];
+       char prompt[150];
        char *password;
 
        if (attempt++ >= options.number_of_password_prompts)
@@ -461,13 +462,85 @@ userauth_passwd(Authctxt *authctxt)
        xfree(password);
        packet_add_padding(64);
        packet_send();
+
+       dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, 
+           &input_userauth_passwd_changereq);
+
        return 1;
 }
+/*
+ * parse PASSWD_CHANGEREQ, prompt user and send SSH2_MSG_USERAUTH_REQUEST
+ */
+void
+input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
+{
+       Authctxt *authctxt = ctxt;
+       char *info, *lang, *password = NULL, *retype = NULL;
+       char prompt[150];
+
+       debug2("input_userauth_passwd_changereq");
+
+       if (authctxt == NULL)
+               fatal("input_userauth_passwd_changereq: "
+                   "no authentication context");
+
+       info = packet_get_string(NULL);
+       lang = packet_get_string(NULL);
+       if (strlen(info) > 0)
+               log("%s", info);
+       xfree(info);
+       xfree(lang);
+       packet_start(SSH2_MSG_USERAUTH_REQUEST);
+       packet_put_cstring(authctxt->server_user);
+       packet_put_cstring(authctxt->service);
+       packet_put_cstring(authctxt->method->name);
+       packet_put_char(1);                     /* additional info */
+       snprintf(prompt, sizeof(prompt), 
+           "Enter %.30s@%.128s's old password: ",
+           authctxt->server_user, authctxt->host);
+       password = read_passphrase(prompt, 0);
+       packet_put_cstring(password);
+       memset(password, 0, strlen(password));
+       xfree(password);
+       password = NULL;
+       while (password == NULL) {
+               snprintf(prompt, sizeof(prompt), 
+                   "Enter %.30s@%.128s's new password: ",
+                   authctxt->server_user, authctxt->host);
+               password = read_passphrase(prompt, RP_ALLOW_EOF);
+               if (password == NULL) {
+                       /* bail out */
+                       return;
+               }
+               snprintf(prompt, sizeof(prompt), 
+                   "Retype %.30s@%.128s's new password: ",
+                   authctxt->server_user, authctxt->host);
+               retype = read_passphrase(prompt, 0);
+               if (strcmp(password, retype) != 0) {
+                       memset(password, 0, strlen(password));
+                       xfree(password);
+                       log("Mismatch; try again, EOF to quit.");
+                       password = NULL;
+               }
+               memset(retype, 0, strlen(retype));
+               xfree(retype);
+       }
+       packet_put_cstring(password);
+       memset(password, 0, strlen(password));
+       xfree(password);
+       packet_add_padding(64);
+       packet_send();
+       
+       dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, 
+           &input_userauth_passwd_changereq);
+}
 
 static void
 clear_auth_state(Authctxt *authctxt)
 {
        /* XXX clear authentication state */
+       dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, NULL);
+
        if (authctxt->last_key != NULL && authctxt->last_key_hint == -1) {
                debug3("clear_auth_state: key_free %p", authctxt->last_key);
                key_free(authctxt->last_key);
index 13d80e3b8354e29f8489d7f63af8c043a747d30c..138bf6510694fde134ba1dd3a841799d61b429f6 100644 (file)
@@ -34,7 +34,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: sshd.8,v 1.170 2002/02/28 20:46:10 stevesk Exp $
+.\" $OpenBSD: sshd.8,v 1.181 2002/05/15 21:02:53 markus Exp $
 .Dd September 25, 1999
 .Dt SSHD 8
 .Os
@@ -116,14 +116,14 @@ Rhosts authentication is normally disabled
 because it is fundamentally insecure, but can be enabled in the server
 configuration file if desired.
 System security is not improved unless
-.Xr rshd 8 ,
-.Xr rlogind 8 ,
+.Nm rshd ,
+.Nm rlogind ,
 and
-.Xr rexecd 8
+.Xr rexecd
 are disabled (thus completely disabling
-.Xr rlogin 1
+.Xr rlogin
 and
-.Xr rsh 1
+.Xr rsh
 into the machine).
 .Pp
 .Ss SSH protocol version 2
@@ -332,7 +332,7 @@ keywords are case-insensitive and arguments are case-sensitive):
 .It Cm AFSTokenPassing
 Specifies whether an AFS token may be forwarded to the server.
 Default is
-.Dq yes .
+.Dq no .
 .It Cm AllowGroups
 This keyword can be followed by a list of group name patterns, separated
 by spaces.
@@ -390,6 +390,7 @@ may be relevant for getting legal protection.
 The contents of the specified file are sent to the remote user before
 authentication is allowed.
 This option is only available for protocol version 2.
+By default, no banner is displayed.
 .Pp
 .It Cm ChallengeResponseAuthentication
 Specifies whether challenge response authentication is allowed.
@@ -570,7 +571,7 @@ the Kerberos KDC.
 To use this option, the server needs a
 Kerberos servtab which allows the verification of the KDC's identity.
 Default is
-.Dq yes .
+.Dq no .
 .It Cm KerberosOrLocalPasswd
 If set then if password authentication through Kerberos fails then
 the password will be validated via any additional local mechanism
@@ -839,7 +840,19 @@ will be disabled because
 .Xr login 1
 does not know how to handle
 .Xr xauth 1
-cookies.
+cookies.  If
+.Cm UsePrivilegeSeparation
+is specified, it will be disabled after authentication.
+.It Cm UsePrivilegeSeparation
+Specifies whether
+.Nm
+separated privileges by creating an unprivileged child process
+to deal with incoming network traffic.  After successful authentication,
+another process will be created that has the privilege of the authenticated
+user.  The goal of privilege separation is to prevent privilege
+escalation by containing any corruption within the unprivileged processes.
+The default is
+.Dq no .
 .It Cm VerifyReverseMapping
 Specifies whether
 .Nm
@@ -1023,6 +1036,10 @@ or the
 .Pa id_rsa.pub
 file and edit it.
 .Pp
+.Nm
+enforces a minimum RSA key modulus size for protocol 1
+and protocol 2 keys of 768 bits.
+.Pp
 The options (if present) consist of comma-separated option
 specifications.
 No spaces are permitted, except within double quotes.
@@ -1307,13 +1324,17 @@ only by the user; it need not be readable by anyone else.
 .It Pa $HOME/.ssh/rc
 If this file exists, it is run with /bin/sh after reading the
 environment files but before starting the user's shell or command.
-If X11 spoofing is in use, this will receive the "proto cookie" pair in
-standard input (and
+It must not produce any output on stdout; stderr must be used
+instead.
+If X11 forwarding is in use, it will receive the "proto cookie" pair in
+its standard input (and
 .Ev DISPLAY
-in environment).
-This must call
+in its environment).
+The script must call
 .Xr xauth 1
-in that case.
+because
+.Nm
+will not run xauth automatically to add X11 cookies.
 .Pp
 The primary purpose of this file is to run any initialization routines
 which may be needed before the user's home directory becomes
@@ -1322,15 +1343,22 @@ accessible; AFS is a particular example of such an environment.
 This file will probably contain some initialization code followed by
 something similar to:
 .Bd -literal
-       if read proto cookie; then
-               echo add $DISPLAY $proto $cookie | xauth -q -
+if read proto cookie && [ -n "$DISPLAY" ]; then
+       if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
+               # X11UseLocalhost=yes
+               xauth add unix:`echo $DISPLAY |
+                   cut -c11-` $proto $cookie
+       else
+               # X11UseLocalhost=no
+               xauth add $DISPLAY $proto $cookie
        fi
+fi
 .Ed
 .Pp
 If this file does not exist,
 .Pa /etc/ssh/sshrc
 is run, and if that
-does not exist either, xauth is used to store the cookie.
+does not exist either, xauth is used to add the cookie.
 .Pp
 This file should be writable only by the user, and need not be
 readable by anyone else.
@@ -1350,6 +1378,8 @@ removed many bugs, re-added newer features and
 created OpenSSH.
 Markus Friedl contributed the support for SSH
 protocol versions 1.5 and 2.0.
+Niels Provos and Markus Friedl contributed support
+for privilege separation.
 .Sh SEE ALSO
 .Xr scp 1 ,
 .Xr sftp 1 ,
@@ -1367,8 +1397,8 @@ protocol versions 1.5 and 2.0.
 .%A T. Rinne
 .%A S. Lehtinen
 .%T "SSH Protocol Architecture"
-.%N draft-ietf-secsh-architecture-09.txt
-.%D July 2001
+.%N draft-ietf-secsh-architecture-12.txt
+.%D January 2002
 .%O work in progress material
 .Re
 .Rs
@@ -1376,7 +1406,7 @@ protocol versions 1.5 and 2.0.
 .%A N. Provos
 .%A W. A. Simpson
 .%T "Diffie-Hellman Group Exchange for the SSH Transport Layer Protocol"
-.%N draft-ietf-secsh-dh-group-exchange-01.txt
-.%D April 2001
+.%N draft-ietf-secsh-dh-group-exchange-02.txt
+.%D January 2002
 .%O work in progress material
 .Re
index ea929325196e4a0dbf21915973bcbec6fbe354f8..45ccb3d47972e4634f2f438be3621f349f512135 100644 (file)
  * called by a name other than "ssh" or "Secure Shell".
  *
  * SSH2 implementation:
+ * Privilege Separation:
  *
- * Copyright (c) 2000 Markus Friedl.  All rights reserved.
+ * Copyright (c) 2000, 2001, 2002 Markus Friedl.  All rights reserved.
+ * Copyright (c) 2002 Niels Provos.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.228 2002/02/27 21:23:13 stevesk Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.242 2002/05/15 15:47:49 mouring Exp $");
 
 #include <openssl/dh.h>
 #include <openssl/bn.h>
 #include <openssl/md5.h>
+#include <openssl/rand.h>
+#ifdef HAVE_SECUREWARE
+#include <sys/security.h>
+#include <prot.h>
+#endif
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -72,6 +79,11 @@ RCSID("$OpenBSD: sshd.c,v 1.228 2002/02/27 21:23:13 stevesk Exp $");
 #include "misc.h"
 #include "dispatch.h"
 #include "channels.h"
+#include "session.h"
+#include "monitor_mm.h"
+#include "monitor.h"
+#include "monitor_wrap.h"
+#include "monitor_fdpass.h"
 
 #ifdef LIBWRAP
 #include <tcpd.h>
@@ -189,8 +201,13 @@ u_int utmp_len = MAXHOSTNAMELEN;
 int *startup_pipes = NULL;
 int startup_pipe;              /* in child */
 
+/* variables used for privilege separation */
+extern struct monitor *pmonitor;
+extern int use_privsep;
+
 /* Prototypes for various functions defined later in this file. */
 void destroy_sensitive_data(void);
+void demote_sensitive_data(void);
 
 static void do_ssh1_kex(void);
 static void do_ssh2_kex(void);
@@ -263,10 +280,12 @@ sigterm_handler(int sig)
 static void
 main_sigchld_handler(int sig)
 {
+       pid_t pid;
        int save_errno = errno;
        int status;
 
-       while (waitpid(-1, &status, WNOHANG) > 0)
+       while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
+           (pid < 0 && errno == EINTR))
                ;
 
        signal(SIGCHLD, main_sigchld_handler);
@@ -477,6 +496,160 @@ destroy_sensitive_data(void)
        memset(sensitive_data.ssh1_cookie, 0, SSH_SESSION_KEY_LENGTH);
 }
 
+/* Demote private to public keys for network child */
+void
+demote_sensitive_data(void)
+{
+       Key *tmp;
+       int i;
+
+       if (sensitive_data.server_key) {
+               tmp = key_demote(sensitive_data.server_key);
+               key_free(sensitive_data.server_key);
+               sensitive_data.server_key = tmp;
+       }
+
+       for (i = 0; i < options.num_host_key_files; i++) {
+               if (sensitive_data.host_keys[i]) {
+                       tmp = key_demote(sensitive_data.host_keys[i]);
+                       key_free(sensitive_data.host_keys[i]);
+                       sensitive_data.host_keys[i] = tmp;
+                       if (tmp->type == KEY_RSA1)
+                               sensitive_data.ssh1_host_key = tmp;
+               }
+       }
+
+       /* We do not clear ssh1_host key and cookie.  XXX - Okay Niels? */
+}
+
+static void
+privsep_preauth_child(void)
+{
+       u_int32_t rand[256];
+       int i;
+       struct passwd *pw;
+
+       /* Enable challenge-response authentication for privilege separation */
+       privsep_challenge_enable();
+
+       for (i = 0; i < 256; i++)
+               rand[i] = arc4random();
+       RAND_seed(rand, sizeof(rand));
+
+       /* Demote the private keys to public keys. */
+       demote_sensitive_data();
+
+       if ((pw = getpwnam(SSH_PRIVSEP_USER)) == NULL)
+               fatal("Privilege separation user %s does not exist",
+                   SSH_PRIVSEP_USER);
+       memset(pw->pw_passwd, 0, strlen(pw->pw_passwd));
+       endpwent();
+
+       /* Change our root directory*/
+       if (chroot(_PATH_PRIVSEP_CHROOT_DIR) == -1)
+               fatal("chroot(\"%s\"): %s", _PATH_PRIVSEP_CHROOT_DIR,
+                   strerror(errno));
+       if (chdir("/") == -1)
+               fatal("chdir(\"/\"): %s", strerror(errno));
+
+       /* Drop our privileges */
+       debug3("privsep user:group %u:%u", (u_int)pw->pw_uid,
+           (u_int)pw->pw_gid);
+       do_setusercontext(pw);
+}
+
+static Authctxt*
+privsep_preauth(void)
+{
+       Authctxt *authctxt = NULL;
+       int status;
+       pid_t pid;
+
+       /* Set up unprivileged child process to deal with network data */
+       pmonitor = monitor_init();
+       /* Store a pointer to the kex for later rekeying */
+       pmonitor->m_pkex = &xxx_kex;
+
+       pid = fork();
+       if (pid == -1) {
+               fatal("fork of unprivileged child failed");
+       } else if (pid != 0) {
+               debug2("Network child is on pid %d", pid);
+
+               close(pmonitor->m_recvfd);
+               authctxt = monitor_child_preauth(pmonitor);
+               close(pmonitor->m_sendfd);
+
+               /* Sync memory */
+               monitor_sync(pmonitor);
+
+               /* Wait for the child's exit status */
+               while (waitpid(pid, &status, 0) < 0)
+                       if (errno != EINTR)
+                               break;
+               return (authctxt);
+       } else {
+               /* child */
+
+               close(pmonitor->m_sendfd);
+
+               /* Demote the child */
+               if (getuid() == 0 || geteuid() == 0)
+                       privsep_preauth_child();
+               setproctitle("%s", "[net]");
+       }
+       return (NULL);
+}
+
+static void
+privsep_postauth(Authctxt *authctxt)
+{
+       extern Authctxt *x_authctxt;
+
+       /* XXX - Remote port forwarding */
+       x_authctxt = authctxt;
+
+       if (authctxt->pw->pw_uid == 0 || options.use_login) {
+               /* File descriptor passing is broken or root login */
+               monitor_apply_keystate(pmonitor);
+               use_privsep = 0;
+               return;
+       }
+
+       /* Authentication complete */
+       alarm(0);
+       if (startup_pipe != -1) {
+               close(startup_pipe);
+               startup_pipe = -1;
+       }
+
+       /* New socket pair */
+       monitor_reinit(pmonitor);
+
+       pmonitor->m_pid = fork();
+       if (pmonitor->m_pid == -1)
+               fatal("fork of unprivileged child failed");
+       else if (pmonitor->m_pid != 0) {
+               debug2("User child is on pid %d", pmonitor->m_pid);
+               close(pmonitor->m_recvfd);
+               monitor_child_postauth(pmonitor);
+
+               /* NEVERREACHED */
+               exit(0);
+       }
+
+       close(pmonitor->m_sendfd);
+
+       /* Demote the private keys to public keys. */
+       demote_sensitive_data();
+
+       /* Drop privileges */
+       do_setusercontext(authctxt->pw);
+
+       /* It is safe now to apply the key state */
+       monitor_apply_keystate(pmonitor);
+}
+
 static char *
 list_hostkey_types(void)
 {
@@ -506,7 +679,7 @@ list_hostkey_types(void)
        return p;
 }
 
-static Key *
+Key *
 get_hostkey_by_type(int type)
 {
        int i;
@@ -518,6 +691,25 @@ get_hostkey_by_type(int type)
        return NULL;
 }
 
+Key *
+get_hostkey_by_index(int ind)
+{
+       if (ind < 0 || ind >= options.num_host_key_files)
+               return (NULL);
+       return (sensitive_data.host_keys[ind]);
+}
+
+int
+get_hostkey_index(Key *key)
+{
+       int i;
+       for (i = 0; i < options.num_host_key_files; i++) {
+               if (key == sensitive_data.host_keys[i])
+                       return (i);
+       }
+       return (-1);
+}
+
 /*
  * returns 1 if connection should be dropped, 0 otherwise.
  * dropping starts at connection #max_startups_begin with a probability
@@ -594,9 +786,13 @@ main(int ac, char **av)
        int listen_sock, maxfd;
        int startup_p[2];
        int startups = 0;
+       Authctxt *authctxt;
        Key *key;
        int ret, key_used = 0;
 
+#ifdef HAVE_SECUREWARE
+       (void)set_auth_parameters(ac, av);
+#endif
        __progname = get_progname(av[0]);
        init_rng();
 
@@ -809,9 +1005,15 @@ main(int ac, char **av)
        if (test_flag)
                exit(0);
 
-#ifdef HAVE_SCO_PROTECTED_PW
-       (void) set_auth_parameters(ac, av);
-#endif
+       /*
+        * Clear out any supplemental groups we may have inherited.  This
+        * prevents inadvertent creation of files with bad modes (in the
+        * portable version at least, it's certainly possible for PAM 
+        * to create a file, and we can't control the code in every 
+        * module which might be used).
+        */
+       if (setgroups(0, NULL) < 0)
+               debug("setgroups() failed: %.200s", strerror(errno));
 
        /* Initialize the log (it is reinitialized below in case we forked). */
        if (debug_flag && !inetd_flag)
@@ -1129,6 +1331,14 @@ main(int ac, char **av)
 
        /* This is the child processing a new connection. */
 
+       /*
+        * Create a new session and process group since the 4.4BSD
+        * setlogin() affects the entire process group.  We don't
+        * want the child to be able to affect the parent.
+        */
+       if (setsid() < 0)
+               error("setsid: %.100s", strerror(errno));
+
        /*
         * Disable the key regeneration alarm.  We will not regenerate the
         * key since we are no longer in a position to give it to anyone. We
@@ -1231,15 +1441,43 @@ main(int ac, char **av)
 
        packet_set_nonblocking();
 
+       if (use_privsep)
+               if ((authctxt = privsep_preauth()) != NULL)
+                       goto authenticated;
+
        /* perform the key exchange */
        /* authenticate user and start session */
        if (compat20) {
                do_ssh2_kex();
-               do_authentication2();
+               authctxt = do_authentication2();
        } else {
                do_ssh1_kex();
-               do_authentication();
+               authctxt = do_authentication();
+       }
+       /*
+        * If we use privilege separation, the unprivileged child transfers
+        * the current keystate and exits
+        */
+       if (use_privsep) {
+               mm_send_keystate(pmonitor);
+               exit(0);
+       }
+
+ authenticated:
+       /*
+        * In privilege separation, we fork another child and prepare
+        * file descriptor passing.
+        */
+       if (use_privsep) {
+               privsep_postauth(authctxt);
+               /* the monitor process [priv] will not return */
+               if (!compat20)
+                       destroy_sensitive_data();
        }
+
+       /* Perform session preparation. */
+       do_authenticated(authctxt);
+
        /* The connection has been terminated. */
        verbose("Closing connection to %.100s", remote_ip);
 
@@ -1248,9 +1486,57 @@ main(int ac, char **av)
 #endif /* USE_PAM */
 
        packet_close();
+
+       if (use_privsep)
+               mm_terminate();
+
        exit(0);
 }
 
+/*
+ * Decrypt session_key_int using our private server key and private host key
+ * (key with larger modulus first).
+ */
+int
+ssh1_session_key(BIGNUM *session_key_int)
+{
+       int rsafail = 0;
+
+       if (BN_cmp(sensitive_data.server_key->rsa->n, sensitive_data.ssh1_host_key->rsa->n) > 0) {
+               /* Server key has bigger modulus. */
+               if (BN_num_bits(sensitive_data.server_key->rsa->n) <
+                   BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) + SSH_KEY_BITS_RESERVED) {
+                       fatal("do_connection: %s: server_key %d < host_key %d + SSH_KEY_BITS_RESERVED %d",
+                           get_remote_ipaddr(),
+                           BN_num_bits(sensitive_data.server_key->rsa->n),
+                           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
+                           SSH_KEY_BITS_RESERVED);
+               }
+               if (rsa_private_decrypt(session_key_int, session_key_int,
+                   sensitive_data.server_key->rsa) <= 0)
+                       rsafail++;
+               if (rsa_private_decrypt(session_key_int, session_key_int,
+                   sensitive_data.ssh1_host_key->rsa) <= 0)
+                       rsafail++;
+       } else {
+               /* Host key has bigger modulus (or they are equal). */
+               if (BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) <
+                   BN_num_bits(sensitive_data.server_key->rsa->n) + SSH_KEY_BITS_RESERVED) {
+                       fatal("do_connection: %s: host_key %d < server_key %d + SSH_KEY_BITS_RESERVED %d",
+                           get_remote_ipaddr(),
+                           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
+                           BN_num_bits(sensitive_data.server_key->rsa->n),
+                           SSH_KEY_BITS_RESERVED);
+               }
+               if (rsa_private_decrypt(session_key_int, session_key_int,
+                   sensitive_data.ssh1_host_key->rsa) < 0)
+                       rsafail++;
+               if (rsa_private_decrypt(session_key_int, session_key_int,
+                   sensitive_data.server_key->rsa) < 0)
+                       rsafail++;
+       }
+       return (rsafail);
+}
 /*
  * SSH1 key exchange
  */
@@ -1366,43 +1652,9 @@ do_ssh1_kex(void)
        packet_set_protocol_flags(protocol_flags);
        packet_check_eom();
 
-       /*
-        * Decrypt it using our private server key and private host key (key
-        * with larger modulus first).
-        */
-       if (BN_cmp(sensitive_data.server_key->rsa->n, sensitive_data.ssh1_host_key->rsa->n) > 0) {
-               /* Server key has bigger modulus. */
-               if (BN_num_bits(sensitive_data.server_key->rsa->n) <
-                   BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) + SSH_KEY_BITS_RESERVED) {
-                       fatal("do_connection: %s: server_key %d < host_key %d + SSH_KEY_BITS_RESERVED %d",
-                           get_remote_ipaddr(),
-                           BN_num_bits(sensitive_data.server_key->rsa->n),
-                           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
-                           SSH_KEY_BITS_RESERVED);
-               }
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.server_key->rsa) <= 0)
-                       rsafail++;
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.ssh1_host_key->rsa) <= 0)
-                       rsafail++;
-       } else {
-               /* Host key has bigger modulus (or they are equal). */
-               if (BN_num_bits(sensitive_data.ssh1_host_key->rsa->n) <
-                   BN_num_bits(sensitive_data.server_key->rsa->n) + SSH_KEY_BITS_RESERVED) {
-                       fatal("do_connection: %s: host_key %d < server_key %d + SSH_KEY_BITS_RESERVED %d",
-                           get_remote_ipaddr(),
-                           BN_num_bits(sensitive_data.ssh1_host_key->rsa->n),
-                           BN_num_bits(sensitive_data.server_key->rsa->n),
-                           SSH_KEY_BITS_RESERVED);
-               }
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.ssh1_host_key->rsa) < 0)
-                       rsafail++;
-               if (rsa_private_decrypt(session_key_int, session_key_int,
-                   sensitive_data.server_key->rsa) < 0)
-                       rsafail++;
-       }
+       /* Decrypt session_key_int using host/server keys */
+       rsafail = PRIVSEP(ssh1_session_key(session_key_int));
+
        /*
         * Extract session key from the decrypted integer.  The key is in the
         * least significant 256 bits of the integer; the first byte of the
@@ -1453,9 +1705,12 @@ do_ssh1_kex(void)
                for (i = 0; i < 16; i++)
                        session_id[i] = session_key[i] ^ session_key[i + 16];
        }
-       /* Destroy the private and public keys.  They will no longer be needed. */
+       /* Destroy the private and public keys. No longer. */
        destroy_sensitive_data();
 
+       if (use_privsep)
+               mm_ssh1_session_id(session_id);
+
        /* Destroy the decrypted integer.  It is no longer needed. */
        BN_clear_free(session_key_int);
 
@@ -1502,6 +1757,7 @@ do_ssh2_kex(void)
        kex->client_version_string=client_version_string;
        kex->server_version_string=server_version_string;
        kex->load_host_key=&get_hostkey_by_type;
+       kex->host_key_index=&get_hostkey_index;
 
        xxx_kex = kex;
 
index 3eb19875ad693a1aa1635ed3bfaddbc79dfedd79..e96f7a1d30d4987487e68e3fddd010c5d312abcd 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: sshd_config,v 1.48 2002/02/19 02:50:59 deraadt Exp $
+#      $OpenBSD: sshd_config,v 1.53 2002/05/15 21:02:53 markus Exp $
 
 # This is the sshd server system-wide configuration file.  See sshd(8)
 # for more information.
 #ChallengeResponseAuthentication yes
 
 # Kerberos options
-# KerberosAuthentication automatically enabled if keyfile exists
-#KerberosAuthentication yes
+#KerberosAuthentication no
 #KerberosOrLocalPasswd yes
 #KerberosTicketCleanup yes
 
-# AFSTokenPassing automatically enabled if k_hasafs() is true
-#AFSTokenPassing yes
+#AFSTokenPassing no
 
 # Kerberos TGT Passing only works with the AFS kaserver
 #KerberosTgtPassing no
@@ -82,6 +80,7 @@
 #PrintLastLog yes
 #KeepAlive yes
 #UseLogin no
+#UsePrivilegeSeparation no
 
 #MaxStartups 10
 # no default banner path
index 71c48b5730248bac2a8dc54ff44f6395f220df42..91de759390994055af2d4798687d4623736fd2c1 100644 (file)
@@ -199,6 +199,7 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
        const char *ptyminors = "0123456789abcdef";
        int num_minors = strlen(ptyminors);
        int num_ptys = strlen(ptymajors) * num_minors;
+       struct termios tio;
 
        for (i = 0; i < num_ptys; i++) {
                snprintf(buf, sizeof buf, "/dev/pty%c%c", ptymajors[i / num_minors],
@@ -223,6 +224,19 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
                        close(*ptyfd);
                        return 0;
                }
+               /* set tty modes to a sane state for broken clients */
+               if (tcgetattr(*ptyfd, &tio) < 0)
+                       log("Getting tty modes for pty failed: %.100s", strerror(errno));
+               else {
+                       tio.c_lflag |= (ECHO | ISIG | ICANON);
+                       tio.c_oflag |= (OPOST | ONLCR);
+                       tio.c_iflag |= ICRNL;
+
+                       /* Set the new modes for the terminal. */
+                       if (tcsetattr(*ptyfd, TCSANOW, &tio) < 0)
+                               log("Setting tty modes for pty failed: %.100s", strerror(errno));
+               }
+
                return 1;
        }
        return 0;
index ccc001f200197c5e0ce4ba168a17600e012b9fd0..8afdff1a4565bf45d0f07d77610cd65751cf33bb 100644 (file)
@@ -43,7 +43,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ttymodes.c,v 1.16 2001/12/27 20:39:58 markus Exp $");
+RCSID("$OpenBSD: ttymodes.c,v 1.17 2002/03/19 10:49:35 markus Exp $");
 
 #include "packet.h"
 #include "log.h"
@@ -402,17 +402,17 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
                                 * SSH1:
                                 * Opcodes 1 to 127 are defined to have
                                 * a one-byte argument.
-                                * Opcodes 128 to 159 are defined to have
-                                * an integer argument.
-                                */
+                                * Opcodes 128 to 159 are defined to have
+                                * an integer argument.
+                                */
                                if (opcode > 0 && opcode < 128) {
                                        n_bytes += 1;
                                        (void) packet_get_char();
                                        break;
                                } else if (opcode >= 128 && opcode < 160) {
-                                       n_bytes += 4;
-                                       (void) packet_get_int();
-                                       break;
+                                       n_bytes += 4;
+                                       (void) packet_get_int();
+                                       break;
                                } else {
                                        /*
                                         * It is a truly undefined opcode (160 to 255).
@@ -423,7 +423,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
                                         */
                                        log("parse_tty_modes: unknown opcode %d", opcode);
                                        goto set;
-                               }
+                               }
                        } else {
                                /*
                                 * SSH2:
@@ -440,7 +440,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
                                        log("parse_tty_modes: unknown opcode %d", opcode);
                                        goto set;
                                }
-                       }
+                       }
                }
        }
 
index bc67d74b0f6d1235294095260902f02b769c3bd5..9b16a6b51457605914a847f6b2f32a94076fe540 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: uidswap.c,v 1.19 2001/12/19 07:18:56 deraadt Exp $");
+RCSID("$OpenBSD: uidswap.c,v 1.20 2002/04/01 21:50:51 stevesk Exp $");
 
 #include "log.h"
 #include "uidswap.h"
@@ -84,7 +84,7 @@ temporarily_use_uid(struct passwd *pw)
        /* Set the effective uid to the given (unprivileged) uid. */
        if (setgroups(user_groupslen, user_groups) < 0)
                fatal("setgroups: %.100s", strerror(errno));
-#endif /* !HAVE_CYWIN */
+#endif /* !HAVE_CYGWIN */
 #ifndef SAVED_IDS_WORK_WITH_SETEUID
        /* Propagate the privileged gid to all of our gids. */
        if (setgid(getegid()) < 0)
index 529bd67fa3ac565f87f78da21e29fec5038f5249..823d288e3b5d48e485882a47f3f0ce726b3f93b5 100644 (file)
@@ -1,4 +1,3 @@
-/* $OpenBSD: version.h,v 1.28 2002/03/06 00:25:55 markus Exp $ */
-
-#define SSH_VERSION    "OpenSSH_3.1p1"
+/* $OpenBSD: version.h,v 1.31 2002/05/15 21:05:29 markus Exp $ */
 
+#define SSH_VERSION    "OpenSSH_3.2.2p1"
This page took 2.006089 seconds and 5 git commands to generate.