summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CREDITS7
-rw-r--r--ChangeLog2289
-rw-r--r--INSTALL4
-rw-r--r--LICENCE160
-rw-r--r--Makefile.in85
-rw-r--r--README.dns52
-rw-r--r--README.privsep5
-rw-r--r--README.smartcard80
-rw-r--r--TODO80
-rw-r--r--acconfig.h79
-rw-r--r--atomicio.c6
-rw-r--r--atomicio.h8
-rw-r--r--auth-chall.c26
-rw-r--r--auth-krb4.c368
-rw-r--r--auth-krb5.c228
-rw-r--r--auth-options.c8
-rw-r--r--auth-pam.c972
-rw-r--r--auth-pam.h22
-rw-r--r--auth-passwd.c224
-rw-r--r--auth-rh-rsa.c6
-rw-r--r--auth-rhosts.c13
-rw-r--r--auth-rsa.c6
-rw-r--r--auth-sia.c27
-rw-r--r--auth-sia.h4
-rw-r--r--auth.c158
-rw-r--r--auth.h39
-rw-r--r--auth1.c147
-rw-r--r--auth2-chall.c21
-rw-r--r--auth2-gss.c247
-rw-r--r--auth2-hostbased.c10
-rw-r--r--auth2-kbdint.c4
-rw-r--r--auth2-none.c8
-rw-r--r--auth2-pam.c165
-rw-r--r--auth2-pam.h8
-rw-r--r--auth2-passwd.c6
-rw-r--r--auth2-pubkey.c8
-rw-r--r--auth2.c45
-rw-r--r--authfd.c41
-rw-r--r--authfd.h6
-rw-r--r--authfile.c13
-rw-r--r--autom4te.cache/output.019182
-rw-r--r--autom4te.cache/requests111
-rw-r--r--autom4te.cache/traces.0947
-rw-r--r--bufaux.c8
-rw-r--r--bufaux.h2
-rw-r--r--buffer.c3
-rw-r--r--canohost.c52
-rw-r--r--channels.c263
-rw-r--r--cipher-3des1.c171
-rw-r--r--cipher-aes.c156
-rw-r--r--cipher-bf1.c97
-rw-r--r--cipher-ctr.c141
-rw-r--r--cipher.c380
-rw-r--r--clientloop.c48
-rw-r--r--compat.c17
-rw-r--r--compat.h8
-rw-r--r--config.h.in485
-rwxr-xr-xconfigure12980
-rw-r--r--configure.ac493
-rw-r--r--contrib/aix/README3
-rwxr-xr-xcontrib/aix/buildbff.sh13
-rwxr-xr-xcontrib/aix/inventory.sh2
-rw-r--r--contrib/aix/pam.conf20
-rw-r--r--contrib/caldera/openssh.spec6
-rw-r--r--contrib/cygwin/README2
-rw-r--r--contrib/cygwin/ssh-host-config23
-rw-r--r--contrib/cygwin/ssh-user-config8
-rw-r--r--contrib/findssl.sh159
-rw-r--r--contrib/redhat/openssh.spec27
-rw-r--r--contrib/suse/openssh.spec2
-rw-r--r--debian/README.Debian5
-rw-r--r--debian/changelog7
-rw-r--r--debian/po/da.po10
-rw-r--r--debian/po/de.po10
-rw-r--r--debian/po/es.po10
-rw-r--r--debian/po/fr.po24
-rw-r--r--debian/po/ja.po135
-rw-r--r--debian/po/nl.po388
-rw-r--r--debian/po/pl.po12
-rw-r--r--debian/po/pt_BR.po13
-rw-r--r--debian/po/templates.pot10
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/templates.master8
-rw-r--r--defines.h58
-rw-r--r--dh.c10
-rw-r--r--dispatch.c6
-rw-r--r--dns.c290
-rw-r--r--entropy.c10
-rw-r--r--groupaccess.c4
-rw-r--r--gss-genr.c256
-rw-r--r--gss-serv-krb5.c205
-rw-r--r--gss-serv.c292
-rw-r--r--hostfile.c6
-rw-r--r--includes.h11
-rw-r--r--key.c12
-rw-r--r--key.h5
-rw-r--r--log.c23
-rw-r--r--log.h4
-rw-r--r--loginrec.c81
-rw-r--r--loginrec.h7
-rw-r--r--logintest.c9
-rw-r--r--md5crypt.c162
-rw-r--r--md5crypt.h14
-rw-r--r--mdoc2man.awk340
-rw-r--r--mdoc2man.pl592
-rw-r--r--misc.c41
-rw-r--r--misc.h4
-rw-r--r--moduli.c617
-rw-r--r--moduli.h23
-rw-r--r--monitor.c362
-rw-r--r--monitor.h12
-rw-r--r--monitor_mm.c1
-rw-r--r--monitor_wrap.c230
-rw-r--r--monitor_wrap.h25
-rw-r--r--msg.c6
-rw-r--r--myproposal.h5
-rw-r--r--nchan.c50
-rw-r--r--openbsd-compat/Makefile.in6
-rw-r--r--openbsd-compat/base64.h50
-rw-r--r--openbsd-compat/basename.c39
-rw-r--r--openbsd-compat/basename.h12
-rw-r--r--openbsd-compat/bindresvport.c63
-rw-r--r--openbsd-compat/bindresvport.h12
-rw-r--r--openbsd-compat/bsd-arc4random.c3
-rw-r--r--openbsd-compat/bsd-arc4random.h (renamed from dns.h)40
-rw-r--r--openbsd-compat/bsd-cray.c810
-rw-r--r--openbsd-compat/bsd-cray.h34
-rw-r--r--openbsd-compat/bsd-cygwin_util.c95
-rw-r--r--openbsd-compat/bsd-cygwin_util.h15
-rw-r--r--openbsd-compat/bsd-getpeereid.h14
-rw-r--r--openbsd-compat/bsd-misc.c94
-rw-r--r--openbsd-compat/bsd-misc.h45
-rw-r--r--openbsd-compat/bsd-nextstep.c6
-rw-r--r--openbsd-compat/bsd-nextstep.h25
-rw-r--r--openbsd-compat/bsd-snprintf.c557
-rw-r--r--openbsd-compat/bsd-snprintf.h19
-rw-r--r--openbsd-compat/bsd-waitpid.c11
-rw-r--r--openbsd-compat/bsd-waitpid.h8
-rw-r--r--openbsd-compat/daemon.c11
-rw-r--r--openbsd-compat/daemon.h11
-rw-r--r--openbsd-compat/dirname.c42
-rw-r--r--openbsd-compat/dirname.h5
-rw-r--r--openbsd-compat/fake-gai-errnos.h14
-rw-r--r--openbsd-compat/fake-getaddrinfo.c135
-rw-r--r--openbsd-compat/fake-getaddrinfo.h47
-rw-r--r--openbsd-compat/fake-getnameinfo.c55
-rw-r--r--openbsd-compat/fake-getnameinfo.h20
-rw-r--r--openbsd-compat/fake-rfc2553.c220
-rw-r--r--openbsd-compat/fake-rfc2553.h154
-rw-r--r--openbsd-compat/fake-socket.h47
-rw-r--r--openbsd-compat/getcwd.c7
-rw-r--r--openbsd-compat/getcwd.h12
-rw-r--r--openbsd-compat/getgrouplist.c9
-rw-r--r--openbsd-compat/getgrouplist.h16
-rw-r--r--openbsd-compat/getopt.c8
-rw-r--r--openbsd-compat/getopt.h14
-rw-r--r--openbsd-compat/getrrsetbyname.c578
-rw-r--r--openbsd-compat/getrrsetbyname.h100
-rw-r--r--openbsd-compat/glob.c12
-rw-r--r--openbsd-compat/glob.h8
-rw-r--r--openbsd-compat/inet_aton.c12
-rw-r--r--openbsd-compat/inet_aton.h12
-rw-r--r--openbsd-compat/inet_ntoa.c8
-rw-r--r--openbsd-compat/inet_ntoa.h12
-rw-r--r--openbsd-compat/inet_ntop.c1
-rw-r--r--openbsd-compat/inet_ntop.h13
-rw-r--r--openbsd-compat/mktemp.c8
-rw-r--r--openbsd-compat/mktemp.h13
-rw-r--r--openbsd-compat/openbsd-compat.h175
-rw-r--r--openbsd-compat/port-aix.c91
-rw-r--r--openbsd-compat/port-aix.h26
-rw-r--r--openbsd-compat/port-irix.c43
-rw-r--r--openbsd-compat/port-irix.h36
-rw-r--r--openbsd-compat/readpassphrase.c40
-rw-r--r--openbsd-compat/realpath.c19
-rw-r--r--openbsd-compat/realpath.h13
-rw-r--r--openbsd-compat/rresvport.c9
-rw-r--r--openbsd-compat/rresvport.h12
-rw-r--r--openbsd-compat/setenv.c8
-rw-r--r--openbsd-compat/setenv.h14
-rw-r--r--openbsd-compat/setproctitle.c308
-rw-r--r--openbsd-compat/setproctitle.h13
-rw-r--r--openbsd-compat/strlcat.c41
-rw-r--r--openbsd-compat/strlcat.h12
-rw-r--r--openbsd-compat/strlcpy.c41
-rw-r--r--openbsd-compat/strlcpy.h12
-rw-r--r--openbsd-compat/strmode.c12
-rw-r--r--openbsd-compat/strmode.h7
-rw-r--r--openbsd-compat/strsep.c16
-rw-r--r--openbsd-compat/strsep.h12
-rw-r--r--openbsd-compat/sys-queue.h8
-rw-r--r--openbsd-compat/vis.c45
-rw-r--r--openbsd-compat/vis.h11
-rw-r--r--openbsd-compat/xcrypt.c116
-rw-r--r--openbsd-compat/xmmap.c5
-rw-r--r--openbsd-compat/xmmap.h23
-rw-r--r--packet.c181
-rw-r--r--packet.h15
-rw-r--r--progressmeter.c423
-rw-r--r--radix.c158
-rw-r--r--radix.h28
-rw-r--r--readconf.c182
-rw-r--r--readconf.h19
-rw-r--r--regress/Makefile61
-rw-r--r--regress/README.regress86
-rw-r--r--regress/agent-getpeereid.sh6
-rw-r--r--regress/agent-ptrace.sh18
-rw-r--r--regress/agent-timeout.sh12
-rw-r--r--regress/agent.sh2
-rw-r--r--regress/authorized_keys_root2
-rwxr-xr-xregress/copy.1bin0 -> 45948 bytes
-rwxr-xr-xregress/copy.2bin0 -> 45948 bytes
-rw-r--r--regress/dynamic-forward.sh47
-rw-r--r--regress/forwarding.sh7
-rw-r--r--regress/proto-version.sh2
-rw-r--r--regress/reconfigure.sh35
-rw-r--r--regress/rekey.sh31
-rw-r--r--regress/sftp-badcmds.sh78
-rw-r--r--regress/sftp-batch.sh4
-rw-r--r--regress/sftp-cmds.sh109
-rw-r--r--regress/sftp.sh26
-rw-r--r--regress/ssh-com-client.sh6
-rw-r--r--regress/ssh-com-keygen.sh4
-rw-r--r--regress/ssh-com-sftp.sh28
-rw-r--r--regress/ssh-com.sh6
-rw-r--r--regress/stderr-after-eof.sh14
-rw-r--r--regress/stderr-data.sh2
-rw-r--r--regress/test-exec.sh45
-rw-r--r--regress/transfer.sh2
-rw-r--r--regress/try-ciphers.sh5
-rw-r--r--regress/yes-head.sh2
-rw-r--r--scard-opensc.c85
-rw-r--r--scard.c13
-rw-r--r--scard.h3
-rw-r--r--scp.011
-rw-r--r--scp.120
-rw-r--r--scp.c108
-rw-r--r--servconf.c147
-rw-r--r--servconf.h19
-rw-r--r--serverloop.c20
-rw-r--r--session.c283
-rw-r--r--session.h5
-rw-r--r--sftp-client.c10
-rw-r--r--sftp-common.c6
-rw-r--r--sftp-int.c217
-rw-r--r--sftp-server.02
-rw-r--r--sftp-server.84
-rw-r--r--sftp-server.c10
-rw-r--r--sftp.045
-rw-r--r--sftp.193
-rw-r--r--sftp.c37
-rw-r--r--ssh-add.036
-rw-r--r--ssh-add.140
-rw-r--r--ssh-add.c9
-rw-r--r--ssh-agent.08
-rw-r--r--ssh-agent.114
-rw-r--r--ssh-agent.c52
-rw-r--r--ssh-gss.h121
-rw-r--r--ssh-keygen.088
-rw-r--r--ssh-keygen.1131
-rw-r--r--ssh-keygen.c149
-rw-r--r--ssh-keyscan.040
-rw-r--r--ssh-keyscan.153
-rw-r--r--ssh-keyscan.c14
-rw-r--r--ssh-keysign.06
-rw-r--r--ssh-keysign.86
-rw-r--r--ssh-keysign.c7
-rw-r--r--ssh-rand-helper.04
-rw-r--r--ssh-rand-helper.c16
-rw-r--r--ssh-rsa.c33
-rw-r--r--ssh.047
-rw-r--r--ssh.151
-rw-r--r--ssh.c90
-rw-r--r--ssh.h6
-rw-r--r--ssh2.h4
-rw-r--r--ssh_config5
-rw-r--r--ssh_config.0110
-rw-r--r--ssh_config.5121
-rw-r--r--sshconnect.c185
-rw-r--r--sshconnect1.c589
-rw-r--r--sshconnect2.c625
-rw-r--r--sshd.049
-rw-r--r--sshd.868
-rw-r--r--sshd.c181
-rw-r--r--sshd_config35
-rw-r--r--sshd_config.0117
-rw-r--r--sshd_config.5115
-rw-r--r--sshlogin.c6
-rw-r--r--sshpty.c24
-rw-r--r--sshtty.c5
-rw-r--r--ttymodes.c14
-rw-r--r--uidswap.c53
-rw-r--r--version.h4
293 files changed, 37461 insertions, 19285 deletions
diff --git a/CREDITS b/CREDITS
index 092229cf7..8d7b8a484 100644
--- a/CREDITS
+++ b/CREDITS
@@ -23,7 +23,7 @@ Chris Saia <csaia@wtower.com> - SuSE packaging
23Chris, the Young One <cky@pobox.com> - Password auth fixes 23Chris, the Young One <cky@pobox.com> - Password auth fixes
24Christos Zoulas <christos@zoulas.com> - Autoconf fixes 24Christos Zoulas <christos@zoulas.com> - Autoconf fixes
25Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes 25Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes
26Corinna Vinschen <vinschen@redhat.com> - Cygwin support 26Corinna Vinschen <vinschen@cygnus.com> - Cygwin support
27Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes 27Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes
28Darren Hall <dhall@virage.org> - AIX patches 28Darren Hall <dhall@virage.org> - AIX patches
29Darren Tucker <dtucker@zip.com.au> - AIX BFF package scripts 29Darren Tucker <dtucker@zip.com.au> - AIX BFF package scripts
@@ -49,7 +49,6 @@ Juergen Keil <jk@tools.de> - scp bugfixing
49KAMAHARA Junzo <kamahara@cc.kshosen.ac.jp> - Configure fixes 49KAMAHARA Junzo <kamahara@cc.kshosen.ac.jp> - Configure fixes
50Kees Cook <cook@cpoint.net> - scp fixes 50Kees Cook <cook@cpoint.net> - scp fixes
51Kenji Miyake <kenji@miyake.org> - Configure fixes 51Kenji Miyake <kenji@miyake.org> - Configure fixes
52Kevin Cawlfield <cawlfiel@us.ibm.com> - AIX fixes.
53Kevin O'Connor <kevin_oconnor@standardandpoors.com> - RSAless operation 52Kevin O'Connor <kevin_oconnor@standardandpoors.com> - RSAless operation
54Kevin Steves <stevesk@pobox.com> - HP support, bugfixes, improvements 53Kevin Steves <stevesk@pobox.com> - HP support, bugfixes, improvements
55Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes 54Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes
@@ -70,13 +69,11 @@ Pavel Kankovsky <peak@argo.troja.mff.cuni.cz> - Security fixes
70Pavel Troller <patrol@omni.sinus.cz> - Bugfixes 69Pavel Troller <patrol@omni.sinus.cz> - Bugfixes
71Pekka Savola <pekkas@netcore.fi> - Bugfixes 70Pekka Savola <pekkas@netcore.fi> - Bugfixes
72Peter Kocks <peter.kocks@baygate.com> - Makefile fixes 71Peter Kocks <peter.kocks@baygate.com> - Makefile fixes
73Peter Stuge <stuge@cdy.org> - mdoc2man.awk script
74Phil Hands <phil@hands.com> - Debian scripts, assorted patches 72Phil Hands <phil@hands.com> - Debian scripts, assorted patches
75Phil Karn <karn@ka9q.ampr.org> - Autoconf fixes 73Phil Karn <karn@ka9q.ampr.org> - Autoconf fixes
76Philippe WILLEM <Philippe.WILLEM@urssaf.fr> - Bugfixes 74Philippe WILLEM <Philippe.WILLEM@urssaf.fr> - Bugfixes
77Phill Camp <P.S.S.Camp@ukc.ac.uk> - login code fix 75Phill Camp <P.S.S.Camp@ukc.ac.uk> - login code fix
78Rip Loomis <loomisg@cist.saic.com> - Solaris package support, fixes 76Rip Loomis <loomisg@cist.saic.com> - Solaris package support, fixes
79Roumen Petrov <openssh@roumenpetrov.info> - Compile & configure fixes
80SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp> - Multiple bugfixes 77SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp> - Multiple bugfixes
81Simon Wilkinson <sxw@dcs.ed.ac.uk> - PAM fixes, Compat with MIT KrbV 78Simon Wilkinson <sxw@dcs.ed.ac.uk> - PAM fixes, Compat with MIT KrbV
82Solar Designer <solar@openwall.com> - many patches and technical assistance 79Solar Designer <solar@openwall.com> - many patches and technical assistance
@@ -94,5 +91,5 @@ Apologies to anyone I have missed.
94 91
95Damien Miller <djm@mindrot.org> 92Damien Miller <djm@mindrot.org>
96 93
97$Id: CREDITS,v 1.74 2003/09/07 02:34:54 dtucker Exp $ 94$Id: CREDITS,v 1.67.6.1 2003/04/29 09:12:07 djm Exp $
98 95
diff --git a/ChangeLog b/ChangeLog
index b5505da19..6ccc4d4ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,995 +1,3 @@
120030916
2 - (dtucker) [acconfig.h configure.ac defines.h session.c] Bug #252: Retrieve
3 PATH (or SUPATH) and UMASK from /etc/default/login on platforms that have it
4 (eg Solaris, Reliant Unix). Patch from Robert.Dahlem at siemens.com.
5 ok djm@
6 - (bal) OpenBSD Sync
7 - deraadt@cvs.openbsd.org 2003/09/16 03:03:47
8 [buffer.c]
9 do not expand buffer before attempting to reallocate it; markus ok
10 - (djm) Crank spec versions
11 - (djm) Banish (safe) sprintf from auth-pam.c. Patch from bal
12 - (tim) [configure.ac] Fix portability issues.
13 - (djm) Release 3.7p1
14
1520030914
16 - (dtucker) [Makefile regress/Makefile] Fix portability issues preventing
17 the regression tests from running with Solaris' make. Patch from Brian
18 Poole (raj at cerias.purdue.edu).
19 - (dtucker) [regress/Makefile] AIX's make doesn't like " +=", so replace
20 with vanilla "=".
21
2220030913
23 - (dtucker) [regress/agent-timeout.sh] Timeout of 5 sec is borderline for
24 slower hosts, increase to 10 sec.
25 - (dtucker) [auth-passwd.c] On AIX, call setauthdb() before loginsuccess(),
26 required to correctly reset failed login count when using a password
27 registry other than "files" (eg LDAP, see bug #543).
28 - (tim) [configure.ac] define WITH_ABBREV_NO_TTY for SCO.
29 Report by Roger Cornelius.
30 - (dtucker) [auth-pam.c] Use SSHD_PAM_SERVICE for PAM service name, patch
31 from cjwatson at debian.org.
32
3320030912
34 - (tim) [regress/agent-ptrace.sh] sh doesn't like "if ! shell_function; then".
35 - (tim) [Makefile.in] only mkdir regress if it does not exist.
36 - (tim) [regress/yes-head.sh] shell portability fix.
37
3820030911
39 - (dtucker) [configure.ac] Bug #588, #615: Move other libgen tests to after
40 the dirname test, to allow a broken dirname to be detected correctly.
41 Based partially on patch supplied by alex.kiernan at thus.net. ok djm@
42 - (tim) [configure.ac] Move libgen tests to before libwrap to unbreak
43 UnixWare 2.03 using --with-tcp-wrappers.
44 - (tim) [configure.ac] Prefer setuid/setgid on UnixWare and Open Server.
45 - (tim) [regress/agent-ptrace.sh regress/dynamic-forward.sh
46 regress/sftp-cmds.sh regress/stderr-after-eof.sh regress/test-exec.sh]
47 no longer depends on which(1). patch by dtucker@
48
4920030910
50 - (dtucker) [configure.ac] Bug #636: Add support for Cray's new X1 machine.
51 Patch from wendyp at cray.com.
52 - (dtucker) [configure.ac] Part of bug #615: tcsendbreak might be a macro.
53 - (dtucker) [regressh/yes-head.sh] Some platforms (eg Solaris) don't have
54 "yes".
55
5620030909
57 - (tim) [regress/Makefile] Fixes for building outside of a read-only
58 source tree.
59 - (tim) [regress/agent-timeout.sh] s/TIMEOUT/SSHAGENT_TIMEOUT/ Fixes conflict
60 with shell read-only variable.
61 - (tim) [regress/sftp-badcmds.sh regress/sftp-cmds.sh] Fix errors like
62 UX:rm: ERROR: Cannot remove '.' or '..'
63
6420030908
65 - (tim) [configure.ac openbsd-compat/getrrsetbyname.c] wrap _getshort and
66 _getlong in #ifndef
67 - (tim) [configure.ac acconfig.h openbsd-compat/getrrsetbyname.c] test for
68 HEADER.ad in arpa/nameser.h
69 - (tim) [ssh-keygen.c] s/PATH_MAX/MAXPATHLEN/ ok mouring@
70
7120030907
72 - (dtucker) [agent-ptrace.sh dynamic-forward.sh (all regress/)]
73 Put "which" inside quotes.
74 - (dtucker) [dynamic-forward.sh forwarding.sh sftp-batch.sh (all regress/)]
75 Add ${EXEEXT}: required to work on Cygwin.
76 - (dtucker) [regress/sftp-batch.sh] Make temporary batch file name more
77 distinctive, so "rm ${BATCH}.*" doesn't match the script itself.
78 - (dtucker) [regress/sftp-cmds.sh] Skip quoted file test on Cygwin.
79 - (dtucker) [openbsd-compat/xcrypt.c] #elsif -> #elif
80 - (dtucker) [acconfig.h] Typo.
81 - (dtucker) [CREDITS Makefile.in configure.ac mdoc2man.awk mdoc2man.pl]
82 Replace mdoc2man.pl with mdoc2man.awk, provided by Peter Stuge.
83
8420030906
85 - (dtucker) [acconfig.h configure.ac uidswap.c] Prefer setuid/setgid on AIX.
86
8720030905
88 - (dtucker) [Makefile.in] Add distclean target for regress/, fix clean target.
89
9020030904
91 - (dtucker) Portablize regression tests. Parts contributed by Roumen
92 Petrov, David M. Williams and Corinna Vinschen.
93 - [Makefile.in] Add "make tests" target and "make clean" hooks.
94 - [regress/agent-getpeereid.sh] Skip test on platforms that don't support
95 getpeereid.
96 - [regress/agent-ptrace.sh] Skip tests if platform doesn't support it or
97 gdb cannot be found.
98 - [regress/reconfigure/sh] Make path to sshd fully qualified if required.
99 - [regress/rekey.sh] Remove dependence on /dev/zero (not all platforms have
100 it). The sparse file will take less disk space too.
101 - [regress/sftp-cmds.sh] Ensure files used for test are readable.
102 - [regress/stderr-after-eof.sh] Search for a usable checksum program.
103 - [regress/sftp-badcmds.sh regress/sftp-cmds.sh regress/sftp.sh
104 regress/ssh-com-client.sh regress/ssh-com-sftp.sh regress/stderr-data.sh
105 regress/transfer.sh] Use ${EXEEXT} where appropriate.
106 - [regress/sftp.sh regress/ssh-com-sftp.sh] Remove dependency on /dev/stdin.
107 - [regress/agent-ptrace.sh regress/agent-timeout.sh]
108 "grep -q" -> "grep >/dev/null"
109 - [regress/agent.sh regress/proto-version.sh regress/ssh-com.sh
110 regress/test-exec.sh] Handle different ways of echoing without newlines.
111 - [regress/dynamic-forward.sh] Some "which" programs output on stderr.
112 - [regress/sftp-cmds.sh] Use portable "test" option.
113 - [regress/test-exec.sh] Use sudo, search for "whoami" equivalent, always
114 use Strictmodes no, wait longer for sshd startup.
115 - [regress/Makefile] Remove BSDisms.
116 - [regress/README.regress] Add a basic readme.
117 - [Makefile.in regress/agent-getpeereid.sh] config.h is now in $BUILDDIR
118 not $OBJ.
119 - [Makefile.in regress/agent-ptrace] Fix minor regress issues on Cygwin.
120
12120030903
122 - (djm) OpenBSD CVS Sync
123 - markus@cvs.openbsd.org 2003/08/26 09:58:43
124 [auth-passwd.c auth.c auth.h auth1.c auth2-none.c auth2-passwd.c]
125 [auth2.c monitor.c]
126 fix passwd auth for 'username leaks via timing'; with djm@, original
127 patches from solar
128 - markus@cvs.openbsd.org 2003/08/28 12:54:34
129 [auth.h]
130 remove kerberos support from ssh1, since it has been replaced with GSSAPI;
131 but keep kerberos passwd auth for ssh1 and 2; ok djm, hin, henning, ...
132 - markus@cvs.openbsd.org 2003/09/02 16:40:29
133 [version.h]
134 enter 3.7
135 - jmc@cvs.openbsd.org 2003/09/02 18:50:06
136 [sftp.1 ssh_config.5]
137 escape punctuation;
138 ok deraadt@
139
14020030902
141 - (djm) OpenBSD CVS Sync
142 - deraadt@cvs.openbsd.org 2003/08/24 17:36:51
143 [auth2-gss.c]
144 64 bit cleanups; markus ok
145 - markus@cvs.openbsd.org 2003/08/28 12:54:34
146 [auth-krb5.c auth.h auth1.c monitor.c monitor.h monitor_wrap.c]
147 [monitor_wrap.h readconf.c servconf.c session.c ssh_config.5]
148 [sshconnect1.c sshd.c sshd_config sshd_config.5]
149 remove kerberos support from ssh1, since it has been replaced with GSSAPI;
150 but keep kerberos passwd auth for ssh1 and 2; ok djm, hin, henning, ...
151 - markus@cvs.openbsd.org 2003/08/29 10:03:15
152 [compat.c compat.h]
153 SSH_BUG_K5USER is unused; ok henning@
154 - markus@cvs.openbsd.org 2003/08/29 10:04:36
155 [channels.c nchan.c]
156 be less chatty; debug -> debug2, cleanup; ok henning@
157 - markus@cvs.openbsd.org 2003/08/31 10:26:04
158 [progressmeter.c]
159 pass file_size + 1 to snprintf: fixes printing of truncated
160 file names; fix based on patch/report from sturm@;
161 - markus@cvs.openbsd.org 2003/08/31 12:14:22
162 [progressmeter.c]
163 do write to buf[-1]
164 - markus@cvs.openbsd.org 2003/08/31 13:29:05
165 [session.c]
166 call ssh_gssapi_storecreds conditionally from do_exec();
167 with sxw@inf.ed.ac.uk
168 - markus@cvs.openbsd.org 2003/08/31 13:30:18
169 [gss-serv.c]
170 correct string termination in parse_ename(); sxw@inf.ed.ac.uk
171 - markus@cvs.openbsd.org 2003/08/31 13:31:57
172 [gss-serv.c]
173 whitspace KNF
174 - markus@cvs.openbsd.org 2003/09/01 09:50:04
175 [sshd_config.5]
176 gss kex is not supported; sxw@inf.ed.ac.uk
177 - markus@cvs.openbsd.org 2003/09/01 12:50:46
178 [readconf.c]
179 rm gssapidelegatecreds alias; never supported before
180 - markus@cvs.openbsd.org 2003/09/01 13:52:18
181 [ssh.h]
182 rm whitespace
183 - markus@cvs.openbsd.org 2003/09/01 18:15:50
184 [readconf.c readconf.h servconf.c servconf.h ssh.c]
185 remove unused kerberos code; ok henning@
186 - markus@cvs.openbsd.org 2003/09/01 20:44:54
187 [auth2-gss.c]
188 fix leak
189 - (djm) Don't initialise pam_conv structures inline. Avoids HP/UX compiler
190 error. Part of Bug #423, patch from michael_steffens AT hp.com
191 - (djm) Bug #423: reorder setting of PAM_TTY and calling of PAM session
192 management (now done in do_setusercontext). Largely from
193 michael_steffens AT hp.com
194 - (djm) Fix openbsd-compat/ again - remove references to strl(cpy|cat).h
195
19620030829
197 - (bal) openbsd-compat/ clean up. Considate headers, add in Id on our
198 files, and added missing license to header.
199
20020030826
201 - (djm) Bug #629: Mark ssh_config option "pamauthenticationviakbdint"
202 as deprecated. Remove mention from README.privsep. Patch from
203 aet AT cc.hut.fi
204 - (dtucker) OpenBSD CVS Sync
205 - markus@cvs.openbsd.org 2003/08/22 10:56:09
206 [auth2.c auth2-gss.c auth.h compat.c compat.h gss-genr.c gss-serv-krb5.c
207 gss-serv.c monitor.c monitor.h monitor_wrap.c monitor_wrap.h readconf.c
208 readconf.h servconf.c servconf.h session.c session.h ssh-gss.h
209 ssh_config.5 sshconnect2.c sshd_config sshd_config.5]
210 support GSS API user authentication; patches from Simon Wilkinson,
211 stripped down and tested by Jakob and myself.
212 - markus@cvs.openbsd.org 2003/08/22 13:20:03
213 [sshconnect2.c]
214 remove support for "kerberos-2@ssh.com"
215 - markus@cvs.openbsd.org 2003/08/22 13:22:27
216 [auth2.c] (auth2-krb5.c removed)
217 nuke "kerberos-2@ssh.com"
218 - markus@cvs.openbsd.org 2003/08/22 20:55:06
219 [LICENCE]
220 add Simon Wilkinson
221 - deraadt@cvs.openbsd.org 2003/08/24 17:36:52
222 [monitor.c monitor_wrap.c sshconnect2.c]
223 64 bit cleanups; markus ok
224 - fgsch@cvs.openbsd.org 2003/08/25 08:13:09
225 [sftp-int.c]
226 fix div by zero when listing for filename lengths longer than width.
227 markus@ ok.
228 - djm@cvs.openbsd.org 2003/08/25 10:33:33
229 [sshconnect2.c]
230 fprintf->logit to silence login banner with "ssh -q"; ok markus@
231 - (dtucker) [Makefile.in acconfig.h auth-krb5.c auth-pam.c auth-pam.h
232 configure.ac defines.h gss-serv-krb5.c session.c ssh-gss.h sshconnect1.c
233 sshconnect2.c] Add Portable GSSAPI support, patch by Simon Wilkinson.
234 - (dtucker) [Makefile.in] Remove auth2-krb5.
235 - (dtucker) [contrib/aix/inventory.sh] Add public domain notice. ok mouring@
236 (the original author)
237 - (dtucker) [auth.c] Do not check for locked accounts when PAM is enabled.
238
23920030825
240 - (djm) Bug #621: Select OpenSC keys by usage attributes. Patch from
241 larsch@trustcenter.de
242 - (bal) openbsd-compat/ OpenBSD updates. Mostly licensing, ansifications
243 and minor fixes. OK djm@
244 - (bal) redo how we handle 'mysignal()'. Move it to
245 openbsd-compat/bsd-misc.c, s/mysignal/signal/ and #define signal to
246 be our 'mysignal' by default. OK djm@
247 - (dtucker) [acconfig.h auth.c configure.ac sshd.8] Bug #422 again: deny
248 any access to locked accounts. ok djm@
249 - (djm) Bug #564: Perform PAM account checks for all authentications when
250 UsePAM=yes; ok dtucker
251 - (dtucker) [configure.ac] Bug #533, #551: define BROKEN_GETADDRINFO on
252 Tru64, solves getnameinfo and "bad addr or host" errors. ok djm@
253 - (dtucker) [README buildbff.sh inventory.sh] (all in contrib/aix)
254 Update package builder: correctly handle config variables, use lsuser
255 rather than /etc/passwd, fix typos, add Id's.
256
25720030822
258 - (djm) s/get_progname/ssh_get_progname/g to avoid conflict with Heimdal
259 -lbroken; ok dtucker
260 - (dtucker) [contrib/cygwin/ssh-user-config] Put keys in authorized_keys
261 rather that authorized_keys2. Patch from vinschen@redhat.com.
262
26320030821
264 - (dtucker) OpenBSD CVS Sync
265 - markus@cvs.openbsd.org 2003/08/14 16:08:58
266 [ssh-keygen.c]
267 exit after primetest, ok djm@
268 - (dtucker) [defines.h] Put CMSG_DATA, CMSG_FIRSTHDR with other CMSG* macros,
269 change CMSG_DATA to use __CMSG_ALIGN (and thus work properly), reformat for
270 consistency.
271 - (dtucker) [configure.ac] Move openpty/ctty test outside of case statement
272 and after normal openpty test.
273
27420030813
275 - (dtucker) [session.c] Remove #ifdef TIOCSBRK kludge.
276 - (dtucker) OpenBSD CVS Sync
277 - markus@cvs.openbsd.org 2003/08/13 08:33:02
278 [session.c]
279 use more portable tcsendbreak(3) and ignore break_length;
280 ok deraadt, millert
281 - markus@cvs.openbsd.org 2003/08/13 08:46:31
282 [auth1.c readconf.c readconf.h servconf.c servconf.h ssh.c ssh_config
283 ssh_config.5 sshconnect1.c sshd.8 sshd.c sshd_config sshd_config.5]
284 remove RhostsAuthentication; suggested by djm@ before; ok djm@, deraadt@,
285 fgsch@, miod@, henning@, jakob@ and others
286 - markus@cvs.openbsd.org 2003/08/13 09:07:10
287 [readconf.c ssh.c]
288 socks4->socks, since with support both 4 and 5; dtucker@zip.com.au
289 - (dtucker) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
290 Add a tcsendbreak function for platforms that don't have one, based on the
291 one from OpenBSD.
292
29320030811
294 - (dtucker) OpenBSD CVS Sync
295 (thanks to Simon Wilkinson for help with this -dt)
296 - markus@cvs.openbsd.org 2003/07/16 15:02:06
297 [auth-krb5.c]
298 mcc -> fcc; from Love Hörnquist Åstrand <lha@it.su.se>
299 otherwise the kerberos credentinal is stored in a memory cache
300 in the privileged sshd. ok jabob@, hin@ (some time ago)
301 - (dtucker) [openbsd-compat/xcrypt.c] Remove Cygwin #ifdef block (duplicate
302 in bsd-cygwin_util.h).
303
30420030808
305 - (dtucker) [openbsd-compat/fake-rfc2553.h] Older Linuxes have AI_PASSIVE and
306 AI_CANONNAME in netdb.h but not AI_NUMERICHOST, so check each definition
307 separately before defining them.
308 - (dtucker) [auth-pam.c] Don't set PAM_TTY if tty is null. ok djm@
309
31020030807
311 - (dtucker) [session.c] Have session_break_req not attempt to send a break
312 if TIOCSBRK and TIOCCBRK are not defined (eg Cygwin).
313 - (dtucker) [canohost.c] Bug #336: Only check ip options if IP_OPTIONS is
314 defined (fixes compile error on really old Linuxes).
315 - (dtucker) [defines.h] Bug #336: Add CMSG_DATA and CMSG_FIRSTHDR macros if
316 not already defined (eg Linux with some versions of libc5), based on those
317 from OpenBSD.
318 - (dtucker) [openbsd-compat/bsd-cygwin_util.c openbsd-compat/bsd-cygwin_util.h]
319 Remove incorrect filenames from comments (file names are in Id tags).
320 - (dtucker) [session.c openbsd-compat/bsd-cygwin_util.h] Move Cygwin
321 specific defines and includes to bsd-cygwin_util.h. Fixes build error too.
322
32320030802
324 - (dtucker) [monitor.h monitor_wrap.h] Remove excess ident tags.
325 - (dtucker) OpenBSD CVS Sync
326 - markus@cvs.openbsd.org 2003/07/22 13:35:22
327 [auth1.c auth.h auth-passwd.c monitor.c monitor.h monitor_wrap.c
328 monitor_wrap.h readconf.c readconf.h servconf.c servconf.h session.c ssh.1
329 ssh.c ssh_config.5 sshconnect1.c sshd.c sshd_config.5 ssh.h]
330 remove (already disabled) KRB4/AFS support, re-enable -k in ssh(1);
331 test+ok henning@
332 - (dtucker) [Makefile.in acconfig.h configure.ac] Remove KRB4/AFS support.
333 - (dtucker) [auth-krb4.c radix.c radix.h] Remove KRB4/AFS specific files.
334 - (dtucker) OpenBSD CVS Sync
335 - markus@cvs.openbsd.org 2003/07/23 07:42:43
336 [sshd_config]
337 remove AFS; itojun@
338 - djm@cvs.openbsd.org 2003/07/28 09:49:56
339 [ssh-keygen.1 ssh-keygen.c]
340 Support for generating Diffie-Hellman groups (/etc/moduli) from ssh-keygen.
341 Based on code from Phil Karn, William Allen Simpson and Niels Provos.
342 ok markus@, thanks jmc@
343 - markus@cvs.openbsd.org 2003/07/29 18:24:00
344 [LICENCE progressmeter.c]
345 replace 4 clause BSD licensed progressmeter code with a replacement
346 from Nils Nordman and myself; ok deraadt@
347 (copied from OpenBSD an re-applied portable changes)
348 - markus@cvs.openbsd.org 2003/07/29 18:26:46
349 [progressmeter.c]
350 fix length for "- stalled -" (included with previous import)
351 - markus@cvs.openbsd.org 2003/07/30 07:44:14
352 [progressmeter.c]
353 use only 4 digits in format_size (included with previous import)
354 - markus@cvs.openbsd.org 2003/07/30 07:53:27
355 [progressmeter.c]
356 whitespace (included with previous import)
357 - markus@cvs.openbsd.org 2003/07/31 09:21:02
358 [auth2-none.c]
359 check whether passwd auth is allowd, similar to proto 1; rob@pitman.co.za
360 ok henning
361 - avsm@cvs.openbsd.org 2003/07/31 15:50:16
362 [atomicio.c]
363 correct comment: atomicio takes vwrite, not write; deraadt@ ok
364 - markus@cvs.openbsd.org 2003/07/31 22:34:03
365 [progressmeter.c]
366 print rate similar old version; round instead truncate;
367 (included in previous progressmeter.c commit)
368 - (dtucker) [openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
369 Add a tcgetpgrp function.
370 - (dtucker) [Makefile.in moduli.c moduli.h] Add new files and to Makefile.
371 - (dtucker) [openbsd-compat/bsd-misc.c] Fix cut-and-paste bug in tcgetpgrp.
372
37320030730
374 - (djm) [auth-pam.c] Don't use crappy APIs like sprintf. Thanks bal
375
37620030726
377 - (dtucker) [openbsd-compat/xcrypt.c] Fix typo: DISABLED_SHADOW ->
378 DISABLE_SHADOW. Fixes HP-UX compile error.
379
38020030724
381 - (bal) [auth-passwd.c openbsd-compat/Makefile.in openbsd-compat/xcrypt.c
382 openbsd-compat/xcrypt.h] Split off encryption into xcrypt() interface,
383 and isolate shadow password functions. Tested in Solaris, but should
384 not break other platforms too badly (except maybe HP =). Also brings
385 auth-passwd.c into full sync with OpenBSD tree.
386
38720030723
388 - (dtucker) [configure.ac] Back out change for bug #620.
389
39020030719
391 - (dtucker) [configure.ac] Bug #620: Define BROKEN_GETADDRINFO for
392 Solaris/x86. Patch from jrhett at isite.net.
393 - (dtucker) OpenBSD CVS Sync
394 - markus@cvs.openbsd.org 2003/07/14 12:36:37
395 [sshd.c]
396 remove undocumented -V option. would be only useful if openssh is used
397 as ssh v1 server for ssh.com's ssh v2.
398 - markus@cvs.openbsd.org 2003/07/16 10:34:53
399 [ssh.c sshd.c]
400 don't exit on multiple -v or -d; ok deraadt@
401 - markus@cvs.openbsd.org 2003/07/16 10:36:28
402 [sshtty.c]
403 clear IUCLC in enter_raw_mode; from rob@pitman.co.za; ok deraadt@, fgs@
404 - deraadt@cvs.openbsd.org 2003/07/18 01:54:25
405 [scp.c]
406 userid is unsigned, but well, force it anyways; andrushock@korovino.net
407 - djm@cvs.openbsd.org 2003/07/19 00:45:53
408 [sftp-int.c]
409 fix sftp filename parsing for arguments with escaped quotes. bz #517;
410 ok markus
411 - djm@cvs.openbsd.org 2003/07/19 00:46:31
412 [regress/sftp-cmds.sh]
413 regress test for sftp arguments with escaped quotes; ok markus
414
41520030714
416 - (dtucker) [acconfig.h configure.ac port-aix.c] Older AIXes don't declare
417 loginfailed at all, so assume 3-arg loginfailed if not declared.
418 - (dtucker) [port-aix.h] Work around name collision on AIX for r_type by
419 undef'ing it.
420 - (dtucker) Bug #543: [configure.ac port-aix.c port-aix.h]
421 Call setauthdb() before loginfailed(), which may load password registry-
422 specific functions. Based on patch by cawlfiel at us.ibm.com.
423 - (dtucker) [port-aix.h] Fix prototypes.
424 - (dtucker) OpenBSD CVS Sync
425 - avsm@cvs.openbsd.org 2003/07/09 13:58:19
426 [key.c]
427 minor tweak: when generating the hex fingerprint, give strlcat the full
428 bound to the buffer, and add a comment below explaining why the
429 zero-termination is one less than the bound. markus@ ok
430 - markus@cvs.openbsd.org 2003/07/10 14:42:28
431 [packet.c]
432 the 2^(blocksize*2) rekeying limit is too expensive for 3DES,
433 blowfish, etc, so enforce a 1GB limit for small blocksizes.
434 - markus@cvs.openbsd.org 2003/07/10 20:05:55
435 [sftp.c]
436 sync usage with manpage, add missing -R
437
43820030708
439 - (dtucker) [acconfig.h auth-passwd.c configure.ac session.c port-aix.[ch]]
440 Include AIX headers for authentication functions and make calls match
441 prototypes. Test for and handle 3-arg and 4-arg variants of loginfailed.
442 - (dtucker) [session.c] Check return value of setpcred().
443 - (dtucker) [auth-passwd.c auth.c session.c sshd.c port-aix.c port-aix.h]
444 Convert aixloginmsg into platform-independant Buffer loginmsg.
445
44620030707
447 - (dtucker) [configure.ac] Bug #600: Check that getrusage is declared before
448 searching libraries for it. Fixes build errors on NCR MP-RAS.
449
45020030706
451 - (dtucker) [ssh-rand-helper.c loginrec.c]
452 Apply atomicio typing change to these too.
453
45420030703
455 - (dtucker) OpenBSD CVS Sync
456 - djm@cvs.openbsd.org 2003/06/28 07:48:10
457 [sshd.c]
458 report pidfile creation errors, based on patch from Roumen Petrov;
459 ok markus@
460 - deraadt@cvs.openbsd.org 2003/06/28 16:23:06
461 [atomicio.c atomicio.h authfd.c clientloop.c monitor_wrap.c msg.c
462 progressmeter.c scp.c sftp-client.c ssh-keyscan.c ssh.h sshconnect.c
463 sshd.c]
464 deal with typing of write vs read in atomicio
465 - markus@cvs.openbsd.org 2003/06/29 12:44:38
466 [sshconnect.c]
467 memset 0, not \0; andrushock@korovino.net
468 - markus@cvs.openbsd.org 2003/07/02 12:56:34
469 [channels.c]
470 deny dynamic forwarding with -R for v1, too; ok djm@
471 - markus@cvs.openbsd.org 2003/07/02 14:51:16
472 [channels.c ssh.1 ssh_config.5]
473 (re)add socks5 suppport to -D; ok djm@
474 now ssh(1) can act both as a socks 4 and socks 5 server and
475 dynamically forward ports.
476 - markus@cvs.openbsd.org 2003/07/02 20:37:48
477 [ssh.c]
478 convert hostkeyalias to lowercase, otherwise uppercase aliases will
479 not match at all; ok henning@
480 - markus@cvs.openbsd.org 2003/07/03 08:21:46
481 [regress/dynamic-forward.sh]
482 add socks5; speedup; reformat; based on patch from dtucker@zip.com.au
483 - markus@cvs.openbsd.org 2003/07/03 08:24:13
484 [regress/Makefile]
485 enable tests for dynamic fwd via socks (-D), uses nc(1)
486 - djm@cvs.openbsd.org 2003/07/03 08:09:06
487 [readconf.c readconf.h ssh-keysign.c ssh.c]
488 fix AddressFamily option in config file, from brent@graveland.net;
489 ok markus@
490
49120030630
492 - (djm) Search for support functions necessary to build our
493 getrrsetbyname() replacement. Patch from Roumen Petrov
494
49520030629
496 - (dtucker) [includes.h] Bug #602: move #include of netdb.h to after in.h
497 (fixes compiler warnings on Solaris 2.5.1).
498 - (dtucker) [configure.ac] Add sanity test after system-dependant compiler
499 flag modifications.
500
50120030628
502 - (djm) Bug #591: use PKCS#15 private key label as a comment in case
503 of OpenSC. Report and patch from larsch@trustcenter.de
504 - (djm) Bug #593: Sanity check OpenSC card reader number; patch from
505 aj@dungeon.inka.de
506 - (dtucker) OpenBSD CVS Sync
507 - markus@cvs.openbsd.org 2003/06/23 09:02:44
508 [ssh_config.5]
509 document EnableSSHKeysign; bugzilla #599; ok deraadt@, jmc@
510 - markus@cvs.openbsd.org 2003/06/24 08:23:46
511 [auth2-hostbased.c auth2-pubkey.c auth2.c channels.c key.c key.h
512 monitor.c packet.c packet.h serverloop.c sshconnect2.c sshd.c]
513 int -> u_int; ok djm@, deraadt@, mouring@
514 - miod@cvs.openbsd.org 2003/06/25 22:39:36
515 [sftp-server.c]
516 Typo police: attribute is better written with an 'r'.
517 - markus@cvs.openbsd.org 2003/06/26 20:08:33
518 [readconf.c]
519 do not dump core for 'ssh -o proxycommand host'; ok deraadt@
520 - (dtucker) [regress/dynamic-forward.sh] Import new regression test.
521 - (dtucker) [configure.ac] Bug #570: Have ./configure --enable-FEATURE
522 actually enable the feature, for those normally disabled. Patch by
523 openssh (at) roumenpetrov.info.
524
52520030624
526 - (dtucker) Have configure refer the user to config.log and
527 contrib/findssl.sh for OpenSSL header/library mismatches.
528
52920030622
530 - (dtucker) OpenBSD CVS Sync
531 - markus@cvs.openbsd.org 2003/06/21 09:14:05
532 [regress/reconfigure.sh]
533 missing $SUDO; from dtucker@zip.com.au
534 - markus@cvs.openbsd.org 2003/06/18 11:28:11
535 [ssh-rsa.c]
536 backout last change, since it violates pkcs#1
537 switch to share/misc/license.template
538 - djm@cvs.openbsd.org 2003/06/20 05:47:58
539 [sshd_config.5]
540 sync description of protocol 2 cipher proposal; ok markus
541 - djm@cvs.openbsd.org 2003/06/20 05:48:21
542 [sshd_config]
543 sync some implemented options; ok markus@
544 - (dtucker) [regress/authorized_keys_root] Remove temp data file from CVS.
545 - (dtucker) [openbsd-compat/setproctitle.c] Ensure SPT_TYPE is defined before
546 testing its value.
547
54820030618
549 - (djm) OpenBSD CVS Sync
550 - markus@cvs.openbsd.org 2003/06/12 07:57:38
551 [monitor.c sshlogin.c sshpty.c]
552 typos; dtucker at zip.com.au
553 - djm@cvs.openbsd.org 2003/06/12 12:22:47
554 [LICENCE]
555 mention more copyright holders; ok markus@
556 - nino@cvs.openbsd.org 2003/06/12 15:34:09
557 [scp.c]
558 Typo. Ok markus@.
559 - markus@cvs.openbsd.org 2003/06/12 19:12:03
560 [scard.c scard.h ssh-agent.c ssh.c]
561 add sc_get_key_label; larsch at trustcenter.de; bugzilla#591
562 - markus@cvs.openbsd.org 2003/06/16 08:22:35
563 [ssh-rsa.c]
564 make sure the signature has at least the expected length (don't
565 insist on len == hlen + oidlen, since this breaks some smartcards)
566 bugzilla #592; ok djm@
567 - markus@cvs.openbsd.org 2003/06/16 10:22:45
568 [ssh-add.c]
569 print out key comment on each prompt; make ssh-askpass more useable; ok djm@
570 - markus@cvs.openbsd.org 2003/06/17 18:14:23
571 [cipher-ctr.c]
572 use license from /usr/share/misc/license.template for new code
573 - (dtucker) [reconfigure.sh rekey.sh sftp-badcmds.sh]
574 Import new regression tests from OpenBSD
575 - (dtucker) [regress/copy.1 regress/copy.2] Remove temp data files from CVS.
576 - (dtucker) OpenBSD CVS Sync (regress/)
577 - markus@cvs.openbsd.org 2003/04/02 12:21:13
578 [Makefile]
579 enable rekey test
580 - djm@cvs.openbsd.org 2003/04/04 09:34:22
581 [Makefile sftp-cmds.sh]
582 More regression tests, including recent directory rename bug; ok markus@
583 - markus@cvs.openbsd.org 2003/05/14 22:08:27
584 [ssh-com-client.sh ssh-com-keygen.sh ssh-com-sftp.sh ssh-com.sh]
585 test against some new commerical versions
586 - mouring@cvs.openbsd.org 2003/05/15 04:07:12
587 [sftp-cmds.sh]
588 Advanced put/get testing for sftp. OK @djm
589 - markus@cvs.openbsd.org 2003/06/12 15:40:01
590 [try-ciphers.sh]
591 add ctr
592 - markus@cvs.openbsd.org 2003/06/12 15:43:32
593 [Makefile]
594 test -HUP; dtucker at zip.com.au
595
59620030614
597 - (djm) Update license on fake-rfc2553.[ch]; ok itojun@
598
59920030611
600 - (djm) Mention portable copyright holders in LICENSE
601 - (djm) Put licenses on substantial header files
602 - (djm) Sync LICENSE against OpenBSD
603 - (djm) OpenBSD CVS Sync
604 - jmc@cvs.openbsd.org 2003/06/10 09:12:11
605 [scp.1 sftp-server.8 ssh.1 ssh-add.1 ssh-agent.1 ssh_config.5]
606 [sshd.8 sshd_config.5 ssh-keygen.1 ssh-keyscan.1 ssh-keysign.8]
607 - section reorder
608 - COMPATIBILITY merge
609 - macro cleanup
610 - kill whitespace at EOL
611 - new sentence, new line
612 ssh pages ok markus@
613 - deraadt@cvs.openbsd.org 2003/06/10 22:20:52
614 [packet.c progressmeter.c]
615 mostly ansi cleanup; pval ok
616 - jakob@cvs.openbsd.org 2003/06/11 10:16:16
617 [sshconnect.c]
618 clean up check_host_key() and improve SSHFP feedback. ok markus@
619 - jakob@cvs.openbsd.org 2003/06/11 10:18:47
620 [dns.c]
621 sync with check_host_key() change
622 - djm@cvs.openbsd.org 2003/06/11 11:18:38
623 [authfd.c authfd.h ssh-add.c ssh-agent.c]
624 make agent constraints (lifetime, confirm) work with smartcard keys;
625 ok markus@
626
627
62820030609
629 - (djm) Sync README.smartcard with OpenBSD -current
630 - (djm) Re-merge OpenSC info into README.smartcard
631
63220030606
633 - (dtucker) [uidswap.c] Fix setreuid and add missing args to fatal(). ok djm@
634
63520030605
636 - (djm) Support AI_NUMERICHOST in fake-getaddrinfo.c. Needed for recent
637 canohost.c changes.
638 - (djm) Implement paranoid priv dropping checks, based on:
639 "SetUID demystified" - Hao Chen, David Wagner and Drew Dean
640 Proceedings of USENIX Security Symposium 2002
641 - (djm) Don't use xmalloc() or pull in toplevel headers in fake-* code
642 - (djm) Merge all the openbsd/fake-* into fake-rfc2553.[ch]
643 - (djm) Bug #588 - Add scard-opensc.o back to Makefile.in
644 Patch from larsch@trustcenter.de
645 - (djm) Bug #589 - scard-opensc: load only keys with a private keys
646 Patch from larsch@trustcenter.de
647 - (dtucker) Add includes.h to fake-rfc2553.c so it will build.
648 - (dtucker) Define EAI_NONAME in fake-rfc2553.h (used by fake-rfc2553.c).
649
65020030604
651 - (djm) Bug #573 - Remove unneeded Krb headers and compat goop. Patch from
652 simon@sxw.org.uk (Also matches a change in OpenBSD a while ago)
653 - (djm) Bug #577 - wrong flag in scard-opensc.c sc_private_decrypt.
654 Patch from larsch@trustcenter.de; ok markus@
655 - (djm) Bug #584: scard-opensc.c doesn't work without PIN. Patch from
656 larsch@trustcenter.de; ok markus@
657 - (djm) OpenBSD CVS Sync
658 - djm@cvs.openbsd.org 2003/06/04 08:25:18
659 [sshconnect.c]
660 disable challenge/response and keyboard-interactive auth methods
661 upon hostkey mismatch. based on patch from fcusack AT fcusack.com.
662 bz #580; ok markus@
663 - djm@cvs.openbsd.org 2003/06/04 10:23:48
664 [sshd.c]
665 remove duplicated group-dropping code; ok markus@
666 - djm@cvs.openbsd.org 2003/06/04 12:03:59
667 [serverloop.c]
668 remove bitrotten commet; ok markus@
669 - djm@cvs.openbsd.org 2003/06/04 12:18:49
670 [scp.c]
671 ansify; ok markus@
672 - djm@cvs.openbsd.org 2003/06/04 12:40:39
673 [scp.c]
674 kill ssh process upon receipt of signal, bz #241.
675 based on patch from esb AT hawaii.edu; ok markus@
676 - djm@cvs.openbsd.org 2003/06/04 12:41:22
677 [sftp.c]
678 kill ssh process on receipt of signal; ok markus@
679 - (djm) Update to fix of bug #584: lock card before return.
680 From larsch@trustcenter.de
681 - (djm) Always use mysignal() for SIGALRM
682
68320030603
684 - (djm) Replace setproctitle replacement with code derived from
685 UCB sendmail
686 - (djm) OpenBSD CVS Sync
687 - markus@cvs.openbsd.org 2003/06/02 09:17:34
688 [auth2-hostbased.c auth.c auth-options.c auth-rhosts.c auth-rh-rsa.c]
689 [canohost.c monitor.c servconf.c servconf.h session.c sshd_config]
690 [sshd_config.5]
691 deprecate VerifyReverseMapping since it's dangerous if combined
692 with IP based access control as noted by Mike Harding; replace with
693 a UseDNS option, UseDNS is on by default and includes the
694 VerifyReverseMapping check; with itojun@, provos@, jakob@ and deraadt@
695 ok deraadt@, djm@
696 - millert@cvs.openbsd.org 2003/06/03 02:56:16
697 [scp.c]
698 Remove the advertising clause in the UCB license which Berkeley
699 rescinded 22 July 1999. Proofed by myself and Theo.
700 - (djm) Fix portable-specific uses of verify_reverse_mapping too
701 - (djm) Sync openbsd-compat with OpenBSD CVS.
702 - No more 4-term BSD licenses in linked code
703 - (dtucker) [port-aix.c bsd-cray.c] Fix uses of verify_reverse_mapping.
704
70520030602
706 - (djm) Fix segv from bad reordering in auth-pam.c
707 - (djm) Always use saved_argv in sshd.c as compat_init_setproctitle may
708 clobber
709 - (tim) openbsd-compat/xmmap.[ch] License clarifications. Add missing
710 CVS ID.
711 - (djm) Remove "noip6" option from RedHat spec file. This may now be
712 set at runtime using AddressFamily option.
713 - (djm) Fix use of macro before #define in cipher-aes.c
714 - (djm) Sync license on openbsd-compat/bindresvport.c with OpenBSD CVS
715 - (djm) OpenBSD CVS Sync
716 - djm@cvs.openbsd.org 2003/05/26 12:54:40
717 [sshconnect.c]
718 fix format strings; ok markus@
719 - deraadt@cvs.openbsd.org 2003/05/29 16:58:45
720 [sshd.c uidswap.c]
721 seteuid and setegid; markus ok
722 - jakob@cvs.openbsd.org 2003/06/02 08:31:10
723 [ssh_config.5]
724 VerifyHostKeyDNS is v2 only. ok markus@
725
72620030530
727 - (dtucker) Add missing semicolon in md5crypt.c, patch from openssh at
728 roumenpetrov.info
729 - (dtucker) Define SSHD_ACQUIRES_CTTY for NCR MP-RAS and Reliant Unix.
730
73120030526
732 - (djm) Avoid auth2-chall.c warning when compiling without
733 PAM, BSD_AUTH and SKEY
734
73520030525
736- (djm) OpenBSD CVS Sync
737 - djm@cvs.openbsd.org 2003/05/24 09:02:22
738 [log.c]
739 pass logged data through strnvis; ok markus
740 - djm@cvs.openbsd.org 2003/05/24 09:30:40
741 [authfile.c monitor.c sftp-common.c sshpty.c]
742 cast some types for printing; ok markus@
743
74420030524
745 - (dtucker) Correct --osfsia in INSTALL. Patch by skeleten at shillest.net
746
74720030523
748 - (djm) Use VIS_SAFE on logged strings rather than default strnvis
749 encoding (which encodes many more characters)
750 - OpenBSD CVS Sync
751 - jmc@cvs.openbsd.org 2003/05/20 12:03:35
752 [sftp.1]
753 - new sentence, new line
754 - added .Xr's
755 - typos
756 ok djm@
757 - jmc@cvs.openbsd.org 2003/05/20 12:09:31
758 [ssh.1 ssh_config.5 sshd.8 sshd_config.5 ssh-keygen.1]
759 new sentence, new line
760 - djm@cvs.openbsd.org 2003/05/23 08:29:30
761 [sshconnect.c]
762 fix leak; ok markus@
763
76420030520
765 - (djm) OpenBSD CVS Sync
766 - deraadt@cvs.openbsd.org 2003/05/18 23:22:01
767 [log.c]
768 use syslog_r() in a signal handler called place; markus ok
769 - (djm) Configure logic to detect syslog_r and friends
770
77120030519
772 - (djm) Sync auth-pam.h with what we actually implement
773
77420030518
775 - (djm) Return of the dreaded PAM_TTY_KLUDGE, which went missing in
776 recent merge
777 - (djm) OpenBSD CVS Sync
778 - djm@cvs.openbsd.org 2003/05/16 03:27:12
779 [readconf.c ssh_config ssh_config.5 ssh-keysign.c]
780 add AddressFamily option to ssh_config (like -4, -6 on commandline).
781 Portable bug #534; ok markus@
782 - itojun@cvs.openbsd.org 2003/05/17 03:25:58
783 [auth-rhosts.c]
784 just in case, put numbers to sscanf %s arg.
785 - markus@cvs.openbsd.org 2003/05/17 04:27:52
786 [cipher.c cipher-ctr.c myproposal.h]
787 experimental support for aes-ctr modes from
788 http://www.ietf.org/internet-drafts/draft-ietf-secsh-newmodes-00.txt
789 ok djm@
790 - (djm) Remove IPv4 by default hack now that we can specify AF in config
791 - (djm) Tidy and trim TODO
792 - (djm) Sync openbsd-compat/ with OpenBSD CVS head
793 - (djm) Big KNF on openbsd-compat/
794 - (djm) KNF on md5crypt.[ch]
795 - (djm) KNF on auth-sia.[ch]
796
79720030517
798 - (bal) strcat -> strlcat on openbsd-compat/realpath.c (rev 1.8 OpenBSD)
799
80020030516
801 - (djm) OpenBSD CVS Sync
802 - djm@cvs.openbsd.org 2003/05/15 13:52:10
803 [ssh.c]
804 Make "ssh -V" print the OpenSSL version in a human readable form. Patch
805 from Craig Leres (mindrot at ee.lbl.gov); ok markus@
806 - jakob@cvs.openbsd.org 2003/05/15 14:02:47
807 [readconf.c servconf.c]
808 warn for unsupported config option. ok markus@
809 - markus@cvs.openbsd.org 2003/05/15 14:09:21
810 [auth2-krb5.c]
811 fix 64bit issue; report itojun@
812 - djm@cvs.openbsd.org 2003/05/15 14:55:25
813 [readconf.c readconf.h ssh_config ssh_config.5 sshconnect.c]
814 add a ConnectTimeout option to ssh, based on patch from
815 Jean-Charles Longuet (jclonguet at free.fr); portable #207 ok markus@
816 - (djm) Add warning for UsePAM when built without PAM support
817 - (djm) A few type mismatch fixes from Bug #565
818 - (djm) Guard free_pam_environment against NULL argument. Works around
819 HP/UX PAM problems debugged by dtucker
820
82120030515
822 - (djm) OpenBSD CVS Sync
823 - jmc@cvs.openbsd.org 2003/05/14 13:11:56
824 [ssh-agent.1]
825 setup -> set up;
826 from wiz@netbsd
827 - jakob@cvs.openbsd.org 2003/05/14 18:16:20
828 [key.c key.h readconf.c readconf.h ssh_config.5 sshconnect.c]
829 [dns.c dns.h README.dns ssh-keygen.1 ssh-keygen.c]
830 add experimental support for verifying hos keys using DNS as described
831 in draft-ietf-secsh-dns-xx.txt. more information in README.dns.
832 ok markus@ and henning@
833 - markus@cvs.openbsd.org 2003/05/14 22:24:42
834 [clientloop.c session.c ssh.1]
835 allow to send a BREAK to the remote system; ok various
836 - markus@cvs.openbsd.org 2003/05/15 00:28:28
837 [sshconnect2.c]
838 cleanup unregister of per-method packet handlers; ok djm@
839 - jakob@cvs.openbsd.org 2003/05/15 01:48:10
840 [readconf.c readconf.h servconf.c servconf.h]
841 always parse kerberos options. ok djm@ markus@
842 - jakob@cvs.openbsd.org 2003/05/15 02:27:15
843 [dns.c]
844 add missing freerrset
845 - markus@cvs.openbsd.org 2003/05/15 03:08:29
846 [cipher.c cipher-bf1.c cipher-aes.c cipher-3des1.c]
847 split out custom EVP ciphers
848 - djm@cvs.openbsd.org 2003/05/15 03:10:52
849 [ssh-keygen.c]
850 avoid warning; ok jakob@
851 - mouring@cvs.openbsd.org 2003/05/15 03:39:07
852 [sftp-int.c]
853 Make put/get (globed and nonglobed) code more consistant. OK djm@
854 - mouring@cvs.openbsd.org 2003/05/15 03:43:59
855 [sftp-int.c sftp.c]
856 Teach ls how to display multiple column display and allow users
857 to return to single column format via 'ls -1'. OK @djm
858 - jakob@cvs.openbsd.org 2003/05/15 04:08:44
859 [readconf.c servconf.c]
860 disable kerberos when not supported. ok markus@
861 - markus@cvs.openbsd.org 2003/05/15 04:08:41
862 [ssh.1]
863 ~B is ssh2 only
864 - (djm) Always parse UsePAM
865 - (djm) Configure glue for DNS support (code doesn't work in portable yet)
866 - (djm) Import getrrsetbyname() function from OpenBSD libc (for DNS support)
867 - (djm) Tidy Makefile clean targets
868 - (djm) Adapt README.dns for portable
869 - (djm) Avoid uuencode.c warnings
870 - (djm) Enable UsePAM when built --with-pam
871 - (djm) Only build getrrsetbyname replacement when using --with-dns
872 - (djm) Bug #529: sshd doesn't work correctly after SIGHUP (copy argv
873 correctly)
874 - (djm) Bug #444: Wrong paths after reconfigure
875 - (dtucker) HP-UX needs to include <sys/strtio.h> for TIOCSBRK
876
87720030514
878 - (djm) Bug #117: Don't lie to PAM about username
879 - (djm) RCSID sync w/ OpenBSD
880 - (djm) OpenBSD CVS Sync
881 - djm@cvs.openbsd.org 2003/04/09 12:00:37
882 [readconf.c]
883 strip trailing whitespace from config lines before parsing.
884 Fixes bz 528; ok markus@
885 - markus@cvs.openbsd.org 2003/04/12 10:13:57
886 [cipher.c]
887 hide cipher details; ok djm@
888 - markus@cvs.openbsd.org 2003/04/12 10:15:36
889 [misc.c]
890 debug->debug2
891 - naddy@cvs.openbsd.org 2003/04/12 11:40:15
892 [ssh.1]
893 document -V switch, fix wording; ok markus@
894 - markus@cvs.openbsd.org 2003/04/14 14:17:50
895 [channels.c sshconnect.c sshd.c ssh-keyscan.c]
896 avoid hardcoded SOCK_xx; with itojun@; should allow ssh over SCTP
897 - mouring@cvs.openbsd.org 2003/04/14 21:31:27
898 [sftp-int.c]
899 Missing globfree(&g) in process_put() spotted by Vince Brimhall
900 <VBrimhall@novell.com>. ok@ Theo
901 - markus@cvs.openbsd.org 2003/04/16 14:35:27
902 [auth.h]
903 document struct Authctxt; with solar
904 - deraadt@cvs.openbsd.org 2003/04/26 04:29:49
905 [ssh-keyscan.c]
906 -t in usage(); rogier@quaak.org
907 - mouring@cvs.openbsd.org 2003/04/30 01:16:20
908 [sshd.8 sshd_config.5]
909 Escape ?, * and ! in .Ql for nroff compatibility. OpenSSH Portable
910 Bug #550 and * escaping suggested by jmc@.
911 - david@cvs.openbsd.org 2003/04/30 20:41:07
912 [sshd.8]
913 fix invalid .Pf macro usage introduced in previous commit
914 ok jmc@ mouring@
915 - markus@cvs.openbsd.org 2003/05/11 16:56:48
916 [authfile.c ssh-keygen.c]
917 change key_load_public to try to read a public from:
918 rsa1 private or rsa1 public and ssh2 keys.
919 this makes ssh-keygen -e fail for ssh1 keys more gracefully
920 for example; report from itojun (netbsd pr 20550).
921 - markus@cvs.openbsd.org 2003/05/11 20:30:25
922 [channels.c clientloop.c serverloop.c session.c ssh.c]
923 make channel_new() strdup the 'remote_name' (not the caller); ok theo
924 - markus@cvs.openbsd.org 2003/05/12 16:55:37
925 [sshconnect2.c]
926 for pubkey authentication try the user keys in the following order:
927 1. agent keys that are found in the config file
928 2. other agent keys
929 3. keys that are only listed in the config file
930 this helps when an agent has many keys, where the server might
931 close the connection before the correct key is used. report & ok pb@
932 - markus@cvs.openbsd.org 2003/05/12 18:35:18
933 [ssh-keyscan.1]
934 typo: DSA keys are of type ssh-dss; Brian Poole
935 - markus@cvs.openbsd.org 2003/05/14 00:52:59
936 [ssh2.h]
937 ranges for per auth method messages
938 - djm@cvs.openbsd.org 2003/05/14 01:00:44
939 [sftp.1]
940 emphasise the batchmode functionality and make reference to pubkey auth,
941 both of which are FAQs; ok markus@
942 - markus@cvs.openbsd.org 2003/05/14 02:15:47
943 [auth2.c monitor.c sshconnect2.c auth2-krb5.c]
944 implement kerberos over ssh2 ("kerberos-2@ssh.com"); tested with jakob@
945 server interops with commercial client; ok jakob@ djm@
946 - jmc@cvs.openbsd.org 2003/05/14 08:25:39
947 [sftp.1]
948 - better formatting in SYNOPSIS
949 - whitespace at EOL
950 ok djm@
951 - markus@cvs.openbsd.org 2003/05/14 08:57:49
952 [monitor.c]
953 http://bugzilla.mindrot.org/show_bug.cgi?id=560
954 Privsep child continues to run after monitor killed.
955 Pass monitor signals through to child; Darren Tucker
956 - (djm) Make portable build with MIT krb5 (some issues remain)
957 - (djm) Add new UsePAM configuration directive to allow runtime control
958 over usage of PAM. This allows non-root use of sshd when built with
959 --with-pam
960 - (djm) Die screaming if start_pam() is called when UsePAM=no
961 - (djm) Avoid KrbV leak for MIT Kerberos
962 - (dtucker) Set ai_socktype and ai_protocol in fake-getaddrinfo.c. ok djm@
963 - (djm) Bug #258: sscanf("[0-9]") -> sscanf("[0123456789]") for portability
964
96520030512
966 - (djm) Redhat spec: Don't install profile.d scripts when not
967 building with GNOME/GTK askpass (patch from bet@rahul.net)
968
96920030510
970 - (dtucker) Bug #318: Create ssh_prng_cmds.out during "make" rather than
971 "make install". Patch by roth@feep.net.
972 - (dtucker) Bug #536: Test for and work around openpty/controlling tty
973 problem on Linux (fixes "could not set controlling tty" errors).
974 - (djm) Merge FreeBSD PAM code: replaces PAM password auth kludge with
975 proper challenge-response module
976 - (djm) 2-clause license on loginrec.c, with permission from
977 andre@ae-35.com
978
97920030504
980 - (dtucker) Bug #497: Move #include of bsd-cygwin_util.h to openbsd-compat.h.
981 Patch from vinschen@redhat.com.
982
98320030503
984 - (dtucker) Add missing "void" to record_failed_login in bsd-cray.c. Noted
985 by wendyp@cray.com.
986
98720030502
988 - (dtucker) Bug #544: ignore invalid cmsg_type on Linux 2.0 kernels,
989 privsep should now work.
990 - (dtucker) Move handling of bad password authentications into a platform
991 specific record_failed_login() function (affects AIX & Unicos). ok mouring@
992
99320030429 120030429
994 - (djm) Add back radix.o (used by AFS support), after it went missing from 2 - (djm) Add back radix.o (used by AFS support), after it went missing from
995 Makefile many moons ago 3 Makefile many moons ago
@@ -997,60 +5,6 @@
997 - (djm) Fix blibpath specification for AIX/gcc 5 - (djm) Fix blibpath specification for AIX/gcc
998 - (djm) Some systems have basename in -lgen. Fix from ayamura@ayamura.org 6 - (djm) Some systems have basename in -lgen. Fix from ayamura@ayamura.org
999 7
100020030428
1001 - (bal) [defines.h progressmeter.c scp.c] Some more culling of non 64bit
1002 hacked code.
1003
100420030427
1005 - (bal) Bug #541: return; was dropped by mistake. Reported by
1006 furrier@iglou.com
1007 - (bal) Since we don't support platforms lacking u_int_64. We may
1008 as well clean out some of those evil #ifdefs
1009 - (bal) auth1.c minor resync while looking at the code.
1010 - (bal) auth2.c same changed as above.
1011
101220030409
1013 - (djm) Bug #539: Specify creation mode with O_CREAT for lastlog. Report
1014 from matth@eecs.berkeley.edu
1015 - (djm) Make the spec work with Redhat 9.0 (which renames sharutils)
1016 - (djm) OpenBSD CVS Sync
1017 - markus@cvs.openbsd.org 2003/04/02 09:48:07
1018 [clientloop.c monitor.c monitor_wrap.c packet.c packet.h readconf.c]
1019 [readconf.h serverloop.c sshconnect2.c]
1020 reapply rekeying chage, tested by henning@, ok djm@
1021 - markus@cvs.openbsd.org 2003/04/02 14:36:26
1022 [ssh-keysign.c]
1023 potential segfault if KEY_UNSPEC; cjwatson@debian.org; bug #526
1024 - itojun@cvs.openbsd.org 2003/04/03 07:25:27
1025 [progressmeter.c]
1026 $OpenBSD$
1027 - itojun@cvs.openbsd.org 2003/04/03 10:17:35
1028 [progressmeter.c]
1029 remove $OpenBSD$, as other *.c does not have it.
1030 - markus@cvs.openbsd.org 2003/04/07 08:29:57
1031 [monitor_wrap.c]
1032 typo: get correct counters; introduced during rekeying change.
1033 - millert@cvs.openbsd.org 2003/04/07 21:58:05
1034 [progressmeter.c]
1035 The UCB copyright here is incorrect. This code did not originate
1036 at UCB, it was written by Luke Mewburn. Updated the copyright at
1037 the author's request. markus@ OK
1038 - itojun@cvs.openbsd.org 2003/04/08 20:21:29
1039 [*.c *.h]
1040 rename log() into logit() to avoid name conflict. markus ok, from
1041 netbsd
1042 - (djm) XXX - Performed locally using:
1043 "perl -p -i -e 's/(\s|^)log\(/$1logit\(/g' *.c *.h"
1044 - hin@cvs.openbsd.org 2003/04/09 08:23:52
1045 [servconf.c]
1046 Don't include <krb.h> when compiling with Kerberos 5 support
1047 - (djm) Fix up missing include for packet.c
1048 - (djm) Fix missed log => logit occurance (reference by function pointer)
1049
105020030402
1051 - (bal) if IP_TOS is not found or broken don't try to compile in
1052 packet_set_tos() function call. bug #527
1053
105420030401 820030401
1055 - (djm) OpenBSD CVS Sync 9 - (djm) OpenBSD CVS Sync
1056 - jmc@cvs.openbsd.org 2003/03/28 10:11:43 10 - jmc@cvs.openbsd.org 2003/03/28 10:11:43
@@ -1107,4 +61,1245 @@
1107 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 61 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1108 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 62 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1109 63
1110$Id: ChangeLog,v 1.2994.2.4 2003/09/16 06:00:52 djm Exp $ 6420030320
65 - (djm) OpenBSD CVS Sync
66 - markus@cvs.openbsd.org 2003/03/17 10:38:38
67 [progressmeter.c]
68 don't print \n if backgrounded; from ho@
69 - markus@cvs.openbsd.org 2003/03/17 11:43:47
70 [version.h]
71 enter 3.6
72 - (bal) The days of lack of int64_t support are over. Sorry kids.
73 - (bal) scp.c 'limit' conflicts with Cray. Rename to 'limitbw'
74 - (bal) Collection of Cray patches (bsd-cray.h fix for CRAYT3E and improved
75 guessing rules)
76 - (bal) Disable Privsep for Tru64 after pre-authentication due to issues
77 with SIA. Also, clean up of tru64 support patch by Chris Adams
78 <cmadams@hiwaay.net>
79 - (tim) [contrib/caldera/openssh.spec] workaround RPM quirk. Fix %files
80
8120030318
82 - (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
83 add nanosleep(). testing/corrections by Darren Tucker <dtucker@zip.com.au>
84
8520030317
86 - (djm) Fix return value checks for RAND_bytes. Report from
87 Steve G <linux_4ever@yahoo.com>
88
8920030315
90 - (djm) OpenBSD CVS Sync
91 - markus@cvs.openbsd.org 2003/03/13 11:42:19
92 [authfile.c ssh-keysign.c]
93 move RSA_blinding_on to generic key load method
94 - markus@cvs.openbsd.org 2003/03/13 11:44:50
95 [ssh-agent.c]
96 ssh-agent is similar to ssh-keysign (allows other processes to use
97 private rsa keys). however, it gets key over socket and not from
98 a file, so we have to do blinding here as well.
99
10020030310
101- (djm) OpenBSD CVS Sync
102 - markus@cvs.openbsd.org 2003/03/05 22:33:43
103 [channels.c monitor.c scp.c session.c sftp-client.c sftp-int.c]
104 [sftp-server.c ssh-add.c sshconnect2.c]
105 fix memory leaks; from dlheine@suif.Stanford.EDU/CLOUSEAU; ok djm@
106 - (djm) One more portable-specific one from dlheine@suif.Stanford.EDU/
107 CLOUSEAU
108 - (djm) Bug #245: TTY problems on Solaris. Fix by stevesk@ and
109 dtucker@zip.com.au
110 - (djm) AIX package builder update from dtucker@zip.com.au
111
11220030225
113 - (djm) Fix some compile errors spotted by dtucker and his fabulous
114 tinderbox
115
11620030224
117 - (djm) Tweak gnome-ssh-askpass2:
118 - Retry kb and mouse grab a couple of times, so passphrase dialog doesn't
119 immediately fail if you are doing something else when it appears (e.g.
120 dragging a window)
121 - Perform server grab after we have the keyboard and/or pointer to avoid
122 races.
123 - (djm) OpenBSD CVS Sync
124 - markus@cvs.openbsd.org 2003/01/27 17:06:31
125 [sshd.c]
126 more specific error message when /var/empty has wrong permissions;
127 bug #46, map@appgate.com; ok henning@, provos@, stevesk@
128 - markus@cvs.openbsd.org 2003/01/28 16:11:52
129 [scp.1]
130 document -l; pekkas@netcore.fi
131 - stevesk@cvs.openbsd.org 2003/01/28 17:24:51
132 [scp.1]
133 remove example not pertinent with -1 addition; ok markus@
134 - jmc@cvs.openbsd.org 2003/01/31 21:54:40
135 [sshd.8]
136 typos; sshd(8): help and ok markus@
137 help and ok millert@
138 - markus@cvs.openbsd.org 2003/02/02 10:51:13
139 [scp.c]
140 call okname() only when using system(3) for remote-remote copy;
141 fixes bugs #483, #472; ok deraadt@, mouring@
142 - markus@cvs.openbsd.org 2003/02/02 10:56:08
143 [kex.c]
144 add support for key exchange guesses; based on work by
145 avraham.fraenkel@commatch.com; fixes bug #148; ok deraadt@
146 - markus@cvs.openbsd.org 2003/02/03 08:56:16
147 [sshpty.c]
148 don't call error() for readonly /dev; from soekris list; ok mcbride,
149 henning, deraadt.
150 - markus@cvs.openbsd.org 2003/02/04 09:32:08
151 [key.c]
152 better debug3 message
153 - markus@cvs.openbsd.org 2003/02/04 09:33:22
154 [monitor.c monitor_wrap.c]
155 skey/bsdauth: use 0 to indicate failure instead of -1, because
156 the buffer API only supports unsigned ints.
157 - markus@cvs.openbsd.org 2003/02/05 09:02:28
158 [readconf.c]
159 simplify ProxyCommand parsing, remove strcat/xrealloc; ok henning@, djm@
160 - markus@cvs.openbsd.org 2003/02/06 09:26:23
161 [session.c]
162 missing call to setproctitle() after authentication; ok provos@
163 - markus@cvs.openbsd.org 2003/02/06 09:27:29
164 [ssh.c ssh_config.5]
165 support 'ProxyCommand none'; bugzilla #433; binder@arago.de; ok djm@
166 - markus@cvs.openbsd.org 2003/02/06 09:29:18
167 [sftp-server.c]
168 fix races in rename/symlink; from Tony Finch; ok djm@
169 - markus@cvs.openbsd.org 2003/02/06 21:22:43
170 [auth1.c auth2.c]
171 undo broken fix for #387, fixes #486
172 - markus@cvs.openbsd.org 2003/02/10 11:51:47
173 [ssh-add.1]
174 xref sshd_config.5 (not sshd.8); mark@summersault.com; bug #490
175 - markus@cvs.openbsd.org 2003/02/12 09:33:04
176 [key.c key.h ssh-dss.c ssh-rsa.c]
177 merge ssh-dss.h ssh-rsa.h into key.h; ok deraadt@
178 - markus@cvs.openbsd.org 2003/02/12 21:39:50
179 [crc32.c crc32.h]
180 replace crc32.c with a BSD licensed version; noted by David Turner
181 - markus@cvs.openbsd.org 2003/02/16 17:09:57
182 [kex.c kexdh.c kexgex.c kex.h sshconnect2.c sshd.c ssh-keyscan.c]
183 split kex into client and server code, no need to link
184 server code into the client; ok provos@
185 - markus@cvs.openbsd.org 2003/02/16 17:30:33
186 [monitor.c monitor_wrap.c]
187 fix permitrootlogin forced-commands-only for privsep; bux #387;
188 ok provos@
189 - markus@cvs.openbsd.org 2003/02/21 09:05:53
190 [servconf.c]
191 print sshd_config filename in debug2 mode.
192 - mpech@cvs.openbsd.org 2003/02/21 10:34:48
193 [auth-krb4.c]
194 ...sizeof(&adat.session) is not good here.
195 henning@, deraadt@, millert@
196 - (djm) Add new object files to Makefile and reorder
197 - (djm) Bug #501: gai_strerror should return char*;
198 fix from dtucker@zip.com.au
199 - (djm) Most of Bug #499: Cygwin compile fixes for new progressmeter;
200 From vinschen@redhat.com
201 - (djm) Rest of Bug #499: Import a basename() function from OpenBSD libc
202 - (djm) Bug #494: Allow multiple accounts on Windows 9x/Me;
203 From vinschen@redhat.com
204 - (djm) Bug #456: Support for NEC SX6 with Unicos; from wendyp@cray.com
205
20620030211
207 - (djm) Cygwin needs libcrypt too. Patch from vinschen@redhat.com
208
20920030206
210 - (djm) Teach fake-getaddrinfo to use getservbyname() when provided a
211 string service name. Suggested by markus@, review by itojun@
212
21320030131
214 - (bal) AIX 4.2.1 lacks nanosleep(). Patch to use nsleep() provided by
215 dtucker@zip.com.au
216
21720030130
218 - (djm) Unbreak root password auth. Spotted by dtucker@zip.com.au
219
220200301028
221 - (djm) Search libposix4 and librt for nanosleep. From dtucker@zip.com.au
222 and openssh-unix-dev@thewrittenword.com
223
224200301027
225 - (bal) Bugzilla 477 patch by wendyp@cray.com. Define TIOCGPGRP for
226 cray. Also removed test for tcgetpgrp in configure.ac since it
227 is no longer used.
228
22920030124
230 - (djm) OpenBSD CVS Sync
231 - jmc@cvs.openbsd.org 2003/01/23 08:58:47
232 [sshd_config.5]
233 typos; ok millert@
234 - markus@cvs.openbsd.org 2003/01/23 13:50:27
235 [authfd.c authfd.h readpass.c ssh-add.1 ssh-add.c ssh-agent.c]
236 ssh-add -c, prompt user for confirmation (using ssh-askpass) when
237 private agent key is used; with djm@; test by dugsong@, djm@;
238 ok deraadt@
239 - markus@cvs.openbsd.org 2003/01/23 14:01:53
240 [scp.c]
241 bandwidth limitation patch (scp -l) from niels@; ok todd@, deraadt@
242 - markus@cvs.openbsd.org 2003/01/23 14:06:15
243 [scp.1 scp.c]
244 scp -12; Sam Smith and others; ok provos@, deraadt@
245 - (djm) Add TIMEVAL_TO_TIMESPEC macros
246
24720030123
248 - (djm) OpenBSD CVS Sync
249 - djm@cvs.openbsd.org 2003/01/23 00:03:00
250 [auth1.c]
251 Don't log TIS auth response; "get rid of it" - markus@
252
25320030122
254 - (djm) OpenBSD CVS Sync
255 - marc@cvs.openbsd.org 2003/01/21 18:14:36
256 [ssh-agent.1 ssh-agent.c]
257 Add a -t life option to ssh-agent that set the default lifetime.
258 The default can still be overriden by using -t in ssh-add.
259 OK markus@
260 - (djm) Reorganise PAM & SIA password handling to eliminate some common code
261 - (djm) Sync regress with OpenBSD -current
262
26320030120
264 - (djm) Fix compilation for NetBSD from dtucker@zip.com.au
265 - (tim) [progressmeter.c] make compilers without long long happy.
266 - (tim) [configure.ac] Add -belf to build ELF binaries on OpenServer 5 when
267 using cc. (gcc already did)
268
26920030118
270 - (djm) Revert fix for Bug #442 for now.
271
27220030117
273 - (djm) Bug #470: Detect strnvis, not strvis in configure.
274 From d_wllms@lanl.gov
275
27620030116
277 - (djm) OpenBSD CVS Sync
278 - djm@cvs.openbsd.org 2003/01/16 03:41:55
279 [sftp-int.c]
280 explicitly use first glob result
281
28220030114
283 - (djm) OpenBSD CVS Sync
284 - fgsch@cvs.openbsd.org 2003/01/10 23:23:24
285 [sftp-int.c]
286 typo; from Nils Nordman <nino at nforced dot com>.
287 - markus@cvs.openbsd.org 2003/01/11 18:29:43
288 [log.c]
289 set fatal_cleanups to NULL in fatal_remove_all_cleanups();
290 dtucker@zip.com.au
291 - markus@cvs.openbsd.org 2003/01/12 16:57:02
292 [progressmeter.c]
293 allow WARNINGS=yes; ok djm@
294 - djm@cvs.openbsd.org 2003/01/13 11:04:04
295 [sftp-int.c]
296 make cmds[] array static to avoid conflict with BSDI libc.
297 mindrot bug #466. Fix from mdev@idg.nl; ok markus@
298 - djm@cvs.openbsd.org 2003/01/14 10:58:00
299 [sftp-client.c sftp-int.c]
300 Don't try to upload or download non-regular files. Report from
301 apoloval@pantuflo.escet.urjc.es; ok markus@
302
30320030113
304 - (djm) Rework openbsd-compat/setproctitle.c a bit: move emulation type
305 detection to configure.ac. Prompted by stevesk@
306 - (djm) Bug #467: Add a --disable-strip option to turn off stripping of
307 installed binaries. From mdev@idg.nl
308
30920030110
310 - (djm) Enable new setproctitle emulation for Linux, AIX and HP/UX. More
311 systems may be added later.
312 - (djm) OpenBSD CVS Sync
313 - djm@cvs.openbsd.org 2003/01/08 23:53:26
314 [sftp.1 sftp.c sftp-int.c sftp-int.h]
315 Cleanup error handling for batchmode
316 Allow blank lines and comments in input
317 Ability to suppress abort on error in batchmode ("-put blah")
318 Fixes mindrot bug #452; markus@ ok
319 - fgsch@cvs.openbsd.org 2003/01/10 08:19:07
320 [scp.c sftp.1 sftp.c sftp-client.c sftp-int.c progressmeter.c]
321 [progressmeter.h]
322 sftp progress meter support.
323 original diffs by Nils Nordman <nino at nforced dot com> via
324 markus@, merged to -current by me, djm@ ok.
325 - djm@cvs.openbsd.org 2003/01/10 08:48:15
326 [sftp-client.c]
327 Simplify and avoid redundancy in packet send and receive
328 functions; ok fgs@
329 - djm@cvs.openbsd.org 2003/01/10 10:29:35
330 [scp.c]
331 Don't ftruncate after write error, creating sparse files of
332 incorrect length
333 mindrot bug #403, reported by rusr@cup.hp.com; ok markus@
334 - djm@cvs.openbsd.org 2003/01/10 10:32:54
335 [channels.c]
336 hush socket() errors, except last. Fixes mindrot bug #408; ok markus@
337
33820030108
339 - (djm) Sync openbsd-compat/ with OpenBSD -current
340 - (djm) Avoid redundant xstrdup/xfree in auth2-pam.c. From Solar via markus@
341 - (djm) OpenBSD CVS Sync
342 - markus@cvs.openbsd.org 2003/01/01 18:08:52
343 [channels.c]
344 move big output buffer messages to debug2
345 - djm@cvs.openbsd.org 2003/01/06 23:51:22
346 [sftp-client.c]
347 Fix "get -p" download to not add user-write perm. mindrot bug #426
348 reported by gfernandez@livevault.com; ok markus@
349 - fgsch@cvs.openbsd.org 2003/01/07 23:42:54
350 [sftp.1]
351 add version; from Nils Nordman <nino at nforced dot com> via markus@.
352 markus@ ok
353 - (djm) Update README to reflect AIX's status as a well supported platform.
354 From dtucker@zip.com.au
355 - (tim) [Makefile.in configure.ac] replace fixpath with sed script. Patch
356 by Mo DeJong.
357 - (tim) [auth.c] declare today at top of allowed_user() to keep
358 older compilers happy.
359 - (tim) [scp.c] make compilers without long long happy.
360
36120030107
362 - (djm) Bug #401: Work around Linux breakage with IPv6 mapped addresses.
363 Based on fix from yoshfuji@linux-ipv6.org
364 - (djm) Bug #442: Check for and deny access to accounts with locked
365 passwords. Patch from dtucker@zip.com.au
366 - (djm) Bug #44: Use local mkstemp() rather than glibc's silly one. Fixes
367 Can't pass KRB4 TGT passing. Fix from: jan.iven@cern.ch
368 - (djm) Fix Bug #442 for PAM case
369 - (djm) Bug #110: bogus error messages in lastlog_get_entry(). Fix based
370 on one by peak@argo.troja.mff.cuni.cz
371 - (djm) Bug #111: Run syslog and stderr logging through strnvis to eliminate
372 nasties. Report from peak@argo.troja.mff.cuni.cz
373 - (djm) Bug #178: On AIX /etc/nologin wasnt't shown to users. Fix from
374 Ralf.Wenk@fh-karlsruhe.de and dtucker@zip.com.au
375 - (djm) Fix my fix of the fix for the Bug #442 for PAM case. Spotted by
376 dtucker@zip.com.au. Reorder for clarity too.
377
37820030103
379 - (djm) Bug #461: ssh-copy-id fails with no arguments. Patch from
380 cjwatson@debian.org
381 - (djm) Bug #460: Filling utmp[x]->ut_addr_v6 if present. Patch from
382 cjwatson@debian.org
383 - (djm) Bug #446: Set LOGIN env var to pw_name on AIX. Patch from
384 mii@ornl.gov
385
38620030101
387 - (stevesk) [session.c sshlogin.c sshlogin.h] complete portable
388 parts of pass addrlen with sockaddr * fix.
389 from Hajimu UMEMOTO <ume@FreeBSD.org>
390
39120021222
392 - (bal) OpenBSD CVS Sync
393 - fgsch@cvs.openbsd.org 2002/11/15 10:03:09
394 [authfile.c]
395 lseek(2) may return -1 when getting the public/private key lenght.
396 Simplify the code and check for errors using fstat(2).
397
398 Problem reported by Mauricio Sanchez, markus@ ok.
399 - markus@cvs.openbsd.org 2002/11/18 16:43:44
400 [clientloop.c]
401 don't overwrite SIG{INT,QUIT,TERM} handler if set to SIG_IGN;
402 e.g. if ssh is used for backup; report Joerg Schilling; ok millert@
403 - markus@cvs.openbsd.org 2002/11/21 22:22:50
404 [dh.c]
405 debug->debug2
406 - markus@cvs.openbsd.org 2002/11/21 22:45:31
407 [cipher.c kex.c packet.c sshconnect.c sshconnect2.c]
408 debug->debug2, unify debug messages
409 - deraadt@cvs.openbsd.org 2002/11/21 23:03:51
410 [auth-krb5.c auth1.c hostfile.h monitor_wrap.c sftp-client.c sftp-int.c ssh-add.c ssh-rsa.c
411 sshconnect.c]
412 KNF
413 - markus@cvs.openbsd.org 2002/11/21 23:04:33
414 [ssh.c]
415 debug->debug2
416 - stevesk@cvs.openbsd.org 2002/11/24 21:46:24
417 [ssh-keysign.8]
418 typo: "the the"
419 - wcobb@cvs.openbsd.org 2002/11/26 00:45:03
420 [scp.c ssh-keygen.c]
421 Remove unnecessary fflush(stderr) calls, stderr is unbuffered by default.
422 ok markus@
423 - stevesk@cvs.openbsd.org 2002/11/26 02:35:30
424 [ssh-keygen.1]
425 remove outdated statement; ok markus@ deraadt@
426 - stevesk@cvs.openbsd.org 2002/11/26 02:38:54
427 [canohost.c]
428 KNF, comment and error message repair; ok markus@
429 - markus@cvs.openbsd.org 2002/11/27 17:53:35
430 [scp.c sftp.c ssh.c]
431 allow usernames with embedded '@', e.g. scp user@vhost@realhost:file /tmp;
432 http://bugzilla.mindrot.org/show_bug.cgi?id=447; ok mouring@, millert@
433 - stevesk@cvs.openbsd.org 2002/12/04 04:36:47
434 [session.c]
435 remove xauth entries before add; PR 2994 from janjaap@stack.nl.
436 ok markus@
437 - markus@cvs.openbsd.org 2002/12/05 11:08:35
438 [scp.c]
439 use roundup() similar to rcp/util.c and avoid problems with strange
440 filesystem block sizes, noted by tjr@freebsd.org; ok djm@
441 - djm@cvs.openbsd.org 2002/12/06 05:20:02
442 [sftp.1]
443 Fix cut'n'paste error, spotted by matthias.riese@b-novative.de; ok deraadt@
444 - millert@cvs.openbsd.org 2002/12/09 16:50:30
445 [ssh.c]
446 Avoid setting optind to 0 as GNU getopt treats that like we do optreset.
447 markus@ OK
448 - markus@cvs.openbsd.org 2002/12/10 08:56:00
449 [session.c]
450 Make sure $SHELL points to the shell from the password file, even if shell
451 is overridden from login.conf; bug#453; semen at online.sinor.ru; ok millert@
452 - markus@cvs.openbsd.org 2002/12/10 19:26:50
453 [packet.c]
454 move tos handling to packet_set_tos; ok provos/henning/deraadt
455 - markus@cvs.openbsd.org 2002/12/10 19:47:14
456 [packet.c]
457 static
458 - markus@cvs.openbsd.org 2002/12/13 10:03:15
459 [channels.c misc.c sshconnect2.c]
460 cleanup debug messages, more useful information for the client user.
461 - markus@cvs.openbsd.org 2002/12/13 15:20:52
462 [scp.c]
463 1) include stalling time in total time
464 2) truncate filenames to 45 instead of 20 characters
465 3) print rate instead of progress bar, no more stars
466 4) scale output to tty width
467 based on a patch from Niels; ok fries@ lebel@ fgs@ millert@
468 - (bal) [msg.c msg.h scp.c ssh-keysign.c sshconnect2.c] Resync CVS IDs since
469 we already did s/msg_send/ssh_msg_send/
470
47120021205
472 - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
473
47420021122
475 - (tim) [configure.ac] fix STDPATH test for IRIX. First reported by
476 advax@triumf.ca. This type of solution tested by <herb@sgi.com>
477
47820021113
479 - (tim) [configure.ac] remove unused variables no_libsocket and no_libnsl
480
48120021111
482 - (tim) [contrib/solaris/opensshd.in] add umask 022 so sshd.pid is
483 not world writable.
484
48520021109
486 - (bal) OpenBSD CVS Sync
487 - itojun@cvs.openbsd.org 2002/10/16 14:31:48
488 [sftp-common.c]
489 64bit pedant. %llu is "unsigned long long". markus ok
490 - markus@cvs.openbsd.org 2002/10/23 10:32:13
491 [packet.c]
492 use %u for u_int
493 - markus@cvs.openbsd.org 2002/10/23 10:40:16
494 [bufaux.c]
495 %u for u_int
496 - markus@cvs.openbsd.org 2002/11/04 10:07:53
497 [auth.c]
498 don't compare against pw_home if realpath fails for pw_home (seen
499 on AFS); ok djm@
500 - markus@cvs.openbsd.org 2002/11/04 10:09:51
501 [packet.c]
502 log before send disconnect; ok djm@
503 - markus@cvs.openbsd.org 2002/11/05 19:45:20
504 [monitor.c]
505 handle overflows for size_t larger than u_int; siw@goneko.de, bug #425
506 - markus@cvs.openbsd.org 2002/11/05 20:10:37
507 [sftp-client.c]
508 typo; GaryF@livevault.com
509 - markus@cvs.openbsd.org 2002/11/07 16:28:47
510 [sshd.c]
511 log to stderr if -ie is given, bug #414, prj@po.cwru.edu
512 - markus@cvs.openbsd.org 2002/11/07 22:08:07
513 [readconf.c readconf.h ssh-keysign.8 ssh-keysign.c]
514 we cannot use HostbasedAuthentication for enabling ssh-keysign(8),
515 because HostbasedAuthentication might be enabled based on the
516 target host and ssh-keysign(8) does not know the remote hostname
517 and not trust ssh(1) about the hostname, so we add a new option
518 EnableSSHKeysign; ok djm@, report from zierke@informatik.uni-hamburg.de
519 - markus@cvs.openbsd.org 2002/11/07 22:35:38
520 [scp.c]
521 check exit status from ssh, and exit(1) if ssh fails; bug#369;
522 binder@arago.de
523 - (bal) Update ssh-host-config and minor rewrite of bsd-cygwin_util.c
524 ntsec now default if cygwin version beginning w/ version 56. Patch
525 by Corinna Vinschen <vinschen@redhat.com>
526 - (bal) AIX does not log login attempts for unknown users (bug #432).
527 patch by dtucker@zip.com.au
528
52920021021
530 - (djm) Bug #400: Kill ssh-rand-helper children on timeout, patch from
531 dtucker@zip.com.au
532 - (djm) Bug #317: FreeBSD needs libutil.h for openpty() Report from
533 dirk.meyer@dinoex.sub.org
534
53520021015
536 - (bal) Fix bug id 383 and only call loginrestrict for AIX if not root.
537 - (bal) More advanced strsep test by Darren Tucker <dtucker@zip.com.au>
538
53920021015
540 - (tim) [contrib/caldera/openssh.spec] make ssh-agent setgid nobody
541
54220021004
543 - (bal) Disable post-authentication Privsep for OSF/1. It conflicts with
544 SIA.
545
54620021003
547 - (djm) OpenBSD CVS Sync
548 - markus@cvs.openbsd.org 2002/10/01 20:34:12
549 [ssh-agent.c]
550 allow root to access the agent, since there is no protection from root.
551 - markus@cvs.openbsd.org 2002/10/01 13:24:50
552 [version.h]
553 OpenSSH 3.5
554 - (djm) Bump RPM spec version numbers
555 - (djm) Bug #406: s/msg_send/ssh_msg_send/ for Mac OS X 1.2
556
55720020930
558 - (djm) Tidy contrib/, add Makefile for GNOME passphrase dialogs,
559 tweak README
560 - (djm) OpenBSD CVS Sync
561 - mickey@cvs.openbsd.org 2002/09/27 10:42:09
562 [compat.c compat.h sshd.c]
563 add a generic match for a prober, such as sie big brother;
564 idea from stevesk@; markus@ ok
565 - stevesk@cvs.openbsd.org 2002/09/27 15:46:21
566 [ssh.1]
567 clarify compression level protocol 1 only; ok markus@ deraadt@
568
56920020927
570 - (djm) OpenBSD CVS Sync
571 - markus@cvs.openbsd.org 2002/09/25 11:17:16
572 [sshd_config]
573 sync LoginGraceTime with default
574 - markus@cvs.openbsd.org 2002/09/25 15:19:02
575 [sshd.c]
576 typo; pilot@monkey.org
577 - markus@cvs.openbsd.org 2002/09/26 11:38:43
578 [auth1.c auth.h auth-krb4.c monitor.c monitor.h monitor_wrap.c]
579 [monitor_wrap.h]
580 krb4 + privsep; ok dugsong@, deraadt@
581
58220020925
583 - (bal) Fix issue where successfull login does not clear failure counts
584 in AIX. Patch by dtucker@zip.com.au ok by djm
585 - (tim) Cray fixes (bug 367) based on patch from Wendy Palm @ cray.
586 This does not include the deattack.c fixes.
587
58820020923
589 - (djm) OpenBSD CVS Sync
590 - stevesk@cvs.openbsd.org 2002/09/23 20:46:27
591 [canohost.c]
592 change get_peer_ipaddr() and get_local_ipaddr() to not return NULL for
593 non-sockets; fixes a problem passing NULL to snprintf(). ok markus@
594 - markus@cvs.openbsd.org 2002/09/23 22:11:05
595 [monitor.c]
596 only call auth_krb5 if kerberos is enabled; ok deraadt@
597 - markus@cvs.openbsd.org 2002/09/24 08:46:04
598 [monitor.c]
599 only call kerberos code for authctxt->valid
600 - todd@cvs.openbsd.org 2002/09/24 20:59:44
601 [sshd.8]
602 tweak the example $HOME/.ssh/rc script to not show on any cmdline the
603 sensitive data it handles. This fixes bug # 402 as reported by
604 kolya@mit.edu (Nickolai Zeldovich).
605 ok markus@ and stevesk@
606
60720020923
608 - (tim) [configure.ac] s/return/exit/ patch by dtucker@zip.com.au
609
61020020922
611 - (djm) OpenBSD CVS Sync
612 - stevesk@cvs.openbsd.org 2002/09/19 14:53:14
613 [compat.c]
614 - markus@cvs.openbsd.org 2002/09/19 15:51:23
615 [ssh-add.c]
616 typo; cd@kalkatraz.de
617 - stevesk@cvs.openbsd.org 2002/09/19 16:03:15
618 [serverloop.c]
619 log IP address also; ok markus@
620 - stevesk@cvs.openbsd.org 2002/09/20 18:41:29
621 [auth.c]
622 log illegal user here for missing privsep case (ssh2).
623 this is executed in the monitor. ok markus@
624
62520020919
626 - (djm) OpenBSD CVS Sync
627 - stevesk@cvs.openbsd.org 2002/09/12 19:11:52
628 [ssh-agent.c]
629 %u for uid print; ok markus@
630 - stevesk@cvs.openbsd.org 2002/09/12 19:50:36
631 [session.c ssh.1]
632 add SSH_CONNECTION and deprecate SSH_CLIENT; bug #384. ok markus@
633 - stevesk@cvs.openbsd.org 2002/09/13 19:23:09
634 [channels.c sshconnect.c sshd.c]
635 remove use of SO_LINGER, it should not be needed. error check
636 SO_REUSEADDR. fixup comments. ok markus@
637 - stevesk@cvs.openbsd.org 2002/09/16 19:55:33
638 [session.c]
639 log when _PATH_NOLOGIN exists; ok markus@
640 - stevesk@cvs.openbsd.org 2002/09/16 20:12:11
641 [sshd_config.5]
642 more details on X11Forwarding security issues and threats; ok markus@
643 - stevesk@cvs.openbsd.org 2002/09/16 22:03:13
644 [sshd.8]
645 reference moduli(5) in FILES /etc/moduli.
646 - itojun@cvs.openbsd.org 2002/09/17 07:47:02
647 [channels.c]
648 don't quit while creating X11 listening socket.
649 http://mail-index.netbsd.org/current-users/2002/09/16/0005.html
650 got from portable. markus ok
651 - djm@cvs.openbsd.org 2002/09/19 01:58:18
652 [ssh.c sshconnect.c]
653 bugzilla.mindrot.org #223 - ProxyCommands don't exit.
654 Patch from dtucker@zip.com.au; ok markus@
655
65620020912
657 - (djm) Made GNOME askpass programs return non-zero if cancel button is
658 pressed.
659 - (djm) Added getpeereid() replacement. Properly implemented for systems
660 with SO_PEERCRED support. Faked for systems which lack it.
661 - (djm) Sync sys/tree.h with OpenBSD -current. Rename tree.h and
662 fake-queue.h to sys-tree.h and sys-queue.h
663 - (djm) OpenBSD CVS Sync
664 - markus@cvs.openbsd.org 2002/09/08 20:24:08
665 [hostfile.h]
666 no comma at end of enumerator list
667 - itojun@cvs.openbsd.org 2002/09/09 06:48:06
668 [auth1.c auth.h auth-krb5.c monitor.c monitor.h]
669 [monitor_wrap.c monitor_wrap.h]
670 kerberos support for privsep. confirmed to work by lha@stacken.kth.se
671 patch from markus
672 - markus@cvs.openbsd.org 2002/09/09 14:54:15
673 [channels.c kex.h key.c monitor.c monitor_wrap.c radix.c uuencode.c]
674 signed vs unsigned from -pedantic; ok henning@
675 - markus@cvs.openbsd.org 2002/09/10 20:24:47
676 [ssh-agent.c]
677 check the euid of the connecting process with getpeereid(2);
678 ok provos deraadt stevesk
679 - stevesk@cvs.openbsd.org 2002/09/11 17:55:03
680 [ssh.1]
681 add agent and X11 forwarding warning text from ssh_config.5; ok markus@
682 - stevesk@cvs.openbsd.org 2002/09/11 18:27:26
683 [authfd.c authfd.h ssh.c]
684 don't connect to agent to test for presence if we've previously
685 connected; ok markus@
686 - djm@cvs.openbsd.org 2002/09/11 22:41:50
687 [sftp.1 sftp-client.c sftp-client.h sftp-common.c sftp-common.h]
688 [sftp-glob.c sftp-glob.h sftp-int.c sftp-server.c]
689 support for short/long listings and globbing in "ls"; ok markus@
690 - djm@cvs.openbsd.org 2002/09/12 00:13:06
691 [sftp-int.c]
692 zap unused var introduced in last commit
693
69420020911
695 - (djm) Sync openbsd-compat with OpenBSD -current
696
69720020910
698 - (djm) Bug #365: Read /.ssh/environment properly under CygWin.
699 Patch from Mark Bradshaw <bradshaw@staff.crosswalk.com>
700 - (djm) Bug #138: Make protocol 1 blowfish work with old OpenSSL.
701 Patch from Robert Halubek <rob@adso.com.pl>
702
70320020905
704 - (djm) OpenBSD CVS Sync
705 - stevesk@cvs.openbsd.org 2002/09/04 18:52:42
706 [servconf.c sshd.8 sshd_config.5]
707 default LoginGraceTime to 2m; 1m may be too short for slow systems.
708 ok markus@
709 - (djm) Merge openssh-TODO.patch from Redhat (null) beta
710 - (djm) Add gnome-ssh-askpass2.c (gtk2) by merge with patch from
711 Nalin Dahyabhai <nalin@redhat.com>
712 - (djm) Add support for building gtk2 password requestor from Redhat beta
713
71420020903
715 - (djm) Patch from itojun@ for Darwin OS: test getaddrinfo, reorder libcrypt
716 - (djm) Fix Redhat RPM build dependancy test
717 - (djm) OpenBSD CVS Sync
718 - markus@cvs.openbsd.org 2002/08/12 10:46:35
719 [ssh-agent.c]
720 make ssh-agent setgid, disallow ptrace.
721 - espie@cvs.openbsd.org 2002/08/21 11:20:59
722 [sshd.8]
723 `RSA' updated to refer to `public key', where it matters.
724 okay markus@
725 - stevesk@cvs.openbsd.org 2002/08/21 19:38:06
726 [servconf.c sshd.8 sshd_config sshd_config.5]
727 change LoginGraceTime default to 1 minute; ok mouring@ markus@
728 - stevesk@cvs.openbsd.org 2002/08/21 20:10:28
729 [ssh-agent.c]
730 raise listen backlog; ok markus@
731 - stevesk@cvs.openbsd.org 2002/08/22 19:27:53
732 [ssh-agent.c]
733 use common close function; ok markus@
734 - stevesk@cvs.openbsd.org 2002/08/22 19:38:42
735 [clientloop.c]
736 format with current EscapeChar; bugzilla #388 from wknox@mitre.org.
737 ok markus@
738 - stevesk@cvs.openbsd.org 2002/08/22 20:57:19
739 [ssh-agent.c]
740 shutdown(SHUT_RDWR) not needed before close here; ok markus@
741 - markus@cvs.openbsd.org 2002/08/22 21:33:58
742 [auth1.c auth2.c]
743 auth_root_allowed() is handled by the monitor in the privsep case,
744 so skip this for use_privsep, ok stevesk@, fixes bugzilla #387/325
745 - markus@cvs.openbsd.org 2002/08/22 21:45:41
746 [session.c]
747 send signal name (not signal number) in "exit-signal" message; noticed
748 by galb@vandyke.com
749 - stevesk@cvs.openbsd.org 2002/08/27 17:13:56
750 [ssh-rsa.c]
751 RSA_public_decrypt() returns -1 on error so len must be signed;
752 ok markus@
753 - stevesk@cvs.openbsd.org 2002/08/27 17:18:40
754 [ssh_config.5]
755 some warning text for ForwardAgent and ForwardX11; ok markus@
756 - stevesk@cvs.openbsd.org 2002/08/29 15:57:25
757 [monitor.c session.c sshlogin.c sshlogin.h]
758 pass addrlen with sockaddr *; from Hajimu UMEMOTO <ume@FreeBSD.org>
759 NOTE: there are also p-specific parts to this patch. ok markus@
760 - stevesk@cvs.openbsd.org 2002/08/29 16:02:54
761 [ssh.1 ssh.c]
762 deprecate -P as UsePrivilegedPort defaults to no now; ok markus@
763 - stevesk@cvs.openbsd.org 2002/08/29 16:09:02
764 [ssh_config.5]
765 more on UsePrivilegedPort and setuid root; ok markus@
766 - stevesk@cvs.openbsd.org 2002/08/29 19:49:42
767 [ssh.c]
768 shrink initial privilege bracket for setuid case; ok markus@
769 - stevesk@cvs.openbsd.org 2002/08/29 22:54:10
770 [ssh_config.5 sshd_config.5]
771 state XAuthLocation is a full pathname
772
77320020820
774 - OpenBSD CVS Sync
775 - millert@cvs.openbsd.org 2002/08/02 14:43:15
776 [monitor.c monitor_mm.c]
777 Change mm_zalloc() sanity checks to be more in line with what
778 we do in calloc() and add a check to monitor_mm.c.
779 OK provos@ and markus@
780 - marc@cvs.openbsd.org 2002/08/02 16:00:07
781 [ssh.1 sshd.8]
782 note that .ssh/environment is only read when
783 allowed (PermitUserEnvironment in sshd_config).
784 OK markus@
785 - markus@cvs.openbsd.org 2002/08/02 21:23:41
786 [ssh-rsa.c]
787 diff is u_int (2x); ok deraadt/provos
788 - markus@cvs.openbsd.org 2002/08/02 22:20:30
789 [ssh-rsa.c]
790 replace RSA_verify with our own version and avoid the OpenSSL ASN.1 parser
791 for authentication; ok deraadt/djm
792 - aaron@cvs.openbsd.org 2002/08/08 13:50:23
793 [sshconnect1.c]
794 Use & to test if bits are set, not &&; markus@ ok.
795 - stevesk@cvs.openbsd.org 2002/08/08 23:54:52
796 [auth.c]
797 typo in comment
798 - stevesk@cvs.openbsd.org 2002/08/09 17:21:42
799 [sshd_config.5]
800 use Op for mdoc conformance; from esr@golux.thyrsus.com
801 ok aaron@
802 - stevesk@cvs.openbsd.org 2002/08/09 17:41:12
803 [sshd_config.5]
804 proxy vs. fake display
805 - stevesk@cvs.openbsd.org 2002/08/12 17:30:35
806 [ssh.1 sshd.8 sshd_config.5]
807 more PermitUserEnvironment; ok markus@
808 - stevesk@cvs.openbsd.org 2002/08/17 23:07:14
809 [ssh.1]
810 ForwardAgent has defaulted to no for over 2 years; be more clear here.
811 - stevesk@cvs.openbsd.org 2002/08/17 23:55:01
812 [ssh_config.5]
813 ordered list here
814 - (bal) [defines.h] Some platforms don't have SIZE_T_MAX. So assign
815 it to ULONG_MAX.
816
81720020813
818 - (tim) [configure.ac] Display OpenSSL header/library version.
819 Patch by dtucker@zip.com.au
820
82120020731
822 - (bal) OpenBSD CVS Sync
823 - markus@cvs.openbsd.org 2002/07/24 16:11:18
824 [hostfile.c hostfile.h sshconnect.c]
825 print out all known keys for a host if we get a unknown host key,
826 see discussion at http://marc.theaimsgroup.com/?t=101069210100016&r=1&w=4
827
828 the ssharp mitm tool attacks users in a similar way, so i'd like to
829 pointed out again:
830 A MITM attack is always possible if the ssh client prints:
831 The authenticity of host 'bla' can't be established.
832 (protocol version 2 with pubkey authentication allows you to detect
833 MITM attacks)
834 - mouring@cvs.openbsd.org 2002/07/25 01:16:59
835 [sftp.c]
836 FallBackToRsh does not exist anywhere else. Remove it from here.
837 OK deraadt.
838 - markus@cvs.openbsd.org 2002/07/29 18:57:30
839 [sshconnect.c]
840 print file:line
841 - markus@cvs.openbsd.org 2002/07/30 17:03:55
842 [auth-options.c servconf.c servconf.h session.c sshd_config sshd_config.5]
843 add PermitUserEnvironment (off by default!); from dot@dotat.at;
844 ok provos, deraadt
845
84620020730
847 - (bal) [uidswap.c] SCO compile correction by gert@greenie.muc.de
848
84920020728
850 - (stevesk) [auth-pam.c] should use PAM_MSG_MEMBER(); from solar
851 - (stevesk) [CREDITS] solar
852 - (stevesk) [ssh-rand-helper.c] RAND_bytes() and SHA1_Final() unsigned
853 char arg.
854
85520020725
856 - (djm) Remove some cruft from INSTALL
857 - (djm) Latest config.guess and config.sub from ftp://ftp.gnu.org/gnu/config/
858
85920020723
860 - (bal) [bsd-cray.c bsd-cray.h] Part 2 of Cray merger.
861 - (bal) sync ID w/ ssh-agent.c
862 - (bal) OpenBSD Sync
863 - markus@cvs.openbsd.org 2002/07/19 15:43:33
864 [log.c log.h session.c sshd.c]
865 remove fatal cleanups after fork; based on discussions with and code
866 from solar.
867 - stevesk@cvs.openbsd.org 2002/07/19 17:42:40
868 [ssh.c]
869 display a warning from ssh when XAuthLocation does not exist or xauth
870 returned no authentication data. ok markus@
871 - stevesk@cvs.openbsd.org 2002/07/21 18:32:20
872 [auth-options.c]
873 unneeded includes
874 - stevesk@cvs.openbsd.org 2002/07/21 18:34:43
875 [auth-options.h]
876 remove invalid comment
877 - markus@cvs.openbsd.org 2002/07/22 11:03:06
878 [session.c]
879 fallback to _PATH_STDPATH on setusercontext+LOGIN_SETPATH errors;
880 - stevesk@cvs.openbsd.org 2002/07/22 17:32:56
881 [monitor.c]
882 u_int here; ok provos@
883 - stevesk@cvs.openbsd.org 2002/07/23 16:03:10
884 [sshd.c]
885 utmp_len is unsigned; display error consistent with other options.
886 ok markus@
887 - stevesk@cvs.openbsd.org 2002/07/15 17:15:31
888 [uidswap.c]
889 little more debugging; ok markus@
890
89120020722
892 - (bal) AIX tty data limiting patch fix by leigh@solinno.co.uk
893 - (stevesk) [xmmap.c] missing prototype for fatal()
894 - (bal) [configure.ac defines.h loginrec.c sshd.c sshpty.c] Partial sync
895 with Cray (mostly #ifdef renaming). Patch by wendyp@cray.com.
896 - (bal) [configure.ac] Missing ;; from cray patch.
897 - (bal) [monitor_mm.c openbsd-compat/xmmap.h] Move xmmap() defines
898 into it's own header.
899 - (stevesk) [auth-pam.[ch] session.c] pam_getenvlist() must be
900 freed by the caller; add free_pam_environment() and use it.
901 - (stevesk) [auth-pam.c] typo in comment
902
90320020721
904 - (stevesk) [auth-pam.c] merge cosmetic changes from solar's
905 openssh-3.4p1-owl-password-changing.diff
906 - (stevesk) [auth-pam.c] merge rest of solar's PAM patch;
907 PAM_NEW_AUTHTOK_REQD remains in #if 0 for now.
908 - (stevesk) [auth-pam.c] cast to avoid initialization type mismatch
909 warning on pam_conv struct conversation function.
910 - (stevesk) [auth-pam.h] license
911 - (stevesk) [auth-pam.h] unneeded include
912 - (stevesk) [auth-pam.[ch] ssh.h] move SSHD_PAM_SERVICE to auth-pam.h
913
91420020720
915 - (stevesk) [ssh-keygen.c] bug #231: always init/seed_rng().
916
91720020719
918 - (tim) [contrib/solaris/buildpkg.sh] create privsep user/group if needed.
919 Patch by dtucker@zip.com.au
920 - (tim) [configure.ac] test for libxnet on HP. Patch by dtucker@zip.com.au
921
92220020718
923 - (tim) [defines.h] Bug 313 patch by dirk.meyer@dinoex.sub.org
924 - (tim) [monitor_mm.c] add missing declaration for xmmap(). Reported
925 by ayamura@ayamura.org
926 - (tim) [configure.ac] Bug 267 rework int64_t test.
927 - (tim) [includes.h] Bug 267 add stdint.h
928
92920020717
930 - (bal) aixbff package updated by dtucker@zip.com.au
931 - (tim) [configure.ac] change how we do paths in AC_PATH_PROGS tests
932 for autoconf 2.53. Based on a patch by jrj@purdue.edu
933
93420020716
935 - (tim) [contrib/solaris/opensshd.in] Only kill sshd if .pid file found
936
93720020715
938 - (bal) OpenBSD CVS Sync
939 - itojun@cvs.openbsd.org 2002/07/12 13:29:09
940 [sshconnect.c]
941 print connect failure during debugging mode.
942 - markus@cvs.openbsd.org 2002/07/12 15:50:17
943 [cipher.c]
944 EVP_CIPH_CUSTOM_IV for our own rijndael
945 - (bal) Remove unused tty defined in do_setusercontext() pointed out by
946 dtucker@zip.com.au plus a a more KNF since I am near it.
947 - (bal) Privsep user creation support in Solaris buildpkg.sh by
948 dtucker@zip.com.au
949
95020020714
951 - (tim) [Makefile.in] replace "id sshd" with "sshd -t"
952 - (bal/tim) [acconfig.h configure.ac monitor_mm.c servconf.c
953 openbsd-compat/Makefile.in] support compression on platforms that
954 have no/broken MAP_ANON. Moved code to openbsd-compat/xmmap.c
955 Based on patch from nalin@redhat.com of code extracted from Owl's package
956 - (tim) [ssh_prng_cmds.in] Bug 323 arp -n flag doesn't exist under Solaris.
957 report by chris@by-design.net
958 - (tim) [loginrec.c] Bug 347: Fix typo (WTMPX_FILE) report by rodney@bond.net
959 - (tim) [loginrec.c] Bug 348: add missing found = 1; to wtmpx_islogin()
960 report by rodney@bond.net
961
96220020712
963 - (tim) [Makefile.in] quiet down install-files: and check-user:
964 - (tim) [configure.ac] remove unused filepriv line
965
96620020710
967 - (tim) [contrib/cygwin/ssh-host-config] explicitely sets the permissions
968 on /var/empty to 755 Patch by vinschen@redhat.com
969 - (bal) OpenBSD CVS Sync
970 - itojun@cvs.openbsd.org 2002/07/09 11:56:50
971 [sshconnect.c]
972 silently try next address on connect(2). markus ok
973 - itojun@cvs.openbsd.org 2002/07/09 11:56:27
974 [canohost.c]
975 suppress log on reverse lookup failiure, as there's no real value in
976 doing so.
977 markus ok
978 - itojun@cvs.openbsd.org 2002/07/09 12:04:02
979 [sshconnect.c]
980 ed static function (less warnings)
981 - stevesk@cvs.openbsd.org 2002/07/09 17:46:25
982 [sshd_config.5]
983 clarify no preference ordering in protocol list; ok markus@
984 - itojun@cvs.openbsd.org 2002/07/10 10:28:15
985 [sshconnect.c]
986 bark if all connection attempt fails.
987 - deraadt@cvs.openbsd.org 2002/07/10 17:53:54
988 [rijndael.c]
989 use right sizeof in memcpy; markus ok
990
99120020709
992 - (bal) NO_IPPORT_RESERVED_CONCEPT used instead of CYGWIN so other platforms
993 lacking that concept can share it. Patch by vinschen@redhat.com
994
99520020708
996 - (tim) [openssh/contrib/solaris/buildpkg.sh] add PKG_INSTALL_ROOT to
997 work in a jumpstart environment. patch by kbrint@rufus.net
998 - (tim) [Makefile.in] workaround for broken pakadd on some systems.
999 - (tim) [configure.ac] fix libc89 utimes test. Mention default path for
1000 --with-privsep-path=
1001
100220020707
1003 - (tim) [Makefile.in] use umask instead of chmod on $(PRIVSEP_PATH)
1004 - (tim) [acconfig.h configure.ac sshd.c]
1005 s/BROKEN_FD_PASSING/DISABLE_FD_PASSING/
1006 - (tim) [contrib/cygwin/ssh-host-config] sshd account creation fixes
1007 patch from vinschen@redhat.com
1008 - (bal) [realpath.c] Updated with OpenBSD tree.
1009 - (bal) OpenBSD CVS Sync
1010 - deraadt@cvs.openbsd.org 2002/07/04 04:15:33
1011 [key.c monitor_wrap.c sftp-glob.c ssh-dss.c ssh-rsa.c]
1012 patch memory leaks; grendel@zeitbombe.org
1013 - deraadt@cvs.openbsd.org 2002/07/04 08:12:15
1014 [channels.c packet.c]
1015 blah blah minor nothing as i read and re-read and re-read...
1016 - markus@cvs.openbsd.org 2002/07/04 10:41:47
1017 [key.c monitor_wrap.c ssh-dss.c ssh-rsa.c]
1018 don't allocate, copy, and discard if there is not interested in the data;
1019 ok deraadt@
1020 - deraadt@cvs.openbsd.org 2002/07/06 01:00:49
1021 [log.c]
1022 KNF
1023 - deraadt@cvs.openbsd.org 2002/07/06 01:01:26
1024 [ssh-keyscan.c]
1025 KNF, realloc fix, and clean usage
1026 - stevesk@cvs.openbsd.org 2002/07/06 17:47:58
1027 [ssh-keyscan.c]
1028 unused variable
1029 - (bal) Minor KNF on ssh-keyscan.c
1030
103120020705
1032 - (tim) [configure.ac] AIX 4.2.1 has authenticate() in libs.
1033 Reported by Darren Tucker <dtucker@zip.com.au>
1034 - (tim) [contrib/cygwin/ssh-host-config] double slash corrction
1035 from vinschen@redhat.com
1036
103720020704
1038 - (bal) Limit data to TTY for AIX only (Newer versions can't handle the
1039 faster data rate) Bug #124
1040 - (bal) glob.c defines TILDE and AIX also defines it. #undef it first.
1041 bug #265
1042 - (bal) One too many nulls in ports-aix.c
1043
104420020703
1045 - (bal) Updated contrib/cygwin/ patch by vinschen@redhat.com
1046 - (bal) minor correction to utimes() replacement. Patch by
1047 onoe@sm.sony.co.jp
1048 - OpenBSD CVS Sync
1049 - markus@cvs.openbsd.org 2002/06/27 08:49:44
1050 [dh.c ssh-keyscan.c sshconnect.c]
1051 more checks for NULL pointers; from grendel@zeitbombe.org; ok deraadt@
1052 - deraadt@cvs.openbsd.org 2002/06/27 09:08:00
1053 [monitor.c]
1054 improve mm_zalloc check; markus ok
1055 - deraadt@cvs.openbsd.org 2002/06/27 10:35:47
1056 [auth2-none.c monitor.c sftp-client.c]
1057 use xfree()
1058 - stevesk@cvs.openbsd.org 2002/06/27 19:49:08
1059 [ssh-keyscan.c]
1060 use convtime(); ok markus@
1061 - millert@cvs.openbsd.org 2002/06/28 01:49:31
1062 [monitor_mm.c]
1063 tree(3) wants an int return value for its compare functions and
1064 the difference between two pointers is not an int. Just do the
1065 safest thing and store the result in a long and then return 0,
1066 -1, or 1 based on that result.
1067 - deraadt@cvs.openbsd.org 2002/06/28 01:50:37
1068 [monitor_wrap.c]
1069 use ssize_t
1070 - deraadt@cvs.openbsd.org 2002/06/28 10:08:25
1071 [sshd.c]
1072 range check -u option at invocation
1073 - deraadt@cvs.openbsd.org 2002/06/28 23:05:06
1074 [sshd.c]
1075 gidset[2] -> gidset[1]; markus ok
1076 - deraadt@cvs.openbsd.org 2002/06/30 21:54:16
1077 [auth2.c session.c sshd.c]
1078 lint asks that we use names that do not overlap
1079 - deraadt@cvs.openbsd.org 2002/06/30 21:59:45
1080 [auth-bsdauth.c auth-skey.c auth2-chall.c clientloop.c key.c
1081 monitor_wrap.c monitor_wrap.h scard.h session.h sftp-glob.c ssh.c
1082 sshconnect2.c sshd.c]
1083 minor KNF
1084 - deraadt@cvs.openbsd.org 2002/07/01 16:15:25
1085 [msg.c]
1086 %u
1087 - markus@cvs.openbsd.org 2002/07/01 19:48:46
1088 [sshconnect2.c]
1089 for compression=yes, we fallback to no-compression if the server does
1090 not support compression, vice versa for compression=no. ok mouring@
1091 - markus@cvs.openbsd.org 2002/07/03 09:55:38
1092 [ssh-keysign.c]
1093 use RSA_blinding_on() for rsa hostkeys (suggested by Bill Sommerfeld)
1094 in order to avoid a possible Kocher timing attack pointed out by Charles
1095 Hannum; ok provos@
1096 - markus@cvs.openbsd.org 2002/07/03 14:21:05
1097 [ssh-keysign.8 ssh-keysign.c ssh.c ssh_config]
1098 re-enable ssh-keysign's sbit, but make ssh-keysign read
1099 /etc/ssh/ssh_config and exit if HostbasedAuthentication is disabled
1100 globally. based on discussions with deraadt, itojun and sommerfeld;
1101 ok itojun@
1102 - (bal) Failed password attempts don't increment counter on AIX. Bug #145
1103 - (bal) Missed Makefile.in change. keysign needs readconf.o
1104 - (bal) Clean up aix_usrinfo(). Ignore TTY= period I guess.
1105
110620020702
1107 - (djm) Use PAM_MSG_MEMBER for PAM_TEXT_INFO messages, use xmalloc &
1108 friends consistently. Spotted by Solar Designer <solar@openwall.com>
1109
111020020629
1111 - (bal) fix to auth2-pam.c to swap fatal() arguments, A bit of style
1112 clean up while I'm near it.
1113
111420020628
1115 - (stevesk) [sshd_config] PAMAuthenticationViaKbdInt no; commented
1116 options should contain default value. from solar.
1117 - (bal) Cygwin uid0 fix by vinschen@redhat.com
1118 - (bal) s/config.h/includes.h/ in openbsd-compat/ for *.c. Otherwise wise
1119 have issues of our fixes not propogating right (ie bcopy instead of
1120 memmove). OK tim
1121 - (bal) FreeBSD needs <sys/types.h> to detect if mmap() is supported.
1122 Bug #303
1123
112420020627
1125 - OpenBSD CVS Sync
1126 - deraadt@cvs.openbsd.org 2002/06/26 14:49:36
1127 [monitor.c]
1128 correct %u
1129 - deraadt@cvs.openbsd.org 2002/06/26 14:50:04
1130 [monitor_fdpass.c]
1131 use ssize_t for recvmsg() and sendmsg() return
1132 - markus@cvs.openbsd.org 2002/06/26 14:51:33
1133 [ssh-add.c]
1134 fix exit code for -X/-x
1135 - deraadt@cvs.openbsd.org 2002/06/26 15:00:32
1136 [monitor_wrap.c]
1137 more %u
1138 - markus@cvs.openbsd.org 2002/06/26 22:27:32
1139 [ssh-keysign.c]
1140 bug #304, xfree(data) called to early; openssh@sigint.cs.purdue.edu
1141
114220020626
1143 - (stevesk) [monitor.c] remove duplicate proto15 dispatch entry for PAM
1144 - (bal) OpenBSD CVS Sync
1145 - markus@cvs.openbsd.org 2002/06/23 21:34:07
1146 [channels.c]
1147 tcode is u_int
1148 - markus@cvs.openbsd.org 2002/06/24 13:12:23
1149 [ssh-agent.1]
1150 the socket name contains ssh-agent's ppid; via mpech@ from form@
1151 - markus@cvs.openbsd.org 2002/06/24 14:33:27
1152 [channels.c channels.h clientloop.c serverloop.c]
1153 move channel counter to u_int
1154 - markus@cvs.openbsd.org 2002/06/24 14:55:38
1155 [authfile.c kex.c ssh-agent.c]
1156 cat to (void) when output from buffer_get_X is ignored
1157 - itojun@cvs.openbsd.org 2002/06/24 15:49:22
1158 [msg.c]
1159 printf type pedant
1160 - deraadt@cvs.openbsd.org 2002/06/24 17:57:20
1161 [sftp-server.c sshpty.c]
1162 explicit (u_int) for uid and gid
1163 - markus@cvs.openbsd.org 2002/06/25 16:22:42
1164 [authfd.c]
1165 unnecessary cast
1166 - markus@cvs.openbsd.org 2002/06/25 18:51:04
1167 [sshd.c]
1168 lightweight do_setusercontext after chroot()
1169 - (bal) Updated AIX package build. Patch by dtucker@zip.com.au
1170 - (tim) [Makefile.in] fix test on installing ssh-rand-helper.8
1171 - (bal) added back in error check for mmap(). I screwed up, Pointed
1172 out by stevesk@
1173 - (tim) [README.privsep] UnixWare tip no longer needed.
1174 - (bal) fixed NeXTStep missing munmap() issue. It defines HAVE_MMAP,
1175 but it all damned lies.
1176 - (stevesk) [README.privsep] more for sshd pseudo-account.
1177 - (tim) [contrib/caldera/openssh.spec] add support for privsep
1178 - (djm) setlogin needs pgid==pid on BSD/OS; from itojun@
1179 - (djm) OpenBSD CVS Sync
1180 - markus@cvs.openbsd.org 2002/06/26 08:53:12
1181 [bufaux.c]
1182 limit size of BNs to 8KB; ok provos/deraadt
1183 - markus@cvs.openbsd.org 2002/06/26 08:54:18
1184 [buffer.c]
1185 limit append to 1MB and buffers to 10MB
1186 - markus@cvs.openbsd.org 2002/06/26 08:55:02
1187 [channels.c]
1188 limit # of channels to 10000
1189 - markus@cvs.openbsd.org 2002/06/26 08:58:26
1190 [session.c]
1191 limit # of env vars to 1000; ok deraadt/djm
1192 - deraadt@cvs.openbsd.org 2002/06/26 13:20:57
1193 [monitor.c]
1194 be careful in mm_zalloc
1195 - deraadt@cvs.openbsd.org 2002/06/26 13:49:26
1196 [session.c]
1197 disclose less information from environment files; based on input
1198 from djm, and dschultz@uclink.Berkeley.EDU
1199 - markus@cvs.openbsd.org 2002/06/26 13:55:37
1200 [auth2-chall.c]
1201 make sure # of response matches # of queries, fixes int overflow;
1202 from ISS
1203 - markus@cvs.openbsd.org 2002/06/26 13:56:27
1204 [version.h]
1205 3.4
1206 - (djm) Require krb5 devel for RPM build w/ KrbV
1207 - (djm) Improve PAMAuthenticationViaKbdInt text from Nalin Dahyabhai
1208 <nalin@redhat.com>
1209 - (djm) Update spec files for release
1210 - (djm) Fix int overflow in auth2-pam.c, similar to one discovered by ISS
1211 - (djm) Release 3.4p1
1212 - (tim) [contrib/caldera/openssh.spec] remove 2 configure options I put in
1213 by mistake
1214
121520020625
1216 - (stevesk) [INSTALL acconfig.h configure.ac defines.h] remove --with-rsh
1217 - (stevesk) [README.privsep] minor updates
1218 - (djm) Create privsep directory and warn if privsep user is missing
1219 during make install
1220 - (bal) Started list of PrivSep issues in TODO
1221 - (bal) if mmap() is substandard, don't allow compression on server side.
1222 Post 'event' we will add more options.
1223 - (tim) [contrib/caldera/openssh.spec] Sync with Caldera
1224 - (bal) moved aix_usrinfo() and noted not setting real TTY. Patch by
1225 dtucker@zip.com.au
1226 - (tim) [acconfig.h configure.ac sshd.c] BROKEN_FD_PASSING fix from Markus
1227 for Cygwin, Cray, & SCO
1228
122920020624
1230 - OpenBSD CVS Sync
1231 - deraadt@cvs.openbsd.org 2002/06/23 03:25:50
1232 [tildexpand.c]
1233 KNF
1234 - deraadt@cvs.openbsd.org 2002/06/23 03:26:19
1235 [cipher.c key.c]
1236 KNF
1237 - deraadt@cvs.openbsd.org 2002/06/23 03:30:58
1238 [scard.c ssh-dss.c ssh-rsa.c sshconnect.c sshconnect2.c sshd.c sshlogin.c
1239 sshpty.c]
1240 various KNF and %d for unsigned
1241 - deraadt@cvs.openbsd.org 2002/06/23 09:30:14
1242 [sftp-client.c sftp-client.h sftp-common.c sftp-int.c sftp-server.c
1243 sftp.c]
1244 bunch of u_int vs int stuff
1245 - deraadt@cvs.openbsd.org 2002/06/23 09:39:55
1246 [ssh-keygen.c]
1247 u_int stuff
1248 - deraadt@cvs.openbsd.org 2002/06/23 09:46:51
1249 [bufaux.c servconf.c]
1250 minor KNF. things the fingers do while you read
1251 - deraadt@cvs.openbsd.org 2002/06/23 10:29:52
1252 [ssh-agent.c sshd.c]
1253 some minor KNF and %u
1254 - deraadt@cvs.openbsd.org 2002/06/23 20:39:45
1255 [session.c]
1256 compression_level is u_int
1257 - deraadt@cvs.openbsd.org 2002/06/23 21:06:13
1258 [sshpty.c]
1259 KNF
1260 - deraadt@cvs.openbsd.org 2002/06/23 21:06:41
1261 [channels.c channels.h session.c session.h]
1262 display, screen, row, col, xpixel, ypixel are u_int; markus ok
1263 - deraadt@cvs.openbsd.org 2002/06/23 21:10:02
1264 [packet.c]
1265 packet_get_int() returns unsigned for reason & seqnr
1266 - (bal) Also fixed IPADDR_IN_DISPLAY case where display, screen, row, col,
1267 xpixel are u_int.
1268
1269
127020020623
1271 - (stevesk) [configure.ac] bug #255 LOGIN_NEEDS_UTMPX for AIX.
1272 - (bal) removed GNUism for getops in ssh-agent since glibc lacks optreset.
1273 - (bal) add extern char *getopt. Based on report by dtucker@zip.com.au
1274 - OpenBSD CVS Sync
1275 - stevesk@cvs.openbsd.org 2002/06/22 02:00:29
1276 [ssh.h]
1277 correct comment
1278 - stevesk@cvs.openbsd.org 2002/06/22 02:40:23
1279 [ssh.1]
1280 section 5 not 4 for ssh_config
1281 - naddy@cvs.openbsd.org 2002/06/22 11:51:39
1282 [ssh.1]
1283 typo
1284 - stevesk@cvs.openbsd.org 2002/06/22 16:32:54
1285 [sshd.8]
1286 add /var/empty in FILES section
1287 - stevesk@cvs.openbsd.org 2002/06/22 16:40:19
1288 [sshd.c]
1289 check /var/empty owner mode; ok provos@
1290 - stevesk@cvs.openbsd.org 2002/06/22 16:41:57
1291 [scp.1]
1292 typo
1293 - stevesk@cvs.openbsd.org 2002/06/22 16:45:29
1294 [ssh-agent.1 sshd.8 sshd_config.5]
1295 use process ID vs. pid/PID/process identifier
1296 - stevesk@cvs.openbsd.org 2002/06/22 20:05:27
1297 [sshd.c]
1298 don't call setsid() if debugging or run from inetd; no "Operation not
1299 permitted" errors now; ok millert@ markus@
1300 - stevesk@cvs.openbsd.org 2002/06/22 23:09:51
1301 [monitor.c]
1302 save auth method before monitor_reset_key_state(); bugzilla bug #284;
1303 ok provos@
1304
1305$Id: ChangeLog,v 1.2648.2.1 2003/04/29 09:12:07 djm Exp $
diff --git a/INSTALL b/INSTALL
index 93070b105..f5ab0dbd3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -123,7 +123,7 @@ it if lastlog is installed in a different place.
123 123
124--without-lastlog will disable lastlog support entirely. 124--without-lastlog will disable lastlog support entirely.
125 125
126--with-osfsia, --without-osfsia will enable or disable OSF1's Security 126--with-sia, --without-sia will enable or disable OSF1's Security
127Integration Architecture. The default for OSF1 machines is enable. 127Integration Architecture. The default for OSF1 machines is enable.
128 128
129--with-kerberos4=PATH will enable Kerberos IV support. You will need 129--with-kerberos4=PATH will enable Kerberos IV support. You will need
@@ -217,4 +217,4 @@ Please refer to the "reporting bugs" section of the webpage at
217http://www.openssh.com/ 217http://www.openssh.com/
218 218
219 219
220$Id: INSTALL,v 1.56 2003/05/24 01:41:16 dtucker Exp $ 220$Id: INSTALL,v 1.55 2002/07/25 04:36:25 djm Exp $
diff --git a/LICENCE b/LICENCE
index b47556dda..19d4c74e6 100644
--- a/LICENCE
+++ b/LICENCE
@@ -76,6 +76,14 @@ OpenSSH contains no GPL code.
76 POSSIBILITY OF SUCH DAMAGES. 76 POSSIBILITY OF SUCH DAMAGES.
77 77
782) 782)
79 The 32-bit CRC implementation in crc32.c is due to Gary S. Brown.
80 Comments in the file indicate it may be used for any purpose without
81 restrictions:
82
83 * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
84 * code or tables extracted from it, as desired without restriction.
85
863)
79 The 32-bit CRC compensation attack detector in deattack.c was 87 The 32-bit CRC compensation attack detector in deattack.c was
80 contributed by CORE SDI S.A. under a BSD-style license. 88 contributed by CORE SDI S.A. under a BSD-style license.
81 89
@@ -96,7 +104,7 @@ OpenSSH contains no GPL code.
96 * Ariel Futoransky <futo@core-sdi.com> 104 * Ariel Futoransky <futo@core-sdi.com>
97 * <http://www.core-sdi.com> 105 * <http://www.core-sdi.com>
98 106
993) 1074)
100 ssh-keygen was contributed by David Mazieres under a BSD-style 108 ssh-keygen was contributed by David Mazieres under a BSD-style
101 license. 109 license.
102 110
@@ -106,7 +114,7 @@ OpenSSH contains no GPL code.
106 * permitted provided that due credit is given to the author and the 114 * permitted provided that due credit is given to the author and the
107 * OpenBSD project by leaving this copyright notice intact. 115 * OpenBSD project by leaving this copyright notice intact.
108 116
1094) 1175)
110 The Rijndael implementation by Vincent Rijmen, Antoon Bosselaers 118 The Rijndael implementation by Vincent Rijmen, Antoon Bosselaers
111 and Paulo Barreto is in the public domain and distributed 119 and Paulo Barreto is in the public domain and distributed
112 with the following license: 120 with the following license:
@@ -133,10 +141,12 @@ OpenSSH contains no GPL code.
133 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 141 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
134 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 142 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
135 143
1365) 1446)
137 One component of the ssh source code is under a 3-clause BSD license, 145 One component of the ssh source code is under a 4-clause BSD license,
138 held by the University of California, since we pulled these parts from 146 held by the University of California, since we pulled these parts from
139 original Berkeley code. 147 original Berkeley code. The Regents of the University of California
148 have declared that term 3 is no longer enforceable on their source code,
149 but we retain that license as is.
140 150
141 * Copyright (c) 1983, 1990, 1992, 1993, 1995 151 * Copyright (c) 1983, 1990, 1992, 1993, 1995
142 * The Regents of the University of California. All rights reserved. 152 * The Regents of the University of California. All rights reserved.
@@ -149,7 +159,11 @@ OpenSSH contains no GPL code.
149 * 2. Redistributions in binary form must reproduce the above copyright 159 * 2. Redistributions in binary form must reproduce the above copyright
150 * notice, this list of conditions and the following disclaimer in the 160 * notice, this list of conditions and the following disclaimer in the
151 * documentation and/or other materials provided with the distribution. 161 * documentation and/or other materials provided with the distribution.
152 * 3. Neither the name of the University nor the names of its contributors 162 * 3. All advertising materials mentioning features or use of this software
163 * must display the following acknowledgement:
164 * This product includes software developed by the University of
165 * California, Berkeley and its contributors.
166 * 4. Neither the name of the University nor the names of its contributors
153 * may be used to endorse or promote products derived from this software 167 * may be used to endorse or promote products derived from this software
154 * without specific prior written permission. 168 * without specific prior written permission.
155 * 169 *
@@ -165,7 +179,7 @@ OpenSSH contains no GPL code.
165 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 179 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
166 * SUCH DAMAGE. 180 * SUCH DAMAGE.
167 181
1686) 1827)
169 Remaining components of the software are provided under a standard 183 Remaining components of the software are provided under a standard
170 2-term BSD licence with the following names as copyright holders: 184 2-term BSD licence with the following names as copyright holders:
171 185
@@ -178,31 +192,6 @@ OpenSSH contains no GPL code.
178 Kevin Steves 192 Kevin Steves
179 Daniel Kouril 193 Daniel Kouril
180 Per Allansson 194 Per Allansson
181 Wesley Griffin
182 Per Allansson
183 Nils Nordman
184 Simon Wilkinson
185
186 Portable OpenSSH additionally includes code from the following copyright
187 holders, also under the 2-term BSD license:
188
189 Ben Lindstrom
190 Tim Rice
191 Andre Lucas
192 Chris Adams
193 Corinna Vinschen
194 Cray Inc.
195 Denis Parker
196 Gert Doering
197 Jakob Schlyter
198 Jason Downs
199 Juha Yrjölä
200 Michael Stone
201 Networks Associates Technology, Inc.
202 Solar Designer
203 Todd C. Miller
204 Wayne Schroeder
205 William Jones
206 195
207 * Redistribution and use in source and binary forms, with or without 196 * Redistribution and use in source and binary forms, with or without
208 * modification, are permitted provided that the following conditions 197 * modification, are permitted provided that the following conditions
@@ -223,110 +212,3 @@ OpenSSH contains no GPL code.
223 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 212 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
224 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 213 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
225 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 214 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
226
2278) Portable OpenSSH contains the following additional licenses:
228
229 a) md5crypt.c, md5crypt.h
230
231 * "THE BEER-WARE LICENSE" (Revision 42):
232 * <phk@login.dknet.dk> wrote this file. As long as you retain this
233 * notice you can do whatever you want with this stuff. If we meet
234 * some day, and you think this stuff is worth it, you can buy me a
235 * beer in return. Poul-Henning Kamp
236
237 b) snprintf replacement
238
239 * Copyright Patrick Powell 1995
240 * This code is based on code written by Patrick Powell
241 * (papowell@astart.com) It may be used for any purpose as long as this
242 * notice remains intact on all source code distributions
243
244 c) Compatibility code (openbsd-compat)
245
246 Apart from the previously mentioned licenses, various pieces of code
247 in the openbsd-compat/ subdirectory are licensed as follows:
248
249 Some code is licensed under a 3-term BSD license, to the following
250 copyright holders:
251
252 Todd C. Miller
253 Theo de Raadt
254 Damien Miller
255 Eric P. Allman
256 The Regents of the University of California
257
258 * Redistribution and use in source and binary forms, with or without
259 * modification, are permitted provided that the following conditions
260 * are met:
261 * 1. Redistributions of source code must retain the above copyright
262 * notice, this list of conditions and the following disclaimer.
263 * 2. Redistributions in binary form must reproduce the above copyright
264 * notice, this list of conditions and the following disclaimer in the
265 * documentation and/or other materials provided with the distribution.
266 * 3. Neither the name of the University nor the names of its contributors
267 * may be used to endorse or promote products derived from this software
268 * without specific prior written permission.
269 *
270 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
271 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
272 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
273 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
274 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
275 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
276 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
277 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
278 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
279 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
280 * SUCH DAMAGE.
281
282 Some code is licensed under an ISC-style license, to the following
283 copyright holders:
284
285 Internet Software Consortium.
286 Todd C. Miller
287
288 * Permission to use, copy, modify, and distribute this software for any
289 * purpose with or without fee is hereby granted, provided that the above
290 * copyright notice and this permission notice appear in all copies.
291 *
292 * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
293 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
294 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
295 * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
296 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
297 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
298 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
299
300 Some code is licensed under a MIT-style license to the following
301 copyright holders:
302
303 Free Software Foundation, Inc.
304
305 * Permission is hereby granted, free of charge, to any person obtaining a *
306 * copy of this software and associated documentation files (the *
307 * "Software"), to deal in the Software without restriction, including *
308 * without limitation the rights to use, copy, modify, merge, publish, *
309 * distribute, distribute with modifications, sublicense, and/or sell *
310 * copies of the Software, and to permit persons to whom the Software is *
311 * furnished to do so, subject to the following conditions: *
312 * *
313 * The above copyright notice and this permission notice shall be included *
314 * in all copies or substantial portions of the Software. *
315 * *
316 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
317 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
318 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
319 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
320 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
321 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
322 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
323 * *
324 * Except as contained in this notice, the name(s) of the above copyright *
325 * holders shall not be used in advertising or otherwise to promote the *
326 * sale, use or other dealings in this Software without prior written *
327 * authorization. *
328 ****************************************************************************/
329
330
331------
332$OpenBSD: LICENCE,v 1.17 2003/08/22 20:55:06 markus Exp $
diff --git a/Makefile.in b/Makefile.in
index 8a8774461..39bbf344d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.249 2003/09/14 01:40:36 dtucker Exp $ 1# $Id: Makefile.in,v 1.228.2.1 2003/04/29 09:12:08 djm Exp $
2 2
3# uncomment if you run a non bourne compatable shell. Ie. csh 3# uncomment if you run a non bourne compatable shell. Ie. csh
4#SHELL = @SH@ 4#SHELL = @SH@
@@ -46,7 +46,6 @@ LIBS=@LIBS@
46LIBPAM=@LIBPAM@ 46LIBPAM=@LIBPAM@
47LIBWRAP=@LIBWRAP@ 47LIBWRAP=@LIBWRAP@
48AR=@AR@ 48AR=@AR@
49AWK=@AWK@
50RANLIB=@RANLIB@ 49RANLIB=@RANLIB@
51INSTALL=@INSTALL@ 50INSTALL=@INSTALL@
52PERL=@PERL@ 51PERL=@PERL@
@@ -62,14 +61,13 @@ INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
62TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) 61TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT)
63 62
64LIBSSH_OBJS=authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o \ 63LIBSSH_OBJS=authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o \
65 cipher.o cipher-aes.o cipher-bf1.o cipher-ctr.o cipher-3des1.o \ 64 cipher.o compat.o compress.o crc32.o deattack.o fatal.o \
66 compat.o compress.o crc32.o deattack.o fatal.o \ 65 hostfile.o log.o match.o mpaux.o nchan.o packet.o radix.o readpass.o \
67 hostfile.o log.o match.o moduli.o mpaux.o nchan.o packet.o \ 66 rsa.o tildexpand.o ttymodes.o xmalloc.o atomicio.o \
68 readpass.o rsa.o tildexpand.o ttymodes.o xmalloc.o atomicio.o \
69 key.o dispatch.o kex.o mac.o uuencode.o misc.o \ 67 key.o dispatch.o kex.o mac.o uuencode.o misc.o \
70 rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o kexgex.o \ 68 rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o kexgex.o \
71 kexdhc.o kexgexc.o scard.o msg.o progressmeter.o dns.o \ 69 kexdhc.o kexgexc.o scard.o msg.o progressmeter.o \
72 entropy.o scard-opensc.o gss-genr.o 70 entropy.o
73 71
74SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ 72SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
75 sshconnect.o sshconnect1.o sshconnect2.o 73 sshconnect.o sshconnect1.o sshconnect2.o
@@ -82,9 +80,8 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
82 auth2-none.o auth2-passwd.o auth2-pubkey.o \ 80 auth2-none.o auth2-passwd.o auth2-pubkey.o \
83 monitor_mm.o monitor.o monitor_wrap.o monitor_fdpass.o \ 81 monitor_mm.o monitor.o monitor_wrap.o monitor_fdpass.o \
84 kexdhs.o kexgexs.o \ 82 kexdhs.o kexgexs.o \
85 auth-krb5.o \ 83 auth-krb5.o auth-krb4.o \
86 auth2-gss.o gss-serv.o gss-serv-krb5.o \ 84 loginrec.o auth-pam.o auth2-pam.o auth-sia.o md5crypt.o
87 loginrec.o auth-pam.o auth-sia.o md5crypt.o
88 85
89MANPAGES = 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 ssh-keysign.8.out sshd_config.5.out ssh_config.5.out 86MANPAGES = 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 ssh-keysign.8.out sshd_config.5.out ssh_config.5.out
90MANPAGES_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 ssh-keysign.8 sshd_config.5 ssh_config.5 87MANPAGES_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 ssh-keysign.8 sshd_config.5 ssh_config.5
@@ -112,11 +109,11 @@ PATHSUBS = \
112 109
113FIXPATHSCMD = $(SED) $(PATHSUBS) 110FIXPATHSCMD = $(SED) $(PATHSUBS)
114 111
115all: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) 112all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
116 113
117$(LIBSSH_OBJS): Makefile.in config.h 114$(LIBSSH_OBJS): config.h
118$(SSHOBJS): Makefile.in config.h 115$(SSHOBJS): config.h
119$(SSHDOBJS): Makefile.in config.h 116$(SSHDOBJS): config.h
120 117
121.c.o: 118.c.o:
122 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< 119 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
@@ -174,7 +171,7 @@ $(MANPAGES): $(MANPAGES_IN)
174 manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \ 171 manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \
175 fi; \ 172 fi; \
176 if test "$(MANTYPE)" = "man"; then \ 173 if test "$(MANTYPE)" = "man"; then \
177 $(FIXPATHSCMD) $${manpage} | $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \ 174 $(FIXPATHSCMD) $${manpage} | $(PERL) $(srcdir)/mdoc2man.pl > $@; \
178 else \ 175 else \
179 $(FIXPATHSCMD) $${manpage} > $@; \ 176 $(FIXPATHSCMD) $${manpage} > $@; \
180 fi 177 fi
@@ -183,20 +180,10 @@ $(CONFIGFILES): $(CONFIGFILES_IN)
183 conffile=`echo $@ | sed 's/.out$$//'`; \ 180 conffile=`echo $@ | sed 's/.out$$//'`; \
184 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@ 181 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
185 182
186ssh_prng_cmds.out: ssh_prng_cmds
187 if test ! -z "$(INSTALL_SSH_PRNG_CMDS)"; then \
188 $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
189 fi
190
191# fake rule to stop make trying to compile moduli.o into a binary "modulo"
192moduli:
193 echo
194
195clean: 183clean:
196 rm -f *.o *.a $(TARGETS) logintest config.cache config.log 184 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
197 rm -f *.out core 185 rm -f *.out core
198 (cd openbsd-compat && $(MAKE) clean) 186 (cd openbsd-compat && $(MAKE) clean)
199 (cd regress && $(MAKE) clean)
200 187
201distclean: 188distclean:
202 rm -f *.o *.a $(TARGETS) logintest config.cache config.log 189 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
@@ -205,14 +192,16 @@ distclean:
205 rm -rf autom4te.cache 192 rm -rf autom4te.cache
206 (cd openbsd-compat && $(MAKE) distclean) 193 (cd openbsd-compat && $(MAKE) distclean)
207 (cd scard && $(MAKE) distclean) 194 (cd scard && $(MAKE) distclean)
208 (cd regress && $(MAKE) distclean)
209 195
210veryclean: distclean 196veryclean:
211 rm -f configure config.h.in *.0 197 rm -f configure config.h.in *.0
198 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
199 rm -f *.out core
200 rm -f Makefile config.h config.status ssh_prng_cmds *~
201 (cd openbsd-compat && $(MAKE) distclean)
202 (cd scard && $(MAKE) distclean)
212 203
213mrproper: veryclean 204mrproper: distclean
214
215realclean: veryclean
216 205
217catman-do: 206catman-do:
218 @for f in $(MANPAGES_IN) ; do \ 207 @for f in $(MANPAGES_IN) ; do \
@@ -226,8 +215,8 @@ distprep: catman-do
226 $(AUTORECONF) 215 $(AUTORECONF)
227 (cd scard && $(MAKE) -f Makefile.in distprep) 216 (cd scard && $(MAKE) -f Makefile.in distprep)
228 217
229install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files host-key check-config 218install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files host-key check-config
230install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files 219install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
231 220
232check-config: 221check-config:
233 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config 222 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
@@ -291,6 +280,7 @@ install-files: scard-install
291 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \ 280 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
292 fi 281 fi
293 @if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \ 282 @if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
283 $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
294 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \ 284 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
295 $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \ 285 $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
296 else \ 286 else \
@@ -369,32 +359,3 @@ uninstall:
369 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 359 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
370 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 360 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
371 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 361 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
372
373tests: $(TARGETS)
374 BUILDDIR=`pwd`; \
375 [ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \
376 TEST_SSH_SSH="$${BUILDDIR}/ssh"; \
377 TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \
378 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \
379 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \
380 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \
381 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \
382 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \
383 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \
384 cd $(srcdir)/regress || exit $$?; \
385 $(MAKE) \
386 .OBJDIR="$${BUILDDIR}/regress" \
387 .CURDIR="`pwd`" \
388 BUILDDIR="$${BUILDDIR}" \
389 OBJ="$${BUILDDIR}/regress/" \
390 PATH="$${BUILDDIR}:$${PATH}" \
391 TEST_SSH_SSH="$${TEST_SSH_SSH}" \
392 TEST_SSH_SSHD="$${TEST_SSH_SSHD}" \
393 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \
394 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \
395 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \
396 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \
397 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \
398 TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \
399 EXEEXT="$(EXEEXT)" \
400 $@
diff --git a/README.dns b/README.dns
deleted file mode 100644
index e24092e03..000000000
--- a/README.dns
+++ /dev/null
@@ -1,52 +0,0 @@
1How to verify host keys using OpenSSH and DNS
2---------------------------------------------
3
4OpenSSH contains experimental support for verifying host keys using DNS
5as described in draft-ietf-secsh-dns-xx.txt. The document contains
6very brief instructions on how to test this feature. Configuring DNS
7and DNSSEC is out of the scope of this document.
8
9
10(1) Enable DNS fingerprint support in OpenSSH
11
12 configure --with-dns
13
14(2) Generate and publish the DNS RR
15
16To create a DNS resource record (RR) containing a fingerprint of the
17public host key, use the following command:
18
19 ssh-keygen -r hostname -f keyfile -g
20
21where "hostname" is your fully qualified hostname and "keyfile" is the
22file containing the public host key file. If you have multiple keys,
23you should generate one RR for each key.
24
25In the example above, ssh-keygen will print the fingerprint in a
26generic DNS RR format parsable by most modern name server
27implementations. If your nameserver has support for the SSHFP RR, as
28defined by the draft, you can omit the -g flag and ssh-keygen will
29print a standard RR.
30
31To publish the fingerprint using the DNS you must add the generated RR
32to your DNS zone file and sign your zone.
33
34
35(3) Enable the ssh client to verify host keys using DNS
36
37To enable the ssh client to verify host keys using DNS, you have to
38add the following option to the ssh configuration file
39($HOME/.ssh/config or /etc/ssh/ssh_config):
40
41 VerifyHostKeyDNS yes
42
43Upon connection the client will try to look up the fingerprint RR
44using DNS. If the fingerprint received from the DNS server matches
45the remote host key, the user will be notified.
46
47
48 Jakob Schlyter
49 Wesley Griffin
50
51
52$OpenBSD: README.dns,v 1.1 2003/05/14 18:16:20 jakob Exp $
diff --git a/README.privsep b/README.privsep
index 64adad83b..e8bf1db34 100644
--- a/README.privsep
+++ b/README.privsep
@@ -40,7 +40,8 @@ Compression will be disabled on systems without a working mmap MAP_ANON.
40 40
41PAM-enabled OpenSSH is known to function with privsep on Linux. 41PAM-enabled OpenSSH is known to function with privsep on Linux.
42It does not function on HP-UX with a trusted system 42It does not function on HP-UX with a trusted system
43configuration. 43configuration. PAMAuthenticationViaKbdInt does not function with
44privsep.
44 45
45On Compaq Tru64 Unix, only the pre-authentication part of privsep is 46On Compaq Tru64 Unix, only the pre-authentication part of privsep is
46supported. Post-authentication privsep is disabled automatically (so 47supported. Post-authentication privsep is disabled automatically (so
@@ -61,4 +62,4 @@ process 1005 is the sshd process listening for new connections.
61process 6917 is the privileged monitor process, 6919 is the user owned 62process 6917 is the privileged monitor process, 6919 is the user owned
62sshd process and 6921 is the shell process. 63sshd process and 6921 is the shell process.
63 64
64$Id: README.privsep,v 1.12 2003/08/26 00:48:15 djm Exp $ 65$Id: README.privsep,v 1.11 2003/03/21 01:18:09 mouring Exp $
diff --git a/README.smartcard b/README.smartcard
index 88810fc83..29bec8dc6 100644
--- a/README.smartcard
+++ b/README.smartcard
@@ -1,66 +1,62 @@
1How to use smartcards with OpenSSH? 1How to use smartcards with OpenSSH?
2 2
3OpenSSH contains experimental support for authentication using 3OpenSSH contains experimental support for authentication using Cyberflex
4Cyberflex smartcards and TODOS card readers, in addition to the cards 4smartcards and TODOS card readers, in addition to the cards with PKCS#15
5with PKCS#15 structure supported by OpenSC. To enable this you 5structure supported by OpenSC.
6need to:
7 6
8Using libsectok: 7WARNING: Smartcard support is still in development.
8Keyfile formats, etc are still subject to change.
9 9
10(1) enable sectok support in OpenSSH: 10To enable sectok support:
11 11
12 $ ./configure --with-sectok 12(1) install sectok:
13 13
14(2) If you have used a previous version of ssh with your card, you 14 Sources and instructions are available from
15 must remove the old applet and keys. 15 http://www.citi.umich.edu/projects/smartcard/sectok.html
16 16
17 $ sectok 17(2) enable sectok support in OpenSSH:
18 sectok> login -d
19 sectok> junload Ssh.bin
20 sectok> delete 0012
21 sectok> delete sh
22 sectok> quit
23 18
24(3) load the Java Cardlet to the Cyberflex card and set card passphrase: 19 $ ./configure --with-sectok[=/path/to/libsectok] [options]
20
21(3) load the Java Cardlet to the Cyberflex card:
25 22
26 $ sectok 23 $ sectok
27 sectok> login -d 24 sectok> login -d
28 sectok> jload /usr/libdata/ssh/Ssh.bin 25 sectok> jload /usr/libdata/ssh/Ssh.bin
29 sectok> setpass
30 Enter new AUT0 passphrase:
31 Re-enter passphrase:
32 sectok> quit 26 sectok> quit
33 27
34 Do not forget the passphrase. There is no way to
35 recover if you do.
36
37 IMPORTANT WARNING: If you attempt to login with the
38 wrong passphrase three times in a row, you will
39 destroy your card.
40
41(4) load a RSA key to the card: 28(4) load a RSA key to the card:
42 29
43 $ ssh-keygen -f /path/to/rsakey -U 1 30 Please don't use your production RSA keys, since
44 (where 1 is the reader number, you can also try 0) 31 with the current version of sectok/ssh-keygen
32 the private key file is still readable.
33
34 $ ssh-keygen -f /path/to/rsakey -U <readernum, eg. 0>
45 35
46 In spite of the name, this does not generate a key. 36 In spite of the name, this does not generate a key.
47 It just loads an already existing key on to the card. 37 It just loads an already existing key on to the card.
48 38
49(5) Optional: If you don't want to use a card passphrase, change the 39(5) optional:
50 acl on the private key file: 40
41 Change the card password so that only you can
42 read the private key:
51 43
52 $ sectok 44 $ sectok
53 sectok> login -d 45 sectok> login -d
54 sectok> acl 0012 world: w 46 sectok> setpass
55 world: w
56 AUT0: w inval
57 sectok> quit 47 sectok> quit
58 48
59 If you do this, anyone who has access to your card 49 This prevents reading the key but not use of the
60 can assume your identity. This is not recommended. 50 key by the card applet.
51
52 Do not forget the passphrase. There is no way to
53 recover if you do.
61 54
55 IMPORTANT WARNING: If you attempt to login with the
56 wrong passphrase three times in a row, you will
57 destroy your card.
62 58
63Using OpenSC: 59To enable OpenSC support:
64 60
65(1) install OpenSC: 61(1) install OpenSC:
66 62
@@ -75,19 +71,15 @@ Using OpenSC:
75 71
76 Not supported yet. 72 Not supported yet.
77 73
78 74Common smartcard options:
79Common operations:
80 75
81(1) tell the ssh client to use the card reader: 76(1) tell the ssh client to use the card reader:
82 77
83 $ ssh -I 1 otherhost 78 $ ssh -I <readernum, eg. 0> otherhost
84 79
85(2) or tell the agent (don't forget to restart) to use the smartcard: 80(2) or tell the agent (don't forget to restart) to use the smartcard:
86 81
87 $ ssh-add -s 1 82 $ ssh-add -s <readernum, eg. 0>
88
89 83
90-markus, 84-markus,
91Tue Jul 17 23:54:51 CEST 2001 85Sat Apr 13 13:48:10 EEST 2002
92
93$OpenBSD: README.smartcard,v 1.8 2002/03/26 18:56:23 rees Exp $
diff --git a/TODO b/TODO
index bca818523..de83000f5 100644
--- a/TODO
+++ b/TODO
@@ -1,19 +1,4 @@
1Documentation:
2
3- Update the docs
4 - Update README
5 - Update INSTALL
6 - Merge INSTALL & README.privsep
7
8- Install FAQ?
9
10- General FAQ on S/Key, TIS, RSA, RSA2, DSA, etc and suggestions on when it
11 would be best to use them.
12
13- Create a Documentation/ directory?
14
15Programming: 1Programming:
16
17- Grep for 'XXX' comments and fix 2- Grep for 'XXX' comments and fix
18 3
19- Link order is incorrect for some systems using Kerberos 4 and AFS. Result 4- Link order is incorrect for some systems using Kerberos 4 and AFS. Result
@@ -36,9 +21,8 @@ Programming:
36 and maybe support alternate forms of authentications like OPIE via 21 and maybe support alternate forms of authentications like OPIE via
37 pam? 22 pam?
38 23
39- Improve PAM ChallengeResponseAuthentication 24- Rework PAM ChallengeResponseAuthentication
40 - Informational messages 25 - Use kbdint request packet with 0 prompts for informational messages
41 - chauthtok
42 - Use different PAM service name for kbdint vs regular auth (suggest from 26 - Use different PAM service name for kbdint vs regular auth (suggest from
43 Solar Designer) 27 Solar Designer)
44 - Ability to select which ChallengeResponseAuthentications may be used 28 - Ability to select which ChallengeResponseAuthentications may be used
@@ -51,17 +35,70 @@ Programming:
51- Finish integrating kernel-level auditing code for IRIX and SOLARIS 35- Finish integrating kernel-level auditing code for IRIX and SOLARIS
52 (Gilbert.r.loomis@saic.com) 36 (Gilbert.r.loomis@saic.com)
53 37
38- sftp-server: Rework to step down to 32bit ints if the platform
39 lacks 'long long' == 64bit (Notable SCO w/ SCO compiler)
40
41- Linux hangs for 20 seconds when you do "sleep 20&exit". All current
42 solutions break scp or leaves processes hanging around after the ssh
43 connection has ended. It seems to be linked to two things. One
44 select() under Linux is not as nice as others, and two the children
45 of the shell are not killed on exiting the shell.
46 A short run-down of what happens:
47 - The shell starts up, and starts its own session. As a side-effect, it
48 gets its own process group.
49 - The child forks off sleep, and because it's in the background, puts it
50 into its own process group. The sleep command inherits a copy of the
51 shell's descriptor for the tty as its stdout.
52 - The shell exits, but doesn't SIGHUP all of its child PIDs like it probably
53 should(?)
54 - The sshd server attempts to read from the master side of the pty, and
55 while there are still process with the pty open, no EOF is produced.
56 - The sleep command exits, closes its descriptor, sshd detects the EOF, and
57 the connection gets closed.
58 Ways we've tried fixing this in sshd, and why they didn't work out:
59 - SIGHUP the sshd's process group.
60 - The shell is in its own process group.
61 - Track process group IDs of all children before we reap them (via an extra
62 field in Session structures which holds the pgid for each child pid), and
63 SIGHUP the pgid when we reap.
64 - Background commands are in yet another process group.
65 - Close the connection when the child dies.
66 - Background commands may need to write data to the connection. Also
67 prematurely truncates output from some commands (scp server, the
68 famous "dd if=/dev/zero bs=1000 count=100" case).
69 Known workarounds:
70 - bash: shopt huponexit on
71 - tcsh: none
72 - zsh: setopt HUP (usually the default setting)
73 (taken from email from Jason Stone to openssh-unix-dev, 5 May 2001)
74 - pdksh: ?
75 This appears to affect NetKit rsh under Linux as well: it behaves the same
76 with 'sleep 20 & exit'.
77
78- Build an automated test suite
79
54- 64-bit builds on HP-UX 11.X (stevesk@pobox.com): 80- 64-bit builds on HP-UX 11.X (stevesk@pobox.com):
55 - utmp/wtmp get corrupted (something in loginrec?) 81 - utmp/wtmp get corrupted (something in loginrec?)
56 - can't build with PAM (no 64-bit libpam yet) 82 - can't build with PAM (no 64-bit libpam yet)
57 83
84Documentation:
85- More and better
86
87- Install FAQ?
88
89- General FAQ on S/Key, TIS, RSA, RSA2, DSA, etc and suggestions on when it
90 would be best to use them.
91
92- Create a Documentation/ directory?
93
58Clean up configure/makefiles: 94Clean up configure/makefiles:
59- Clean up configure.ac - There are a few double #defined variables 95- Clean up configure.ac - There are a few double #defined variables
60 left to do. HAVE_LOGIN is one of them. Consider NOT looking for 96 left to do. HAVE_LOGIN is one of them. Consider NOT looking for
61 information in wtmpx or utmpx or any of that stuff if it's not detected 97 information in wtmpx or utmpx or any of that stuff if it's not detected
62 from the start 98 from the start
63 99
64- Fails to compile when cross compile. (vinschen@redhat.com) 100- Fails to compile when cross compile.
101 (vinschen@redhat.com)
65 102
66- Replace the whole u_intXX_t evilness in acconfig.h with something better??? 103- Replace the whole u_intXX_t evilness in acconfig.h with something better???
67 - Do it in configure.ac 104 - Do it in configure.ac
@@ -81,6 +118,7 @@ Packaging:
81- HP-UX: Provide DEPOT package scripts. 118- HP-UX: Provide DEPOT package scripts.
82 (gilbert.r.loomis@saic.com) 119 (gilbert.r.loomis@saic.com)
83 120
121
84PrivSep Issues: 122PrivSep Issues:
85- mmap() issues. 123- mmap() issues.
86 + /dev/zero solution (Solaris) 124 + /dev/zero solution (Solaris)
@@ -89,11 +127,11 @@ PrivSep Issues:
89- PAM 127- PAM
90 + See above PAM notes 128 + See above PAM notes
91- AIX 129- AIX
92 + usrinfo() does not set TTY, but only required for legacy systems. Works 130 + usrinfo() does not set TTY, but only required for legicy systems. Works
93 with PrivSep. 131 with PrivSep.
94- OSF 132- OSF
95 + SIA is broken 133 + SIA is broken
96- Cygwin 134- Cygwin
97 + Privsep for Pre-auth only (no fd passing) 135 + Privsep for Pre-auth only (no fd passing)
98 136
99$Id: TODO,v 1.55 2003/06/11 13:56:41 dtucker Exp $ 137$Id: TODO,v 1.53 2003/01/12 23:00:34 djm Exp $
diff --git a/acconfig.h b/acconfig.h
index 9bfb9b6c9..b6e4b37cc 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,28 +1,4 @@
1/* $Id: acconfig.h,v 1.166 2003/09/16 01:52:19 dtucker Exp $ */ 1/* $Id: acconfig.h,v 1.149 2003/03/10 00:38:10 djm Exp $ */
2
3/*
4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26 2
27#ifndef _CONFIG_H 3#ifndef _CONFIG_H
28#define _CONFIG_H 4#define _CONFIG_H
@@ -32,19 +8,9 @@
32 8
33@TOP@ 9@TOP@
34 10
35/* Define if your platform breaks doing a seteuid before a setuid */
36#undef SETEUID_BREAKS_SETUID
37
38/* Define if your setreuid() is broken */
39#undef BROKEN_SETREUID
40
41/* Define if your setregid() is broken */
42#undef BROKEN_SETREGID
43
44/* Define to a Set Process Title type if your system is */ 11/* Define to a Set Process Title type if your system is */
45/* supported by bsd-setproctitle.c */ 12/* supported by bsd-setproctitle.c */
46#undef SPT_TYPE 13#undef SPT_TYPE
47#undef SPT_PADCHAR
48 14
49/* setgroups() NOOP allowed */ 15/* setgroups() NOOP allowed */
50#undef SETGROUPS_NOOP 16#undef SETGROUPS_NOOP
@@ -116,9 +82,6 @@
116/* Define if you want to enable AIX4's authenticate function */ 82/* Define if you want to enable AIX4's authenticate function */
117#undef WITH_AIXAUTHENTICATE 83#undef WITH_AIXAUTHENTICATE
118 84
119/* Define if your AIX loginfailed() function takes 4 arguments (AIX >= 5.2) */
120#undef AIX_LOGINFAILED_4ARG
121
122/* Define if you have/want arrays (cluster-wide session managment, not C arrays) */ 85/* Define if you have/want arrays (cluster-wide session managment, not C arrays) */
123#undef WITH_IRIX_ARRAY 86#undef WITH_IRIX_ARRAY
124 87
@@ -238,15 +201,18 @@
238/* Define if compiler implements __func__ */ 201/* Define if compiler implements __func__ */
239#undef HAVE___func__ 202#undef HAVE___func__
240 203
241/* Define this is you want GSSAPI support in the version 2 protocol */
242#undef GSSAPI
243
244/* Define if you want Kerberos 5 support */ 204/* Define if you want Kerberos 5 support */
245#undef KRB5 205#undef KRB5
246 206
247/* Define this if you are using the Heimdal version of Kerberos V5 */ 207/* Define this if you are using the Heimdal version of Kerberos V5 */
248#undef HEIMDAL 208#undef HEIMDAL
249 209
210/* Define if you want Kerberos 4 support */
211#undef KRB4
212
213/* Define if you want AFS support */
214#undef AFS
215
250/* Define if you want S/Key support */ 216/* Define if you want S/Key support */
251#undef SKEY 217#undef SKEY
252 218
@@ -329,6 +295,9 @@
329/* Specify location of ssh.pid */ 295/* Specify location of ssh.pid */
330#undef _PATH_SSH_PIDDIR 296#undef _PATH_SSH_PIDDIR
331 297
298/* Use IPv4 for connection by default, IPv6 can still if explicity asked */
299#undef IPV4_DEFAULT
300
332/* getaddrinfo is broken (if present) */ 301/* getaddrinfo is broken (if present) */
333#undef BROKEN_GETADDRINFO 302#undef BROKEN_GETADDRINFO
334 303
@@ -359,9 +328,6 @@
359/* Define in your struct dirent expects you to allocate extra space for d_name */ 328/* Define in your struct dirent expects you to allocate extra space for d_name */
360#undef BROKEN_ONE_BYTE_DIRENT_D_NAME 329#undef BROKEN_ONE_BYTE_DIRENT_D_NAME
361 330
362/* Define if your system has /etc/default/login */
363#undef HAVE_ETC_DEFAULT_LOGIN
364
365/* Define if your getopt(3) defines and uses optreset */ 331/* Define if your getopt(3) defines and uses optreset */
366#undef HAVE_GETOPT_OPTRESET 332#undef HAVE_GETOPT_OPTRESET
367 333
@@ -401,28 +367,15 @@
401/* Silly mkstemp() */ 367/* Silly mkstemp() */
402#undef HAVE_STRICT_MKSTEMP 368#undef HAVE_STRICT_MKSTEMP
403 369
370/* Setproctitle emulation */
371#undef SETPROCTITLE_STRATEGY
372#undef SETPROCTITLE_PS_PADDING
373
404/* Some systems put this outside of libc */ 374/* Some systems put this outside of libc */
405#undef HAVE_NANOSLEEP 375#undef HAVE_NANOSLEEP
406 376
407/* Define if sshd somehow reacquires a controlling TTY after setsid() */ 377/* Pushing STREAMS modules incorrectly acquires a controlling TTY */
408#undef SSHD_ACQUIRES_CTTY 378#undef STREAMS_PUSH_ACQUIRES_CTTY
409
410/* Define if cmsg_type is not passed correctly */
411#undef BROKEN_CMSG_TYPE
412
413/* Strings used in /etc/passwd to denote locked account */
414#undef LOCKED_PASSWD_STRING
415#undef LOCKED_PASSWD_PREFIX
416#undef LOCKED_PASSWD_SUBSTR
417
418/* Define if DNS support is to be activated */
419#undef DNS
420
421/* Define if getrrsetbyname() exists */
422#undef HAVE_GETRRSETBYNAME
423
424/* Define if HEADER.ad exists in arpa/nameser.h */
425#undef HAVE_HEADER_AD
426 379
427@BOTTOM@ 380@BOTTOM@
428 381
diff --git a/atomicio.c b/atomicio.c
index 7637e1671..47161eb3a 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -24,16 +24,16 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: atomicio.c,v 1.12 2003/07/31 15:50:16 avsm Exp $"); 27RCSID("$OpenBSD: atomicio.c,v 1.10 2001/05/08 22:48:07 markus Exp $");
28 28
29#include "atomicio.h" 29#include "atomicio.h"
30 30
31/* 31/*
32 * ensure all of data on socket comes through. f==read || f==vwrite 32 * ensure all of data on socket comes through. f==read || f==write
33 */ 33 */
34ssize_t 34ssize_t
35atomicio(f, fd, _s, n) 35atomicio(f, fd, _s, n)
36 ssize_t (*f) (int, void *, size_t); 36 ssize_t (*f) ();
37 int fd; 37 int fd;
38 void *_s; 38 void *_s;
39 size_t n; 39 size_t n;
diff --git a/atomicio.h b/atomicio.h
index 5c0f392ef..e569d38c6 100644
--- a/atomicio.h
+++ b/atomicio.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: atomicio.h,v 1.5 2003/06/28 16:23:06 deraadt Exp $ */ 1/* $OpenBSD: atomicio.h,v 1.4 2001/06/26 06:32:46 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. 4 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved.
@@ -26,8 +26,6 @@
26 */ 26 */
27 27
28/* 28/*
29 * Ensure all of data on socket comes through. f==read || f==vwrite 29 * Ensure all of data on socket comes through. f==read || f==write
30 */ 30 */
31ssize_t atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t); 31ssize_t atomicio(ssize_t (*)(), int, void *, size_t);
32
33#define vwrite (ssize_t (*)(int, void *, size_t))write
diff --git a/auth-chall.c b/auth-chall.c
index 6b7c8bd13..45e0c3452 100644
--- a/auth-chall.c
+++ b/auth-chall.c
@@ -76,33 +76,7 @@ verify_response(Authctxt *authctxt, const char *response)
76 return 0; 76 return 0;
77 resp[0] = (char *)response; 77 resp[0] = (char *)response;
78 res = device->respond(authctxt->kbdintctxt, 1, resp); 78 res = device->respond(authctxt->kbdintctxt, 1, resp);
79 if (res == 1) {
80 /* postponed - send a null query just in case */
81 char *name, *info, **prompts;
82 u_int i, numprompts, *echo_on;
83
84 res = device->query(authctxt->kbdintctxt, &name, &info,
85 &numprompts, &prompts, &echo_on);
86 if (res == 0) {
87 for (i = 0; i < numprompts; i++)
88 xfree(prompts[i]);
89 xfree(prompts);
90 xfree(name);
91 xfree(echo_on);
92 xfree(info);
93 }
94 /* if we received more prompts, we're screwed */
95 res = (numprompts != 0);
96 }
97 device->free_ctx(authctxt->kbdintctxt); 79 device->free_ctx(authctxt->kbdintctxt);
98 authctxt->kbdintctxt = NULL; 80 authctxt->kbdintctxt = NULL;
99 return res ? 0 : 1; 81 return res ? 0 : 1;
100} 82}
101void
102abandon_challenge_response(Authctxt *authctxt)
103{
104 if (authctxt->kbdintctxt != NULL) {
105 device->free_ctx(authctxt->kbdintctxt);
106 authctxt->kbdintctxt = NULL;
107 }
108}
diff --git a/auth-krb4.c b/auth-krb4.c
new file mode 100644
index 000000000..b28df469f
--- /dev/null
+++ b/auth-krb4.c
@@ -0,0 +1,368 @@
1/*
2 * Copyright (c) 1999 Dug Song. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26RCSID("$OpenBSD: auth-krb4.c,v 1.29 2003/02/21 10:34:48 mpech Exp $");
27
28#include "ssh.h"
29#include "ssh1.h"
30#include "packet.h"
31#include "xmalloc.h"
32#include "log.h"
33#include "servconf.h"
34#include "uidswap.h"
35#include "auth.h"
36
37#ifdef AFS
38#include "radix.h"
39#endif
40
41#ifdef KRB4
42extern ServerOptions options;
43
44static int
45krb4_init(void *context)
46{
47 static int cleanup_registered = 0;
48 Authctxt *authctxt = (Authctxt *)context;
49 const char *tkt_root = TKT_ROOT;
50 struct stat st;
51 int fd;
52
53 if (!authctxt->krb4_ticket_file) {
54 /* Set unique ticket string manually since we're still root. */
55 authctxt->krb4_ticket_file = xmalloc(MAXPATHLEN);
56#ifdef AFS
57 if (lstat("/ticket", &st) != -1)
58 tkt_root = "/ticket/";
59#endif /* AFS */
60 snprintf(authctxt->krb4_ticket_file, MAXPATHLEN, "%s%u_%ld",
61 tkt_root, authctxt->pw->pw_uid, (long)getpid());
62 krb_set_tkt_string(authctxt->krb4_ticket_file);
63 }
64 /* Register ticket cleanup in case of fatal error. */
65 if (!cleanup_registered) {
66 fatal_add_cleanup(krb4_cleanup_proc, authctxt);
67 cleanup_registered = 1;
68 }
69 /* Try to create our ticket file. */
70 if ((fd = mkstemp(authctxt->krb4_ticket_file)) != -1) {
71 close(fd);
72 return (1);
73 }
74 /* Ticket file exists - make sure user owns it (just passed ticket). */
75 if (lstat(authctxt->krb4_ticket_file, &st) != -1) {
76 if (st.st_mode == (S_IFREG | S_IRUSR | S_IWUSR) &&
77 st.st_uid == authctxt->pw->pw_uid)
78 return (1);
79 }
80 /* Failure - cancel cleanup function, leaving ticket for inspection. */
81 log("WARNING: bad ticket file %s", authctxt->krb4_ticket_file);
82
83 fatal_remove_cleanup(krb4_cleanup_proc, authctxt);
84 cleanup_registered = 0;
85
86 xfree(authctxt->krb4_ticket_file);
87 authctxt->krb4_ticket_file = NULL;
88
89 return (0);
90}
91
92/*
93 * try krb4 authentication,
94 * return 1 on success, 0 on failure, -1 if krb4 is not available
95 */
96int
97auth_krb4_password(Authctxt *authctxt, const char *password)
98{
99 AUTH_DAT adata;
100 KTEXT_ST tkt;
101 struct hostent *hp;
102 struct passwd *pw;
103 char localhost[MAXHOSTNAMELEN], phost[INST_SZ], realm[REALM_SZ];
104 u_int32_t faddr;
105 int r;
106
107 if ((pw = authctxt->pw) == NULL)
108 return (0);
109
110 /*
111 * Try Kerberos password authentication only for non-root
112 * users and only if Kerberos is installed.
113 */
114 if (pw->pw_uid != 0 && krb_get_lrealm(realm, 1) == KSUCCESS) {
115 /* Set up our ticket file. */
116 if (!krb4_init(authctxt)) {
117 log("Couldn't initialize Kerberos ticket file for %s!",
118 pw->pw_name);
119 goto failure;
120 }
121 /* Try to get TGT using our password. */
122 r = krb_get_pw_in_tkt((char *) pw->pw_name, "", realm,
123 "krbtgt", realm, DEFAULT_TKT_LIFE, (char *)password);
124 if (r != INTK_OK) {
125 debug("Kerberos v4 password authentication for %s "
126 "failed: %s", pw->pw_name, krb_err_txt[r]);
127 goto failure;
128 }
129 /* Successful authentication. */
130 chown(tkt_string(), pw->pw_uid, pw->pw_gid);
131
132 /*
133 * Now that we have a TGT, try to get a local
134 * "rcmd" ticket to ensure that we are not talking
135 * to a bogus Kerberos server.
136 */
137 gethostname(localhost, sizeof(localhost));
138 strlcpy(phost, (char *)krb_get_phost(localhost),
139 sizeof(phost));
140 r = krb_mk_req(&tkt, KRB4_SERVICE_NAME, phost, realm, 33);
141
142 if (r == KSUCCESS) {
143 if ((hp = gethostbyname(localhost)) == NULL) {
144 log("Couldn't get local host address!");
145 goto failure;
146 }
147 memmove((void *)&faddr, (void *)hp->h_addr,
148 sizeof(faddr));
149
150 /* Verify our "rcmd" ticket. */
151 r = krb_rd_req(&tkt, KRB4_SERVICE_NAME, phost,
152 faddr, &adata, "");
153 if (r == RD_AP_UNDEC) {
154 /*
155 * Probably didn't have a srvtab on
156 * localhost. Disallow login.
157 */
158 log("Kerberos v4 TGT for %s unverifiable, "
159 "no srvtab installed? krb_rd_req: %s",
160 pw->pw_name, krb_err_txt[r]);
161 goto failure;
162 } else if (r != KSUCCESS) {
163 log("Kerberos v4 %s ticket unverifiable: %s",
164 KRB4_SERVICE_NAME, krb_err_txt[r]);
165 goto failure;
166 }
167 } else if (r == KDC_PR_UNKNOWN) {
168 /*
169 * Disallow login if no rcmd service exists, and
170 * log the error.
171 */
172 log("Kerberos v4 TGT for %s unverifiable: %s; %s.%s "
173 "not registered, or srvtab is wrong?", pw->pw_name,
174 krb_err_txt[r], KRB4_SERVICE_NAME, phost);
175 goto failure;
176 } else {
177 /*
178 * TGT is bad, forget it. Possibly spoofed!
179 */
180 debug("WARNING: Kerberos v4 TGT possibly spoofed "
181 "for %s: %s", pw->pw_name, krb_err_txt[r]);
182 goto failure;
183 }
184 /* Authentication succeeded. */
185 return (1);
186 } else
187 /* Logging in as root or no local Kerberos realm. */
188 debug("Unable to authenticate to Kerberos.");
189
190 failure:
191 krb4_cleanup_proc(authctxt);
192
193 if (!options.kerberos_or_local_passwd)
194 return (0);
195
196 /* Fall back to ordinary passwd authentication. */
197 return (-1);
198}
199
200void
201krb4_cleanup_proc(void *context)
202{
203 Authctxt *authctxt = (Authctxt *)context;
204 debug("krb4_cleanup_proc called");
205 if (authctxt->krb4_ticket_file) {
206 (void) dest_tkt();
207 xfree(authctxt->krb4_ticket_file);
208 authctxt->krb4_ticket_file = NULL;
209 }
210}
211
212int
213auth_krb4(Authctxt *authctxt, KTEXT auth, char **client, KTEXT reply)
214{
215 AUTH_DAT adat = {0};
216 Key_schedule schedule;
217 struct sockaddr_in local, foreign;
218 char instance[INST_SZ];
219 socklen_t slen;
220 u_int cksum;
221 int r, s;
222
223 s = packet_get_connection_in();
224
225 slen = sizeof(local);
226 memset(&local, 0, sizeof(local));
227 if (getsockname(s, (struct sockaddr *) & local, &slen) < 0)
228 debug("getsockname failed: %.100s", strerror(errno));
229 slen = sizeof(foreign);
230 memset(&foreign, 0, sizeof(foreign));
231 if (getpeername(s, (struct sockaddr *) & foreign, &slen) < 0) {
232 debug("getpeername failed: %.100s", strerror(errno));
233 fatal_cleanup();
234 }
235 instance[0] = '*';
236 instance[1] = 0;
237
238 /* Get the encrypted request, challenge, and session key. */
239 if ((r = krb_rd_req(auth, KRB4_SERVICE_NAME, instance,
240 0, &adat, ""))) {
241 debug("Kerberos v4 krb_rd_req: %.100s", krb_err_txt[r]);
242 return (0);
243 }
244 des_key_sched((des_cblock *) adat.session, schedule);
245
246 *client = xmalloc(MAX_K_NAME_SZ);
247 (void) snprintf(*client, MAX_K_NAME_SZ, "%s%s%s@%s", adat.pname,
248 *adat.pinst ? "." : "", adat.pinst, adat.prealm);
249
250 /* Check ~/.klogin authorization now. */
251 if (kuserok(&adat, authctxt->user) != KSUCCESS) {
252 log("Kerberos v4 .klogin authorization failed for %s to "
253 "account %s", *client, authctxt->user);
254 xfree(*client);
255 *client = NULL;
256 return (0);
257 }
258 /* Increment the checksum, and return it encrypted with the
259 session key. */
260 cksum = adat.checksum + 1;
261 cksum = htonl(cksum);
262
263 /* If we can't successfully encrypt the checksum, we send back an
264 empty message, admitting our failure. */
265 if ((r = krb_mk_priv((u_char *) & cksum, reply->dat, sizeof(cksum) + 1,
266 schedule, &adat.session, &local, &foreign)) < 0) {
267 debug("Kerberos v4 mk_priv: (%d) %s", r, krb_err_txt[r]);
268 reply->dat[0] = 0;
269 reply->length = 0;
270 } else
271 reply->length = r;
272
273 /* Clear session key. */
274 memset(&adat.session, 0, sizeof(adat.session));
275 return (1);
276}
277#endif /* KRB4 */
278
279#ifdef AFS
280int
281auth_krb4_tgt(Authctxt *authctxt, const char *string)
282{
283 CREDENTIALS creds;
284 struct passwd *pw;
285
286 if ((pw = authctxt->pw) == NULL)
287 goto failure;
288
289 temporarily_use_uid(pw);
290
291 if (!radix_to_creds(string, &creds)) {
292 log("Protocol error decoding Kerberos v4 TGT");
293 goto failure;
294 }
295 if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */
296 strlcpy(creds.service, "krbtgt", sizeof creds.service);
297
298 if (strcmp(creds.service, "krbtgt")) {
299 log("Kerberos v4 TGT (%s%s%s@%s) rejected for %s",
300 creds.pname, creds.pinst[0] ? "." : "", creds.pinst,
301 creds.realm, pw->pw_name);
302 goto failure;
303 }
304 if (!krb4_init(authctxt))
305 goto failure;
306
307 if (in_tkt(creds.pname, creds.pinst) != KSUCCESS)
308 goto failure;
309
310 if (save_credentials(creds.service, creds.instance, creds.realm,
311 creds.session, creds.lifetime, creds.kvno, &creds.ticket_st,
312 creds.issue_date) != KSUCCESS) {
313 debug("Kerberos v4 TGT refused: couldn't save credentials");
314 goto failure;
315 }
316 /* Successful authentication, passed all checks. */
317 chown(tkt_string(), pw->pw_uid, pw->pw_gid);
318
319 debug("Kerberos v4 TGT accepted (%s%s%s@%s)",
320 creds.pname, creds.pinst[0] ? "." : "", creds.pinst, creds.realm);
321 memset(&creds, 0, sizeof(creds));
322
323 restore_uid();
324
325 return (1);
326
327 failure:
328 krb4_cleanup_proc(authctxt);
329 memset(&creds, 0, sizeof(creds));
330 restore_uid();
331
332 return (0);
333}
334
335int
336auth_afs_token(Authctxt *authctxt, const char *token_string)
337{
338 CREDENTIALS creds;
339 struct passwd *pw;
340 uid_t uid;
341
342 if ((pw = authctxt->pw) == NULL)
343 return (0);
344
345 if (!radix_to_creds(token_string, &creds)) {
346 log("Protocol error decoding AFS token");
347 return (0);
348 }
349 if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */
350 strlcpy(creds.service, "afs", sizeof creds.service);
351
352 if (strncmp(creds.pname, "AFS ID ", 7) == 0)
353 uid = atoi(creds.pname + 7);
354 else
355 uid = pw->pw_uid;
356
357 if (kafs_settoken(creds.realm, uid, &creds)) {
358 log("AFS token (%s@%s) rejected for %s",
359 creds.pname, creds.realm, pw->pw_name);
360 memset(&creds, 0, sizeof(creds));
361 return (0);
362 }
363 debug("AFS token accepted (%s@%s)", creds.pname, creds.realm);
364 memset(&creds, 0, sizeof(creds));
365
366 return (1);
367}
368#endif /* AFS */
diff --git a/auth-krb5.c b/auth-krb5.c
index 0aa5195b8..e3e2d9751 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -28,7 +28,7 @@
28 */ 28 */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$OpenBSD: auth-krb5.c,v 1.12 2003/08/28 12:54:34 markus Exp $"); 31RCSID("$OpenBSD: auth-krb5.c,v 1.10 2002/11/21 23:03:51 deraadt Exp $");
32 32
33#include "ssh.h" 33#include "ssh.h"
34#include "ssh1.h" 34#include "ssh1.h"
@@ -40,8 +40,10 @@ RCSID("$OpenBSD: auth-krb5.c,v 1.12 2003/08/28 12:54:34 markus Exp $");
40#include "auth.h" 40#include "auth.h"
41 41
42#ifdef KRB5 42#ifdef KRB5
43
44#include <krb5.h> 43#include <krb5.h>
44#ifndef HEIMDAL
45#define krb5_get_err_text(context,code) error_message(code)
46#endif /* !HEIMDAL */
45 47
46extern ServerOptions options; 48extern ServerOptions options;
47 49
@@ -65,6 +67,193 @@ krb5_init(void *context)
65 return (0); 67 return (0);
66} 68}
67 69
70/*
71 * Try krb5 authentication. server_user is passed for logging purposes
72 * only, in auth is received ticket, in client is returned principal
73 * from the ticket
74 */
75int
76auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *reply)
77{
78 krb5_error_code problem;
79 krb5_principal server;
80 krb5_ticket *ticket;
81 int fd, ret;
82
83 ret = 0;
84 server = NULL;
85 ticket = NULL;
86 reply->length = 0;
87
88 problem = krb5_init(authctxt);
89 if (problem)
90 goto err;
91
92 problem = krb5_auth_con_init(authctxt->krb5_ctx,
93 &authctxt->krb5_auth_ctx);
94 if (problem)
95 goto err;
96
97 fd = packet_get_connection_in();
98#ifdef HEIMDAL
99 problem = krb5_auth_con_setaddrs_from_fd(authctxt->krb5_ctx,
100 authctxt->krb5_auth_ctx, &fd);
101#else
102 problem = krb5_auth_con_genaddrs(authctxt->krb5_ctx,
103 authctxt->krb5_auth_ctx,fd,
104 KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR |
105 KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR);
106#endif
107 if (problem)
108 goto err;
109
110 problem = krb5_sname_to_principal(authctxt->krb5_ctx, NULL, NULL,
111 KRB5_NT_SRV_HST, &server);
112 if (problem)
113 goto err;
114
115 problem = krb5_rd_req(authctxt->krb5_ctx, &authctxt->krb5_auth_ctx,
116 auth, server, NULL, NULL, &ticket);
117 if (problem)
118 goto err;
119
120#ifdef HEIMDAL
121 problem = krb5_copy_principal(authctxt->krb5_ctx, ticket->client,
122 &authctxt->krb5_user);
123#else
124 problem = krb5_copy_principal(authctxt->krb5_ctx,
125 ticket->enc_part2->client,
126 &authctxt->krb5_user);
127#endif
128 if (problem)
129 goto err;
130
131 /* if client wants mutual auth */
132 problem = krb5_mk_rep(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
133 reply);
134 if (problem)
135 goto err;
136
137 /* Check .k5login authorization now. */
138 if (!krb5_kuserok(authctxt->krb5_ctx, authctxt->krb5_user,
139 authctxt->pw->pw_name))
140 goto err;
141
142 if (client)
143 krb5_unparse_name(authctxt->krb5_ctx, authctxt->krb5_user,
144 client);
145
146 ret = 1;
147 err:
148 if (server)
149 krb5_free_principal(authctxt->krb5_ctx, server);
150 if (ticket)
151 krb5_free_ticket(authctxt->krb5_ctx, ticket);
152 if (!ret && reply->length) {
153 xfree(reply->data);
154 memset(reply, 0, sizeof(*reply));
155 }
156
157 if (problem) {
158 if (authctxt->krb5_ctx != NULL)
159 debug("Kerberos v5 authentication failed: %s",
160 krb5_get_err_text(authctxt->krb5_ctx, problem));
161 else
162 debug("Kerberos v5 authentication failed: %d",
163 problem);
164 }
165
166 return (ret);
167}
168
169int
170auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt)
171{
172 krb5_error_code problem;
173 krb5_ccache ccache = NULL;
174 char *pname;
175 krb5_creds **creds;
176
177 if (authctxt->pw == NULL || authctxt->krb5_user == NULL)
178 return (0);
179
180 temporarily_use_uid(authctxt->pw);
181
182#ifdef HEIMDAL
183 problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, &ccache);
184#else
185{
186 char ccname[40];
187 int tmpfd;
188
189 snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
190
191 if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
192 log("mkstemp(): %.100s", strerror(errno));
193 problem = errno;
194 goto fail;
195 }
196 if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) {
197 log("fchmod(): %.100s", strerror(errno));
198 close(tmpfd);
199 problem = errno;
200 goto fail;
201 }
202 close(tmpfd);
203 problem = krb5_cc_resolve(authctxt->krb5_ctx, ccname, &ccache);
204}
205#endif
206 if (problem)
207 goto fail;
208
209 problem = krb5_cc_initialize(authctxt->krb5_ctx, ccache,
210 authctxt->krb5_user);
211 if (problem)
212 goto fail;
213
214#ifdef HEIMDAL
215 problem = krb5_rd_cred2(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
216 ccache, tgt);
217 if (problem)
218 goto fail;
219#else
220 problem = krb5_rd_cred(authctxt->krb5_ctx, authctxt->krb5_auth_ctx,
221 tgt, &creds, NULL);
222 if (problem)
223 goto fail;
224 problem = krb5_cc_store_cred(authctxt->krb5_ctx, ccache, *creds);
225 if (problem)
226 goto fail;
227#endif
228
229 authctxt->krb5_fwd_ccache = ccache;
230 ccache = NULL;
231
232 authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
233
234 problem = krb5_unparse_name(authctxt->krb5_ctx, authctxt->krb5_user,
235 &pname);
236 if (problem)
237 goto fail;
238
239 debug("Kerberos v5 TGT accepted (%s)", pname);
240
241 restore_uid();
242
243 return (1);
244
245 fail:
246 if (problem)
247 debug("Kerberos v5 TGT passing failed: %s",
248 krb5_get_err_text(authctxt->krb5_ctx, problem));
249 if (ccache)
250 krb5_cc_destroy(authctxt->krb5_ctx, ccache);
251
252 restore_uid();
253
254 return (0);
255}
256
68int 257int
69auth_krb5_password(Authctxt *authctxt, const char *password) 258auth_krb5_password(Authctxt *authctxt, const char *password)
70{ 259{
@@ -75,7 +264,6 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
75 int tmpfd; 264 int tmpfd;
76#endif 265#endif
77 krb5_error_code problem; 266 krb5_error_code problem;
78 krb5_ccache ccache = NULL;
79 267
80 if (authctxt->pw == NULL) 268 if (authctxt->pw == NULL)
81 return (0); 269 return (0);
@@ -92,35 +280,23 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
92 goto out; 280 goto out;
93 281
94#ifdef HEIMDAL 282#ifdef HEIMDAL
95 problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache); 283 problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops,
284 &authctxt->krb5_fwd_ccache);
96 if (problem) 285 if (problem)
97 goto out; 286 goto out;
98 287
99 problem = krb5_cc_initialize(authctxt->krb5_ctx, ccache, 288 problem = krb5_cc_initialize(authctxt->krb5_ctx,
100 authctxt->krb5_user); 289 authctxt->krb5_fwd_ccache, authctxt->krb5_user);
101 if (problem) 290 if (problem)
102 goto out; 291 goto out;
103 292
104 restore_uid(); 293 restore_uid();
105
106 problem = krb5_verify_user(authctxt->krb5_ctx, authctxt->krb5_user, 294 problem = krb5_verify_user(authctxt->krb5_ctx, authctxt->krb5_user,
107 ccache, password, 1, NULL); 295 authctxt->krb5_fwd_ccache, password, 1, NULL);
108
109 temporarily_use_uid(authctxt->pw); 296 temporarily_use_uid(authctxt->pw);
110 297
111 if (problem) 298 if (problem)
112 goto out; 299 goto out;
113 problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops,
114 &authctxt->krb5_fwd_ccache);
115 if (problem)
116 goto out;
117
118 problem = krb5_cc_copy_cache(authctxt->krb5_ctx, ccache,
119 authctxt->krb5_fwd_ccache);
120 krb5_cc_destroy(authctxt->krb5_ctx, ccache);
121 ccache = NULL;
122 if (problem)
123 goto out;
124 300
125#else 301#else
126 problem = krb5_get_init_creds_password(authctxt->krb5_ctx, &creds, 302 problem = krb5_get_init_creds_password(authctxt->krb5_ctx, &creds,
@@ -150,13 +326,13 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
150 snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid()); 326 snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
151 327
152 if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) { 328 if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
153 logit("mkstemp(): %.100s", strerror(errno)); 329 log("mkstemp(): %.100s", strerror(errno));
154 problem = errno; 330 problem = errno;
155 goto out; 331 goto out;
156 } 332 }
157 333
158 if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) { 334 if (fchmod(tmpfd,S_IRUSR | S_IWUSR) == -1) {
159 logit("fchmod(): %.100s", strerror(errno)); 335 log("fchmod(): %.100s", strerror(errno));
160 close(tmpfd); 336 close(tmpfd);
161 problem = errno; 337 problem = errno;
162 goto out; 338 goto out;
@@ -184,9 +360,6 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
184 restore_uid(); 360 restore_uid();
185 361
186 if (problem) { 362 if (problem) {
187 if (ccache)
188 krb5_cc_destroy(authctxt->krb5_ctx, ccache);
189
190 if (authctxt->krb5_ctx != NULL && problem!=-1) 363 if (authctxt->krb5_ctx != NULL && problem!=-1)
191 debug("Kerberos password authentication failed: %s", 364 debug("Kerberos password authentication failed: %s",
192 krb5_get_err_text(authctxt->krb5_ctx, problem)); 365 krb5_get_err_text(authctxt->krb5_ctx, problem));
@@ -218,6 +391,11 @@ krb5_cleanup_proc(void *context)
218 krb5_free_principal(authctxt->krb5_ctx, authctxt->krb5_user); 391 krb5_free_principal(authctxt->krb5_ctx, authctxt->krb5_user);
219 authctxt->krb5_user = NULL; 392 authctxt->krb5_user = NULL;
220 } 393 }
394 if (authctxt->krb5_auth_ctx) {
395 krb5_auth_con_free(authctxt->krb5_ctx,
396 authctxt->krb5_auth_ctx);
397 authctxt->krb5_auth_ctx = NULL;
398 }
221 if (authctxt->krb5_ctx) { 399 if (authctxt->krb5_ctx) {
222 krb5_free_context(authctxt->krb5_ctx); 400 krb5_free_context(authctxt->krb5_ctx);
223 authctxt->krb5_ctx = NULL; 401 authctxt->krb5_ctx = NULL;
diff --git a/auth-options.c b/auth-options.c
index 0e146ab15..8595fdc14 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: auth-options.c,v 1.28 2003/06/02 09:17:34 markus Exp $"); 13RCSID("$OpenBSD: auth-options.c,v 1.26 2002/07/30 17:03:55 markus Exp $");
14 14
15#include "xmalloc.h" 15#include "xmalloc.h"
16#include "match.h" 16#include "match.h"
@@ -173,7 +173,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
173 if (strncasecmp(opts, cp, strlen(cp)) == 0) { 173 if (strncasecmp(opts, cp, strlen(cp)) == 0) {
174 const char *remote_ip = get_remote_ipaddr(); 174 const char *remote_ip = get_remote_ipaddr();
175 const char *remote_host = get_canonical_hostname( 175 const char *remote_host = get_canonical_hostname(
176 options.use_dns); 176 options.verify_reverse_mapping);
177 char *patterns = xmalloc(strlen(opts) + 1); 177 char *patterns = xmalloc(strlen(opts) + 1);
178 178
179 opts += strlen(cp); 179 opts += strlen(cp);
@@ -201,7 +201,7 @@ auth_parse_options(struct passwd *pw, char *opts, char *file, u_long linenum)
201 if (match_host_and_ip(remote_host, remote_ip, 201 if (match_host_and_ip(remote_host, remote_ip,
202 patterns) != 1) { 202 patterns) != 1) {
203 xfree(patterns); 203 xfree(patterns);
204 logit("Authentication tried for %.100s with " 204 log("Authentication tried for %.100s with "
205 "correct key but not from a permitted " 205 "correct key but not from a permitted "
206 "host (host=%.200s, ip=%.200s).", 206 "host (host=%.200s, ip=%.200s).",
207 pw->pw_name, remote_host, remote_ip); 207 pw->pw_name, remote_host, remote_ip);
@@ -287,7 +287,7 @@ next_option:
287 return 1; 287 return 1;
288 288
289bad_option: 289bad_option:
290 logit("Bad options in %.100s file, line %lu: %.50s", 290 log("Bad options in %.100s file, line %lu: %.50s",
291 file, linenum, opts); 291 file, linenum, opts);
292 auth_debug_add("Bad options in %.100s file, line %lu: %.50s", 292 auth_debug_add("Bad options in %.100s file, line %lu: %.50s",
293 file, linenum, opts); 293 file, linenum, opts);
diff --git a/auth-pam.c b/auth-pam.c
index 04cabbca2..cb57ba110 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -1,11 +1,5 @@
1/*- 1/*
2 * Copyright (c) 2002 Networks Associates Technology, Inc. 2 * Copyright (c) 2000 Damien Miller. All rights reserved.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by ThinkSec AS and
6 * NAI Labs, the Security Research Division of Network Associates, Inc.
7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8 * DARPA CHATS research program.
9 * 3 *
10 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
@@ -16,730 +10,446 @@
16 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
18 * 12 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 * SUCH DAMAGE.
30 */ 23 */
31 24
32/* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */
33#include "includes.h" 25#include "includes.h"
34RCSID("$Id: auth-pam.c,v 1.72.2.2 2003/09/23 09:24:21 djm Exp $");
35 26
36#ifdef USE_PAM 27#ifdef USE_PAM
37#include <security/pam_appl.h> 28#include "xmalloc.h"
38 29#include "log.h"
39#include "auth.h" 30#include "auth.h"
31#include "auth-options.h"
40#include "auth-pam.h" 32#include "auth-pam.h"
41#include "buffer.h" 33#include "servconf.h"
42#include "bufaux.h"
43#include "canohost.h" 34#include "canohost.h"
44#include "log.h"
45#include "monitor_wrap.h"
46#include "msg.h"
47#include "packet.h"
48#include "readpass.h" 35#include "readpass.h"
49#include "servconf.h"
50#include "ssh2.h"
51#include "xmalloc.h"
52#include "auth-options.h"
53 36
54extern ServerOptions options; 37extern char *__progname;
55 38
56#define __unused 39extern int use_privsep;
57 40
58#ifdef USE_POSIX_THREADS 41RCSID("$Id: auth-pam.c,v 1.55.4.1 2003/04/29 09:12:08 djm Exp $");
59#include <pthread.h>
60/*
61 * Avoid namespace clash when *not* using pthreads for systems *with*
62 * pthreads, which unconditionally define pthread_t via sys/types.h
63 * (e.g. Linux)
64 */
65typedef pthread_t sp_pthread_t;
66#else
67/*
68 * Simulate threads with processes.
69 */
70typedef pid_t sp_pthread_t;
71 42
72static void 43#define NEW_AUTHTOK_MSG \
73pthread_exit(void *value __unused) 44 "Warning: Your password has expired, please change it now."
74{ 45#define NEW_AUTHTOK_MSG_PRIVSEP \
75 _exit(0); 46 "Your password has expired, the session cannot proceed."
76}
77 47
78static int 48static int do_pam_conversation(int num_msg, const struct pam_message **msg,
79pthread_create(sp_pthread_t *thread, const void *attr __unused, 49 struct pam_response **resp, void *appdata_ptr);
80 void *(*thread_start)(void *), void *arg)
81{
82 pid_t pid;
83
84 switch ((pid = fork())) {
85 case -1:
86 error("fork(): %s", strerror(errno));
87 return (-1);
88 case 0:
89 thread_start(arg);
90 _exit(1);
91 default:
92 *thread = pid;
93 return (0);
94 }
95}
96 50
97static int 51/* module-local variables */
98pthread_cancel(sp_pthread_t thread) 52static struct pam_conv conv = {
53 (int (*)())do_pam_conversation,
54 NULL
55};
56static char *__pam_msg = NULL;
57static pam_handle_t *__pamh = NULL;
58static const char *__pampasswd = NULL;
59
60/* states for do_pam_conversation() */
61enum { INITIAL_LOGIN, OTHER } pamstate = INITIAL_LOGIN;
62/* remember whether pam_acct_mgmt() returned PAM_NEW_AUTHTOK_REQD */
63static int password_change_required = 0;
64/* remember whether the last pam_authenticate() succeeded or not */
65static int was_authenticated = 0;
66
67/* Remember what has been initialised */
68static int session_opened = 0;
69static int creds_set = 0;
70
71/* accessor which allows us to switch conversation structs according to
72 * the authentication method being used */
73void do_pam_set_conv(struct pam_conv *conv)
99{ 74{
100 return (kill(thread, SIGTERM)); 75 pam_set_item(__pamh, PAM_CONV, conv);
101} 76}
102 77
103static int 78/* start an authentication run */
104pthread_join(sp_pthread_t thread, void **value __unused) 79int do_pam_authenticate(int flags)
105{ 80{
106 int status; 81 int retval = pam_authenticate(__pamh, flags);
107 82 was_authenticated = (retval == PAM_SUCCESS);
108 waitpid(thread, &status, 0); 83 return retval;
109 return (status);
110} 84}
111#endif
112
113
114static pam_handle_t *sshpam_handle = NULL;
115static int sshpam_err = 0;
116static int sshpam_authenticated = 0;
117static int sshpam_new_authtok_reqd = 0;
118static int sshpam_session_open = 0;
119static int sshpam_cred_established = 0;
120
121struct pam_ctxt {
122 sp_pthread_t pam_thread;
123 int pam_psock;
124 int pam_csock;
125 int pam_done;
126};
127
128static void sshpam_free_ctx(void *);
129 85
130/* 86/*
131 * Conversation function for authentication thread. 87 * PAM conversation function.
88 * There are two states this can run in.
89 *
90 * INITIAL_LOGIN mode simply feeds the password from the client into
91 * PAM in response to PAM_PROMPT_ECHO_OFF, and collects output
92 * messages with into __pam_msg. This is used during initial
93 * authentication to bypass the normal PAM password prompt.
94 *
95 * OTHER mode handles PAM_PROMPT_ECHO_OFF with read_passphrase()
96 * and outputs messages to stderr. This mode is used if pam_chauthtok()
97 * is called to update expired passwords.
132 */ 98 */
133static int 99static int do_pam_conversation(int num_msg, const struct pam_message **msg,
134sshpam_thread_conv(int n, const struct pam_message **msg, 100 struct pam_response **resp, void *appdata_ptr)
135 struct pam_response **resp, void *data)
136{ 101{
137 Buffer buffer;
138 struct pam_ctxt *ctxt;
139 struct pam_response *reply; 102 struct pam_response *reply;
140 int i; 103 int count;
141 104 char buf[1024];
142 *resp = NULL; 105
143 106 /* PAM will free this later */
144 ctxt = data; 107 reply = xmalloc(num_msg * sizeof(*reply));
145 if (n <= 0 || n > PAM_MAX_NUM_MSG) 108
146 return (PAM_CONV_ERR); 109 for (count = 0; count < num_msg; count++) {
147 110 if (pamstate == INITIAL_LOGIN) {
148 if ((reply = malloc(n * sizeof(*reply))) == NULL) 111 /*
149 return (PAM_CONV_ERR); 112 * We can't use stdio yet, queue messages for
150 memset(reply, 0, n * sizeof(*reply)); 113 * printing later
151 114 */
152 buffer_init(&buffer); 115 switch(PAM_MSG_MEMBER(msg, count, msg_style)) {
153 for (i = 0; i < n; ++i) { 116 case PAM_PROMPT_ECHO_ON:
154 switch (PAM_MSG_MEMBER(msg, i, msg_style)) { 117 xfree(reply);
155 case PAM_PROMPT_ECHO_OFF: 118 return PAM_CONV_ERR;
156 buffer_put_cstring(&buffer, 119 case PAM_PROMPT_ECHO_OFF:
157 PAM_MSG_MEMBER(msg, i, msg)); 120 if (__pampasswd == NULL) {
158 ssh_msg_send(ctxt->pam_csock, 121 xfree(reply);
159 PAM_MSG_MEMBER(msg, i, msg_style), &buffer); 122 return PAM_CONV_ERR;
160 ssh_msg_recv(ctxt->pam_csock, &buffer); 123 }
161 if (buffer_get_char(&buffer) != PAM_AUTHTOK) 124 reply[count].resp = xstrdup(__pampasswd);
162 goto fail; 125 reply[count].resp_retcode = PAM_SUCCESS;
163 reply[i].resp = buffer_get_string(&buffer, NULL); 126 break;
164 break; 127 case PAM_ERROR_MSG:
165 case PAM_PROMPT_ECHO_ON: 128 case PAM_TEXT_INFO:
166 buffer_put_cstring(&buffer, 129 if (PAM_MSG_MEMBER(msg, count, msg) != NULL) {
167 PAM_MSG_MEMBER(msg, i, msg)); 130 message_cat(&__pam_msg,
168 ssh_msg_send(ctxt->pam_csock, 131 PAM_MSG_MEMBER(msg, count, msg));
169 PAM_MSG_MEMBER(msg, i, msg_style), &buffer); 132 }
170 ssh_msg_recv(ctxt->pam_csock, &buffer); 133 reply[count].resp = xstrdup("");
171 if (buffer_get_char(&buffer) != PAM_AUTHTOK) 134 reply[count].resp_retcode = PAM_SUCCESS;
172 goto fail; 135 break;
173 reply[i].resp = buffer_get_string(&buffer, NULL); 136 default:
174 break; 137 xfree(reply);
175 case PAM_ERROR_MSG: 138 return PAM_CONV_ERR;
176 buffer_put_cstring(&buffer, 139 }
177 PAM_MSG_MEMBER(msg, i, msg)); 140 } else {
178 ssh_msg_send(ctxt->pam_csock, 141 /*
179 PAM_MSG_MEMBER(msg, i, msg_style), &buffer); 142 * stdio is connected, so interact directly
180 break; 143 */
181 case PAM_TEXT_INFO: 144 switch(PAM_MSG_MEMBER(msg, count, msg_style)) {
182 buffer_put_cstring(&buffer, 145 case PAM_PROMPT_ECHO_ON:
183 PAM_MSG_MEMBER(msg, i, msg)); 146 fputs(PAM_MSG_MEMBER(msg, count, msg), stderr);
184 ssh_msg_send(ctxt->pam_csock, 147 fgets(buf, sizeof(buf), stdin);
185 PAM_MSG_MEMBER(msg, i, msg_style), &buffer); 148 reply[count].resp = xstrdup(buf);
186 break; 149 reply[count].resp_retcode = PAM_SUCCESS;
187 default: 150 break;
188 goto fail; 151 case PAM_PROMPT_ECHO_OFF:
152 reply[count].resp =
153 read_passphrase(PAM_MSG_MEMBER(msg, count,
154 msg), RP_ALLOW_STDIN);
155 reply[count].resp_retcode = PAM_SUCCESS;
156 break;
157 case PAM_ERROR_MSG:
158 case PAM_TEXT_INFO:
159 if (PAM_MSG_MEMBER(msg, count, msg) != NULL)
160 fprintf(stderr, "%s\n",
161 PAM_MSG_MEMBER(msg, count, msg));
162 reply[count].resp = xstrdup("");
163 reply[count].resp_retcode = PAM_SUCCESS;
164 break;
165 default:
166 xfree(reply);
167 return PAM_CONV_ERR;
168 }
189 } 169 }
190 buffer_clear(&buffer);
191 } 170 }
192 buffer_free(&buffer); 171
193 *resp = reply; 172 *resp = reply;
194 return (PAM_SUCCESS);
195 173
196 fail: 174 return PAM_SUCCESS;
197 for(i = 0; i < n; i++) {
198 if (reply[i].resp != NULL)
199 xfree(reply[i].resp);
200 }
201 xfree(reply);
202 buffer_free(&buffer);
203 return (PAM_CONV_ERR);
204} 175}
205 176
206/* 177/* Called at exit to cleanly shutdown PAM */
207 * Authentication thread. 178void do_pam_cleanup_proc(void *context)
208 */
209static void *
210sshpam_thread(void *ctxtp)
211{ 179{
212 struct pam_ctxt *ctxt = ctxtp; 180 int pam_retval = PAM_SUCCESS;
213 Buffer buffer;
214 struct pam_conv sshpam_conv;
215#ifndef USE_POSIX_THREADS
216 const char *pam_user;
217
218 pam_get_item(sshpam_handle, PAM_USER, (const void **)&pam_user);
219 setproctitle("%s [pam]", pam_user);
220#endif
221 181
222 sshpam_conv.conv = sshpam_thread_conv; 182 if (__pamh && session_opened) {
223 sshpam_conv.appdata_ptr = ctxt; 183 pam_retval = pam_close_session(__pamh, 0);
224 184 if (pam_retval != PAM_SUCCESS)
225 buffer_init(&buffer); 185 log("Cannot close PAM session[%d]: %.200s",
226 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, 186 pam_retval, PAM_STRERROR(__pamh, pam_retval));
227 (const void *)&sshpam_conv); 187 }
228 if (sshpam_err != PAM_SUCCESS)
229 goto auth_fail;
230 sshpam_err = pam_authenticate(sshpam_handle, 0);
231 if (sshpam_err != PAM_SUCCESS)
232 goto auth_fail;
233 buffer_put_cstring(&buffer, "OK");
234 ssh_msg_send(ctxt->pam_csock, sshpam_err, &buffer);
235 buffer_free(&buffer);
236 pthread_exit(NULL);
237
238 auth_fail:
239 buffer_put_cstring(&buffer,
240 pam_strerror(sshpam_handle, sshpam_err));
241 ssh_msg_send(ctxt->pam_csock, PAM_AUTH_ERR, &buffer);
242 buffer_free(&buffer);
243 pthread_exit(NULL);
244
245 return (NULL); /* Avoid warning for non-pthread case */
246}
247 188
248static void 189 if (__pamh && creds_set) {
249sshpam_thread_cleanup(void *ctxtp) 190 pam_retval = pam_setcred(__pamh, PAM_DELETE_CRED);
250{ 191 if (pam_retval != PAM_SUCCESS)
251 struct pam_ctxt *ctxt = ctxtp; 192 debug("Cannot delete credentials[%d]: %.200s",
193 pam_retval, PAM_STRERROR(__pamh, pam_retval));
194 }
252 195
253 pthread_cancel(ctxt->pam_thread); 196 if (__pamh) {
254 pthread_join(ctxt->pam_thread, NULL); 197 pam_retval = pam_end(__pamh, pam_retval);
255 close(ctxt->pam_psock); 198 if (pam_retval != PAM_SUCCESS)
256 close(ctxt->pam_csock); 199 log("Cannot release PAM authentication[%d]: %.200s",
200 pam_retval, PAM_STRERROR(__pamh, pam_retval));
201 }
257} 202}
258 203
259static int 204/* Attempt password authentication using PAM */
260sshpam_null_conv(int n, const struct pam_message **msg, 205int auth_pam_password(Authctxt *authctxt, const char *password)
261 struct pam_response **resp, void *data)
262{ 206{
263 return (PAM_CONV_ERR); 207 extern ServerOptions options;
264} 208 int pam_retval;
209 struct passwd *pw = authctxt->pw;
265 210
266static struct pam_conv null_conv = { sshpam_null_conv, NULL }; 211 do_pam_set_conv(&conv);
267 212
268static void 213 __pampasswd = password;
269sshpam_cleanup(void *arg)
270{
271 (void)arg;
272 debug("PAM: cleanup");
273 if (sshpam_handle == NULL)
274 return;
275 pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv);
276 if (sshpam_cred_established) {
277 pam_setcred(sshpam_handle, PAM_DELETE_CRED);
278 sshpam_cred_established = 0;
279 }
280 if (sshpam_session_open) {
281 pam_close_session(sshpam_handle, PAM_SILENT);
282 sshpam_session_open = 0;
283 }
284 sshpam_authenticated = sshpam_new_authtok_reqd = 0;
285 pam_end(sshpam_handle, sshpam_err);
286 sshpam_handle = NULL;
287}
288 214
289static int 215 pamstate = INITIAL_LOGIN;
290sshpam_init(const char *user) 216 pam_retval = do_pam_authenticate(
291{ 217 options.permit_empty_passwd == 0 ? PAM_DISALLOW_NULL_AUTHTOK : 0);
292 extern u_int utmp_len; 218 if (pam_retval == PAM_SUCCESS && pw) {
293 extern char *__progname; 219 debug("PAM password authentication accepted for "
294 const char *pam_rhost, *pam_user; 220 "%.100s", pw->pw_name);
295 221 return 1;
296 if (sshpam_handle != NULL) { 222 } else {
297 /* We already have a PAM context; check if the user matches */ 223 debug("PAM password authentication failed for "
298 sshpam_err = pam_get_item(sshpam_handle, 224 "%.100s: %s", pw ? pw->pw_name : "an illegal user",
299 PAM_USER, (const void **)&pam_user); 225 PAM_STRERROR(__pamh, pam_retval));
300 if (sshpam_err == PAM_SUCCESS && strcmp(user, pam_user) == 0) 226 return 0;
301 return (0);
302 fatal_remove_cleanup(sshpam_cleanup, NULL);
303 pam_end(sshpam_handle, sshpam_err);
304 sshpam_handle = NULL;
305 }
306 debug("PAM: initializing for \"%s\"", user);
307 sshpam_err =
308 pam_start(SSHD_PAM_SERVICE, user, &null_conv, &sshpam_handle);
309 if (sshpam_err != PAM_SUCCESS) {
310 pam_end(sshpam_handle, sshpam_err);
311 sshpam_handle = NULL;
312 return (-1);
313 }
314 pam_rhost = get_remote_name_or_ip(utmp_len, options.use_dns);
315 debug("PAM: setting PAM_RHOST to \"%s\"", pam_rhost);
316 sshpam_err = pam_set_item(sshpam_handle, PAM_RHOST, pam_rhost);
317 if (sshpam_err != PAM_SUCCESS) {
318 pam_end(sshpam_handle, sshpam_err);
319 sshpam_handle = NULL;
320 return (-1);
321 }
322#ifdef PAM_TTY_KLUDGE
323 /*
324 * Some silly PAM modules (e.g. pam_time) require a TTY to operate.
325 * sshd doesn't set the tty until too late in the auth process and
326 * may not even set one (for tty-less connections)
327 */
328 debug("PAM: setting PAM_TTY to \"ssh\"");
329 sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, "ssh");
330 if (sshpam_err != PAM_SUCCESS) {
331 pam_end(sshpam_handle, sshpam_err);
332 sshpam_handle = NULL;
333 return (-1);
334 } 227 }
335#endif
336 fatal_add_cleanup(sshpam_cleanup, NULL);
337 return (0);
338} 228}
339 229
340static void * 230/* Do account management using PAM */
341sshpam_init_ctx(Authctxt *authctxt) 231int do_pam_account(char *username, char *remote_user)
342{ 232{
343 struct pam_ctxt *ctxt; 233 int pam_retval;
344 int socks[2];
345
346 /* Refuse to start if we don't have PAM enabled */
347 if (!options.use_pam)
348 return NULL;
349
350 /* Initialize PAM */
351 if (sshpam_init(authctxt->user) == -1) {
352 error("PAM: initialization failed");
353 return (NULL);
354 }
355 234
356 ctxt = xmalloc(sizeof *ctxt); 235 do_pam_set_conv(&conv);
357 ctxt->pam_done = 0;
358 236
359 /* Start the authentication thread */ 237 if (remote_user) {
360 if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, socks) == -1) { 238 debug("PAM setting ruser to \"%.200s\"", remote_user);
361 error("PAM: failed create sockets: %s", strerror(errno)); 239 pam_retval = pam_set_item(__pamh, PAM_RUSER, remote_user);
362 xfree(ctxt); 240 if (pam_retval != PAM_SUCCESS)
363 return (NULL); 241 fatal("PAM set ruser failed[%d]: %.200s", pam_retval,
242 PAM_STRERROR(__pamh, pam_retval));
364 } 243 }
365 ctxt->pam_psock = socks[0];
366 ctxt->pam_csock = socks[1];
367 if (pthread_create(&ctxt->pam_thread, NULL, sshpam_thread, ctxt) == -1) {
368 error("PAM: failed to start authentication thread: %s",
369 strerror(errno));
370 close(socks[0]);
371 close(socks[1]);
372 xfree(ctxt);
373 return (NULL);
374 }
375 fatal_add_cleanup(sshpam_thread_cleanup, ctxt);
376 return (ctxt);
377}
378 244
379static int 245 pam_retval = pam_acct_mgmt(__pamh, 0);
380sshpam_query(void *ctx, char **name, char **info, 246 debug2("pam_acct_mgmt() = %d", pam_retval);
381 u_int *num, char ***prompts, u_int **echo_on) 247 switch (pam_retval) {
382{
383 Buffer buffer;
384 struct pam_ctxt *ctxt = ctx;
385 size_t plen;
386 u_char type;
387 char *msg;
388 size_t len;
389
390 buffer_init(&buffer);
391 *name = xstrdup("");
392 *info = xstrdup("");
393 *prompts = xmalloc(sizeof(char *));
394 **prompts = NULL;
395 plen = 0;
396 *echo_on = xmalloc(sizeof(u_int));
397 while (ssh_msg_recv(ctxt->pam_psock, &buffer) == 0) {
398 type = buffer_get_char(&buffer);
399 msg = buffer_get_string(&buffer, NULL);
400 switch (type) {
401 case PAM_PROMPT_ECHO_ON:
402 case PAM_PROMPT_ECHO_OFF:
403 *num = 1;
404 len = plen + strlen(msg) + 1;
405 **prompts = xrealloc(**prompts, len);
406 plen += snprintf(**prompts + plen, len, "%s", msg);
407 **echo_on = (type == PAM_PROMPT_ECHO_ON);
408 xfree(msg);
409 return (0);
410 case PAM_ERROR_MSG:
411 case PAM_TEXT_INFO:
412 /* accumulate messages */
413 len = plen + strlen(msg) + 1;
414 **prompts = xrealloc(**prompts, len);
415 plen += snprintf(**prompts + plen, len, "%s", msg);
416 xfree(msg);
417 break;
418 case PAM_SUCCESS: 248 case PAM_SUCCESS:
419 case PAM_AUTH_ERR: 249 /* This is what we want */
420 if (**prompts != NULL) { 250 break;
421 /* drain any accumulated messages */ 251#if 0
422#if 0 /* XXX - not compatible with privsep */ 252 case PAM_NEW_AUTHTOK_REQD:
423 packet_start(SSH2_MSG_USERAUTH_BANNER); 253 message_cat(&__pam_msg, use_privsep ?
424 packet_put_cstring(**prompts); 254 NEW_AUTHTOK_MSG_PRIVSEP : NEW_AUTHTOK_MSG);
425 packet_put_cstring(""); 255 /* flag that password change is necessary */
426 packet_send(); 256 password_change_required = 1;
427 packet_write_wait(); 257 /* disallow other functionality for now */
258 no_port_forwarding_flag |= 2;
259 no_agent_forwarding_flag |= 2;
260 no_x11_forwarding_flag |= 2;
261 break;
428#endif 262#endif
429 xfree(**prompts);
430 **prompts = NULL;
431 }
432 if (type == PAM_SUCCESS) {
433 *num = 0;
434 **echo_on = 0;
435 ctxt->pam_done = 1;
436 xfree(msg);
437 return (0);
438 }
439 error("PAM: %s", msg);
440 default: 263 default:
441 *num = 0; 264 log("PAM rejected by account configuration[%d]: "
442 **echo_on = 0; 265 "%.200s", pam_retval, PAM_STRERROR(__pamh,
443 xfree(msg); 266 pam_retval));
444 ctxt->pam_done = -1; 267 return(0);
445 return (-1);
446 }
447 } 268 }
448 return (-1);
449}
450 269
451/* XXX - see also comment in auth-chall.c:verify_response */ 270 return(1);
452static int
453sshpam_respond(void *ctx, u_int num, char **resp)
454{
455 Buffer buffer;
456 struct pam_ctxt *ctxt = ctx;
457
458 debug2("PAM: %s", __func__);
459 switch (ctxt->pam_done) {
460 case 1:
461 sshpam_authenticated = 1;
462 return (0);
463 case 0:
464 break;
465 default:
466 return (-1);
467 }
468 if (num != 1) {
469 error("PAM: expected one response, got %u", num);
470 return (-1);
471 }
472 buffer_init(&buffer);
473 buffer_put_cstring(&buffer, *resp);
474 ssh_msg_send(ctxt->pam_psock, PAM_AUTHTOK, &buffer);
475 buffer_free(&buffer);
476 return (1);
477} 271}
478 272
479static void 273/* Do PAM-specific session initialisation */
480sshpam_free_ctx(void *ctxtp) 274void do_pam_session(char *username, const char *ttyname)
481{ 275{
482 struct pam_ctxt *ctxt = ctxtp; 276 int pam_retval;
483 277
484 fatal_remove_cleanup(sshpam_thread_cleanup, ctxt); 278 do_pam_set_conv(&conv);
485 sshpam_thread_cleanup(ctxtp);
486 xfree(ctxt);
487 /*
488 * We don't call sshpam_cleanup() here because we may need the PAM
489 * handle at a later stage, e.g. when setting up a session. It's
490 * still on the cleanup list, so pam_end() *will* be called before
491 * the server process terminates.
492 */
493}
494 279
495KbdintDevice sshpam_device = { 280 if (ttyname != NULL) {
496 "pam", 281 debug("PAM setting tty to \"%.200s\"", ttyname);
497 sshpam_init_ctx, 282 pam_retval = pam_set_item(__pamh, PAM_TTY, ttyname);
498 sshpam_query, 283 if (pam_retval != PAM_SUCCESS)
499 sshpam_respond, 284 fatal("PAM set tty failed[%d]: %.200s",
500 sshpam_free_ctx 285 pam_retval, PAM_STRERROR(__pamh, pam_retval));
501}; 286 }
502
503KbdintDevice mm_sshpam_device = {
504 "pam",
505 mm_sshpam_init_ctx,
506 mm_sshpam_query,
507 mm_sshpam_respond,
508 mm_sshpam_free_ctx
509};
510 287
511/* 288 pam_retval = pam_open_session(__pamh, 0);
512 * This replaces auth-pam.c 289 if (pam_retval != PAM_SUCCESS)
513 */ 290 fatal("PAM session setup failed[%d]: %.200s",
514void 291 pam_retval, PAM_STRERROR(__pamh, pam_retval));
515start_pam(const char *user)
516{
517 if (!options.use_pam)
518 fatal("PAM: initialisation requested when UsePAM=no");
519 292
520 if (sshpam_init(user) == -1) 293 session_opened = 1;
521 fatal("PAM: initialisation failed");
522} 294}
523 295
524void 296/* Set PAM credentials */
525finish_pam(void) 297void do_pam_setcred(int init)
526{ 298{
527 fatal_remove_cleanup(sshpam_cleanup, NULL); 299 int pam_retval;
528 sshpam_cleanup(NULL);
529}
530 300
531u_int 301 if (__pamh == NULL)
532do_pam_account(void) 302 return;
533{
534 sshpam_err = pam_acct_mgmt(sshpam_handle, 0);
535 debug3("%s: pam_acct_mgmt = %d", __func__, sshpam_err);
536
537 if (sshpam_err != PAM_SUCCESS && sshpam_err != PAM_NEW_AUTHTOK_REQD)
538 return (0);
539
540 if (sshpam_err == PAM_NEW_AUTHTOK_REQD) {
541 sshpam_new_authtok_reqd = 1;
542
543 /* Prevent forwardings until password changed */
544 no_port_forwarding_flag |= 2;
545 no_agent_forwarding_flag |= 2;
546 no_x11_forwarding_flag |= 2;
547 }
548 303
549 return (1); 304 do_pam_set_conv(&conv);
305
306 debug("PAM establishing creds");
307 pam_retval = pam_setcred(__pamh,
308 init ? PAM_ESTABLISH_CRED : PAM_REINITIALIZE_CRED);
309 if (pam_retval != PAM_SUCCESS) {
310 if (was_authenticated)
311 fatal("PAM setcred failed[%d]: %.200s",
312 pam_retval, PAM_STRERROR(__pamh, pam_retval));
313 else
314 debug("PAM setcred failed[%d]: %.200s",
315 pam_retval, PAM_STRERROR(__pamh, pam_retval));
316 } else
317 creds_set = 1;
550} 318}
551 319
552void 320/* accessor function for file scope static variable */
553do_pam_session(void) 321int is_pam_password_change_required(void)
554{ 322{
555 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, 323 return password_change_required;
556 (const void *)&null_conv);
557 if (sshpam_err != PAM_SUCCESS)
558 fatal("PAM: failed to set PAM_CONV: %s",
559 pam_strerror(sshpam_handle, sshpam_err));
560 sshpam_err = pam_open_session(sshpam_handle, 0);
561 if (sshpam_err != PAM_SUCCESS)
562 fatal("PAM: pam_open_session(): %s",
563 pam_strerror(sshpam_handle, sshpam_err));
564 sshpam_session_open = 1;
565} 324}
566 325
567void 326/*
568do_pam_set_tty(const char *tty) 327 * Have user change authentication token if pam_acct_mgmt() indicated
328 * it was expired. This needs to be called after an interactive
329 * session is established and the user's pty is connected to
330 * stdin/stdout/stderr.
331 */
332void do_pam_chauthtok(void)
569{ 333{
570 if (tty != NULL) { 334 int pam_retval;
571 debug("PAM: setting PAM_TTY to \"%s\"", tty); 335
572 sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty); 336 do_pam_set_conv(&conv);
573 if (sshpam_err != PAM_SUCCESS) 337
574 fatal("PAM: failed to set PAM_TTY: %s", 338 if (password_change_required) {
575 pam_strerror(sshpam_handle, sshpam_err)); 339 if (use_privsep)
340 fatal("Password changing is currently unsupported"
341 " with privilege separation");
342 pamstate = OTHER;
343 pam_retval = pam_chauthtok(__pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
344 if (pam_retval != PAM_SUCCESS)
345 fatal("PAM pam_chauthtok failed[%d]: %.200s",
346 pam_retval, PAM_STRERROR(__pamh, pam_retval));
347#if 0
348 /* XXX: This would need to be done in the parent process,
349 * but there's currently no way to pass such request. */
350 no_port_forwarding_flag &= ~2;
351 no_agent_forwarding_flag &= ~2;
352 no_x11_forwarding_flag &= ~2;
353 if (!no_port_forwarding_flag && options.allow_tcp_forwarding)
354 channel_permit_all_opens();
355#endif
576 } 356 }
577} 357}
578 358
579void 359/* Cleanly shutdown PAM */
580do_pam_setcred(int init) 360void finish_pam(void)
581{ 361{
582 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV, 362 do_pam_cleanup_proc(NULL);
583 (const void *)&null_conv); 363 fatal_remove_cleanup(&do_pam_cleanup_proc, NULL);
584 if (sshpam_err != PAM_SUCCESS)
585 fatal("PAM: failed to set PAM_CONV: %s",
586 pam_strerror(sshpam_handle, sshpam_err));
587 if (init) {
588 debug("PAM: establishing credentials");
589 sshpam_err = pam_setcred(sshpam_handle, PAM_ESTABLISH_CRED);
590 } else {
591 debug("PAM: reinitializing credentials");
592 sshpam_err = pam_setcred(sshpam_handle, PAM_REINITIALIZE_CRED);
593 }
594 if (sshpam_err == PAM_SUCCESS) {
595 sshpam_cred_established = 1;
596 return;
597 }
598 if (sshpam_authenticated)
599 fatal("PAM: pam_setcred(): %s",
600 pam_strerror(sshpam_handle, sshpam_err));
601 else
602 debug("PAM: pam_setcred(): %s",
603 pam_strerror(sshpam_handle, sshpam_err));
604} 364}
605 365
606int 366/* Start PAM authentication for specified account */
607is_pam_password_change_required(void) 367void start_pam(const char *user)
608{ 368{
609 return (sshpam_new_authtok_reqd); 369 int pam_retval;
610} 370 extern ServerOptions options;
371 extern u_int utmp_len;
372 const char *rhost;
611 373
612static int 374 debug("Starting up PAM with username \"%.200s\"", user);
613pam_chauthtok_conv(int n, const struct pam_message **msg,
614 struct pam_response **resp, void *data)
615{
616 char input[PAM_MAX_MSG_SIZE];
617 struct pam_response *reply;
618 int i;
619 375
620 *resp = NULL; 376 pam_retval = pam_start(SSHD_PAM_SERVICE, user, &conv, &__pamh);
621 377
622 if (n <= 0 || n > PAM_MAX_NUM_MSG) 378 if (pam_retval != PAM_SUCCESS)
623 return (PAM_CONV_ERR); 379 fatal("PAM initialisation failed[%d]: %.200s",
380 pam_retval, PAM_STRERROR(__pamh, pam_retval));
624 381
625 if ((reply = malloc(n * sizeof(*reply))) == NULL) 382 rhost = get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping);
626 return (PAM_CONV_ERR); 383 debug("PAM setting rhost to \"%.200s\"", rhost);
627 memset(reply, 0, n * sizeof(*reply));
628 384
629 for (i = 0; i < n; ++i) { 385 pam_retval = pam_set_item(__pamh, PAM_RHOST, rhost);
630 switch (PAM_MSG_MEMBER(msg, i, msg_style)) { 386 if (pam_retval != PAM_SUCCESS)
631 case PAM_PROMPT_ECHO_OFF: 387 fatal("PAM set rhost failed[%d]: %.200s", pam_retval,
632 reply[i].resp = 388 PAM_STRERROR(__pamh, pam_retval));
633 read_passphrase(PAM_MSG_MEMBER(msg, i, msg), 389#ifdef PAM_TTY_KLUDGE
634 RP_ALLOW_STDIN); 390 /*
635 reply[i].resp_retcode = PAM_SUCCESS; 391 * Some PAM modules (e.g. pam_time) require a TTY to operate,
636 break; 392 * and will fail in various stupid ways if they don't get one.
637 case PAM_PROMPT_ECHO_ON: 393 * sshd doesn't set the tty until too late in the auth process and may
638 fprintf(stderr, "%s\n", PAM_MSG_MEMBER(msg, i, msg)); 394 * not even need one (for tty-less connections)
639 fgets(input, sizeof input, stdin); 395 * Kludge: Set a fake PAM_TTY
640 reply[i].resp = xstrdup(input); 396 */
641 reply[i].resp_retcode = PAM_SUCCESS; 397 pam_retval = pam_set_item(__pamh, PAM_TTY, "NODEVssh");
642 break; 398 if (pam_retval != PAM_SUCCESS)
643 case PAM_ERROR_MSG: 399 fatal("PAM set tty failed[%d]: %.200s",
644 case PAM_TEXT_INFO: 400 pam_retval, PAM_STRERROR(__pamh, pam_retval));
645 fprintf(stderr, "%s\n", PAM_MSG_MEMBER(msg, i, msg)); 401#endif /* PAM_TTY_KLUDGE */
646 reply[i].resp_retcode = PAM_SUCCESS;
647 break;
648 default:
649 goto fail;
650 }
651 }
652 *resp = reply;
653 return (PAM_SUCCESS);
654 402
655 fail: 403 fatal_add_cleanup(&do_pam_cleanup_proc, NULL);
656 for(i = 0; i < n; i++) {
657 if (reply[i].resp != NULL)
658 xfree(reply[i].resp);
659 }
660 xfree(reply);
661 return (PAM_CONV_ERR);
662} 404}
663 405
664/* 406/* Return list of PAM environment strings */
665 * XXX this should be done in the authentication phase, but ssh1 doesn't 407char **fetch_pam_environment(void)
666 * support that
667 */
668void
669do_pam_chauthtok(void)
670{ 408{
671 struct pam_conv pam_conv; 409#ifdef HAVE_PAM_GETENVLIST
672 410 return(pam_getenvlist(__pamh));
673 pam_conv.conv = pam_chauthtok_conv; 411#else /* HAVE_PAM_GETENVLIST */
674 pam_conv.appdata_ptr = NULL; 412 return(NULL);
675 413#endif /* HAVE_PAM_GETENVLIST */
676 if (use_privsep)
677 fatal("Password expired (unable to change with privsep)");
678 sshpam_err = pam_set_item(sshpam_handle, PAM_CONV,
679 (const void *)&pam_conv);
680 if (sshpam_err != PAM_SUCCESS)
681 fatal("PAM: failed to set PAM_CONV: %s",
682 pam_strerror(sshpam_handle, sshpam_err));
683 debug("PAM: changing password");
684 sshpam_err = pam_chauthtok(sshpam_handle, PAM_CHANGE_EXPIRED_AUTHTOK);
685 if (sshpam_err != PAM_SUCCESS)
686 fatal("PAM: pam_chauthtok(): %s",
687 pam_strerror(sshpam_handle, sshpam_err));
688} 414}
689 415
690/* 416void free_pam_environment(char **env)
691 * Set a PAM environment string. We need to do this so that the session
692 * modules can handle things like Kerberos/GSI credentials that appear
693 * during the ssh authentication process.
694 */
695
696int
697do_pam_putenv(char *name, char *value)
698{ 417{
699 int ret = 1; 418 int i;
700#ifdef HAVE_PAM_PUTENV
701 char *compound;
702 size_t len;
703
704 len = strlen(name) + strlen(value) + 2;
705 compound = xmalloc(len);
706
707 snprintf(compound, len, "%s=%s", name, value);
708 ret = pam_putenv(sshpam_handle, compound);
709 xfree(compound);
710#endif
711 419
712 return (ret); 420 if (env != NULL) {
421 for (i = 0; env[i] != NULL; i++)
422 xfree(env[i]);
423 }
713} 424}
714 425
715void 426/* Print any messages that have been generated during authentication */
716print_pam_messages(void) 427/* or account checking to stderr */
428void print_pam_messages(void)
717{ 429{
718 /* XXX */ 430 if (__pam_msg != NULL)
431 fputs(__pam_msg, stderr);
719} 432}
720 433
721char ** 434/* Append a message to buffer */
722fetch_pam_environment(void) 435void message_cat(char **p, const char *a)
723{ 436{
724#ifdef HAVE_PAM_GETENVLIST 437 char *cp;
725 debug("PAM: retrieving environment"); 438 size_t new_len;
726 return (pam_getenvlist(sshpam_handle));
727#else
728 return (NULL);
729#endif
730}
731 439
732void 440 new_len = strlen(a);
733free_pam_environment(char **env)
734{
735 char **envp;
736 441
737 if (env == NULL) 442 if (*p) {
738 return; 443 size_t len = strlen(*p);
444
445 *p = xrealloc(*p, new_len + len + 2);
446 cp = *p + len;
447 } else
448 *p = cp = xmalloc(new_len + 2);
739 449
740 for (envp = env; *envp; envp++) 450 memcpy(cp, a, new_len);
741 xfree(*envp); 451 cp[new_len] = '\n';
742 xfree(env); 452 cp[new_len + 1] = '\0';
743} 453}
744 454
745#endif /* USE_PAM */ 455#endif /* USE_PAM */
diff --git a/auth-pam.h b/auth-pam.h
index 5c952f305..7881b6b80 100644
--- a/auth-pam.h
+++ b/auth-pam.h
@@ -1,4 +1,4 @@
1/* $Id: auth-pam.h,v 1.21 2003/09/02 13:18:53 djm Exp $ */ 1/* $Id: auth-pam.h,v 1.16 2002/07/23 00:44:07 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Damien Miller. All rights reserved. 4 * Copyright (c) 2000 Damien Miller. All rights reserved.
@@ -31,17 +31,19 @@
31# define SSHD_PAM_SERVICE __progname 31# define SSHD_PAM_SERVICE __progname
32#endif 32#endif
33 33
34void start_pam(const char *); 34void start_pam(const char *user);
35void finish_pam(void); 35void finish_pam(void);
36u_int do_pam_account(void); 36int auth_pam_password(Authctxt *authctxt, const char *password);
37void do_pam_session(void); 37char **fetch_pam_environment(void);
38void do_pam_set_tty(const char *); 38void free_pam_environment(char **env);
39void do_pam_setcred(int ); 39int do_pam_authenticate(int flags);
40int do_pam_account(char *username, char *remote_user);
41void do_pam_session(char *username, const char *ttyname);
42void do_pam_setcred(int init);
43void print_pam_messages(void);
40int is_pam_password_change_required(void); 44int is_pam_password_change_required(void);
41void do_pam_chauthtok(void); 45void do_pam_chauthtok(void);
42int do_pam_putenv(char *, char *); 46void do_pam_set_conv(struct pam_conv *);
43void print_pam_messages(void); 47void message_cat(char **p, const char *a);
44char ** fetch_pam_environment(void);
45void free_pam_environment(char **);
46 48
47#endif /* USE_PAM */ 49#endif /* USE_PAM */
diff --git a/auth-passwd.c b/auth-passwd.c
index 971c7ba19..2307c1e5e 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -36,19 +36,54 @@
36 */ 36 */
37 37
38#include "includes.h" 38#include "includes.h"
39RCSID("$OpenBSD: auth-passwd.c,v 1.29 2003/08/26 09:58:43 markus Exp $"); 39RCSID("$OpenBSD: auth-passwd.c,v 1.27 2002/05/24 16:45:16 stevesk Exp $");
40 40
41#include "packet.h" 41#include "packet.h"
42#include "log.h" 42#include "log.h"
43#include "servconf.h" 43#include "servconf.h"
44#include "auth.h" 44#include "auth.h"
45#ifdef WITH_AIXAUTHENTICATE 45
46# include "buffer.h" 46#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
47# include "canohost.h" 47/* Don't need any of these headers for the PAM or SIA cases */
48extern Buffer loginmsg; 48# ifdef HAVE_CRYPT_H
49#endif 49# include <crypt.h>
50# endif
51# ifdef WITH_AIXAUTHENTICATE
52# include <login.h>
53# endif
54# ifdef __hpux
55# include <hpsecurity.h>
56# include <prot.h>
57# endif
58# ifdef HAVE_SECUREWARE
59# include <sys/security.h>
60# include <sys/audit.h>
61# include <prot.h>
62# endif /* HAVE_SECUREWARE */
63# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
64# include <shadow.h>
65# endif
66# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
67# include <sys/label.h>
68# include <sys/audit.h>
69# include <pwdadj.h>
70# endif
71# if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
72# include "md5crypt.h"
73# endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
74
75# ifdef HAVE_CYGWIN
76# undef ERROR
77# include <windows.h>
78# include <sys/cygwin.h>
79# define is_winnt (GetVersion() < 0x80000000)
80# endif
81#endif /* !USE_PAM && !HAVE_OSF_SIA */
50 82
51extern ServerOptions options; 83extern ServerOptions options;
84#ifdef WITH_AIXAUTHENTICATE
85extern char *aixloginmsg;
86#endif
52 87
53/* 88/*
54 * Tries to authenticate the user using password. Returns true if 89 * Tries to authenticate the user using password. Returns true if
@@ -59,25 +94,58 @@ auth_password(Authctxt *authctxt, const char *password)
59{ 94{
60 struct passwd * pw = authctxt->pw; 95 struct passwd * pw = authctxt->pw;
61 int ok = authctxt->valid; 96 int ok = authctxt->valid;
97#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
98 char *encrypted_password;
99 char *pw_password;
100 char *salt;
101# if defined(__hpux) || defined(HAVE_SECUREWARE)
102 struct pr_passwd *spw;
103# endif /* __hpux || HAVE_SECUREWARE */
104# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
105 struct spwd *spw;
106# endif
107# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
108 struct passwd_adjunct *spw;
109# endif
110# ifdef WITH_AIXAUTHENTICATE
111 char *authmsg;
112 int authsuccess;
113 int reenter = 1;
114# endif
115#endif /* !defined(USE_PAM) && !defined(HAVE_OSF_SIA) */
62 116
63 /* deny if no user. */ 117 /* deny if no user. */
64 if (pw == NULL) 118 if (pw == NULL)
65 return 0; 119 ok = 0;
66#ifndef HAVE_CYGWIN 120#ifndef HAVE_CYGWIN
67 if (pw && pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) 121 if (pw && pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
68 ok = 0; 122 ok = 0;
69#endif 123#endif
70 if (*password == '\0' && options.permit_empty_passwd == 0) 124 if (*password == '\0' && options.permit_empty_passwd == 0)
71 return 0; 125 ok = 0;
72 126
73#if defined(HAVE_OSF_SIA) 127#if defined(USE_PAM)
74 return auth_sia_password(authctxt, password) && ok; 128 /*
129 * If the user logging in is root and RootLogin=no, always attempt
130 * an invalid root login to prevent leaking timing information
131 */
132 if (pw && pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) {
133 auth_pam_password(authctxt, "\b\n\r\177INCORRECT");
134 return 0;
135 }
136 return auth_pam_password(authctxt, password) && ok;
137#elif defined(HAVE_OSF_SIA)
138 if (!ok)
139 return 0;
140 return auth_sia_password(authctxt, password);
75#else 141#else
142 if (!ok)
143 return 0;
76# ifdef KRB5 144# ifdef KRB5
77 if (options.kerberos_authentication == 1) { 145 if (options.kerberos_authentication == 1) {
78 int ret = auth_krb5_password(authctxt, password); 146 int ret = auth_krb5_password(authctxt, password);
79 if (ret == 1 || ret == 0) 147 if (ret == 1 || ret == 0)
80 return ret && ok; 148 return ret;
81 /* Fall back to ordinary passwd authentication. */ 149 /* Fall back to ordinary passwd authentication. */
82 } 150 }
83# endif 151# endif
@@ -88,47 +156,27 @@ auth_password(Authctxt *authctxt, const char *password)
88 if (hToken == INVALID_HANDLE_VALUE) 156 if (hToken == INVALID_HANDLE_VALUE)
89 return 0; 157 return 0;
90 cygwin_set_impersonation_token(hToken); 158 cygwin_set_impersonation_token(hToken);
91 return ok; 159 return 1;
92 } 160 }
93# endif 161# endif
94# ifdef WITH_AIXAUTHENTICATE 162# ifdef WITH_AIXAUTHENTICATE
95 { 163 authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
96 char *authmsg = NULL; 164
97 int reenter = 1; 165 if (authsuccess)
98 int authsuccess = 0; 166 /* We don't have a pty yet, so just label the line as "ssh" */
99 167 if (loginsuccess(authctxt->user,
100 if (authenticate(pw->pw_name, password, &reenter, 168 get_canonical_hostname(options.verify_reverse_mapping),
101 &authmsg) == 0 && ok) { 169 "ssh", &aixloginmsg) < 0)
102 char *msg; 170 aixloginmsg = NULL;
103 char *host = 171
104 (char *)get_canonical_hostname(options.use_dns); 172 return(authsuccess);
105 173# endif
106 authsuccess = 1; 174# ifdef KRB4
107 aix_remove_embedded_newlines(authmsg); 175 if (options.kerberos_authentication == 1) {
108 176 int ret = auth_krb4_password(authctxt, password);
109 debug3("AIX/authenticate succeeded for user %s: %.100s", 177 if (ret == 1 || ret == 0)
110 pw->pw_name, authmsg); 178 return ret;
111 179 /* Fall back to ordinary passwd authentication. */
112 /* No pty yet, so just label the line as "ssh" */
113 aix_setauthdb(authctxt->user);
114 if (loginsuccess(authctxt->user, host, "ssh",
115 &msg) == 0) {
116 if (msg != NULL) {
117 debug("%s: msg %s", __func__, msg);
118 buffer_append(&loginmsg, msg,
119 strlen(msg));
120 xfree(msg);
121 }
122 }
123 } else {
124 debug3("AIX/authenticate failed for user %s: %.100s",
125 pw->pw_name, authmsg);
126 }
127
128 if (authmsg != NULL)
129 xfree(authmsg);
130
131 return authsuccess;
132 } 180 }
133# endif 181# endif
134# ifdef BSD_AUTH 182# ifdef BSD_AUTH
@@ -136,28 +184,64 @@ auth_password(Authctxt *authctxt, const char *password)
136 (char *)password) == 0) 184 (char *)password) == 0)
137 return 0; 185 return 0;
138 else 186 else
139 return ok; 187 return 1;
140# else 188# endif
141 { 189 pw_password = pw->pw_passwd;
142 /* Just use the supplied fake password if authctxt is invalid */ 190
143 char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; 191 /*
192 * Various interfaces to shadow or protected password data
193 */
194# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
195 spw = getspnam(pw->pw_name);
196 if (spw != NULL)
197 pw_password = spw->sp_pwdp;
198# endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
199
200# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
201 if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
202 pw_password = spw->pwa_passwd;
203# endif /* defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) */
204
205# ifdef HAVE_SECUREWARE
206 if ((spw = getprpwnam(pw->pw_name)) != NULL)
207 pw_password = spw->ufld.fd_encrypt;
208# endif /* HAVE_SECUREWARE */
209
210# if defined(__hpux) && !defined(HAVE_SECUREWARE)
211 if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
212 pw_password = spw->ufld.fd_encrypt;
213# endif /* defined(__hpux) && !defined(HAVE_SECUREWARE) */
144 214
145 /* Check for users with no password. */ 215 /* Check for users with no password. */
146 if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0) 216 if ((password[0] == '\0') && (pw_password[0] == '\0'))
147 return ok; 217 return 1;
148 else {
149 /* Encrypt the candidate password using the proper salt. */
150 char *encrypted_password = xcrypt(password,
151 (pw_password[0] && pw_password[1]) ? pw_password : "xx");
152
153 /*
154 * Authentication is accepted if the encrypted passwords
155 * are identical.
156 */
157 return (strcmp(encrypted_password, pw_password) == 0) && ok;
158 }
159 218
160 } 219 if (pw_password[0] != '\0')
161# endif 220 salt = pw_password;
162#endif /* !HAVE_OSF_SIA */ 221 else
222 salt = "xx";
223
224# ifdef HAVE_MD5_PASSWORDS
225 if (is_md5_salt(salt))
226 encrypted_password = md5_crypt(password, salt);
227 else
228 encrypted_password = crypt(password, salt);
229# else /* HAVE_MD5_PASSWORDS */
230# if defined(__hpux) && !defined(HAVE_SECUREWARE)
231 if (iscomsec())
232 encrypted_password = bigcrypt(password, salt);
233 else
234 encrypted_password = crypt(password, salt);
235# else
236# ifdef HAVE_SECUREWARE
237 encrypted_password = bigcrypt(password, salt);
238# else
239 encrypted_password = crypt(password, salt);
240# endif /* HAVE_SECUREWARE */
241# endif /* __hpux && !defined(HAVE_SECUREWARE) */
242# endif /* HAVE_MD5_PASSWORDS */
243
244 /* Authentication is accepted if the encrypted passwords are identical. */
245 return (strcmp(encrypted_password, pw_password) == 0);
246#endif /* !USE_PAM && !HAVE_OSF_SIA */
163} 247}
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 2eb7e6e2d..d7848d04c 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: auth-rh-rsa.c,v 1.36 2003/06/02 09:17:34 markus Exp $"); 16RCSID("$OpenBSD: auth-rh-rsa.c,v 1.34 2002/03/25 09:25:06 markus Exp $");
17 17
18#include "packet.h" 18#include "packet.h"
19#include "uidswap.h" 19#include "uidswap.h"
@@ -63,7 +63,7 @@ auth_rhosts_rsa(struct passwd *pw, char *cuser, Key *client_host_key)
63 client_host_key->rsa == NULL) 63 client_host_key->rsa == NULL)
64 return 0; 64 return 0;
65 65
66 chost = (char *)get_canonical_hostname(options.use_dns); 66 chost = (char *)get_canonical_hostname(options.verify_reverse_mapping);
67 debug("Rhosts RSA authentication: canonical host %.900s", chost); 67 debug("Rhosts RSA authentication: canonical host %.900s", chost);
68 68
69 if (!PRIVSEP(auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key))) { 69 if (!PRIVSEP(auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key))) {
@@ -75,7 +75,7 @@ auth_rhosts_rsa(struct passwd *pw, char *cuser, Key *client_host_key)
75 75
76 /* Perform the challenge-response dialog with the client for the host key. */ 76 /* Perform the challenge-response dialog with the client for the host key. */
77 if (!auth_rsa_challenge_dialog(client_host_key)) { 77 if (!auth_rsa_challenge_dialog(client_host_key)) {
78 logit("Client on %.800s failed to respond correctly to host authentication.", 78 log("Client on %.800s failed to respond correctly to host authentication.",
79 chost); 79 chost);
80 return 0; 80 return 0;
81 } 81 }
diff --git a/auth-rhosts.c b/auth-rhosts.c
index b42a64c90..afca1f7c6 100644
--- a/auth-rhosts.c
+++ b/auth-rhosts.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$OpenBSD: auth-rhosts.c,v 1.31 2003/06/02 09:17:34 markus Exp $"); 17RCSID("$OpenBSD: auth-rhosts.c,v 1.28 2002/05/13 21:26:49 markus Exp $");
18 18
19#include "packet.h" 19#include "packet.h"
20#include "uidswap.h" 20#include "uidswap.h"
@@ -68,8 +68,7 @@ check_rhosts_file(const char *filename, const char *hostname,
68 * This should be safe because each buffer is as big as the 68 * This should be safe because each buffer is as big as the
69 * whole string, and thus cannot be overwritten. 69 * whole string, and thus cannot be overwritten.
70 */ 70 */
71 switch (sscanf(buf, "%1023s %1023s %1023s", hostbuf, userbuf, 71 switch (sscanf(buf, "%s %s %s", hostbuf, userbuf, dummy)) {
72 dummy)) {
73 case 0: 72 case 0:
74 auth_debug_add("Found empty line in %.100s.", filename); 73 auth_debug_add("Found empty line in %.100s.", filename);
75 continue; 74 continue;
@@ -156,7 +155,7 @@ auth_rhosts(struct passwd *pw, const char *client_user)
156{ 155{
157 const char *hostname, *ipaddr; 156 const char *hostname, *ipaddr;
158 157
159 hostname = get_canonical_hostname(options.use_dns); 158 hostname = get_canonical_hostname(options.verify_reverse_mapping);
160 ipaddr = get_remote_ipaddr(); 159 ipaddr = get_remote_ipaddr();
161 return auth_rhosts2(pw, client_user, hostname, ipaddr); 160 return auth_rhosts2(pw, client_user, hostname, ipaddr);
162} 161}
@@ -221,7 +220,7 @@ auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostnam
221 * not group or world writable. 220 * not group or world writable.
222 */ 221 */
223 if (stat(pw->pw_dir, &st) < 0) { 222 if (stat(pw->pw_dir, &st) < 0) {
224 logit("Rhosts authentication refused for %.100s: " 223 log("Rhosts authentication refused for %.100s: "
225 "no home directory %.200s", pw->pw_name, pw->pw_dir); 224 "no home directory %.200s", pw->pw_name, pw->pw_dir);
226 auth_debug_add("Rhosts authentication refused for %.100s: " 225 auth_debug_add("Rhosts authentication refused for %.100s: "
227 "no home directory %.200s", pw->pw_name, pw->pw_dir); 226 "no home directory %.200s", pw->pw_name, pw->pw_dir);
@@ -230,7 +229,7 @@ auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostnam
230 if (options.strict_modes && 229 if (options.strict_modes &&
231 ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || 230 ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
232 (st.st_mode & 022) != 0)) { 231 (st.st_mode & 022) != 0)) {
233 logit("Rhosts authentication refused for %.100s: " 232 log("Rhosts authentication refused for %.100s: "
234 "bad ownership or modes for home directory.", pw->pw_name); 233 "bad ownership or modes for home directory.", pw->pw_name);
235 auth_debug_add("Rhosts authentication refused for %.100s: " 234 auth_debug_add("Rhosts authentication refused for %.100s: "
236 "bad ownership or modes for home directory.", pw->pw_name); 235 "bad ownership or modes for home directory.", pw->pw_name);
@@ -257,7 +256,7 @@ auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostnam
257 if (options.strict_modes && 256 if (options.strict_modes &&
258 ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || 257 ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
259 (st.st_mode & 022) != 0)) { 258 (st.st_mode & 022) != 0)) {
260 logit("Rhosts authentication refused for %.100s: bad modes for %.200s", 259 log("Rhosts authentication refused for %.100s: bad modes for %.200s",
261 pw->pw_name, buf); 260 pw->pw_name, buf);
262 auth_debug_add("Bad file modes for %.200s", buf); 261 auth_debug_add("Bad file modes for %.200s", buf);
263 continue; 262 continue;
diff --git a/auth-rsa.c b/auth-rsa.c
index 5631d238c..92f6277f9 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$OpenBSD: auth-rsa.c,v 1.57 2003/04/08 20:21:28 itojun Exp $"); 17RCSID("$OpenBSD: auth-rsa.c,v 1.56 2002/06/10 16:53:06 stevesk Exp $");
18 18
19#include <openssl/rsa.h> 19#include <openssl/rsa.h>
20#include <openssl/md5.h> 20#include <openssl/md5.h>
@@ -187,7 +187,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
187 secure_filename(f, file, pw, line, sizeof(line)) != 0) { 187 secure_filename(f, file, pw, line, sizeof(line)) != 0) {
188 xfree(file); 188 xfree(file);
189 fclose(f); 189 fclose(f);
190 logit("Authentication refused: %s", line); 190 log("Authentication refused: %s", line);
191 restore_uid(); 191 restore_uid();
192 return (0); 192 return (0);
193 } 193 }
@@ -246,7 +246,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
246 246
247 /* check the real bits */ 247 /* check the real bits */
248 if (bits != BN_num_bits(key->rsa->n)) 248 if (bits != BN_num_bits(key->rsa->n))
249 logit("Warning: %s, line %lu: keysize mismatch: " 249 log("Warning: %s, line %lu: keysize mismatch: "
250 "actual %d vs. announced %d.", 250 "actual %d vs. announced %d.",
251 file, linenum, BN_num_bits(key->rsa->n), bits); 251 file, linenum, BN_num_bits(key->rsa->n), bits);
252 252
diff --git a/auth-sia.c b/auth-sia.c
index cae5f0912..5c9b3f5de 100644
--- a/auth-sia.c
+++ b/auth-sia.c
@@ -52,27 +52,26 @@ auth_sia_password(Authctxt *authctxt, char *pass)
52 SIAENTITY *ent = NULL; 52 SIAENTITY *ent = NULL;
53 const char *host; 53 const char *host;
54 54
55 host = get_canonical_hostname(options.use_dns); 55 host = get_canonical_hostname(options.verify_reverse_mapping);
56 56
57 if (!authctxt->user || pass == NULL || pass[0] == '\0') 57 if (!authctxt->user || !pass || pass[0] == '\0')
58 return (0); 58 return(0);
59 59
60 if (sia_ses_init(&ent, saved_argc, saved_argv, host, authctxt->user, 60 if (sia_ses_init(&ent, saved_argc, saved_argv, host, authctxt->user,
61 NULL, 0, NULL) != SIASUCCESS) 61 NULL, 0, NULL) != SIASUCCESS)
62 return (0); 62 return(0);
63 63
64 if ((ret = sia_ses_authent(NULL, pass, ent)) != SIASUCCESS) { 64 if ((ret = sia_ses_authent(NULL, pass, ent)) != SIASUCCESS) {
65 error("Couldn't authenticate %s from %s", 65 error("Couldn't authenticate %s from %s", authctxt->user,
66 authctxt->user, host); 66 host);
67 if (ret & SIASTOP) 67 if (ret & SIASTOP)
68 sia_ses_release(&ent); 68 sia_ses_release(&ent);
69 69 return(0);
70 return (0);
71 } 70 }
72 71
73 sia_ses_release(&ent); 72 sia_ses_release(&ent);
74 73
75 return (1); 74 return(1);
76} 75}
77 76
78void 77void
@@ -81,10 +80,10 @@ session_setup_sia(struct passwd *pw, char *tty)
81 SIAENTITY *ent = NULL; 80 SIAENTITY *ent = NULL;
82 const char *host; 81 const char *host;
83 82
84 host = get_canonical_hostname(options.use_dns); 83 host = get_canonical_hostname(options.verify_reverse_mapping);
85 84
86 if (sia_ses_init(&ent, saved_argc, saved_argv, host, pw->pw_name, 85 if (sia_ses_init(&ent, saved_argc, saved_argv, host, pw->pw_name, tty,
87 tty, 0, NULL) != SIASUCCESS) 86 0, NULL) != SIASUCCESS)
88 fatal("sia_ses_init failed"); 87 fatal("sia_ses_init failed");
89 88
90 if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) { 89 if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) {
@@ -98,8 +97,8 @@ session_setup_sia(struct passwd *pw, char *tty)
98 pw->pw_name, host); 97 pw->pw_name, host);
99 98
100 if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) 99 if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS)
101 fatal("Couldn't launch session for %s from %s", 100 fatal("Couldn't launch session for %s from %s", pw->pw_name,
102 pw->pw_name, host); 101 host);
103 102
104 sia_ses_release(&ent); 103 sia_ses_release(&ent);
105 104
diff --git a/auth-sia.h b/auth-sia.h
index 38164ff81..7aecce940 100644
--- a/auth-sia.h
+++ b/auth-sia.h
@@ -26,7 +26,7 @@
26 26
27#ifdef HAVE_OSF_SIA 27#ifdef HAVE_OSF_SIA
28 28
29int auth_sia_password(Authctxt *, char *); 29int auth_sia_password(Authctxt *authctxt, char *pass);
30void session_setup_sia(struct passwd *, char *); 30void session_setup_sia(struct passwd *pw, char *tty);
31 31
32#endif /* HAVE_OSF_SIA */ 32#endif /* HAVE_OSF_SIA */
diff --git a/auth.c b/auth.c
index 46e495adf..1268accb1 100644
--- a/auth.c
+++ b/auth.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth.c,v 1.49 2003/08/26 09:58:43 markus Exp $"); 26RCSID("$OpenBSD: auth.c,v 1.46 2002/11/04 10:07:53 markus Exp $");
27 27
28#ifdef HAVE_LOGIN_H 28#ifdef HAVE_LOGIN_H
29#include <login.h> 29#include <login.h>
@@ -54,7 +54,6 @@ RCSID("$OpenBSD: auth.c,v 1.49 2003/08/26 09:58:43 markus Exp $");
54 54
55/* import */ 55/* import */
56extern ServerOptions options; 56extern ServerOptions options;
57extern Buffer loginmsg;
58 57
59/* Debugging messages */ 58/* Debugging messages */
60Buffer auth_debug; 59Buffer auth_debug;
@@ -73,25 +72,26 @@ int
73allowed_user(struct passwd * pw) 72allowed_user(struct passwd * pw)
74{ 73{
75 struct stat st; 74 struct stat st;
76 const char *hostname = NULL, *ipaddr = NULL, *passwd = NULL; 75 const char *hostname = NULL, *ipaddr = NULL;
77 char *shell; 76 char *shell;
78 int i; 77 int i;
79#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) 78#ifdef WITH_AIXAUTHENTICATE
80 struct spwd *spw = NULL; 79 char *loginmsg;
80#endif /* WITH_AIXAUTHENTICATE */
81#if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \
82 !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
83 struct spwd *spw;
84 time_t today;
81#endif 85#endif
82 86
83 /* Shouldn't be called if pw is NULL, but better safe than sorry... */ 87 /* Shouldn't be called if pw is NULL, but better safe than sorry... */
84 if (!pw || !pw->pw_name) 88 if (!pw || !pw->pw_name)
85 return 0; 89 return 0;
86 90
87#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) 91#if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \
88 if (!options.use_pam) 92 !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
89 spw = getspnam(pw->pw_name);
90#ifdef HAS_SHADOW_EXPIRE
91#define DAY (24L * 60 * 60) /* 1 day in seconds */ 93#define DAY (24L * 60 * 60) /* 1 day in seconds */
92 if (!options.use_pam && spw != NULL) { 94 if ((spw = getspnam(pw->pw_name)) != NULL) {
93 time_t today;
94
95 today = time(NULL) / DAY; 95 today = time(NULL) / DAY;
96 debug3("allowed_user: today %d sp_expire %d sp_lstchg %d" 96 debug3("allowed_user: today %d sp_expire %d sp_lstchg %d"
97 " sp_max %d", (int)today, (int)spw->sp_expire, 97 " sp_max %d", (int)today, (int)spw->sp_expire,
@@ -102,58 +102,25 @@ allowed_user(struct passwd * pw)
102 * day after the day specified. 102 * day after the day specified.
103 */ 103 */
104 if (spw->sp_expire != -1 && today > spw->sp_expire) { 104 if (spw->sp_expire != -1 && today > spw->sp_expire) {
105 logit("Account %.100s has expired", pw->pw_name); 105 log("Account %.100s has expired", pw->pw_name);
106 return 0; 106 return 0;
107 } 107 }
108 108
109 if (spw->sp_lstchg == 0) { 109 if (spw->sp_lstchg == 0) {
110 logit("User %.100s password has expired (root forced)", 110 log("User %.100s password has expired (root forced)",
111 pw->pw_name); 111 pw->pw_name);
112 return 0; 112 return 0;
113 } 113 }
114 114
115 if (spw->sp_max != -1 && 115 if (spw->sp_max != -1 &&
116 today > spw->sp_lstchg + spw->sp_max) { 116 today > spw->sp_lstchg + spw->sp_max) {
117 logit("User %.100s password has expired (password aged)", 117 log("User %.100s password has expired (password aged)",
118 pw->pw_name); 118 pw->pw_name);
119 return 0; 119 return 0;
120 } 120 }
121 } 121 }
122#endif /* HAS_SHADOW_EXPIRE */
123#endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
124
125 /* grab passwd field for locked account check */
126#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
127 if (spw != NULL)
128 passwd = spw->sp_pwdp;
129#else
130 passwd = pw->pw_passwd;
131#endif 122#endif
132 123
133 /* check for locked account */
134 if (!options.use_pam && passwd && *passwd) {
135 int locked = 0;
136
137#ifdef LOCKED_PASSWD_STRING
138 if (strcmp(passwd, LOCKED_PASSWD_STRING) == 0)
139 locked = 1;
140#endif
141#ifdef LOCKED_PASSWD_PREFIX
142 if (strncmp(passwd, LOCKED_PASSWD_PREFIX,
143 strlen(LOCKED_PASSWD_PREFIX)) == 0)
144 locked = 1;
145#endif
146#ifdef LOCKED_PASSWD_SUBSTR
147 if (strstr(passwd, LOCKED_PASSWD_SUBSTR))
148 locked = 1;
149#endif
150 if (locked) {
151 logit("User %.100s not allowed because account is locked",
152 pw->pw_name);
153 return 0;
154 }
155 }
156
157 /* 124 /*
158 * Get the shell from the password data. An empty shell field is 125 * Get the shell from the password data. An empty shell field is
159 * legal, and means /bin/sh. 126 * legal, and means /bin/sh.
@@ -162,19 +129,19 @@ allowed_user(struct passwd * pw)
162 129
163 /* deny if shell does not exists or is not executable */ 130 /* deny if shell does not exists or is not executable */
164 if (stat(shell, &st) != 0) { 131 if (stat(shell, &st) != 0) {
165 logit("User %.100s not allowed because shell %.100s does not exist", 132 log("User %.100s not allowed because shell %.100s does not exist",
166 pw->pw_name, shell); 133 pw->pw_name, shell);
167 return 0; 134 return 0;
168 } 135 }
169 if (S_ISREG(st.st_mode) == 0 || 136 if (S_ISREG(st.st_mode) == 0 ||
170 (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) { 137 (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)) == 0) {
171 logit("User %.100s not allowed because shell %.100s is not executable", 138 log("User %.100s not allowed because shell %.100s is not executable",
172 pw->pw_name, shell); 139 pw->pw_name, shell);
173 return 0; 140 return 0;
174 } 141 }
175 142
176 if (options.num_deny_users > 0 || options.num_allow_users > 0) { 143 if (options.num_deny_users > 0 || options.num_allow_users > 0) {
177 hostname = get_canonical_hostname(options.use_dns); 144 hostname = get_canonical_hostname(options.verify_reverse_mapping);
178 ipaddr = get_remote_ipaddr(); 145 ipaddr = get_remote_ipaddr();
179 } 146 }
180 147
@@ -183,7 +150,7 @@ allowed_user(struct passwd * pw)
183 for (i = 0; i < options.num_deny_users; i++) 150 for (i = 0; i < options.num_deny_users; i++)
184 if (match_user(pw->pw_name, hostname, ipaddr, 151 if (match_user(pw->pw_name, hostname, ipaddr,
185 options.deny_users[i])) { 152 options.deny_users[i])) {
186 logit("User %.100s not allowed because listed in DenyUsers", 153 log("User %.100s not allowed because listed in DenyUsers",
187 pw->pw_name); 154 pw->pw_name);
188 return 0; 155 return 0;
189 } 156 }
@@ -196,7 +163,7 @@ allowed_user(struct passwd * pw)
196 break; 163 break;
197 /* i < options.num_allow_users iff we break for loop */ 164 /* i < options.num_allow_users iff we break for loop */
198 if (i >= options.num_allow_users) { 165 if (i >= options.num_allow_users) {
199 logit("User %.100s not allowed because not listed in AllowUsers", 166 log("User %.100s not allowed because not listed in AllowUsers",
200 pw->pw_name); 167 pw->pw_name);
201 return 0; 168 return 0;
202 } 169 }
@@ -204,7 +171,7 @@ allowed_user(struct passwd * pw)
204 if (options.num_deny_groups > 0 || options.num_allow_groups > 0) { 171 if (options.num_deny_groups > 0 || options.num_allow_groups > 0) {
205 /* Get the user's group access list (primary and supplementary) */ 172 /* Get the user's group access list (primary and supplementary) */
206 if (ga_init(pw->pw_name, pw->pw_gid) == 0) { 173 if (ga_init(pw->pw_name, pw->pw_gid) == 0) {
207 logit("User %.100s not allowed because not in any group", 174 log("User %.100s not allowed because not in any group",
208 pw->pw_name); 175 pw->pw_name);
209 return 0; 176 return 0;
210 } 177 }
@@ -214,7 +181,7 @@ allowed_user(struct passwd * pw)
214 if (ga_match(options.deny_groups, 181 if (ga_match(options.deny_groups,
215 options.num_deny_groups)) { 182 options.num_deny_groups)) {
216 ga_free(); 183 ga_free();
217 logit("User %.100s not allowed because a group is listed in DenyGroups", 184 log("User %.100s not allowed because a group is listed in DenyGroups",
218 pw->pw_name); 185 pw->pw_name);
219 return 0; 186 return 0;
220 } 187 }
@@ -226,7 +193,7 @@ allowed_user(struct passwd * pw)
226 if (!ga_match(options.allow_groups, 193 if (!ga_match(options.allow_groups,
227 options.num_allow_groups)) { 194 options.num_allow_groups)) {
228 ga_free(); 195 ga_free();
229 logit("User %.100s not allowed because none of user's groups are listed in AllowGroups", 196 log("User %.100s not allowed because none of user's groups are listed in AllowGroups",
230 pw->pw_name); 197 pw->pw_name);
231 return 0; 198 return 0;
232 } 199 }
@@ -239,23 +206,26 @@ allowed_user(struct passwd * pw)
239 * PermitRootLogin to control logins via ssh), or if running as 206 * PermitRootLogin to control logins via ssh), or if running as
240 * non-root user (since loginrestrictions will always fail). 207 * non-root user (since loginrestrictions will always fail).
241 */ 208 */
242 if ((pw->pw_uid != 0) && (geteuid() == 0)) { 209 if ((pw->pw_uid != 0) && (geteuid() == 0) &&
243 char *msg; 210 loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &loginmsg) != 0) {
244 211 int loginrestrict_errno = errno;
245 if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &msg) != 0) { 212
246 int loginrestrict_errno = errno; 213 if (loginmsg && *loginmsg) {
247 214 /* Remove embedded newlines (if any) */
248 if (msg && *msg) { 215 char *p;
249 buffer_append(&loginmsg, msg, strlen(msg)); 216 for (p = loginmsg; *p; p++) {
250 aix_remove_embedded_newlines(msg); 217 if (*p == '\n')
251 logit("Login restricted for %s: %.100s", 218 *p = ' ';
252 pw->pw_name, msg);
253 } 219 }
254 /* Don't fail if /etc/nologin set */ 220 /* Remove trailing newline */
255 if (!(loginrestrict_errno == EPERM && 221 *--p = '\0';
256 stat(_PATH_NOLOGIN, &st) == 0)) 222 log("Login restricted for %s: %.100s", pw->pw_name,
257 return 0; 223 loginmsg);
258 } 224 }
225 /* Don't fail if /etc/nologin set */
226 if (!(loginrestrict_errno == EPERM &&
227 stat(_PATH_NOLOGIN, &st) == 0))
228 return 0;
259 } 229 }
260#endif /* WITH_AIXAUTHENTICATE */ 230#endif /* WITH_AIXAUTHENTICATE */
261 231
@@ -282,7 +252,7 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
282 !authctxt->valid || 252 !authctxt->valid ||
283 authctxt->failures >= AUTH_FAIL_LOG || 253 authctxt->failures >= AUTH_FAIL_LOG ||
284 strcmp(method, "password") == 0) 254 strcmp(method, "password") == 0)
285 authlog = logit; 255 authlog = log;
286 256
287 if (authctxt->postponed) 257 if (authctxt->postponed)
288 authmsg = "Postponed"; 258 authmsg = "Postponed";
@@ -298,10 +268,13 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
298 get_remote_port(), 268 get_remote_port(),
299 info); 269 info);
300 270
301#ifdef CUSTOM_FAILED_LOGIN 271#ifdef WITH_AIXAUTHENTICATE
302 if (authenticated == 0 && strcmp(method, "password") == 0) 272 if (authenticated == 0 && strcmp(method, "password") == 0)
303 record_failed_login(authctxt->user, "ssh"); 273 loginfailed(authctxt->user,
304#endif 274 get_canonical_hostname(options.verify_reverse_mapping),
275 "ssh");
276#endif /* WITH_AIXAUTHENTICATE */
277
305} 278}
306 279
307/* 280/*
@@ -320,12 +293,12 @@ auth_root_allowed(char *method)
320 break; 293 break;
321 case PERMIT_FORCED_ONLY: 294 case PERMIT_FORCED_ONLY:
322 if (forced_command) { 295 if (forced_command) {
323 logit("Root login accepted for forced command."); 296 log("Root login accepted for forced command.");
324 return 1; 297 return 1;
325 } 298 }
326 break; 299 break;
327 } 300 }
328 logit("ROOT LOGIN REFUSED FROM %.200s", get_remote_ipaddr()); 301 log("ROOT LOGIN REFUSED FROM %.200s", get_remote_ipaddr());
329 return 0; 302 return 0;
330} 303}
331 304
@@ -417,7 +390,7 @@ check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host,
417 (stat(user_hostfile, &st) == 0) && 390 (stat(user_hostfile, &st) == 0) &&
418 ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || 391 ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
419 (st.st_mode & 022) != 0)) { 392 (st.st_mode & 022) != 0)) {
420 logit("Authentication refused for %.100s: " 393 log("Authentication refused for %.100s: "
421 "bad owner or modes for %.200s", 394 "bad owner or modes for %.200s",
422 pw->pw_name, user_hostfile); 395 pw->pw_name, user_hostfile);
423 } else { 396 } else {
@@ -521,10 +494,12 @@ getpwnamallow(const char *user)
521 494
522 pw = getpwnam(user); 495 pw = getpwnam(user);
523 if (pw == NULL) { 496 if (pw == NULL) {
524 logit("Illegal user %.100s from %.100s", 497 log("Illegal user %.100s from %.100s",
525 user, get_remote_ipaddr()); 498 user, get_remote_ipaddr());
526#ifdef CUSTOM_FAILED_LOGIN 499#ifdef WITH_AIXAUTHENTICATE
527 record_failed_login(user, "ssh"); 500 loginfailed(user,
501 get_canonical_hostname(options.verify_reverse_mapping),
502 "ssh");
528#endif 503#endif
529 return (NULL); 504 return (NULL);
530 } 505 }
@@ -589,24 +564,3 @@ auth_debug_reset(void)
589 auth_debug_init = 1; 564 auth_debug_init = 1;
590 } 565 }
591} 566}
592
593struct passwd *
594fakepw(void)
595{
596 static struct passwd fake;
597
598 memset(&fake, 0, sizeof(fake));
599 fake.pw_name = "NOUSER";
600 fake.pw_passwd =
601 "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
602 fake.pw_gecos = "NOUSER";
603 fake.pw_uid = -1;
604 fake.pw_gid = -1;
605#ifdef HAVE_PW_CLASS_IN_PASSWD
606 fake.pw_class = "";
607#endif
608 fake.pw_dir = "/nonexist";
609 fake.pw_shell = "/nonexist";
610
611 return (&fake);
612}
diff --git a/auth.h b/auth.h
index beaacb8bc..c75d75366 100644
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.h,v 1.46 2003/08/28 12:54:34 markus Exp $ */ 1/* $OpenBSD: auth.h,v 1.41 2002/09/26 11:38:43 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -48,32 +48,29 @@ typedef struct KbdintDevice KbdintDevice;
48 48
49struct Authctxt { 49struct Authctxt {
50 int success; 50 int success;
51 int postponed; /* authentication needs another step */ 51 int postponed;
52 int valid; /* user exists and is allowed to login */ 52 int valid;
53 int attempt; 53 int attempt;
54 int failures; 54 int failures;
55 char *user; /* username sent by the client */ 55 char *user;
56 char *service; 56 char *service;
57 struct passwd *pw; /* set if 'valid' */ 57 struct passwd *pw;
58 char *style; 58 char *style;
59 void *kbdintctxt; 59 void *kbdintctxt;
60#ifdef BSD_AUTH 60#ifdef BSD_AUTH
61 auth_session_t *as; 61 auth_session_t *as;
62#endif 62#endif
63#ifdef KRB4
64 char *krb4_ticket_file;
65#endif
63#ifdef KRB5 66#ifdef KRB5
64 krb5_context krb5_ctx; 67 krb5_context krb5_ctx;
68 krb5_auth_context krb5_auth_ctx;
65 krb5_ccache krb5_fwd_ccache; 69 krb5_ccache krb5_fwd_ccache;
66 krb5_principal krb5_user; 70 krb5_principal krb5_user;
67 char *krb5_ticket_file; 71 char *krb5_ticket_file;
68#endif 72#endif
69 void *methoddata;
70}; 73};
71/*
72 * Every authentication method has to handle authentication requests for
73 * non-existing users, or for users that are not allowed to login. In this
74 * case 'valid' is set to 0, but 'user' points to the username requested by
75 * the client.
76 */
77 74
78struct Authmethod { 75struct Authmethod {
79 char *name; 76 char *name;
@@ -114,6 +111,20 @@ int auth_rhosts_rsa_key_allowed(struct passwd *, char *, char *, Key *);
114int hostbased_key_allowed(struct passwd *, const char *, char *, Key *); 111int hostbased_key_allowed(struct passwd *, const char *, char *, Key *);
115int user_key_allowed(struct passwd *, Key *); 112int user_key_allowed(struct passwd *, Key *);
116 113
114#ifdef KRB4
115#include <krb.h>
116int auth_krb4(Authctxt *, KTEXT, char **, KTEXT);
117int auth_krb4_password(Authctxt *, const char *);
118void krb4_cleanup_proc(void *);
119
120#ifdef AFS
121#include <kafs.h>
122int auth_krb4_tgt(Authctxt *, const char *);
123int auth_afs_token(Authctxt *, const char *);
124#endif /* AFS */
125
126#endif /* KRB4 */
127
117#ifdef KRB5 128#ifdef KRB5
118int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *); 129int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *);
119int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt); 130int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt);
@@ -122,6 +133,7 @@ void krb5_cleanup_proc(void *authctxt);
122#endif /* KRB5 */ 133#endif /* KRB5 */
123 134
124#include "auth-pam.h" 135#include "auth-pam.h"
136#include "auth2-pam.h"
125 137
126Authctxt *do_authentication(void); 138Authctxt *do_authentication(void);
127Authctxt *do_authentication2(void); 139Authctxt *do_authentication2(void);
@@ -147,7 +159,6 @@ struct passwd * getpwnamallow(const char *user);
147 159
148char *get_challenge(Authctxt *); 160char *get_challenge(Authctxt *);
149int verify_response(Authctxt *, const char *); 161int verify_response(Authctxt *, const char *);
150void abandon_challenge_response(Authctxt *);
151 162
152struct passwd * auth_get_user(void); 163struct passwd * auth_get_user(void);
153 164
@@ -173,8 +184,6 @@ void auth_debug_add(const char *fmt,...) __attribute__((format(printf, 1, 2)));
173void auth_debug_send(void); 184void auth_debug_send(void);
174void auth_debug_reset(void); 185void auth_debug_reset(void);
175 186
176struct passwd *fakepw(void);
177
178#define AUTH_FAIL_MAX 6 187#define AUTH_FAIL_MAX 6
179#define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) 188#define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2)
180#define AUTH_FAIL_MSG "Too many authentication failures for %.100s" 189#define AUTH_FAIL_MSG "Too many authentication failures for %.100s"
diff --git a/auth1.c b/auth1.c
index dfe944dd1..b7e10abd0 100644
--- a/auth1.c
+++ b/auth1.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: auth1.c,v 1.52 2003/08/28 12:54:34 markus Exp $"); 13RCSID("$OpenBSD: auth1.c,v 1.47 2003/02/06 21:22:42 markus Exp $");
14 14
15#include "xmalloc.h" 15#include "xmalloc.h"
16#include "rsa.h" 16#include "rsa.h"
@@ -49,6 +49,10 @@ get_authname(int type)
49 case SSH_CMSG_AUTH_TIS: 49 case SSH_CMSG_AUTH_TIS:
50 case SSH_CMSG_AUTH_TIS_RESPONSE: 50 case SSH_CMSG_AUTH_TIS_RESPONSE:
51 return "challenge-response"; 51 return "challenge-response";
52#if defined(KRB4) || defined(KRB5)
53 case SSH_CMSG_AUTH_KERBEROS:
54 return "kerberos";
55#endif
52 } 56 }
53 snprintf(buf, sizeof buf, "bad-auth-msg-%d", type); 57 snprintf(buf, sizeof buf, "bad-auth-msg-%d", type);
54 return buf; 58 return buf;
@@ -69,15 +73,15 @@ do_authloop(Authctxt *authctxt)
69 char info[1024]; 73 char info[1024];
70 u_int dlen; 74 u_int dlen;
71 u_int ulen; 75 u_int ulen;
72 int prev, type = 0; 76 int type = 0;
73 struct passwd *pw = authctxt->pw; 77 struct passwd *pw = authctxt->pw;
74 78
75 debug("Attempting authentication for %s%.100s.", 79 debug("Attempting authentication for %s%.100s.",
76 authctxt->valid ? "" : "illegal user ", authctxt->user); 80 authctxt->valid ? "" : "illegal user ", authctxt->user);
77 81
78 /* If the user has no password, accept authentication immediately. */ 82 /* If the user has no password, accept authentication immediately. */
79 if (options.password_authentication && 83 if (options.password_authentication && options.permit_empty_passwd &&
80#ifdef KRB5 84#if defined(KRB4) || defined(KRB5)
81 (!options.kerberos_authentication || options.kerberos_or_local_passwd) && 85 (!options.kerberos_authentication || options.kerberos_or_local_passwd) &&
82#endif 86#endif
83 PRIVSEP(auth_password(authctxt, ""))) { 87 PRIVSEP(auth_password(authctxt, ""))) {
@@ -99,22 +103,104 @@ do_authloop(Authctxt *authctxt)
99 info[0] = '\0'; 103 info[0] = '\0';
100 104
101 /* Get a packet from the client. */ 105 /* Get a packet from the client. */
102 prev = type;
103 type = packet_read(); 106 type = packet_read();
104 107
105 /*
106 * If we started challenge-response authentication but the
107 * next packet is not a response to our challenge, release
108 * the resources allocated by get_challenge() (which would
109 * normally have been released by verify_response() had we
110 * received such a response)
111 */
112 if (prev == SSH_CMSG_AUTH_TIS &&
113 type != SSH_CMSG_AUTH_TIS_RESPONSE)
114 abandon_challenge_response(authctxt);
115
116 /* Process the packet. */ 108 /* Process the packet. */
117 switch (type) { 109 switch (type) {
110
111#if defined(KRB4) || defined(KRB5)
112 case SSH_CMSG_AUTH_KERBEROS:
113 if (!options.kerberos_authentication) {
114 verbose("Kerberos authentication disabled.");
115 } else {
116 char *kdata = packet_get_string(&dlen);
117 packet_check_eom();
118
119 if (kdata[0] == 4) { /* KRB_PROT_VERSION */
120#ifdef KRB4
121 KTEXT_ST tkt, reply;
122 tkt.length = dlen;
123 if (tkt.length < MAX_KTXT_LEN)
124 memcpy(tkt.dat, kdata, tkt.length);
125
126 if (PRIVSEP(auth_krb4(authctxt, &tkt,
127 &client_user, &reply))) {
128 authenticated = 1;
129 snprintf(info, sizeof(info),
130 " tktuser %.100s",
131 client_user);
132
133 packet_start(
134 SSH_SMSG_AUTH_KERBEROS_RESPONSE);
135 packet_put_string((char *)
136 reply.dat, reply.length);
137 packet_send();
138 packet_write_wait();
139 }
140#endif /* KRB4 */
141 } else {
142#ifdef KRB5
143 krb5_data tkt, reply;
144 tkt.length = dlen;
145 tkt.data = kdata;
146
147 if (PRIVSEP(auth_krb5(authctxt, &tkt,
148 &client_user, &reply))) {
149 authenticated = 1;
150 snprintf(info, sizeof(info),
151 " tktuser %.100s",
152 client_user);
153
154 /* Send response to client */
155 packet_start(
156 SSH_SMSG_AUTH_KERBEROS_RESPONSE);
157 packet_put_string((char *)
158 reply.data, reply.length);
159 packet_send();
160 packet_write_wait();
161
162 if (reply.length)
163 xfree(reply.data);
164 }
165#endif /* KRB5 */
166 }
167 xfree(kdata);
168 }
169 break;
170#endif /* KRB4 || KRB5 */
171
172#if defined(AFS) || defined(KRB5)
173 /* XXX - punt on backward compatibility here. */
174 case SSH_CMSG_HAVE_KERBEROS_TGT:
175 packet_send_debug("Kerberos TGT passing disabled before authentication.");
176 break;
177#ifdef AFS
178 case SSH_CMSG_HAVE_AFS_TOKEN:
179 packet_send_debug("AFS token passing disabled before authentication.");
180 break;
181#endif /* AFS */
182#endif /* AFS || KRB5 */
183
184 case SSH_CMSG_AUTH_RHOSTS:
185 if (!options.rhosts_authentication) {
186 verbose("Rhosts authentication disabled.");
187 break;
188 }
189 /*
190 * Get client user name. Note that we just have to
191 * trust the client; this is one reason why rhosts
192 * authentication is insecure. (Another is
193 * IP-spoofing on a local network.)
194 */
195 client_user = packet_get_string(&ulen);
196 packet_check_eom();
197
198 /* Try to authenticate using /etc/hosts.equiv and .rhosts. */
199 authenticated = auth_rhosts(pw, client_user);
200
201 snprintf(info, sizeof info, " ruser %.100s", client_user);
202 break;
203
118 case SSH_CMSG_AUTH_RHOSTS_RSA: 204 case SSH_CMSG_AUTH_RHOSTS_RSA:
119 if (!options.rhosts_rsa_authentication) { 205 if (!options.rhosts_rsa_authentication) {
120 verbose("Rhosts with RSA authentication disabled."); 206 verbose("Rhosts with RSA authentication disabled.");
@@ -211,7 +297,7 @@ do_authloop(Authctxt *authctxt)
211 * Any unknown messages will be ignored (and failure 297 * Any unknown messages will be ignored (and failure
212 * returned) during authentication. 298 * returned) during authentication.
213 */ 299 */
214 logit("Unknown message during authentication: type %d", type); 300 log("Unknown message during authentication: type %d", type);
215 break; 301 break;
216 } 302 }
217#ifdef BSD_AUTH 303#ifdef BSD_AUTH
@@ -225,6 +311,8 @@ do_authloop(Authctxt *authctxt)
225 authctxt->user); 311 authctxt->user);
226 312
227#ifdef _UNICOS 313#ifdef _UNICOS
314 if (type == SSH_CMSG_AUTH_PASSWORD && !authenticated)
315 cray_login_failure(authctxt->user, IA_UDBERR);
228 if (authenticated && cray_access_denied(authctxt->user)) { 316 if (authenticated && cray_access_denied(authctxt->user)) {
229 authenticated = 0; 317 authenticated = 0;
230 fatal("Access denied for user %s.",authctxt->user); 318 fatal("Access denied for user %s.",authctxt->user);
@@ -244,10 +332,9 @@ do_authloop(Authctxt *authctxt)
244 !auth_root_allowed(get_authname(type))) 332 !auth_root_allowed(get_authname(type)))
245 authenticated = 0; 333 authenticated = 0;
246#endif 334#endif
247
248#ifdef USE_PAM 335#ifdef USE_PAM
249 if (options.use_pam && authenticated && 336 if (!use_privsep && authenticated &&
250 !PRIVSEP(do_pam_account())) 337 !do_pam_account(pw->pw_name, client_user))
251 authenticated = 0; 338 authenticated = 0;
252#endif 339#endif
253 340
@@ -262,8 +349,9 @@ do_authloop(Authctxt *authctxt)
262 if (authenticated) 349 if (authenticated)
263 return; 350 return;
264 351
265 if (authctxt->failures++ > AUTH_FAIL_MAX) 352 if (authctxt->failures++ > AUTH_FAIL_MAX) {
266 packet_disconnect(AUTH_FAIL_MSG, authctxt->user); 353 packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
354 }
267 355
268 packet_start(SSH_SMSG_FAILURE); 356 packet_start(SSH_SMSG_FAILURE);
269 packet_send(); 357 packet_send();
@@ -292,6 +380,16 @@ do_authentication(void)
292 if ((style = strchr(user, ':')) != NULL) 380 if ((style = strchr(user, ':')) != NULL)
293 *style++ = '\0'; 381 *style++ = '\0';
294 382
383#ifdef KRB5
384 /* XXX - SSH.com Kerberos v5 braindeath. */
385 if ((datafellows & SSH_BUG_K5USER) &&
386 options.kerberos_authentication) {
387 char *p;
388 if ((p = strchr(user, '@')) != NULL)
389 *p = '\0';
390 }
391#endif
392
295 authctxt = authctxt_new(); 393 authctxt = authctxt_new();
296 authctxt->user = user; 394 authctxt->user = user;
297 authctxt->style = style; 395 authctxt->style = style;
@@ -299,17 +397,14 @@ do_authentication(void)
299 /* Verify that the user is a valid user. */ 397 /* Verify that the user is a valid user. */
300 if ((authctxt->pw = PRIVSEP(getpwnamallow(user))) != NULL) 398 if ((authctxt->pw = PRIVSEP(getpwnamallow(user))) != NULL)
301 authctxt->valid = 1; 399 authctxt->valid = 1;
302 else { 400 else
303 debug("do_authentication: illegal user %s", user); 401 debug("do_authentication: illegal user %s", user);
304 authctxt->pw = fakepw();
305 }
306 402
307 setproctitle("%s%s", authctxt->pw ? user : "unknown", 403 setproctitle("%s%s", authctxt->pw ? user : "unknown",
308 use_privsep ? " [net]" : ""); 404 use_privsep ? " [net]" : "");
309 405
310#ifdef USE_PAM 406#ifdef USE_PAM
311 if (options.use_pam) 407 PRIVSEP(start_pam(authctxt->pw == NULL ? "NOUSER" : user));
312 PRIVSEP(start_pam(user));
313#endif 408#endif
314 409
315 /* 410 /*
diff --git a/auth2-chall.c b/auth2-chall.c
index aacbf0bcc..0d1709307 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -41,9 +41,6 @@ static void input_userauth_info_response(int, u_int32_t, void *);
41#ifdef BSD_AUTH 41#ifdef BSD_AUTH
42extern KbdintDevice bsdauth_device; 42extern KbdintDevice bsdauth_device;
43#else 43#else
44#ifdef USE_PAM
45extern KbdintDevice sshpam_device;
46#endif
47#ifdef SKEY 44#ifdef SKEY
48extern KbdintDevice skey_device; 45extern KbdintDevice skey_device;
49#endif 46#endif
@@ -53,9 +50,6 @@ KbdintDevice *devices[] = {
53#ifdef BSD_AUTH 50#ifdef BSD_AUTH
54 &bsdauth_device, 51 &bsdauth_device,
55#else 52#else
56#ifdef USE_PAM
57 &sshpam_device,
58#endif
59#ifdef SKEY 53#ifdef SKEY
60 &skey_device, 54 &skey_device,
61#endif 55#endif
@@ -326,27 +320,18 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
326void 320void
327privsep_challenge_enable(void) 321privsep_challenge_enable(void)
328{ 322{
329#if defined(BSD_AUTH) || defined(USE_PAM) || defined(SKEY)
330 int n = 0;
331#endif
332#ifdef BSD_AUTH 323#ifdef BSD_AUTH
333 extern KbdintDevice mm_bsdauth_device; 324 extern KbdintDevice mm_bsdauth_device;
334#endif 325#endif
335#ifdef USE_PAM
336 extern KbdintDevice mm_sshpam_device;
337#endif
338#ifdef SKEY 326#ifdef SKEY
339 extern KbdintDevice mm_skey_device; 327 extern KbdintDevice mm_skey_device;
340#endif 328#endif
341 329 /* As long as SSHv1 has devices[0] hard coded this is fine */
342#ifdef BSD_AUTH 330#ifdef BSD_AUTH
343 devices[n++] = &mm_bsdauth_device; 331 devices[0] = &mm_bsdauth_device;
344#else 332#else
345#ifdef USE_PAM
346 devices[n++] = &mm_sshpam_device;
347#endif
348#ifdef SKEY 333#ifdef SKEY
349 devices[n++] = &mm_skey_device; 334 devices[0] = &mm_skey_device;
350#endif 335#endif
351#endif 336#endif
352} 337}
diff --git a/auth2-gss.c b/auth2-gss.c
deleted file mode 100644
index 75b94b009..000000000
--- a/auth2-gss.c
+++ /dev/null
@@ -1,247 +0,0 @@
1/* $OpenBSD: auth2-gss.c,v 1.3 2003/09/01 20:44:54 markus Exp $ */
2
3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include "includes.h"
28
29#ifdef GSSAPI
30
31#include "auth.h"
32#include "ssh2.h"
33#include "xmalloc.h"
34#include "log.h"
35#include "dispatch.h"
36#include "servconf.h"
37#include "compat.h"
38#include "packet.h"
39#include "monitor_wrap.h"
40
41#include "ssh-gss.h"
42
43extern ServerOptions options;
44
45static void input_gssapi_token(int type, u_int32_t plen, void *ctxt);
46static void input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt);
47static void input_gssapi_errtok(int, u_int32_t, void *);
48
49/*
50 * We only support those mechanisms that we know about (ie ones that we know
51 * how to check local user kuserok and the like
52 */
53static int
54userauth_gssapi(Authctxt *authctxt)
55{
56 gss_OID_desc oid = {0, NULL};
57 Gssctxt *ctxt = NULL;
58 int mechs;
59 gss_OID_set supported;
60 int present;
61 OM_uint32 ms;
62 u_int len;
63 char *doid = NULL;
64
65 if (!authctxt->valid || authctxt->user == NULL)
66 return (0);
67
68 mechs = packet_get_int();
69 if (mechs == 0) {
70 debug("Mechanism negotiation is not supported");
71 return (0);
72 }
73
74 ssh_gssapi_supported_oids(&supported);
75 do {
76 mechs--;
77
78 if (doid)
79 xfree(doid);
80
81 doid = packet_get_string(&len);
82
83 if (doid[0] != SSH_GSS_OIDTYPE || doid[1] != len-2) {
84 logit("Mechanism OID received using the old encoding form");
85 oid.elements = doid;
86 oid.length = len;
87 } else {
88 oid.elements = doid + 2;
89 oid.length = len - 2;
90 }
91 gss_test_oid_set_member(&ms, &oid, supported, &present);
92 } while (mechs > 0 && !present);
93
94 gss_release_oid_set(&ms, &supported);
95
96 if (!present) {
97 xfree(doid);
98 return (0);
99 }
100
101 if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, &oid)))) {
102 xfree(doid);
103 return (0);
104 }
105
106 authctxt->methoddata=(void *)ctxt;
107
108 packet_start(SSH2_MSG_USERAUTH_GSSAPI_RESPONSE);
109
110 /* Return OID in same format as we received it*/
111 packet_put_string(doid, len);
112
113 packet_send();
114 xfree(doid);
115
116 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token);
117 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok);
118 authctxt->postponed = 1;
119
120 return (0);
121}
122
123static void
124input_gssapi_token(int type, u_int32_t plen, void *ctxt)
125{
126 Authctxt *authctxt = ctxt;
127 Gssctxt *gssctxt;
128 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
129 gss_buffer_desc recv_tok;
130 OM_uint32 maj_status, min_status;
131 u_int len;
132
133 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
134 fatal("No authentication or GSSAPI context");
135
136 gssctxt = authctxt->methoddata;
137 recv_tok.value = packet_get_string(&len);
138 recv_tok.length = len; /* u_int vs. size_t */
139
140 packet_check_eom();
141
142 maj_status = PRIVSEP(ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
143 &send_tok, NULL));
144
145 xfree(recv_tok.value);
146
147 if (GSS_ERROR(maj_status)) {
148 if (send_tok.length != 0) {
149 packet_start(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK);
150 packet_put_string(send_tok.value, send_tok.length);
151 packet_send();
152 }
153 authctxt->postponed = 0;
154 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
155 userauth_finish(authctxt, 0, "gssapi");
156 } else {
157 if (send_tok.length != 0) {
158 packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
159 packet_put_string(send_tok.value, send_tok.length);
160 packet_send();
161 }
162 if (maj_status == GSS_S_COMPLETE) {
163 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
164 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE,
165 &input_gssapi_exchange_complete);
166 }
167 }
168
169 gss_release_buffer(&min_status, &send_tok);
170}
171
172static void
173input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
174{
175 Authctxt *authctxt = ctxt;
176 Gssctxt *gssctxt;
177 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
178 gss_buffer_desc recv_tok;
179 OM_uint32 maj_status;
180 u_int len;
181
182 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
183 fatal("No authentication or GSSAPI context");
184
185 gssctxt = authctxt->methoddata;
186 recv_tok.value = packet_get_string(&len);
187 recv_tok.length = len;
188
189 packet_check_eom();
190
191 /* Push the error token into GSSAPI to see what it says */
192 maj_status = PRIVSEP(ssh_gssapi_accept_ctx(gssctxt, &recv_tok,
193 &send_tok, NULL));
194
195 xfree(recv_tok.value);
196
197 /* We can't return anything to the client, even if we wanted to */
198 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
199 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
200
201 /* The client will have already moved on to the next auth */
202
203 gss_release_buffer(&maj_status, &send_tok);
204}
205
206/*
207 * This is called when the client thinks we've completed authentication.
208 * It should only be enabled in the dispatch handler by the function above,
209 * which only enables it once the GSSAPI exchange is complete.
210 */
211
212static void
213input_gssapi_exchange_complete(int type, u_int32_t plen, void *ctxt)
214{
215 Authctxt *authctxt = ctxt;
216 Gssctxt *gssctxt;
217 int authenticated;
218
219 if (authctxt == NULL || (authctxt->methoddata == NULL && !use_privsep))
220 fatal("No authentication or GSSAPI context");
221
222 gssctxt = authctxt->methoddata;
223
224 /*
225 * We don't need to check the status, because the stored credentials
226 * which userok uses are only populated once the context init step
227 * has returned complete.
228 */
229
230 packet_check_eom();
231
232 authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user));
233
234 authctxt->postponed = 0;
235 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
236 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, NULL);
237 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
238 userauth_finish(authctxt, authenticated, "gssapi");
239}
240
241Authmethod method_gssapi = {
242 "gssapi",
243 userauth_gssapi,
244 &options.gss_authentication
245};
246
247#endif /* GSSAPI */
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index 505d3eff4..2bde7bb79 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2-hostbased.c,v 1.5 2003/06/24 08:23:46 markus Exp $"); 26RCSID("$OpenBSD: auth2-hostbased.c,v 1.2 2002/05/31 11:35:15 markus Exp $");
27 27
28#include "ssh2.h" 28#include "ssh2.h"
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -42,7 +42,7 @@ RCSID("$OpenBSD: auth2-hostbased.c,v 1.5 2003/06/24 08:23:46 markus Exp $");
42/* import */ 42/* import */
43extern ServerOptions options; 43extern ServerOptions options;
44extern u_char *session_id2; 44extern u_char *session_id2;
45extern u_int session_id2_len; 45extern int session_id2_len;
46 46
47static int 47static int
48userauth_hostbased(Authctxt *authctxt) 48userauth_hostbased(Authctxt *authctxt)
@@ -77,7 +77,7 @@ userauth_hostbased(Authctxt *authctxt)
77 pktype = key_type_from_name(pkalg); 77 pktype = key_type_from_name(pkalg);
78 if (pktype == KEY_UNSPEC) { 78 if (pktype == KEY_UNSPEC) {
79 /* this is perfectly legal */ 79 /* this is perfectly legal */
80 logit("userauth_hostbased: unsupported " 80 log("userauth_hostbased: unsupported "
81 "public key algorithm: %s", pkalg); 81 "public key algorithm: %s", pkalg);
82 goto done; 82 goto done;
83 } 83 }
@@ -136,7 +136,7 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
136 HostStatus host_status; 136 HostStatus host_status;
137 int len; 137 int len;
138 138
139 resolvedname = get_canonical_hostname(options.use_dns); 139 resolvedname = get_canonical_hostname(options.verify_reverse_mapping);
140 ipaddr = get_remote_ipaddr(); 140 ipaddr = get_remote_ipaddr();
141 141
142 debug2("userauth_hostbased: chost %s resolvedname %s ipaddr %s", 142 debug2("userauth_hostbased: chost %s resolvedname %s ipaddr %s",
@@ -152,7 +152,7 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
152 chost[len - 1] = '\0'; 152 chost[len - 1] = '\0';
153 } 153 }
154 if (strcasecmp(resolvedname, chost) != 0) 154 if (strcasecmp(resolvedname, chost) != 0)
155 logit("userauth_hostbased mismatch: " 155 log("userauth_hostbased mismatch: "
156 "client sends %s, but we resolve %s to %s", 156 "client sends %s, but we resolve %s to %s",
157 chost, ipaddr, resolvedname); 157 chost, ipaddr, resolvedname);
158 if (auth_rhosts2(pw, cuser, resolvedname, ipaddr) == 0) 158 if (auth_rhosts2(pw, cuser, resolvedname, ipaddr) == 0)
diff --git a/auth2-kbdint.c b/auth2-kbdint.c
index 1696ef4d3..e60992881 100644
--- a/auth2-kbdint.c
+++ b/auth2-kbdint.c
@@ -49,6 +49,10 @@ userauth_kbdint(Authctxt *authctxt)
49 if (options.challenge_response_authentication) 49 if (options.challenge_response_authentication)
50 authenticated = auth2_challenge(authctxt, devs); 50 authenticated = auth2_challenge(authctxt, devs);
51 51
52#ifdef USE_PAM
53 if (authenticated == 0 && options.pam_authentication_via_kbd_int)
54 authenticated = auth2_pam(authctxt);
55#endif
52 xfree(devs); 56 xfree(devs);
53 xfree(lang); 57 xfree(lang);
54#ifdef HAVE_CYGWIN 58#ifdef HAVE_CYGWIN
diff --git a/auth2-none.c b/auth2-none.c
index c342addec..46a4c617e 100644
--- a/auth2-none.c
+++ b/auth2-none.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2-none.c,v 1.6 2003/08/26 09:58:43 markus Exp $"); 26RCSID("$OpenBSD: auth2-none.c,v 1.4 2002/06/27 10:35:47 deraadt Exp $");
27 27
28#include "auth.h" 28#include "auth.h"
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -100,9 +100,9 @@ userauth_none(Authctxt *authctxt)
100 if (check_nt_auth(1, authctxt->pw) == 0) 100 if (check_nt_auth(1, authctxt->pw) == 0)
101 return(0); 101 return(0);
102#endif 102#endif
103 if (options.password_authentication) 103 if (options.permit_empty_passwd == 0)
104 return (PRIVSEP(auth_password(authctxt, ""))); 104 return 0;
105 return (0); 105 return PRIVSEP(auth_password(authctxt, "")) && authctxt->valid;
106} 106}
107 107
108Authmethod method_none = { 108Authmethod method_none = {
diff --git a/auth2-pam.c b/auth2-pam.c
new file mode 100644
index 000000000..ac28fb245
--- /dev/null
+++ b/auth2-pam.c
@@ -0,0 +1,165 @@
1#include "includes.h"
2RCSID("$Id: auth2-pam.c,v 1.15 2003/01/08 01:37:03 djm Exp $");
3
4#ifdef USE_PAM
5#include <security/pam_appl.h>
6
7#include "ssh.h"
8#include "ssh2.h"
9#include "auth.h"
10#include "auth-pam.h"
11#include "packet.h"
12#include "xmalloc.h"
13#include "dispatch.h"
14#include "log.h"
15
16static int do_pam_conversation_kbd_int(int num_msg,
17 const struct pam_message **msg, struct pam_response **resp,
18 void *appdata_ptr);
19void input_userauth_info_response_pam(int type, u_int32_t seqnr, void *ctxt);
20
21struct {
22 int finished, num_received, num_expected;
23 int *prompts;
24 struct pam_response *responses;
25} context_pam2 = {0, 0, 0, NULL};
26
27static struct pam_conv conv2 = {
28 do_pam_conversation_kbd_int,
29 NULL,
30};
31
32int
33auth2_pam(Authctxt *authctxt)
34{
35 int retval = -1;
36
37 if (authctxt->user == NULL)
38 fatal("auth2_pam: internal error: no user");
39
40 conv2.appdata_ptr = authctxt;
41 do_pam_set_conv(&conv2);
42
43 dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE,
44 &input_userauth_info_response_pam);
45 retval = (do_pam_authenticate(0) == PAM_SUCCESS);
46 dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, NULL);
47
48 return retval;
49}
50
51static int
52do_pam_conversation_kbd_int(int num_msg, const struct pam_message **msg,
53 struct pam_response **resp, void *appdata_ptr)
54{
55 int i, j, done;
56 char *text;
57
58 context_pam2.finished = 0;
59 context_pam2.num_received = 0;
60 context_pam2.num_expected = 0;
61 context_pam2.prompts = xmalloc(sizeof(int) * num_msg);
62 context_pam2.responses = xmalloc(sizeof(struct pam_response) * num_msg);
63 memset(context_pam2.responses, 0, sizeof(struct pam_response) * num_msg);
64
65 text = NULL;
66 for (i = 0, context_pam2.num_expected = 0; i < num_msg; i++) {
67 int style = PAM_MSG_MEMBER(msg, i, msg_style);
68 switch (style) {
69 case PAM_PROMPT_ECHO_ON:
70 case PAM_PROMPT_ECHO_OFF:
71 context_pam2.num_expected++;
72 break;
73 case PAM_TEXT_INFO:
74 case PAM_ERROR_MSG:
75 default:
76 /* Capture all these messages to be sent at once */
77 message_cat(&text, PAM_MSG_MEMBER(msg, i, msg));
78 break;
79 }
80 }
81
82 if (context_pam2.num_expected == 0)
83 return PAM_SUCCESS;
84
85 packet_start(SSH2_MSG_USERAUTH_INFO_REQUEST);
86 packet_put_cstring(""); /* Name */
87 packet_put_cstring(""); /* Instructions */
88 packet_put_cstring(""); /* Language */
89 packet_put_int(context_pam2.num_expected);
90
91 for (i = 0, j = 0; i < num_msg; i++) {
92 int style = PAM_MSG_MEMBER(msg, i, msg_style);
93
94 /* Skip messages which don't need a reply */
95 if (style != PAM_PROMPT_ECHO_ON && style != PAM_PROMPT_ECHO_OFF)
96 continue;
97
98 context_pam2.prompts[j++] = i;
99 if (text) {
100 message_cat(&text, PAM_MSG_MEMBER(msg, i, msg));
101 packet_put_cstring(text);
102 text = NULL;
103 } else
104 packet_put_cstring(PAM_MSG_MEMBER(msg, i, msg));
105 packet_put_char(style == PAM_PROMPT_ECHO_ON);
106 }
107 packet_send();
108 packet_write_wait();
109
110 /*
111 * Grabbing control of execution and spinning until we get what
112 * we want is probably rude, but it seems to work properly, and
113 * the client *should* be in lock-step with us, so the loop should
114 * only be traversed once.
115 */
116 while(context_pam2.finished == 0) {
117 done = 1;
118 dispatch_run(DISPATCH_BLOCK, &done, appdata_ptr);
119 if (context_pam2.finished == 0)
120 debug("extra packet during conversation");
121 }
122
123 if (context_pam2.num_received == context_pam2.num_expected) {
124 *resp = context_pam2.responses;
125 return PAM_SUCCESS;
126 } else
127 return PAM_CONV_ERR;
128}
129
130void
131input_userauth_info_response_pam(int type, u_int32_t seqnr, void *ctxt)
132{
133 Authctxt *authctxt = ctxt;
134 unsigned int nresp = 0, rlen = 0, i = 0;
135 char *resp;
136
137 if (authctxt == NULL)
138 fatal("input_userauth_info_response_pam: no authentication context");
139
140 nresp = packet_get_int(); /* Number of responses. */
141 debug("got %d responses", nresp);
142
143
144 if (nresp != context_pam2.num_expected)
145 fatal("%s: Received incorrect number of responses "
146 "(expected %d, received %u)", __func__,
147 context_pam2.num_expected, nresp);
148
149 if (nresp > 100)
150 fatal("%s: too many replies", __func__);
151
152 for (i = 0; i < nresp; i++) {
153 int j = context_pam2.prompts[i];
154
155 resp = packet_get_string(&rlen);
156 context_pam2.responses[j].resp_retcode = PAM_SUCCESS;
157 context_pam2.responses[j].resp = resp;
158 context_pam2.num_received++;
159 }
160
161 context_pam2.finished = 1;
162
163 packet_check_eom();
164}
165#endif
diff --git a/auth2-pam.h b/auth2-pam.h
new file mode 100644
index 000000000..c54f811cf
--- /dev/null
+++ b/auth2-pam.h
@@ -0,0 +1,8 @@
1/* $Id: auth2-pam.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#include "includes.h"
4#ifdef USE_PAM
5
6int auth2_pam(Authctxt *authctxt);
7
8#endif /* USE_PAM */
diff --git a/auth2-passwd.c b/auth2-passwd.c
index 67fb4c921..5026969f8 100644
--- a/auth2-passwd.c
+++ b/auth2-passwd.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2-passwd.c,v 1.4 2003/08/26 09:58:43 markus Exp $"); 26RCSID("$OpenBSD: auth2-passwd.c,v 1.2 2002/05/31 11:35:15 markus Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29#include "packet.h" 29#include "packet.h"
@@ -44,10 +44,10 @@ userauth_passwd(Authctxt *authctxt)
44 u_int len; 44 u_int len;
45 change = packet_get_char(); 45 change = packet_get_char();
46 if (change) 46 if (change)
47 logit("password change not supported"); 47 log("password change not supported");
48 password = packet_get_string(&len); 48 password = packet_get_string(&len);
49 packet_check_eom(); 49 packet_check_eom();
50 if (PRIVSEP(auth_password(authctxt, password)) == 1 50 if (PRIVSEP(auth_password(authctxt, password)) == 1 && authctxt->valid
51#ifdef HAVE_CYGWIN 51#ifdef HAVE_CYGWIN
52 && check_nt_auth(1, authctxt->pw) 52 && check_nt_auth(1, authctxt->pw)
53#endif 53#endif
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index d51e939f1..947bfed0b 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2-pubkey.c,v 1.4 2003/06/24 08:23:46 markus Exp $"); 26RCSID("$OpenBSD: auth2-pubkey.c,v 1.2 2002/05/31 11:35:15 markus Exp $");
27 27
28#include "ssh2.h" 28#include "ssh2.h"
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -44,7 +44,7 @@ RCSID("$OpenBSD: auth2-pubkey.c,v 1.4 2003/06/24 08:23:46 markus Exp $");
44/* import */ 44/* import */
45extern ServerOptions options; 45extern ServerOptions options;
46extern u_char *session_id2; 46extern u_char *session_id2;
47extern u_int session_id2_len; 47extern int session_id2_len;
48 48
49static int 49static int
50userauth_pubkey(Authctxt *authctxt) 50userauth_pubkey(Authctxt *authctxt)
@@ -78,7 +78,7 @@ userauth_pubkey(Authctxt *authctxt)
78 pktype = key_type_from_name(pkalg); 78 pktype = key_type_from_name(pkalg);
79 if (pktype == KEY_UNSPEC) { 79 if (pktype == KEY_UNSPEC) {
80 /* this is perfectly legal */ 80 /* this is perfectly legal */
81 logit("userauth_pubkey: unsupported public key algorithm: %s", 81 log("userauth_pubkey: unsupported public key algorithm: %s",
82 pkalg); 82 pkalg);
83 goto done; 83 goto done;
84 } 84 }
@@ -199,7 +199,7 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
199 if (options.strict_modes && 199 if (options.strict_modes &&
200 secure_filename(f, file, pw, line, sizeof(line)) != 0) { 200 secure_filename(f, file, pw, line, sizeof(line)) != 0) {
201 fclose(f); 201 fclose(f);
202 logit("Authentication refused: %s", line); 202 log("Authentication refused: %s", line);
203 restore_uid(); 203 restore_uid();
204 return 0; 204 return 0;
205 } 205 }
diff --git a/auth2.c b/auth2.c
index 41e77efdc..1b21eb2da 100644
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2.c,v 1.102 2003/08/26 09:58:43 markus Exp $"); 26RCSID("$OpenBSD: auth2.c,v 1.96 2003/02/06 21:22:43 markus Exp $");
27 27
28#include "ssh2.h" 28#include "ssh2.h"
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -36,14 +36,10 @@ RCSID("$OpenBSD: auth2.c,v 1.102 2003/08/26 09:58:43 markus Exp $");
36#include "pathnames.h" 36#include "pathnames.h"
37#include "monitor_wrap.h" 37#include "monitor_wrap.h"
38 38
39#ifdef GSSAPI
40#include "ssh-gss.h"
41#endif
42
43/* import */ 39/* import */
44extern ServerOptions options; 40extern ServerOptions options;
45extern u_char *session_id2; 41extern u_char *session_id2;
46extern u_int session_id2_len; 42extern int session_id2_len;
47 43
48Authctxt *x_authctxt = NULL; 44Authctxt *x_authctxt = NULL;
49 45
@@ -54,16 +50,10 @@ extern Authmethod method_pubkey;
54extern Authmethod method_passwd; 50extern Authmethod method_passwd;
55extern Authmethod method_kbdint; 51extern Authmethod method_kbdint;
56extern Authmethod method_hostbased; 52extern Authmethod method_hostbased;
57#ifdef GSSAPI
58extern Authmethod method_gssapi;
59#endif
60 53
61Authmethod *authmethods[] = { 54Authmethod *authmethods[] = {
62 &method_none, 55 &method_none,
63 &method_pubkey, 56 &method_pubkey,
64#ifdef GSSAPI
65 &method_gssapi,
66#endif
67 &method_passwd, 57 &method_passwd,
68 &method_kbdint, 58 &method_kbdint,
69 &method_hostbased, 59 &method_hostbased,
@@ -95,6 +85,10 @@ do_authentication2(void)
95 /* challenge-response is implemented via keyboard interactive */ 85 /* challenge-response is implemented via keyboard interactive */
96 if (options.challenge_response_authentication) 86 if (options.challenge_response_authentication)
97 options.kbd_interactive_authentication = 1; 87 options.kbd_interactive_authentication = 1;
88 if (options.pam_authentication_via_kbd_int)
89 options.kbd_interactive_authentication = 1;
90 if (use_privsep)
91 options.pam_authentication_via_kbd_int = 0;
98 92
99 dispatch_init(&dispatch_protocol_error); 93 dispatch_init(&dispatch_protocol_error);
100 dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request); 94 dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
@@ -163,15 +157,12 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
163 authctxt->valid = 1; 157 authctxt->valid = 1;
164 debug2("input_userauth_request: setting up authctxt for %s", user); 158 debug2("input_userauth_request: setting up authctxt for %s", user);
165#ifdef USE_PAM 159#ifdef USE_PAM
166 if (options.use_pam) 160 PRIVSEP(start_pam(authctxt->pw->pw_name));
167 PRIVSEP(start_pam(authctxt->pw->pw_name));
168#endif 161#endif
169 } else { 162 } else {
170 logit("input_userauth_request: illegal user %s", user); 163 log("input_userauth_request: illegal user %s", user);
171 authctxt->pw = fakepw();
172#ifdef USE_PAM 164#ifdef USE_PAM
173 if (options.use_pam) 165 PRIVSEP(start_pam("NOUSER"));
174 PRIVSEP(start_pam(user));
175#endif 166#endif
176 } 167 }
177 setproctitle("%s%s", authctxt->pw ? user : "unknown", 168 setproctitle("%s%s", authctxt->pw ? user : "unknown",
@@ -189,12 +180,6 @@ input_userauth_request(int type, u_int32_t seq, void *ctxt)
189 } 180 }
190 /* reset state */ 181 /* reset state */
191 auth2_challenge_stop(authctxt); 182 auth2_challenge_stop(authctxt);
192
193#ifdef GSSAPI
194 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
195 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE, NULL);
196#endif
197
198 authctxt->postponed = 0; 183 authctxt->postponed = 0;
199 184
200 /* try to authenticate user */ 185 /* try to authenticate user */
@@ -225,9 +210,10 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
225 authenticated = 0; 210 authenticated = 0;
226 211
227#ifdef USE_PAM 212#ifdef USE_PAM
228 if (options.use_pam && authenticated && !PRIVSEP(do_pam_account())) 213 if (!use_privsep && authenticated && authctxt->user &&
214 !do_pam_account(authctxt->user, NULL))
229 authenticated = 0; 215 authenticated = 0;
230#endif 216#endif /* USE_PAM */
231 217
232#ifdef _UNICOS 218#ifdef _UNICOS
233 if (authenticated && cray_access_denied(authctxt->user)) { 219 if (authenticated && cray_access_denied(authctxt->user)) {
@@ -252,8 +238,13 @@ userauth_finish(Authctxt *authctxt, int authenticated, char *method)
252 /* now we can break out */ 238 /* now we can break out */
253 authctxt->success = 1; 239 authctxt->success = 1;
254 } else { 240 } else {
255 if (authctxt->failures++ > AUTH_FAIL_MAX) 241 if (authctxt->failures++ > AUTH_FAIL_MAX) {
256 packet_disconnect(AUTH_FAIL_MSG, authctxt->user); 242 packet_disconnect(AUTH_FAIL_MSG, authctxt->user);
243 }
244#ifdef _UNICOS
245 if (strcmp(method, "password") == 0)
246 cray_login_failure(authctxt->user, IA_UDBERR);
247#endif /* _UNICOS */
257 methods = authmethods_get(); 248 methods = authmethods_get();
258 packet_start(SSH2_MSG_USERAUTH_FAILURE); 249 packet_start(SSH2_MSG_USERAUTH_FAILURE);
259 packet_put_cstring(methods); 250 packet_put_cstring(methods);
diff --git a/authfd.c b/authfd.c
index c78db6d94..a186e0117 100644
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: authfd.c,v 1.61 2003/06/28 16:23:06 deraadt Exp $"); 38RCSID("$OpenBSD: authfd.c,v 1.58 2003/01/23 13:50:27 markus Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41 41
@@ -122,8 +122,8 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
122 PUT_32BIT(buf, len); 122 PUT_32BIT(buf, len);
123 123
124 /* Send the length and then the packet to the agent. */ 124 /* Send the length and then the packet to the agent. */
125 if (atomicio(vwrite, auth->fd, buf, 4) != 4 || 125 if (atomicio(write, auth->fd, buf, 4) != 4 ||
126 atomicio(vwrite, auth->fd, buffer_ptr(request), 126 atomicio(write, auth->fd, buffer_ptr(request),
127 buffer_len(request)) != buffer_len(request)) { 127 buffer_len(request)) != buffer_len(request)) {
128 error("Error writing to authentication socket."); 128 error("Error writing to authentication socket.");
129 return 0; 129 return 0;
@@ -332,7 +332,7 @@ ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int versio
332 buffer_get_bignum(&auth->identities, key->rsa->n); 332 buffer_get_bignum(&auth->identities, key->rsa->n);
333 *comment = buffer_get_string(&auth->identities, NULL); 333 *comment = buffer_get_string(&auth->identities, NULL);
334 if (bits != BN_num_bits(key->rsa->n)) 334 if (bits != BN_num_bits(key->rsa->n))
335 logit("Warning: identity keysize mismatch: actual %d, announced %u", 335 log("Warning: identity keysize mismatch: actual %d, announced %u",
336 BN_num_bits(key->rsa->n), bits); 336 BN_num_bits(key->rsa->n), bits);
337 break; 337 break;
338 case 2: 338 case 2:
@@ -373,7 +373,7 @@ ssh_decrypt_challenge(AuthenticationConnection *auth,
373 if (key->type != KEY_RSA1) 373 if (key->type != KEY_RSA1)
374 return 0; 374 return 0;
375 if (response_type == 0) { 375 if (response_type == 0) {
376 logit("Compatibility with ssh protocol version 1.0 no longer supported."); 376 log("Compatibility with ssh protocol version 1.0 no longer supported.");
377 return 0; 377 return 0;
378 } 378 }
379 buffer_init(&buffer); 379 buffer_init(&buffer);
@@ -392,7 +392,7 @@ ssh_decrypt_challenge(AuthenticationConnection *auth,
392 type = buffer_get_char(&buffer); 392 type = buffer_get_char(&buffer);
393 393
394 if (agent_failed(type)) { 394 if (agent_failed(type)) {
395 logit("Agent admitted failure to authenticate using the key."); 395 log("Agent admitted failure to authenticate using the key.");
396 } else if (type != SSH_AGENT_RSA_RESPONSE) { 396 } else if (type != SSH_AGENT_RSA_RESPONSE) {
397 fatal("Bad authentication response: %d", type); 397 fatal("Bad authentication response: %d", type);
398 } else { 398 } else {
@@ -441,7 +441,7 @@ ssh_agent_sign(AuthenticationConnection *auth,
441 } 441 }
442 type = buffer_get_char(&msg); 442 type = buffer_get_char(&msg);
443 if (agent_failed(type)) { 443 if (agent_failed(type)) {
444 logit("Agent admitted failure to sign using the key."); 444 log("Agent admitted failure to sign using the key.");
445 } else if (type != SSH2_AGENT_SIGN_RESPONSE) { 445 } else if (type != SSH2_AGENT_SIGN_RESPONSE) {
446 fatal("Bad authentication response: %d", type); 446 fatal("Bad authentication response: %d", type);
447 } else { 447 } else {
@@ -589,33 +589,16 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key)
589} 589}
590 590
591int 591int
592ssh_update_card(AuthenticationConnection *auth, int add, 592ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id, const char *pin)
593 const char *reader_id, const char *pin, u_int life, u_int confirm)
594{ 593{
595 Buffer msg; 594 Buffer msg;
596 int type, constrained = (life || confirm); 595 int type;
597
598 if (add) {
599 type = constrained ?
600 SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED :
601 SSH_AGENTC_ADD_SMARTCARD_KEY;
602 } else
603 type = SSH_AGENTC_REMOVE_SMARTCARD_KEY;
604 596
605 buffer_init(&msg); 597 buffer_init(&msg);
606 buffer_put_char(&msg, type); 598 buffer_put_char(&msg, add ? SSH_AGENTC_ADD_SMARTCARD_KEY :
599 SSH_AGENTC_REMOVE_SMARTCARD_KEY);
607 buffer_put_cstring(&msg, reader_id); 600 buffer_put_cstring(&msg, reader_id);
608 buffer_put_cstring(&msg, pin); 601 buffer_put_cstring(&msg, pin);
609
610 if (constrained) {
611 if (life != 0) {
612 buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_LIFETIME);
613 buffer_put_int(&msg, life);
614 }
615 if (confirm != 0)
616 buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_CONFIRM);
617 }
618
619 if (ssh_request_reply(auth, &msg, &msg) == 0) { 602 if (ssh_request_reply(auth, &msg, &msg) == 0) {
620 buffer_free(&msg); 603 buffer_free(&msg);
621 return 0; 604 return 0;
@@ -658,7 +641,7 @@ decode_reply(int type)
658 case SSH_AGENT_FAILURE: 641 case SSH_AGENT_FAILURE:
659 case SSH_COM_AGENT2_FAILURE: 642 case SSH_COM_AGENT2_FAILURE:
660 case SSH2_AGENT_FAILURE: 643 case SSH2_AGENT_FAILURE:
661 logit("SSH_AGENT_FAILURE"); 644 log("SSH_AGENT_FAILURE");
662 return 0; 645 return 0;
663 case SSH_AGENT_SUCCESS: 646 case SSH_AGENT_SUCCESS:
664 return 1; 647 return 1;
diff --git a/authfd.h b/authfd.h
index 74b825c51..2a8751ec1 100644
--- a/authfd.h
+++ b/authfd.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.h,v 1.33 2003/06/11 11:18:38 djm Exp $ */ 1/* $OpenBSD: authfd.h,v 1.32 2003/01/23 13:50:27 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -49,7 +49,6 @@
49/* add key with constraints */ 49/* add key with constraints */
50#define SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24 50#define SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24
51#define SSH2_AGENTC_ADD_ID_CONSTRAINED 25 51#define SSH2_AGENTC_ADD_ID_CONSTRAINED 25
52#define SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED 26
53 52
54#define SSH_AGENT_CONSTRAIN_LIFETIME 1 53#define SSH_AGENT_CONSTRAIN_LIFETIME 1
55#define SSH_AGENT_CONSTRAIN_CONFIRM 2 54#define SSH_AGENT_CONSTRAIN_CONFIRM 2
@@ -83,8 +82,7 @@ int ssh_add_identity_constrained(AuthenticationConnection *, Key *,
83int ssh_remove_identity(AuthenticationConnection *, Key *); 82int ssh_remove_identity(AuthenticationConnection *, Key *);
84int ssh_remove_all_identities(AuthenticationConnection *, int); 83int ssh_remove_all_identities(AuthenticationConnection *, int);
85int ssh_lock_agent(AuthenticationConnection *, int, const char *); 84int ssh_lock_agent(AuthenticationConnection *, int, const char *);
86int ssh_update_card(AuthenticationConnection *, int, const char *, 85int ssh_update_card(AuthenticationConnection *, int, const char *, const char *);
87 const char *, u_int, u_int);
88 86
89int 87int
90ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16], 88ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16],
diff --git a/authfile.c b/authfile.c
index 1f46093e3..90618efde 100644
--- a/authfile.c
+++ b/authfile.c
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38#include "includes.h" 38#include "includes.h"
39RCSID("$OpenBSD: authfile.c,v 1.54 2003/05/24 09:30:39 djm Exp $"); 39RCSID("$OpenBSD: authfile.c,v 1.52 2003/03/13 11:42:18 markus Exp $");
40 40
41#include <openssl/err.h> 41#include <openssl/err.h>
42#include <openssl/evp.h> 42#include <openssl/evp.h>
@@ -514,7 +514,7 @@ key_perm_ok(int fd, const char *filename)
514 error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @"); 514 error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @");
515 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); 515 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
516 error("Permissions 0%3.3o for '%s' are too open.", 516 error("Permissions 0%3.3o for '%s' are too open.",
517 (u_int)st.st_mode & 0777, filename); 517 st.st_mode & 0777, filename);
518 error("It is recommended that your private key files are NOT accessible by others."); 518 error("It is recommended that your private key files are NOT accessible by others.");
519 error("This private key will be ignored."); 519 error("This private key will be ignored.");
520 return 0; 520 return 0;
@@ -629,18 +629,9 @@ key_load_public(const char *filename, char **commentp)
629 Key *pub; 629 Key *pub;
630 char file[MAXPATHLEN]; 630 char file[MAXPATHLEN];
631 631
632 /* try rsa1 private key */
633 pub = key_load_public_type(KEY_RSA1, filename, commentp); 632 pub = key_load_public_type(KEY_RSA1, filename, commentp);
634 if (pub != NULL) 633 if (pub != NULL)
635 return pub; 634 return pub;
636
637 /* try rsa1 public key */
638 pub = key_new(KEY_RSA1);
639 if (key_try_load_public(pub, filename, commentp) == 1)
640 return pub;
641 key_free(pub);
642
643 /* try ssh2 public key */
644 pub = key_new(KEY_UNSPEC); 635 pub = key_new(KEY_UNSPEC);
645 if (key_try_load_public(pub, filename, commentp) == 1) 636 if (key_try_load_public(pub, filename, commentp) == 1)
646 return pub; 637 return pub;
diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0
new file mode 100644
index 000000000..f99b3ba11
--- /dev/null
+++ b/autom4te.cache/output.0
@@ -0,0 +1,19182 @@
1@%:@! /bin/sh
2@%:@ Guess values for system-dependent variables and create Makefiles.
3@%:@ Generated by GNU Autoconf 2.57.
4@%:@
5@%:@ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6@%:@ Free Software Foundation, Inc.
7@%:@ This configure script is free software; the Free Software Foundation
8@%:@ gives unlimited permission to copy, distribute and modify it.
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
20elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
23
24# Support unset when possible.
25if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
44 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
98
99
100 as_lineno_1=$LINENO
101 as_lineno_2=$LINENO
102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103 test "x$as_lineno_1" != "x$as_lineno_2" &&
104 test "x$as_lineno_3" = "x$as_lineno_2" || {
105 # Find who we are. Look in the path if we contain no path at all
106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117 ;;
118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195 as_expr=expr
196else
197 as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203 # We could just check for DJGPP; but this test a) works b) is more generic
204 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205 if test -f conf$$.exe; then
206 # Don't use ln at all; we don't have any links
207 as_ln_s='cp -p'
208 else
209 as_ln_s='ln -s'
210 fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212 as_ln_s=ln
213else
214 as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
218if mkdir -p . 2>/dev/null; then
219 as_mkdir_p=:
220else
221 as_mkdir_p=false
222fi
223
224as_executable_p="test -f"
225
226# Sed expression to map a string onto a valid CPP name.
227as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
228
229# Sed expression to map a string onto a valid variable name.
230as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
231
232
233# IFS
234# We need space, tab and new line, in precisely that order.
235as_nl='
236'
237IFS=" $as_nl"
238
239# CDPATH.
240$as_unset CDPATH
241
242
243# Name of the host.
244# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
245# so uname gets run too.
246ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
247
248exec 6>&1
249
250#
251# Initializations.
252#
253ac_default_prefix=/usr/local
254ac_config_libobj_dir=.
255cross_compiling=no
256subdirs=
257MFLAGS=
258MAKEFLAGS=
259SHELL=${CONFIG_SHELL-/bin/sh}
260
261# Maximum number of lines to put in a shell here document.
262# This variable seems obsolete. It should probably be removed, and
263# only ac_max_sed_lines should be used.
264: ${ac_max_here_lines=38}
265
266# Identity of this package.
267PACKAGE_NAME=
268PACKAGE_TARNAME=
269PACKAGE_VERSION=
270PACKAGE_STRING=
271PACKAGE_BUGREPORT=
272
273ac_unique_file="ssh.c"
274# Factoring default headers for most tests.
275ac_includes_default="\
276#include <stdio.h>
277#if HAVE_SYS_TYPES_H
278# include <sys/types.h>
279#endif
280#if HAVE_SYS_STAT_H
281# include <sys/stat.h>
282#endif
283#if STDC_HEADERS
284# include <stdlib.h>
285# include <stddef.h>
286#else
287# if HAVE_STDLIB_H
288# include <stdlib.h>
289# endif
290#endif
291#if HAVE_STRING_H
292# if !STDC_HEADERS && HAVE_MEMORY_H
293# include <memory.h>
294# endif
295# include <string.h>
296#endif
297#if HAVE_STRINGS_H
298# include <strings.h>
299#endif
300#if HAVE_INTTYPES_H
301# include <inttypes.h>
302#else
303# if HAVE_STDINT_H
304# include <stdint.h>
305# endif
306#endif
307#if HAVE_UNISTD_H
308# include <unistd.h>
309#endif"
310
311ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR PERL SED ENT TEST_MINUS_S_SH SH LOGIN_PROGRAM_FALLBACK LD EGREP LIBWRAP LIBPAM INSTALL_SSH_RAND_HELPER SSH_PRIVSEP_USER PROG_LS PROG_NETSTAT PROG_ARP PROG_IFCONFIG PROG_JSTAT PROG_PS PROG_SAR PROG_W PROG_WHO PROG_LAST PROG_LASTLOG PROG_DF PROG_VMSTAT PROG_UPTIME PROG_IPCS PROG_TAIL INSTALL_SSH_PRNG_CMDS OPENSC_CONFIG PRIVSEP_PATH xauth_path STRIP_OPT XAUTH_PATH NROFF MANTYPE mansubdir user_path piddir LIB@&t@OBJS LTLIBOBJS'
312ac_subst_files=''
313
314# Initialize some variables set by options.
315ac_init_help=
316ac_init_version=false
317# The variables have the same names as the options, with
318# dashes changed to underlines.
319cache_file=/dev/null
320exec_prefix=NONE
321no_create=
322no_recursion=
323prefix=NONE
324program_prefix=NONE
325program_suffix=NONE
326program_transform_name=s,x,x,
327silent=
328site=
329srcdir=
330verbose=
331x_includes=NONE
332x_libraries=NONE
333
334# Installation directory options.
335# These are left unexpanded so users can "make install exec_prefix=/foo"
336# and all the variables that are supposed to be based on exec_prefix
337# by default will actually change.
338# Use braces instead of parens because sh, perl, etc. also accept them.
339bindir='${exec_prefix}/bin'
340sbindir='${exec_prefix}/sbin'
341libexecdir='${exec_prefix}/libexec'
342datadir='${prefix}/share'
343sysconfdir='${prefix}/etc'
344sharedstatedir='${prefix}/com'
345localstatedir='${prefix}/var'
346libdir='${exec_prefix}/lib'
347includedir='${prefix}/include'
348oldincludedir='/usr/include'
349infodir='${prefix}/info'
350mandir='${prefix}/man'
351
352ac_prev=
353for ac_option
354do
355 # If the previous option needs an argument, assign it.
356 if test -n "$ac_prev"; then
357 eval "$ac_prev=\$ac_option"
358 ac_prev=
359 continue
360 fi
361
362 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
363
364 # Accept the important Cygnus configure options, so we can diagnose typos.
365
366 case $ac_option in
367
368 -bindir | --bindir | --bindi | --bind | --bin | --bi)
369 ac_prev=bindir ;;
370 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
371 bindir=$ac_optarg ;;
372
373 -build | --build | --buil | --bui | --bu)
374 ac_prev=build_alias ;;
375 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
376 build_alias=$ac_optarg ;;
377
378 -cache-file | --cache-file | --cache-fil | --cache-fi \
379 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
380 ac_prev=cache_file ;;
381 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
382 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
383 cache_file=$ac_optarg ;;
384
385 --config-cache | -C)
386 cache_file=config.cache ;;
387
388 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
389 ac_prev=datadir ;;
390 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
391 | --da=*)
392 datadir=$ac_optarg ;;
393
394 -disable-* | --disable-*)
395 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
396 # Reject names that are not valid shell variable names.
397 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
398 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
399 { (exit 1); exit 1; }; }
400 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
401 eval "enable_$ac_feature=no" ;;
402
403 -enable-* | --enable-*)
404 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
405 # Reject names that are not valid shell variable names.
406 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
407 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
408 { (exit 1); exit 1; }; }
409 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
410 case $ac_option in
411 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
412 *) ac_optarg=yes ;;
413 esac
414 eval "enable_$ac_feature='$ac_optarg'" ;;
415
416 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
417 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
418 | --exec | --exe | --ex)
419 ac_prev=exec_prefix ;;
420 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
421 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
422 | --exec=* | --exe=* | --ex=*)
423 exec_prefix=$ac_optarg ;;
424
425 -gas | --gas | --ga | --g)
426 # Obsolete; use --with-gas.
427 with_gas=yes ;;
428
429 -help | --help | --hel | --he | -h)
430 ac_init_help=long ;;
431 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
432 ac_init_help=recursive ;;
433 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
434 ac_init_help=short ;;
435
436 -host | --host | --hos | --ho)
437 ac_prev=host_alias ;;
438 -host=* | --host=* | --hos=* | --ho=*)
439 host_alias=$ac_optarg ;;
440
441 -includedir | --includedir | --includedi | --included | --include \
442 | --includ | --inclu | --incl | --inc)
443 ac_prev=includedir ;;
444 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
445 | --includ=* | --inclu=* | --incl=* | --inc=*)
446 includedir=$ac_optarg ;;
447
448 -infodir | --infodir | --infodi | --infod | --info | --inf)
449 ac_prev=infodir ;;
450 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
451 infodir=$ac_optarg ;;
452
453 -libdir | --libdir | --libdi | --libd)
454 ac_prev=libdir ;;
455 -libdir=* | --libdir=* | --libdi=* | --libd=*)
456 libdir=$ac_optarg ;;
457
458 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
459 | --libexe | --libex | --libe)
460 ac_prev=libexecdir ;;
461 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
462 | --libexe=* | --libex=* | --libe=*)
463 libexecdir=$ac_optarg ;;
464
465 -localstatedir | --localstatedir | --localstatedi | --localstated \
466 | --localstate | --localstat | --localsta | --localst \
467 | --locals | --local | --loca | --loc | --lo)
468 ac_prev=localstatedir ;;
469 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
470 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
471 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
472 localstatedir=$ac_optarg ;;
473
474 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
475 ac_prev=mandir ;;
476 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
477 mandir=$ac_optarg ;;
478
479 -nfp | --nfp | --nf)
480 # Obsolete; use --without-fp.
481 with_fp=no ;;
482
483 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484 | --no-cr | --no-c | -n)
485 no_create=yes ;;
486
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
489 no_recursion=yes ;;
490
491 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
492 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
493 | --oldin | --oldi | --old | --ol | --o)
494 ac_prev=oldincludedir ;;
495 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
496 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
497 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
498 oldincludedir=$ac_optarg ;;
499
500 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
501 ac_prev=prefix ;;
502 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503 prefix=$ac_optarg ;;
504
505 -program-prefix | --program-prefix | --program-prefi | --program-pref \
506 | --program-pre | --program-pr | --program-p)
507 ac_prev=program_prefix ;;
508 -program-prefix=* | --program-prefix=* | --program-prefi=* \
509 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
510 program_prefix=$ac_optarg ;;
511
512 -program-suffix | --program-suffix | --program-suffi | --program-suff \
513 | --program-suf | --program-su | --program-s)
514 ac_prev=program_suffix ;;
515 -program-suffix=* | --program-suffix=* | --program-suffi=* \
516 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
517 program_suffix=$ac_optarg ;;
518
519 -program-transform-name | --program-transform-name \
520 | --program-transform-nam | --program-transform-na \
521 | --program-transform-n | --program-transform- \
522 | --program-transform | --program-transfor \
523 | --program-transfo | --program-transf \
524 | --program-trans | --program-tran \
525 | --progr-tra | --program-tr | --program-t)
526 ac_prev=program_transform_name ;;
527 -program-transform-name=* | --program-transform-name=* \
528 | --program-transform-nam=* | --program-transform-na=* \
529 | --program-transform-n=* | --program-transform-=* \
530 | --program-transform=* | --program-transfor=* \
531 | --program-transfo=* | --program-transf=* \
532 | --program-trans=* | --program-tran=* \
533 | --progr-tra=* | --program-tr=* | --program-t=*)
534 program_transform_name=$ac_optarg ;;
535
536 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
537 | -silent | --silent | --silen | --sile | --sil)
538 silent=yes ;;
539
540 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
541 ac_prev=sbindir ;;
542 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
543 | --sbi=* | --sb=*)
544 sbindir=$ac_optarg ;;
545
546 -sharedstatedir | --sharedstatedir | --sharedstatedi \
547 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
548 | --sharedst | --shareds | --shared | --share | --shar \
549 | --sha | --sh)
550 ac_prev=sharedstatedir ;;
551 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
552 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
553 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
554 | --sha=* | --sh=*)
555 sharedstatedir=$ac_optarg ;;
556
557 -site | --site | --sit)
558 ac_prev=site ;;
559 -site=* | --site=* | --sit=*)
560 site=$ac_optarg ;;
561
562 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
563 ac_prev=srcdir ;;
564 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
565 srcdir=$ac_optarg ;;
566
567 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
568 | --syscon | --sysco | --sysc | --sys | --sy)
569 ac_prev=sysconfdir ;;
570 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
571 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
572 sysconfdir=$ac_optarg ;;
573
574 -target | --target | --targe | --targ | --tar | --ta | --t)
575 ac_prev=target_alias ;;
576 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
577 target_alias=$ac_optarg ;;
578
579 -v | -verbose | --verbose | --verbos | --verbo | --verb)
580 verbose=yes ;;
581
582 -version | --version | --versio | --versi | --vers | -V)
583 ac_init_version=: ;;
584
585 -with-* | --with-*)
586 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
587 # Reject names that are not valid shell variable names.
588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package| sed 's/-/_/g'`
592 case $ac_option in
593 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
594 *) ac_optarg=yes ;;
595 esac
596 eval "with_$ac_package='$ac_optarg'" ;;
597
598 -without-* | --without-*)
599 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
600 # Reject names that are not valid shell variable names.
601 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
602 { echo "$as_me: error: invalid package name: $ac_package" >&2
603 { (exit 1); exit 1; }; }
604 ac_package=`echo $ac_package | sed 's/-/_/g'`
605 eval "with_$ac_package=no" ;;
606
607 --x)
608 # Obsolete; use --with-x.
609 with_x=yes ;;
610
611 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
612 | --x-incl | --x-inc | --x-in | --x-i)
613 ac_prev=x_includes ;;
614 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
615 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
616 x_includes=$ac_optarg ;;
617
618 -x-libraries | --x-libraries | --x-librarie | --x-librari \
619 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
620 ac_prev=x_libraries ;;
621 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
622 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
623 x_libraries=$ac_optarg ;;
624
625 -*) { echo "$as_me: error: unrecognized option: $ac_option
626Try \`$0 --help' for more information." >&2
627 { (exit 1); exit 1; }; }
628 ;;
629
630 *=*)
631 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
632 # Reject names that are not valid shell variable names.
633 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
634 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
635 { (exit 1); exit 1; }; }
636 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
637 eval "$ac_envvar='$ac_optarg'"
638 export $ac_envvar ;;
639
640 *)
641 # FIXME: should be removed in autoconf 3.0.
642 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
643 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
644 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
645 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
646 ;;
647
648 esac
649done
650
651if test -n "$ac_prev"; then
652 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
653 { echo "$as_me: error: missing argument to $ac_option" >&2
654 { (exit 1); exit 1; }; }
655fi
656
657# Be sure to have absolute paths.
658for ac_var in exec_prefix prefix
659do
660 eval ac_val=$`echo $ac_var`
661 case $ac_val in
662 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
663 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
664 { (exit 1); exit 1; }; };;
665 esac
666done
667
668# Be sure to have absolute paths.
669for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
670 localstatedir libdir includedir oldincludedir infodir mandir
671do
672 eval ac_val=$`echo $ac_var`
673 case $ac_val in
674 [\\/$]* | ?:[\\/]* ) ;;
675 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
676 { (exit 1); exit 1; }; };;
677 esac
678done
679
680# There might be people who depend on the old broken behavior: `$host'
681# used to hold the argument of --host etc.
682# FIXME: To remove some day.
683build=$build_alias
684host=$host_alias
685target=$target_alias
686
687# FIXME: To remove some day.
688if test "x$host_alias" != x; then
689 if test "x$build_alias" = x; then
690 cross_compiling=maybe
691 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
692 If a cross compiler is detected then cross compile mode will be used." >&2
693 elif test "x$build_alias" != "x$host_alias"; then
694 cross_compiling=yes
695 fi
696fi
697
698ac_tool_prefix=
699test -n "$host_alias" && ac_tool_prefix=$host_alias-
700
701test "$silent" = yes && exec 6>/dev/null
702
703
704# Find the source files, if location was not specified.
705if test -z "$srcdir"; then
706 ac_srcdir_defaulted=yes
707 # Try the directory containing this script, then its parent.
708 ac_confdir=`(dirname "$0") 2>/dev/null ||
709$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
710 X"$0" : 'X\(//\)[^/]' \| \
711 X"$0" : 'X\(//\)$' \| \
712 X"$0" : 'X\(/\)' \| \
713 . : '\(.\)' 2>/dev/null ||
714echo X"$0" |
715 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
716 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
717 /^X\(\/\/\)$/{ s//\1/; q; }
718 /^X\(\/\).*/{ s//\1/; q; }
719 s/.*/./; q'`
720 srcdir=$ac_confdir
721 if test ! -r $srcdir/$ac_unique_file; then
722 srcdir=..
723 fi
724else
725 ac_srcdir_defaulted=no
726fi
727if test ! -r $srcdir/$ac_unique_file; then
728 if test "$ac_srcdir_defaulted" = yes; then
729 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
730 { (exit 1); exit 1; }; }
731 else
732 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
733 { (exit 1); exit 1; }; }
734 fi
735fi
736(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
737 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
738 { (exit 1); exit 1; }; }
739srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
740ac_env_build_alias_set=${build_alias+set}
741ac_env_build_alias_value=$build_alias
742ac_cv_env_build_alias_set=${build_alias+set}
743ac_cv_env_build_alias_value=$build_alias
744ac_env_host_alias_set=${host_alias+set}
745ac_env_host_alias_value=$host_alias
746ac_cv_env_host_alias_set=${host_alias+set}
747ac_cv_env_host_alias_value=$host_alias
748ac_env_target_alias_set=${target_alias+set}
749ac_env_target_alias_value=$target_alias
750ac_cv_env_target_alias_set=${target_alias+set}
751ac_cv_env_target_alias_value=$target_alias
752ac_env_CC_set=${CC+set}
753ac_env_CC_value=$CC
754ac_cv_env_CC_set=${CC+set}
755ac_cv_env_CC_value=$CC
756ac_env_CFLAGS_set=${CFLAGS+set}
757ac_env_CFLAGS_value=$CFLAGS
758ac_cv_env_CFLAGS_set=${CFLAGS+set}
759ac_cv_env_CFLAGS_value=$CFLAGS
760ac_env_LDFLAGS_set=${LDFLAGS+set}
761ac_env_LDFLAGS_value=$LDFLAGS
762ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
763ac_cv_env_LDFLAGS_value=$LDFLAGS
764ac_env_CPPFLAGS_set=${CPPFLAGS+set}
765ac_env_CPPFLAGS_value=$CPPFLAGS
766ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_cv_env_CPPFLAGS_value=$CPPFLAGS
768ac_env_CPP_set=${CPP+set}
769ac_env_CPP_value=$CPP
770ac_cv_env_CPP_set=${CPP+set}
771ac_cv_env_CPP_value=$CPP
772
773#
774# Report the --help message.
775#
776if test "$ac_init_help" = "long"; then
777 # Omit some internal or obsolete options to make the list less imposing.
778 # This message is too long to be a string in the A/UX 3.1 sh.
779 cat <<_ACEOF
780\`configure' configures this package to adapt to many kinds of systems.
781
782Usage: $0 [OPTION]... [VAR=VALUE]...
783
784To assign environment variables (e.g., CC, CFLAGS...), specify them as
785VAR=VALUE. See below for descriptions of some of the useful variables.
786
787Defaults for the options are specified in brackets.
788
789Configuration:
790 -h, --help display this help and exit
791 --help=short display options specific to this package
792 --help=recursive display the short help of all the included packages
793 -V, --version display version information and exit
794 -q, --quiet, --silent do not print \`checking...' messages
795 --cache-file=FILE cache test results in FILE [disabled]
796 -C, --config-cache alias for \`--cache-file=config.cache'
797 -n, --no-create do not create output files
798 --srcdir=DIR find the sources in DIR [configure dir or \`..']
799
800_ACEOF
801
802 cat <<_ACEOF
803Installation directories:
804 --prefix=PREFIX install architecture-independent files in PREFIX
805 [$ac_default_prefix]
806 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
807 [PREFIX]
808
809By default, \`make install' will install all the files in
810\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
811an installation prefix other than \`$ac_default_prefix' using \`--prefix',
812for instance \`--prefix=\$HOME'.
813
814For better control, use the options below.
815
816Fine tuning of the installation directories:
817 --bindir=DIR user executables [EPREFIX/bin]
818 --sbindir=DIR system admin executables [EPREFIX/sbin]
819 --libexecdir=DIR program executables [EPREFIX/libexec]
820 --datadir=DIR read-only architecture-independent data [PREFIX/share]
821 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
822 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
823 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
824 --libdir=DIR object code libraries [EPREFIX/lib]
825 --includedir=DIR C header files [PREFIX/include]
826 --oldincludedir=DIR C header files for non-gcc [/usr/include]
827 --infodir=DIR info documentation [PREFIX/info]
828 --mandir=DIR man documentation [PREFIX/man]
829_ACEOF
830
831 cat <<\_ACEOF
832
833System types:
834 --build=BUILD configure for building on BUILD [guessed]
835 --host=HOST cross-compile to build programs to run on HOST [BUILD]
836_ACEOF
837fi
838
839if test -n "$ac_init_help"; then
840
841 cat <<\_ACEOF
842
843Optional Features:
844 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
845 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
846 --disable-largefile omit support for large files
847 --disable-strip Disable calling strip(1) on install
848 --disable-lastlog disable use of lastlog even if detected no
849 --disable-utmp disable use of utmp even if detected no
850 --disable-utmpx disable use of utmpx even if detected no
851 --disable-wtmp disable use of wtmp even if detected no
852 --disable-wtmpx disable use of wtmpx even if detected no
853 --disable-libutil disable use of libutil (login() etc.) no
854 --disable-pututline disable use of pututline() etc. (uwtmp) no
855 --disable-pututxline disable use of pututxline() etc. (uwtmpx) no
856
857Optional Packages:
858 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
859 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
860 --with-osfsia Enable Digital Unix SIA
861 --with-cflags Specify additional flags to pass to compiler
862 --with-cppflags Specify additional flags to pass to preprocessor
863 --with-ldflags Specify additional flags to pass to linker
864 --with-libs Specify additional libraries to link with
865 --without-rpath Disable auto-added -R linker paths
866 --with-zlib=PATH Use zlib in PATH
867 --with-skey[=PATH] Enable S/Key support
868 (optionally in PATH)
869 --with-tcp-wrappers[=PATH] Enable tcpwrappers support
870 (optionally in PATH)
871 --with-pam Enable PAM support
872 --with-ssl-dir=PATH Specify path to OpenSSL installation
873 --with-rand-helper Use subprocess to gather strong randomness
874 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT
875 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
876 --with-entropy-timeout Specify entropy gathering command timeout (msec)
877 --with-privsep-user=user Specify non-privileged user for privilege separation
878 --with-sectok Enable smartcard support using libsectok
879 --with-opensc=PFX Enable smartcard support using OpenSC
880 --with-kerberos5=PATH Enable Kerberos 5 support
881 --with-kerberos4=PATH Enable Kerberos 4 support
882 --with-afs=PATH Enable AFS support
883 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
884 --with-xauth=PATH Specify path to xauth program
885 --with-mantype=man|cat|doc Set man page type
886 --with-md5-passwords Enable use of MD5 passwords
887 --without-shadow Disable shadow password support
888 --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY
889 --with-default-path= Specify default \$PATH environment for server
890 --with-superuser-path= Specify different path for super-user
891 --with-ipv4-default Use IPv4 by connections unless '-6' specified
892 --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses
893 --with-bsd-auth Enable BSD auth support
894 --with-pid-dir=PATH Specify location of ssh.pid file
895 --with-lastlog=FILE|DIR specify lastlog location common locations
896
897Some influential environment variables:
898 CC C compiler command
899 CFLAGS C compiler flags
900 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
901 nonstandard directory <lib dir>
902 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
903 headers in a nonstandard directory <include dir>
904 CPP C preprocessor
905
906Use these variables to override the choices made by `configure' or to help
907it to find libraries and programs with nonstandard names/locations.
908
909_ACEOF
910fi
911
912if test "$ac_init_help" = "recursive"; then
913 # If there are subdirs, report their specific --help.
914 ac_popdir=`pwd`
915 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
916 test -d $ac_dir || continue
917 ac_builddir=.
918
919if test "$ac_dir" != .; then
920 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
921 # A "../" for each directory in $ac_dir_suffix.
922 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
923else
924 ac_dir_suffix= ac_top_builddir=
925fi
926
927case $srcdir in
928 .) # No --srcdir option. We are building in place.
929 ac_srcdir=.
930 if test -z "$ac_top_builddir"; then
931 ac_top_srcdir=.
932 else
933 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
934 fi ;;
935 [\\/]* | ?:[\\/]* ) # Absolute path.
936 ac_srcdir=$srcdir$ac_dir_suffix;
937 ac_top_srcdir=$srcdir ;;
938 *) # Relative path.
939 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
940 ac_top_srcdir=$ac_top_builddir$srcdir ;;
941esac
942# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
943# absolute.
944ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
945ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
946ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
947ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
948
949 cd $ac_dir
950 # Check for guested configure; otherwise get Cygnus style configure.
951 if test -f $ac_srcdir/configure.gnu; then
952 echo
953 $SHELL $ac_srcdir/configure.gnu --help=recursive
954 elif test -f $ac_srcdir/configure; then
955 echo
956 $SHELL $ac_srcdir/configure --help=recursive
957 elif test -f $ac_srcdir/configure.ac ||
958 test -f $ac_srcdir/configure.in; then
959 echo
960 $ac_configure --help
961 else
962 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
963 fi
964 cd $ac_popdir
965 done
966fi
967
968test -n "$ac_init_help" && exit 0
969if $ac_init_version; then
970 cat <<\_ACEOF
971
972Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
973Free Software Foundation, Inc.
974This configure script is free software; the Free Software Foundation
975gives unlimited permission to copy, distribute and modify it.
976_ACEOF
977 exit 0
978fi
979exec 5>config.log
980cat >&5 <<_ACEOF
981This file contains any messages produced by compilers while
982running configure, to aid debugging if configure makes a mistake.
983
984It was created by $as_me, which was
985generated by GNU Autoconf 2.57. Invocation command line was
986
987 $ $0 $@
988
989_ACEOF
990{
991cat <<_ASUNAME
992@%:@@%:@ --------- @%:@@%:@
993@%:@@%:@ Platform. @%:@@%:@
994@%:@@%:@ --------- @%:@@%:@
995
996hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
997uname -m = `(uname -m) 2>/dev/null || echo unknown`
998uname -r = `(uname -r) 2>/dev/null || echo unknown`
999uname -s = `(uname -s) 2>/dev/null || echo unknown`
1000uname -v = `(uname -v) 2>/dev/null || echo unknown`
1001
1002/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1003/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1004
1005/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1006/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1007/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1008hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1009/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1010/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1011/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1012
1013_ASUNAME
1014
1015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1016for as_dir in $PATH
1017do
1018 IFS=$as_save_IFS
1019 test -z "$as_dir" && as_dir=.
1020 echo "PATH: $as_dir"
1021done
1022
1023} >&5
1024
1025cat >&5 <<_ACEOF
1026
1027
1028@%:@@%:@ ----------- @%:@@%:@
1029@%:@@%:@ Core tests. @%:@@%:@
1030@%:@@%:@ ----------- @%:@@%:@
1031
1032_ACEOF
1033
1034
1035# Keep a trace of the command line.
1036# Strip out --no-create and --no-recursion so they do not pile up.
1037# Strip out --silent because we don't want to record it for future runs.
1038# Also quote any args containing shell meta-characters.
1039# Make two passes to allow for proper duplicate-argument suppression.
1040ac_configure_args=
1041ac_configure_args0=
1042ac_configure_args1=
1043ac_sep=
1044ac_must_keep_next=false
1045for ac_pass in 1 2
1046do
1047 for ac_arg
1048 do
1049 case $ac_arg in
1050 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1052 | -silent | --silent | --silen | --sile | --sil)
1053 continue ;;
1054 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1055 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1056 esac
1057 case $ac_pass in
1058 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1059 2)
1060 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1061 if test $ac_must_keep_next = true; then
1062 ac_must_keep_next=false # Got value, back to normal.
1063 else
1064 case $ac_arg in
1065 *=* | --config-cache | -C | -disable-* | --disable-* \
1066 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1067 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1068 | -with-* | --with-* | -without-* | --without-* | --x)
1069 case "$ac_configure_args0 " in
1070 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1071 esac
1072 ;;
1073 -* ) ac_must_keep_next=true ;;
1074 esac
1075 fi
1076 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1077 # Get rid of the leading space.
1078 ac_sep=" "
1079 ;;
1080 esac
1081 done
1082done
1083$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1084$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1085
1086# When interrupted or exit'd, cleanup temporary files, and complete
1087# config.log. We remove comments because anyway the quotes in there
1088# would cause problems or look ugly.
1089# WARNING: Be sure not to use single quotes in there, as some shells,
1090# such as our DU 5.0 friend, will then `close' the trap.
1091trap 'exit_status=$?
1092 # Save into config.log some information that might help in debugging.
1093 {
1094 echo
1095
1096 cat <<\_ASBOX
1097@%:@@%:@ ---------------- @%:@@%:@
1098@%:@@%:@ Cache variables. @%:@@%:@
1099@%:@@%:@ ---------------- @%:@@%:@
1100_ASBOX
1101 echo
1102 # The following way of writing the cache mishandles newlines in values,
1103{
1104 (set) 2>&1 |
1105 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1106 *ac_space=\ *)
1107 sed -n \
1108 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1109 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1110 ;;
1111 *)
1112 sed -n \
1113 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1114 ;;
1115 esac;
1116}
1117 echo
1118
1119 cat <<\_ASBOX
1120@%:@@%:@ ----------------- @%:@@%:@
1121@%:@@%:@ Output variables. @%:@@%:@
1122@%:@@%:@ ----------------- @%:@@%:@
1123_ASBOX
1124 echo
1125 for ac_var in $ac_subst_vars
1126 do
1127 eval ac_val=$`echo $ac_var`
1128 echo "$ac_var='"'"'$ac_val'"'"'"
1129 done | sort
1130 echo
1131
1132 if test -n "$ac_subst_files"; then
1133 cat <<\_ASBOX
1134@%:@@%:@ ------------- @%:@@%:@
1135@%:@@%:@ Output files. @%:@@%:@
1136@%:@@%:@ ------------- @%:@@%:@
1137_ASBOX
1138 echo
1139 for ac_var in $ac_subst_files
1140 do
1141 eval ac_val=$`echo $ac_var`
1142 echo "$ac_var='"'"'$ac_val'"'"'"
1143 done | sort
1144 echo
1145 fi
1146
1147 if test -s confdefs.h; then
1148 cat <<\_ASBOX
1149@%:@@%:@ ----------- @%:@@%:@
1150@%:@@%:@ confdefs.h. @%:@@%:@
1151@%:@@%:@ ----------- @%:@@%:@
1152_ASBOX
1153 echo
1154 sed "/^$/d" confdefs.h | sort
1155 echo
1156 fi
1157 test "$ac_signal" != 0 &&
1158 echo "$as_me: caught signal $ac_signal"
1159 echo "$as_me: exit $exit_status"
1160 } >&5
1161 rm -f core core.* *.core &&
1162 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1163 exit $exit_status
1164 ' 0
1165for ac_signal in 1 2 13 15; do
1166 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1167done
1168ac_signal=0
1169
1170# confdefs.h avoids OS command line length limits that DEFS can exceed.
1171rm -rf conftest* confdefs.h
1172# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1173echo >confdefs.h
1174
1175# Predefined preprocessor variables.
1176
1177cat >>confdefs.h <<_ACEOF
1178@%:@define PACKAGE_NAME "$PACKAGE_NAME"
1179_ACEOF
1180
1181
1182cat >>confdefs.h <<_ACEOF
1183@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1184_ACEOF
1185
1186
1187cat >>confdefs.h <<_ACEOF
1188@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
1189_ACEOF
1190
1191
1192cat >>confdefs.h <<_ACEOF
1193@%:@define PACKAGE_STRING "$PACKAGE_STRING"
1194_ACEOF
1195
1196
1197cat >>confdefs.h <<_ACEOF
1198@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1199_ACEOF
1200
1201
1202# Let the site file select an alternate cache file if it wants to.
1203# Prefer explicitly selected file to automatically selected ones.
1204if test -z "$CONFIG_SITE"; then
1205 if test "x$prefix" != xNONE; then
1206 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1207 else
1208 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1209 fi
1210fi
1211for ac_site_file in $CONFIG_SITE; do
1212 if test -r "$ac_site_file"; then
1213 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1214echo "$as_me: loading site script $ac_site_file" >&6;}
1215 sed 's/^/| /' "$ac_site_file" >&5
1216 . "$ac_site_file"
1217 fi
1218done
1219
1220if test -r "$cache_file"; then
1221 # Some versions of bash will fail to source /dev/null (special
1222 # files actually), so we avoid doing that.
1223 if test -f "$cache_file"; then
1224 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1225echo "$as_me: loading cache $cache_file" >&6;}
1226 case $cache_file in
1227 [\\/]* | ?:[\\/]* ) . $cache_file;;
1228 *) . ./$cache_file;;
1229 esac
1230 fi
1231else
1232 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1233echo "$as_me: creating cache $cache_file" >&6;}
1234 >$cache_file
1235fi
1236
1237# Check that the precious variables saved in the cache have kept the same
1238# value.
1239ac_cache_corrupted=false
1240for ac_var in `(set) 2>&1 |
1241 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1242 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1243 eval ac_new_set=\$ac_env_${ac_var}_set
1244 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1245 eval ac_new_val="\$ac_env_${ac_var}_value"
1246 case $ac_old_set,$ac_new_set in
1247 set,)
1248 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1249echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1250 ac_cache_corrupted=: ;;
1251 ,set)
1252 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1253echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1254 ac_cache_corrupted=: ;;
1255 ,);;
1256 *)
1257 if test "x$ac_old_val" != "x$ac_new_val"; then
1258 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1259echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1260 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1261echo "$as_me: former value: $ac_old_val" >&2;}
1262 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1263echo "$as_me: current value: $ac_new_val" >&2;}
1264 ac_cache_corrupted=:
1265 fi;;
1266 esac
1267 # Pass precious variables to config.status.
1268 if test "$ac_new_set" = set; then
1269 case $ac_new_val in
1270 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1271 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1272 *) ac_arg=$ac_var=$ac_new_val ;;
1273 esac
1274 case " $ac_configure_args " in
1275 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1276 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1277 esac
1278 fi
1279done
1280if $ac_cache_corrupted; then
1281 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1282echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1283 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1284echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1285 { (exit 1); exit 1; }; }
1286fi
1287
1288ac_ext=c
1289ac_cpp='$CPP $CPPFLAGS'
1290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1292ac_compiler_gnu=$ac_cv_c_compiler_gnu
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314 ac_config_headers="$ac_config_headers config.h"
1315
1316ac_ext=c
1317ac_cpp='$CPP $CPPFLAGS'
1318ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1319ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1320ac_compiler_gnu=$ac_cv_c_compiler_gnu
1321if test -n "$ac_tool_prefix"; then
1322 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1323set dummy ${ac_tool_prefix}gcc; ac_word=$2
1324echo "$as_me:$LINENO: checking for $ac_word" >&5
1325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1326if test "${ac_cv_prog_CC+set}" = set; then
1327 echo $ECHO_N "(cached) $ECHO_C" >&6
1328else
1329 if test -n "$CC"; then
1330 ac_cv_prog_CC="$CC" # Let the user override the test.
1331else
1332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1333for as_dir in $PATH
1334do
1335 IFS=$as_save_IFS
1336 test -z "$as_dir" && as_dir=.
1337 for ac_exec_ext in '' $ac_executable_extensions; do
1338 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1339 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1341 break 2
1342 fi
1343done
1344done
1345
1346fi
1347fi
1348CC=$ac_cv_prog_CC
1349if test -n "$CC"; then
1350 echo "$as_me:$LINENO: result: $CC" >&5
1351echo "${ECHO_T}$CC" >&6
1352else
1353 echo "$as_me:$LINENO: result: no" >&5
1354echo "${ECHO_T}no" >&6
1355fi
1356
1357fi
1358if test -z "$ac_cv_prog_CC"; then
1359 ac_ct_CC=$CC
1360 # Extract the first word of "gcc", so it can be a program name with args.
1361set dummy gcc; ac_word=$2
1362echo "$as_me:$LINENO: checking for $ac_word" >&5
1363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1364if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1365 echo $ECHO_N "(cached) $ECHO_C" >&6
1366else
1367 if test -n "$ac_ct_CC"; then
1368 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1369else
1370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1371for as_dir in $PATH
1372do
1373 IFS=$as_save_IFS
1374 test -z "$as_dir" && as_dir=.
1375 for ac_exec_ext in '' $ac_executable_extensions; do
1376 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1377 ac_cv_prog_ac_ct_CC="gcc"
1378 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1379 break 2
1380 fi
1381done
1382done
1383
1384fi
1385fi
1386ac_ct_CC=$ac_cv_prog_ac_ct_CC
1387if test -n "$ac_ct_CC"; then
1388 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1389echo "${ECHO_T}$ac_ct_CC" >&6
1390else
1391 echo "$as_me:$LINENO: result: no" >&5
1392echo "${ECHO_T}no" >&6
1393fi
1394
1395 CC=$ac_ct_CC
1396else
1397 CC="$ac_cv_prog_CC"
1398fi
1399
1400if test -z "$CC"; then
1401 if test -n "$ac_tool_prefix"; then
1402 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1403set dummy ${ac_tool_prefix}cc; ac_word=$2
1404echo "$as_me:$LINENO: checking for $ac_word" >&5
1405echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1406if test "${ac_cv_prog_CC+set}" = set; then
1407 echo $ECHO_N "(cached) $ECHO_C" >&6
1408else
1409 if test -n "$CC"; then
1410 ac_cv_prog_CC="$CC" # Let the user override the test.
1411else
1412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1413for as_dir in $PATH
1414do
1415 IFS=$as_save_IFS
1416 test -z "$as_dir" && as_dir=.
1417 for ac_exec_ext in '' $ac_executable_extensions; do
1418 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1419 ac_cv_prog_CC="${ac_tool_prefix}cc"
1420 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1421 break 2
1422 fi
1423done
1424done
1425
1426fi
1427fi
1428CC=$ac_cv_prog_CC
1429if test -n "$CC"; then
1430 echo "$as_me:$LINENO: result: $CC" >&5
1431echo "${ECHO_T}$CC" >&6
1432else
1433 echo "$as_me:$LINENO: result: no" >&5
1434echo "${ECHO_T}no" >&6
1435fi
1436
1437fi
1438if test -z "$ac_cv_prog_CC"; then
1439 ac_ct_CC=$CC
1440 # Extract the first word of "cc", so it can be a program name with args.
1441set dummy cc; ac_word=$2
1442echo "$as_me:$LINENO: checking for $ac_word" >&5
1443echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1444if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1445 echo $ECHO_N "(cached) $ECHO_C" >&6
1446else
1447 if test -n "$ac_ct_CC"; then
1448 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1449else
1450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1451for as_dir in $PATH
1452do
1453 IFS=$as_save_IFS
1454 test -z "$as_dir" && as_dir=.
1455 for ac_exec_ext in '' $ac_executable_extensions; do
1456 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1457 ac_cv_prog_ac_ct_CC="cc"
1458 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1459 break 2
1460 fi
1461done
1462done
1463
1464fi
1465fi
1466ac_ct_CC=$ac_cv_prog_ac_ct_CC
1467if test -n "$ac_ct_CC"; then
1468 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1469echo "${ECHO_T}$ac_ct_CC" >&6
1470else
1471 echo "$as_me:$LINENO: result: no" >&5
1472echo "${ECHO_T}no" >&6
1473fi
1474
1475 CC=$ac_ct_CC
1476else
1477 CC="$ac_cv_prog_CC"
1478fi
1479
1480fi
1481if test -z "$CC"; then
1482 # Extract the first word of "cc", so it can be a program name with args.
1483set dummy cc; ac_word=$2
1484echo "$as_me:$LINENO: checking for $ac_word" >&5
1485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1486if test "${ac_cv_prog_CC+set}" = set; then
1487 echo $ECHO_N "(cached) $ECHO_C" >&6
1488else
1489 if test -n "$CC"; then
1490 ac_cv_prog_CC="$CC" # Let the user override the test.
1491else
1492 ac_prog_rejected=no
1493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1494for as_dir in $PATH
1495do
1496 IFS=$as_save_IFS
1497 test -z "$as_dir" && as_dir=.
1498 for ac_exec_ext in '' $ac_executable_extensions; do
1499 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1500 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1501 ac_prog_rejected=yes
1502 continue
1503 fi
1504 ac_cv_prog_CC="cc"
1505 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1506 break 2
1507 fi
1508done
1509done
1510
1511if test $ac_prog_rejected = yes; then
1512 # We found a bogon in the path, so make sure we never use it.
1513 set dummy $ac_cv_prog_CC
1514 shift
1515 if test $@%:@ != 0; then
1516 # We chose a different compiler from the bogus one.
1517 # However, it has the same basename, so the bogon will be chosen
1518 # first if we set CC to just the basename; use the full file name.
1519 shift
1520 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1521 fi
1522fi
1523fi
1524fi
1525CC=$ac_cv_prog_CC
1526if test -n "$CC"; then
1527 echo "$as_me:$LINENO: result: $CC" >&5
1528echo "${ECHO_T}$CC" >&6
1529else
1530 echo "$as_me:$LINENO: result: no" >&5
1531echo "${ECHO_T}no" >&6
1532fi
1533
1534fi
1535if test -z "$CC"; then
1536 if test -n "$ac_tool_prefix"; then
1537 for ac_prog in cl
1538 do
1539 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1540set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1541echo "$as_me:$LINENO: checking for $ac_word" >&5
1542echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1543if test "${ac_cv_prog_CC+set}" = set; then
1544 echo $ECHO_N "(cached) $ECHO_C" >&6
1545else
1546 if test -n "$CC"; then
1547 ac_cv_prog_CC="$CC" # Let the user override the test.
1548else
1549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1550for as_dir in $PATH
1551do
1552 IFS=$as_save_IFS
1553 test -z "$as_dir" && as_dir=.
1554 for ac_exec_ext in '' $ac_executable_extensions; do
1555 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1556 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1557 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1558 break 2
1559 fi
1560done
1561done
1562
1563fi
1564fi
1565CC=$ac_cv_prog_CC
1566if test -n "$CC"; then
1567 echo "$as_me:$LINENO: result: $CC" >&5
1568echo "${ECHO_T}$CC" >&6
1569else
1570 echo "$as_me:$LINENO: result: no" >&5
1571echo "${ECHO_T}no" >&6
1572fi
1573
1574 test -n "$CC" && break
1575 done
1576fi
1577if test -z "$CC"; then
1578 ac_ct_CC=$CC
1579 for ac_prog in cl
1580do
1581 # Extract the first word of "$ac_prog", so it can be a program name with args.
1582set dummy $ac_prog; ac_word=$2
1583echo "$as_me:$LINENO: checking for $ac_word" >&5
1584echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1585if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1586 echo $ECHO_N "(cached) $ECHO_C" >&6
1587else
1588 if test -n "$ac_ct_CC"; then
1589 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1590else
1591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1592for as_dir in $PATH
1593do
1594 IFS=$as_save_IFS
1595 test -z "$as_dir" && as_dir=.
1596 for ac_exec_ext in '' $ac_executable_extensions; do
1597 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1598 ac_cv_prog_ac_ct_CC="$ac_prog"
1599 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1600 break 2
1601 fi
1602done
1603done
1604
1605fi
1606fi
1607ac_ct_CC=$ac_cv_prog_ac_ct_CC
1608if test -n "$ac_ct_CC"; then
1609 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1610echo "${ECHO_T}$ac_ct_CC" >&6
1611else
1612 echo "$as_me:$LINENO: result: no" >&5
1613echo "${ECHO_T}no" >&6
1614fi
1615
1616 test -n "$ac_ct_CC" && break
1617done
1618
1619 CC=$ac_ct_CC
1620fi
1621
1622fi
1623
1624
1625test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1626See \`config.log' for more details." >&5
1627echo "$as_me: error: no acceptable C compiler found in \$PATH
1628See \`config.log' for more details." >&2;}
1629 { (exit 1); exit 1; }; }
1630
1631# Provide some information about the compiler.
1632echo "$as_me:$LINENO:" \
1633 "checking for C compiler version" >&5
1634ac_compiler=`set X $ac_compile; echo $2`
1635{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1636 (eval $ac_compiler --version </dev/null >&5) 2>&5
1637 ac_status=$?
1638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1639 (exit $ac_status); }
1640{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1641 (eval $ac_compiler -v </dev/null >&5) 2>&5
1642 ac_status=$?
1643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1644 (exit $ac_status); }
1645{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1646 (eval $ac_compiler -V </dev/null >&5) 2>&5
1647 ac_status=$?
1648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1649 (exit $ac_status); }
1650
1651cat >conftest.$ac_ext <<_ACEOF
1652#line $LINENO "configure"
1653/* confdefs.h. */
1654_ACEOF
1655cat confdefs.h >>conftest.$ac_ext
1656cat >>conftest.$ac_ext <<_ACEOF
1657/* end confdefs.h. */
1658
1659int
1660main ()
1661{
1662
1663 ;
1664 return 0;
1665}
1666_ACEOF
1667ac_clean_files_save=$ac_clean_files
1668ac_clean_files="$ac_clean_files a.out a.exe b.out"
1669# Try to create an executable without -o first, disregard a.out.
1670# It will help us diagnose broken compilers, and finding out an intuition
1671# of exeext.
1672echo "$as_me:$LINENO: checking for C compiler default output" >&5
1673echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1674ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1675if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1676 (eval $ac_link_default) 2>&5
1677 ac_status=$?
1678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1679 (exit $ac_status); }; then
1680 # Find the output, starting from the most likely. This scheme is
1681# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1682# resort.
1683
1684# Be careful to initialize this variable, since it used to be cached.
1685# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1686ac_cv_exeext=
1687# b.out is created by i960 compilers.
1688for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1689do
1690 test -f "$ac_file" || continue
1691 case $ac_file in
1692 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1693 ;;
1694 conftest.$ac_ext )
1695 # This is the source file.
1696 ;;
1697 [ab].out )
1698 # We found the default executable, but exeext='' is most
1699 # certainly right.
1700 break;;
1701 *.* )
1702 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1703 # FIXME: I believe we export ac_cv_exeext for Libtool,
1704 # but it would be cool to find out if it's true. Does anybody
1705 # maintain Libtool? --akim.
1706 export ac_cv_exeext
1707 break;;
1708 * )
1709 break;;
1710 esac
1711done
1712else
1713 echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1717See \`config.log' for more details." >&5
1718echo "$as_me: error: C compiler cannot create executables
1719See \`config.log' for more details." >&2;}
1720 { (exit 77); exit 77; }; }
1721fi
1722
1723ac_exeext=$ac_cv_exeext
1724echo "$as_me:$LINENO: result: $ac_file" >&5
1725echo "${ECHO_T}$ac_file" >&6
1726
1727# Check the compiler produces executables we can run. If not, either
1728# the compiler is broken, or we cross compile.
1729echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1730echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1731# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1732# If not cross compiling, check that we can run a simple program.
1733if test "$cross_compiling" != yes; then
1734 if { ac_try='./$ac_file'
1735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1736 (eval $ac_try) 2>&5
1737 ac_status=$?
1738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1739 (exit $ac_status); }; }; then
1740 cross_compiling=no
1741 else
1742 if test "$cross_compiling" = maybe; then
1743 cross_compiling=yes
1744 else
1745 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1746If you meant to cross compile, use \`--host'.
1747See \`config.log' for more details." >&5
1748echo "$as_me: error: cannot run C compiled programs.
1749If you meant to cross compile, use \`--host'.
1750See \`config.log' for more details." >&2;}
1751 { (exit 1); exit 1; }; }
1752 fi
1753 fi
1754fi
1755echo "$as_me:$LINENO: result: yes" >&5
1756echo "${ECHO_T}yes" >&6
1757
1758rm -f a.out a.exe conftest$ac_cv_exeext b.out
1759ac_clean_files=$ac_clean_files_save
1760# Check the compiler produces executables we can run. If not, either
1761# the compiler is broken, or we cross compile.
1762echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1763echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1764echo "$as_me:$LINENO: result: $cross_compiling" >&5
1765echo "${ECHO_T}$cross_compiling" >&6
1766
1767echo "$as_me:$LINENO: checking for suffix of executables" >&5
1768echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1770 (eval $ac_link) 2>&5
1771 ac_status=$?
1772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1773 (exit $ac_status); }; then
1774 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1775# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1776# work properly (i.e., refer to `conftest.exe'), while it won't with
1777# `rm'.
1778for ac_file in conftest.exe conftest conftest.*; do
1779 test -f "$ac_file" || continue
1780 case $ac_file in
1781 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1782 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1783 export ac_cv_exeext
1784 break;;
1785 * ) break;;
1786 esac
1787done
1788else
1789 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1790See \`config.log' for more details." >&5
1791echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1792See \`config.log' for more details." >&2;}
1793 { (exit 1); exit 1; }; }
1794fi
1795
1796rm -f conftest$ac_cv_exeext
1797echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1798echo "${ECHO_T}$ac_cv_exeext" >&6
1799
1800rm -f conftest.$ac_ext
1801EXEEXT=$ac_cv_exeext
1802ac_exeext=$EXEEXT
1803echo "$as_me:$LINENO: checking for suffix of object files" >&5
1804echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1805if test "${ac_cv_objext+set}" = set; then
1806 echo $ECHO_N "(cached) $ECHO_C" >&6
1807else
1808 cat >conftest.$ac_ext <<_ACEOF
1809#line $LINENO "configure"
1810/* confdefs.h. */
1811_ACEOF
1812cat confdefs.h >>conftest.$ac_ext
1813cat >>conftest.$ac_ext <<_ACEOF
1814/* end confdefs.h. */
1815
1816int
1817main ()
1818{
1819
1820 ;
1821 return 0;
1822}
1823_ACEOF
1824rm -f conftest.o conftest.obj
1825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1826 (eval $ac_compile) 2>&5
1827 ac_status=$?
1828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1829 (exit $ac_status); }; then
1830 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1831 case $ac_file in
1832 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1833 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1834 break;;
1835 esac
1836done
1837else
1838 echo "$as_me: failed program was:" >&5
1839sed 's/^/| /' conftest.$ac_ext >&5
1840
1841{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1842See \`config.log' for more details." >&5
1843echo "$as_me: error: cannot compute suffix of object files: cannot compile
1844See \`config.log' for more details." >&2;}
1845 { (exit 1); exit 1; }; }
1846fi
1847
1848rm -f conftest.$ac_cv_objext conftest.$ac_ext
1849fi
1850echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1851echo "${ECHO_T}$ac_cv_objext" >&6
1852OBJEXT=$ac_cv_objext
1853ac_objext=$OBJEXT
1854echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1855echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1856if test "${ac_cv_c_compiler_gnu+set}" = set; then
1857 echo $ECHO_N "(cached) $ECHO_C" >&6
1858else
1859 cat >conftest.$ac_ext <<_ACEOF
1860#line $LINENO "configure"
1861/* confdefs.h. */
1862_ACEOF
1863cat confdefs.h >>conftest.$ac_ext
1864cat >>conftest.$ac_ext <<_ACEOF
1865/* end confdefs.h. */
1866
1867int
1868main ()
1869{
1870#ifndef __GNUC__
1871 choke me
1872#endif
1873
1874 ;
1875 return 0;
1876}
1877_ACEOF
1878rm -f conftest.$ac_objext
1879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1880 (eval $ac_compile) 2>&5
1881 ac_status=$?
1882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1883 (exit $ac_status); } &&
1884 { ac_try='test -s conftest.$ac_objext'
1885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1886 (eval $ac_try) 2>&5
1887 ac_status=$?
1888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1889 (exit $ac_status); }; }; then
1890 ac_compiler_gnu=yes
1891else
1892 echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895ac_compiler_gnu=no
1896fi
1897rm -f conftest.$ac_objext conftest.$ac_ext
1898ac_cv_c_compiler_gnu=$ac_compiler_gnu
1899
1900fi
1901echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1902echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1903GCC=`test $ac_compiler_gnu = yes && echo yes`
1904ac_test_CFLAGS=${CFLAGS+set}
1905ac_save_CFLAGS=$CFLAGS
1906CFLAGS="-g"
1907echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1908echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1909if test "${ac_cv_prog_cc_g+set}" = set; then
1910 echo $ECHO_N "(cached) $ECHO_C" >&6
1911else
1912 cat >conftest.$ac_ext <<_ACEOF
1913#line $LINENO "configure"
1914/* confdefs.h. */
1915_ACEOF
1916cat confdefs.h >>conftest.$ac_ext
1917cat >>conftest.$ac_ext <<_ACEOF
1918/* end confdefs.h. */
1919
1920int
1921main ()
1922{
1923
1924 ;
1925 return 0;
1926}
1927_ACEOF
1928rm -f conftest.$ac_objext
1929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1930 (eval $ac_compile) 2>&5
1931 ac_status=$?
1932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1933 (exit $ac_status); } &&
1934 { ac_try='test -s conftest.$ac_objext'
1935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1936 (eval $ac_try) 2>&5
1937 ac_status=$?
1938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1939 (exit $ac_status); }; }; then
1940 ac_cv_prog_cc_g=yes
1941else
1942 echo "$as_me: failed program was:" >&5
1943sed 's/^/| /' conftest.$ac_ext >&5
1944
1945ac_cv_prog_cc_g=no
1946fi
1947rm -f conftest.$ac_objext conftest.$ac_ext
1948fi
1949echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
1950echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951if test "$ac_test_CFLAGS" = set; then
1952 CFLAGS=$ac_save_CFLAGS
1953elif test $ac_cv_prog_cc_g = yes; then
1954 if test "$GCC" = yes; then
1955 CFLAGS="-g -O2"
1956 else
1957 CFLAGS="-g"
1958 fi
1959else
1960 if test "$GCC" = yes; then
1961 CFLAGS="-O2"
1962 else
1963 CFLAGS=
1964 fi
1965fi
1966echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
1967echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1968if test "${ac_cv_prog_cc_stdc+set}" = set; then
1969 echo $ECHO_N "(cached) $ECHO_C" >&6
1970else
1971 ac_cv_prog_cc_stdc=no
1972ac_save_CC=$CC
1973cat >conftest.$ac_ext <<_ACEOF
1974#line $LINENO "configure"
1975/* confdefs.h. */
1976_ACEOF
1977cat confdefs.h >>conftest.$ac_ext
1978cat >>conftest.$ac_ext <<_ACEOF
1979/* end confdefs.h. */
1980#include <stdarg.h>
1981#include <stdio.h>
1982#include <sys/types.h>
1983#include <sys/stat.h>
1984/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1985struct buf { int x; };
1986FILE * (*rcsopen) (struct buf *, struct stat *, int);
1987static char *e (p, i)
1988 char **p;
1989 int i;
1990{
1991 return p[i];
1992}
1993static char *f (char * (*g) (char **, int), char **p, ...)
1994{
1995 char *s;
1996 va_list v;
1997 va_start (v,p);
1998 s = g (p, va_arg (v,int));
1999 va_end (v);
2000 return s;
2001}
2002int test (int i, double x);
2003struct s1 {int (*f) (int a);};
2004struct s2 {int (*f) (double a);};
2005int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2006int argc;
2007char **argv;
2008int
2009main ()
2010{
2011return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016# Don't try gcc -ansi; that turns off useful extensions and
2017# breaks some systems' header files.
2018# AIX -qlanglvl=ansi
2019# Ultrix and OSF/1 -std1
2020# HP-UX 10.20 and later -Ae
2021# HP-UX older versions -Aa -D_HPUX_SOURCE
2022# SVR4 -Xc -D__EXTENSIONS__
2023for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2024do
2025 CC="$ac_save_CC $ac_arg"
2026 rm -f conftest.$ac_objext
2027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2028 (eval $ac_compile) 2>&5
2029 ac_status=$?
2030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2031 (exit $ac_status); } &&
2032 { ac_try='test -s conftest.$ac_objext'
2033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2034 (eval $ac_try) 2>&5
2035 ac_status=$?
2036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2037 (exit $ac_status); }; }; then
2038 ac_cv_prog_cc_stdc=$ac_arg
2039break
2040else
2041 echo "$as_me: failed program was:" >&5
2042sed 's/^/| /' conftest.$ac_ext >&5
2043
2044fi
2045rm -f conftest.$ac_objext
2046done
2047rm -f conftest.$ac_ext conftest.$ac_objext
2048CC=$ac_save_CC
2049
2050fi
2051
2052case "x$ac_cv_prog_cc_stdc" in
2053 x|xno)
2054 echo "$as_me:$LINENO: result: none needed" >&5
2055echo "${ECHO_T}none needed" >&6 ;;
2056 *)
2057 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2058echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2059 CC="$CC $ac_cv_prog_cc_stdc" ;;
2060esac
2061
2062# Some people use a C++ compiler to compile C. Since we use `exit',
2063# in C++ we need to declare it. In case someone uses the same compiler
2064# for both compiling C and C++ we need to have the C++ compiler decide
2065# the declaration of exit, since it's the most demanding environment.
2066cat >conftest.$ac_ext <<_ACEOF
2067@%:@ifndef __cplusplus
2068 choke me
2069@%:@endif
2070_ACEOF
2071rm -f conftest.$ac_objext
2072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2073 (eval $ac_compile) 2>&5
2074 ac_status=$?
2075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2076 (exit $ac_status); } &&
2077 { ac_try='test -s conftest.$ac_objext'
2078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2079 (eval $ac_try) 2>&5
2080 ac_status=$?
2081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2082 (exit $ac_status); }; }; then
2083 for ac_declaration in \
2084 ''\
2085 '#include <stdlib.h>' \
2086 'extern "C" void std::exit (int) throw (); using std::exit;' \
2087 'extern "C" void std::exit (int); using std::exit;' \
2088 'extern "C" void exit (int) throw ();' \
2089 'extern "C" void exit (int);' \
2090 'void exit (int);'
2091do
2092 cat >conftest.$ac_ext <<_ACEOF
2093#line $LINENO "configure"
2094/* confdefs.h. */
2095_ACEOF
2096cat confdefs.h >>conftest.$ac_ext
2097cat >>conftest.$ac_ext <<_ACEOF
2098/* end confdefs.h. */
2099@%:@include <stdlib.h>
2100$ac_declaration
2101int
2102main ()
2103{
2104exit (42);
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109rm -f conftest.$ac_objext
2110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2111 (eval $ac_compile) 2>&5
2112 ac_status=$?
2113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2114 (exit $ac_status); } &&
2115 { ac_try='test -s conftest.$ac_objext'
2116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2117 (eval $ac_try) 2>&5
2118 ac_status=$?
2119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2120 (exit $ac_status); }; }; then
2121 :
2122else
2123 echo "$as_me: failed program was:" >&5
2124sed 's/^/| /' conftest.$ac_ext >&5
2125
2126continue
2127fi
2128rm -f conftest.$ac_objext conftest.$ac_ext
2129 cat >conftest.$ac_ext <<_ACEOF
2130#line $LINENO "configure"
2131/* confdefs.h. */
2132_ACEOF
2133cat confdefs.h >>conftest.$ac_ext
2134cat >>conftest.$ac_ext <<_ACEOF
2135/* end confdefs.h. */
2136$ac_declaration
2137int
2138main ()
2139{
2140exit (42);
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145rm -f conftest.$ac_objext
2146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2147 (eval $ac_compile) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); } &&
2151 { ac_try='test -s conftest.$ac_objext'
2152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2153 (eval $ac_try) 2>&5
2154 ac_status=$?
2155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2156 (exit $ac_status); }; }; then
2157 break
2158else
2159 echo "$as_me: failed program was:" >&5
2160sed 's/^/| /' conftest.$ac_ext >&5
2161
2162fi
2163rm -f conftest.$ac_objext conftest.$ac_ext
2164done
2165rm -f conftest*
2166if test -n "$ac_declaration"; then
2167 echo '#ifdef __cplusplus' >>confdefs.h
2168 echo $ac_declaration >>confdefs.h
2169 echo '#endif' >>confdefs.h
2170fi
2171
2172else
2173 echo "$as_me: failed program was:" >&5
2174sed 's/^/| /' conftest.$ac_ext >&5
2175
2176fi
2177rm -f conftest.$ac_objext conftest.$ac_ext
2178ac_ext=c
2179ac_cpp='$CPP $CPPFLAGS'
2180ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2181ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2182ac_compiler_gnu=$ac_cv_c_compiler_gnu
2183
2184ac_aux_dir=
2185for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2186 if test -f $ac_dir/install-sh; then
2187 ac_aux_dir=$ac_dir
2188 ac_install_sh="$ac_aux_dir/install-sh -c"
2189 break
2190 elif test -f $ac_dir/install.sh; then
2191 ac_aux_dir=$ac_dir
2192 ac_install_sh="$ac_aux_dir/install.sh -c"
2193 break
2194 elif test -f $ac_dir/shtool; then
2195 ac_aux_dir=$ac_dir
2196 ac_install_sh="$ac_aux_dir/shtool install -c"
2197 break
2198 fi
2199done
2200if test -z "$ac_aux_dir"; then
2201 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2202echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2203 { (exit 1); exit 1; }; }
2204fi
2205ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2206ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2207ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2208
2209# Make sure we can run config.sub.
2210$ac_config_sub sun4 >/dev/null 2>&1 ||
2211 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
2212echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2213 { (exit 1); exit 1; }; }
2214
2215echo "$as_me:$LINENO: checking build system type" >&5
2216echo $ECHO_N "checking build system type... $ECHO_C" >&6
2217if test "${ac_cv_build+set}" = set; then
2218 echo $ECHO_N "(cached) $ECHO_C" >&6
2219else
2220 ac_cv_build_alias=$build_alias
2221test -z "$ac_cv_build_alias" &&
2222 ac_cv_build_alias=`$ac_config_guess`
2223test -z "$ac_cv_build_alias" &&
2224 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2225echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2226 { (exit 1); exit 1; }; }
2227ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2228 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
2229echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
2230 { (exit 1); exit 1; }; }
2231
2232fi
2233echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2234echo "${ECHO_T}$ac_cv_build" >&6
2235build=$ac_cv_build
2236build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2237build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2238build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2239
2240
2241echo "$as_me:$LINENO: checking host system type" >&5
2242echo $ECHO_N "checking host system type... $ECHO_C" >&6
2243if test "${ac_cv_host+set}" = set; then
2244 echo $ECHO_N "(cached) $ECHO_C" >&6
2245else
2246 ac_cv_host_alias=$host_alias
2247test -z "$ac_cv_host_alias" &&
2248 ac_cv_host_alias=$ac_cv_build_alias
2249ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2250 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2251echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2252 { (exit 1); exit 1; }; }
2253
2254fi
2255echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2256echo "${ECHO_T}$ac_cv_host" >&6
2257host=$ac_cv_host
2258host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2259host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2260host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2261
2262
2263
2264echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
2265echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
2266if test "${ac_cv_c_bigendian+set}" = set; then
2267 echo $ECHO_N "(cached) $ECHO_C" >&6
2268else
2269 # See if sys/param.h defines the BYTE_ORDER macro.
2270cat >conftest.$ac_ext <<_ACEOF
2271#line $LINENO "configure"
2272/* confdefs.h. */
2273_ACEOF
2274cat confdefs.h >>conftest.$ac_ext
2275cat >>conftest.$ac_ext <<_ACEOF
2276/* end confdefs.h. */
2277#include <sys/types.h>
2278#include <sys/param.h>
2279
2280int
2281main ()
2282{
2283#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2284 bogus endian macros
2285#endif
2286
2287 ;
2288 return 0;
2289}
2290_ACEOF
2291rm -f conftest.$ac_objext
2292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2293 (eval $ac_compile) 2>&5
2294 ac_status=$?
2295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2296 (exit $ac_status); } &&
2297 { ac_try='test -s conftest.$ac_objext'
2298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2299 (eval $ac_try) 2>&5
2300 ac_status=$?
2301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2302 (exit $ac_status); }; }; then
2303 # It does; now see whether it defined to BIG_ENDIAN or not.
2304cat >conftest.$ac_ext <<_ACEOF
2305#line $LINENO "configure"
2306/* confdefs.h. */
2307_ACEOF
2308cat confdefs.h >>conftest.$ac_ext
2309cat >>conftest.$ac_ext <<_ACEOF
2310/* end confdefs.h. */
2311#include <sys/types.h>
2312#include <sys/param.h>
2313
2314int
2315main ()
2316{
2317#if BYTE_ORDER != BIG_ENDIAN
2318 not big endian
2319#endif
2320
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325rm -f conftest.$ac_objext
2326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2327 (eval $ac_compile) 2>&5
2328 ac_status=$?
2329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2330 (exit $ac_status); } &&
2331 { ac_try='test -s conftest.$ac_objext'
2332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2333 (eval $ac_try) 2>&5
2334 ac_status=$?
2335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2336 (exit $ac_status); }; }; then
2337 ac_cv_c_bigendian=yes
2338else
2339 echo "$as_me: failed program was:" >&5
2340sed 's/^/| /' conftest.$ac_ext >&5
2341
2342ac_cv_c_bigendian=no
2343fi
2344rm -f conftest.$ac_objext conftest.$ac_ext
2345else
2346 echo "$as_me: failed program was:" >&5
2347sed 's/^/| /' conftest.$ac_ext >&5
2348
2349# It does not; compile a test program.
2350if test "$cross_compiling" = yes; then
2351 # try to guess the endianness by grepping values into an object file
2352 ac_cv_c_bigendian=unknown
2353 cat >conftest.$ac_ext <<_ACEOF
2354#line $LINENO "configure"
2355/* confdefs.h. */
2356_ACEOF
2357cat confdefs.h >>conftest.$ac_ext
2358cat >>conftest.$ac_ext <<_ACEOF
2359/* end confdefs.h. */
2360short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
2361short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
2362void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
2363short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
2364short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
2365void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
2366int
2367main ()
2368{
2369 _ascii (); _ebcdic ();
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
2375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2376 (eval $ac_compile) 2>&5
2377 ac_status=$?
2378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2379 (exit $ac_status); } &&
2380 { ac_try='test -s conftest.$ac_objext'
2381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2382 (eval $ac_try) 2>&5
2383 ac_status=$?
2384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385 (exit $ac_status); }; }; then
2386 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
2387 ac_cv_c_bigendian=yes
2388fi
2389if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
2390 if test "$ac_cv_c_bigendian" = unknown; then
2391 ac_cv_c_bigendian=no
2392 else
2393 # finding both strings is unlikely to happen, but who knows?
2394 ac_cv_c_bigendian=unknown
2395 fi
2396fi
2397else
2398 echo "$as_me: failed program was:" >&5
2399sed 's/^/| /' conftest.$ac_ext >&5
2400
2401fi
2402rm -f conftest.$ac_objext conftest.$ac_ext
2403else
2404 cat >conftest.$ac_ext <<_ACEOF
2405#line $LINENO "configure"
2406/* confdefs.h. */
2407_ACEOF
2408cat confdefs.h >>conftest.$ac_ext
2409cat >>conftest.$ac_ext <<_ACEOF
2410/* end confdefs.h. */
2411int
2412main ()
2413{
2414 /* Are we little or big endian? From Harbison&Steele. */
2415 union
2416 {
2417 long l;
2418 char c[sizeof (long)];
2419 } u;
2420 u.l = 1;
2421 exit (u.c[sizeof (long) - 1] == 1);
2422}
2423_ACEOF
2424rm -f conftest$ac_exeext
2425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2426 (eval $ac_link) 2>&5
2427 ac_status=$?
2428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2431 (eval $ac_try) 2>&5
2432 ac_status=$?
2433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434 (exit $ac_status); }; }; then
2435 ac_cv_c_bigendian=no
2436else
2437 echo "$as_me: program exited with status $ac_status" >&5
2438echo "$as_me: failed program was:" >&5
2439sed 's/^/| /' conftest.$ac_ext >&5
2440
2441( exit $ac_status )
2442ac_cv_c_bigendian=yes
2443fi
2444rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2445fi
2446fi
2447rm -f conftest.$ac_objext conftest.$ac_ext
2448fi
2449echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
2450echo "${ECHO_T}$ac_cv_c_bigendian" >&6
2451case $ac_cv_c_bigendian in
2452 yes)
2453
2454cat >>confdefs.h <<\_ACEOF
2455@%:@define WORDS_BIGENDIAN 1
2456_ACEOF
2457 ;;
2458 no)
2459 ;;
2460 *)
2461 { { echo "$as_me:$LINENO: error: unknown endianness
2462presetting ac_cv_c_bigendian=no (or yes) will help" >&5
2463echo "$as_me: error: unknown endianness
2464presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
2465 { (exit 1); exit 1; }; } ;;
2466esac
2467
2468
2469# Checks for programs.
2470ac_ext=c
2471ac_cpp='$CPP $CPPFLAGS'
2472ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2473ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2474ac_compiler_gnu=$ac_cv_c_compiler_gnu
2475echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2476echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2477# On Suns, sometimes $CPP names a directory.
2478if test -n "$CPP" && test -d "$CPP"; then
2479 CPP=
2480fi
2481if test -z "$CPP"; then
2482 if test "${ac_cv_prog_CPP+set}" = set; then
2483 echo $ECHO_N "(cached) $ECHO_C" >&6
2484else
2485 # Double quotes because CPP needs to be expanded
2486 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2487 do
2488 ac_preproc_ok=false
2489for ac_c_preproc_warn_flag in '' yes
2490do
2491 # Use a header file that comes with gcc, so configuring glibc
2492 # with a fresh cross-compiler works.
2493 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2494 # <limits.h> exists even on freestanding compilers.
2495 # On the NeXT, cc -E runs the code through the compiler's parser,
2496 # not just through cpp. "Syntax error" is here to catch this case.
2497 cat >conftest.$ac_ext <<_ACEOF
2498#line $LINENO "configure"
2499/* confdefs.h. */
2500_ACEOF
2501cat confdefs.h >>conftest.$ac_ext
2502cat >>conftest.$ac_ext <<_ACEOF
2503/* end confdefs.h. */
2504@%:@ifdef __STDC__
2505@%:@ include <limits.h>
2506@%:@else
2507@%:@ include <assert.h>
2508@%:@endif
2509 Syntax error
2510_ACEOF
2511if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2512 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2513 ac_status=$?
2514 grep -v '^ *+' conftest.er1 >conftest.err
2515 rm -f conftest.er1
2516 cat conftest.err >&5
2517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2518 (exit $ac_status); } >/dev/null; then
2519 if test -s conftest.err; then
2520 ac_cpp_err=$ac_c_preproc_warn_flag
2521 else
2522 ac_cpp_err=
2523 fi
2524else
2525 ac_cpp_err=yes
2526fi
2527if test -z "$ac_cpp_err"; then
2528 :
2529else
2530 echo "$as_me: failed program was:" >&5
2531sed 's/^/| /' conftest.$ac_ext >&5
2532
2533 # Broken: fails on valid input.
2534continue
2535fi
2536rm -f conftest.err conftest.$ac_ext
2537
2538 # OK, works on sane cases. Now check whether non-existent headers
2539 # can be detected and how.
2540 cat >conftest.$ac_ext <<_ACEOF
2541#line $LINENO "configure"
2542/* confdefs.h. */
2543_ACEOF
2544cat confdefs.h >>conftest.$ac_ext
2545cat >>conftest.$ac_ext <<_ACEOF
2546/* end confdefs.h. */
2547@%:@include <ac_nonexistent.h>
2548_ACEOF
2549if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2550 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2551 ac_status=$?
2552 grep -v '^ *+' conftest.er1 >conftest.err
2553 rm -f conftest.er1
2554 cat conftest.err >&5
2555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2556 (exit $ac_status); } >/dev/null; then
2557 if test -s conftest.err; then
2558 ac_cpp_err=$ac_c_preproc_warn_flag
2559 else
2560 ac_cpp_err=
2561 fi
2562else
2563 ac_cpp_err=yes
2564fi
2565if test -z "$ac_cpp_err"; then
2566 # Broken: success on invalid input.
2567continue
2568else
2569 echo "$as_me: failed program was:" >&5
2570sed 's/^/| /' conftest.$ac_ext >&5
2571
2572 # Passes both tests.
2573ac_preproc_ok=:
2574break
2575fi
2576rm -f conftest.err conftest.$ac_ext
2577
2578done
2579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2580rm -f conftest.err conftest.$ac_ext
2581if $ac_preproc_ok; then
2582 break
2583fi
2584
2585 done
2586 ac_cv_prog_CPP=$CPP
2587
2588fi
2589 CPP=$ac_cv_prog_CPP
2590else
2591 ac_cv_prog_CPP=$CPP
2592fi
2593echo "$as_me:$LINENO: result: $CPP" >&5
2594echo "${ECHO_T}$CPP" >&6
2595ac_preproc_ok=false
2596for ac_c_preproc_warn_flag in '' yes
2597do
2598 # Use a header file that comes with gcc, so configuring glibc
2599 # with a fresh cross-compiler works.
2600 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2601 # <limits.h> exists even on freestanding compilers.
2602 # On the NeXT, cc -E runs the code through the compiler's parser,
2603 # not just through cpp. "Syntax error" is here to catch this case.
2604 cat >conftest.$ac_ext <<_ACEOF
2605#line $LINENO "configure"
2606/* confdefs.h. */
2607_ACEOF
2608cat confdefs.h >>conftest.$ac_ext
2609cat >>conftest.$ac_ext <<_ACEOF
2610/* end confdefs.h. */
2611@%:@ifdef __STDC__
2612@%:@ include <limits.h>
2613@%:@else
2614@%:@ include <assert.h>
2615@%:@endif
2616 Syntax error
2617_ACEOF
2618if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2619 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2620 ac_status=$?
2621 grep -v '^ *+' conftest.er1 >conftest.err
2622 rm -f conftest.er1
2623 cat conftest.err >&5
2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2625 (exit $ac_status); } >/dev/null; then
2626 if test -s conftest.err; then
2627 ac_cpp_err=$ac_c_preproc_warn_flag
2628 else
2629 ac_cpp_err=
2630 fi
2631else
2632 ac_cpp_err=yes
2633fi
2634if test -z "$ac_cpp_err"; then
2635 :
2636else
2637 echo "$as_me: failed program was:" >&5
2638sed 's/^/| /' conftest.$ac_ext >&5
2639
2640 # Broken: fails on valid input.
2641continue
2642fi
2643rm -f conftest.err conftest.$ac_ext
2644
2645 # OK, works on sane cases. Now check whether non-existent headers
2646 # can be detected and how.
2647 cat >conftest.$ac_ext <<_ACEOF
2648#line $LINENO "configure"
2649/* confdefs.h. */
2650_ACEOF
2651cat confdefs.h >>conftest.$ac_ext
2652cat >>conftest.$ac_ext <<_ACEOF
2653/* end confdefs.h. */
2654@%:@include <ac_nonexistent.h>
2655_ACEOF
2656if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2657 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2658 ac_status=$?
2659 grep -v '^ *+' conftest.er1 >conftest.err
2660 rm -f conftest.er1
2661 cat conftest.err >&5
2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2663 (exit $ac_status); } >/dev/null; then
2664 if test -s conftest.err; then
2665 ac_cpp_err=$ac_c_preproc_warn_flag
2666 else
2667 ac_cpp_err=
2668 fi
2669else
2670 ac_cpp_err=yes
2671fi
2672if test -z "$ac_cpp_err"; then
2673 # Broken: success on invalid input.
2674continue
2675else
2676 echo "$as_me: failed program was:" >&5
2677sed 's/^/| /' conftest.$ac_ext >&5
2678
2679 # Passes both tests.
2680ac_preproc_ok=:
2681break
2682fi
2683rm -f conftest.err conftest.$ac_ext
2684
2685done
2686# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2687rm -f conftest.err conftest.$ac_ext
2688if $ac_preproc_ok; then
2689 :
2690else
2691 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2692See \`config.log' for more details." >&5
2693echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2694See \`config.log' for more details." >&2;}
2695 { (exit 1); exit 1; }; }
2696fi
2697
2698ac_ext=c
2699ac_cpp='$CPP $CPPFLAGS'
2700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2702ac_compiler_gnu=$ac_cv_c_compiler_gnu
2703
2704if test -n "$ac_tool_prefix"; then
2705 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2706set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2707echo "$as_me:$LINENO: checking for $ac_word" >&5
2708echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2709if test "${ac_cv_prog_RANLIB+set}" = set; then
2710 echo $ECHO_N "(cached) $ECHO_C" >&6
2711else
2712 if test -n "$RANLIB"; then
2713 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2714else
2715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2716for as_dir in $PATH
2717do
2718 IFS=$as_save_IFS
2719 test -z "$as_dir" && as_dir=.
2720 for ac_exec_ext in '' $ac_executable_extensions; do
2721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2722 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2724 break 2
2725 fi
2726done
2727done
2728
2729fi
2730fi
2731RANLIB=$ac_cv_prog_RANLIB
2732if test -n "$RANLIB"; then
2733 echo "$as_me:$LINENO: result: $RANLIB" >&5
2734echo "${ECHO_T}$RANLIB" >&6
2735else
2736 echo "$as_me:$LINENO: result: no" >&5
2737echo "${ECHO_T}no" >&6
2738fi
2739
2740fi
2741if test -z "$ac_cv_prog_RANLIB"; then
2742 ac_ct_RANLIB=$RANLIB
2743 # Extract the first word of "ranlib", so it can be a program name with args.
2744set dummy ranlib; ac_word=$2
2745echo "$as_me:$LINENO: checking for $ac_word" >&5
2746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2747if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2748 echo $ECHO_N "(cached) $ECHO_C" >&6
2749else
2750 if test -n "$ac_ct_RANLIB"; then
2751 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2752else
2753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2754for as_dir in $PATH
2755do
2756 IFS=$as_save_IFS
2757 test -z "$as_dir" && as_dir=.
2758 for ac_exec_ext in '' $ac_executable_extensions; do
2759 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2760 ac_cv_prog_ac_ct_RANLIB="ranlib"
2761 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2762 break 2
2763 fi
2764done
2765done
2766
2767 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2768fi
2769fi
2770ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2771if test -n "$ac_ct_RANLIB"; then
2772 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2773echo "${ECHO_T}$ac_ct_RANLIB" >&6
2774else
2775 echo "$as_me:$LINENO: result: no" >&5
2776echo "${ECHO_T}no" >&6
2777fi
2778
2779 RANLIB=$ac_ct_RANLIB
2780else
2781 RANLIB="$ac_cv_prog_RANLIB"
2782fi
2783
2784# Find a good install program. We prefer a C program (faster),
2785# so one script is as good as another. But avoid the broken or
2786# incompatible versions:
2787# SysV /etc/install, /usr/sbin/install
2788# SunOS /usr/etc/install
2789# IRIX /sbin/install
2790# AIX /bin/install
2791# AmigaOS /C/install, which installs bootblocks on floppy discs
2792# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2793# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2794# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2795# ./install, which can be erroneously created by make from ./install.sh.
2796echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2797echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2798if test -z "$INSTALL"; then
2799if test "${ac_cv_path_install+set}" = set; then
2800 echo $ECHO_N "(cached) $ECHO_C" >&6
2801else
2802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2803for as_dir in $PATH
2804do
2805 IFS=$as_save_IFS
2806 test -z "$as_dir" && as_dir=.
2807 # Account for people who put trailing slashes in PATH elements.
2808case $as_dir/ in
2809 ./ | .// | /cC/* | \
2810 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2811 /usr/ucb/* ) ;;
2812 *)
2813 # OSF1 and SCO ODT 3.0 have their own names for install.
2814 # Don't use installbsd from OSF since it installs stuff as root
2815 # by default.
2816 for ac_prog in ginstall scoinst install; do
2817 for ac_exec_ext in '' $ac_executable_extensions; do
2818 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2819 if test $ac_prog = install &&
2820 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2821 # AIX install. It has an incompatible calling convention.
2822 :
2823 elif test $ac_prog = install &&
2824 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2825 # program-specific install script used by HP pwplus--don't use.
2826 :
2827 else
2828 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2829 break 3
2830 fi
2831 fi
2832 done
2833 done
2834 ;;
2835esac
2836done
2837
2838
2839fi
2840 if test "${ac_cv_path_install+set}" = set; then
2841 INSTALL=$ac_cv_path_install
2842 else
2843 # As a last resort, use the slow shell script. We don't cache a
2844 # path for INSTALL within a source directory, because that will
2845 # break other packages using the cache if that directory is
2846 # removed, or if the path is relative.
2847 INSTALL=$ac_install_sh
2848 fi
2849fi
2850echo "$as_me:$LINENO: result: $INSTALL" >&5
2851echo "${ECHO_T}$INSTALL" >&6
2852
2853# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2854# It thinks the first close brace ends the variable substitution.
2855test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2856
2857test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2858
2859test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2860
2861# Extract the first word of "ar", so it can be a program name with args.
2862set dummy ar; ac_word=$2
2863echo "$as_me:$LINENO: checking for $ac_word" >&5
2864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2865if test "${ac_cv_path_AR+set}" = set; then
2866 echo $ECHO_N "(cached) $ECHO_C" >&6
2867else
2868 case $AR in
2869 [\\/]* | ?:[\\/]*)
2870 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2871 ;;
2872 *)
2873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2874for as_dir in $PATH
2875do
2876 IFS=$as_save_IFS
2877 test -z "$as_dir" && as_dir=.
2878 for ac_exec_ext in '' $ac_executable_extensions; do
2879 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2880 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
2881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2882 break 2
2883 fi
2884done
2885done
2886
2887 ;;
2888esac
2889fi
2890AR=$ac_cv_path_AR
2891
2892if test -n "$AR"; then
2893 echo "$as_me:$LINENO: result: $AR" >&5
2894echo "${ECHO_T}$AR" >&6
2895else
2896 echo "$as_me:$LINENO: result: no" >&5
2897echo "${ECHO_T}no" >&6
2898fi
2899
2900for ac_prog in perl5 perl
2901do
2902 # Extract the first word of "$ac_prog", so it can be a program name with args.
2903set dummy $ac_prog; ac_word=$2
2904echo "$as_me:$LINENO: checking for $ac_word" >&5
2905echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2906if test "${ac_cv_path_PERL+set}" = set; then
2907 echo $ECHO_N "(cached) $ECHO_C" >&6
2908else
2909 case $PERL in
2910 [\\/]* | ?:[\\/]*)
2911 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2912 ;;
2913 *)
2914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2915for as_dir in $PATH
2916do
2917 IFS=$as_save_IFS
2918 test -z "$as_dir" && as_dir=.
2919 for ac_exec_ext in '' $ac_executable_extensions; do
2920 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2921 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
2922 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2923 break 2
2924 fi
2925done
2926done
2927
2928 ;;
2929esac
2930fi
2931PERL=$ac_cv_path_PERL
2932
2933if test -n "$PERL"; then
2934 echo "$as_me:$LINENO: result: $PERL" >&5
2935echo "${ECHO_T}$PERL" >&6
2936else
2937 echo "$as_me:$LINENO: result: no" >&5
2938echo "${ECHO_T}no" >&6
2939fi
2940
2941 test -n "$PERL" && break
2942done
2943
2944# Extract the first word of "sed", so it can be a program name with args.
2945set dummy sed; ac_word=$2
2946echo "$as_me:$LINENO: checking for $ac_word" >&5
2947echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2948if test "${ac_cv_path_SED+set}" = set; then
2949 echo $ECHO_N "(cached) $ECHO_C" >&6
2950else
2951 case $SED in
2952 [\\/]* | ?:[\\/]*)
2953 ac_cv_path_SED="$SED" # Let the user override the test with a path.
2954 ;;
2955 *)
2956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2957for as_dir in $PATH
2958do
2959 IFS=$as_save_IFS
2960 test -z "$as_dir" && as_dir=.
2961 for ac_exec_ext in '' $ac_executable_extensions; do
2962 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2963 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
2964 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2965 break 2
2966 fi
2967done
2968done
2969
2970 ;;
2971esac
2972fi
2973SED=$ac_cv_path_SED
2974
2975if test -n "$SED"; then
2976 echo "$as_me:$LINENO: result: $SED" >&5
2977echo "${ECHO_T}$SED" >&6
2978else
2979 echo "$as_me:$LINENO: result: no" >&5
2980echo "${ECHO_T}no" >&6
2981fi
2982
2983
2984# Extract the first word of "ent", so it can be a program name with args.
2985set dummy ent; ac_word=$2
2986echo "$as_me:$LINENO: checking for $ac_word" >&5
2987echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2988if test "${ac_cv_path_ENT+set}" = set; then
2989 echo $ECHO_N "(cached) $ECHO_C" >&6
2990else
2991 case $ENT in
2992 [\\/]* | ?:[\\/]*)
2993 ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
2994 ;;
2995 *)
2996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2997for as_dir in $PATH
2998do
2999 IFS=$as_save_IFS
3000 test -z "$as_dir" && as_dir=.
3001 for ac_exec_ext in '' $ac_executable_extensions; do
3002 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3003 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
3004 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3005 break 2
3006 fi
3007done
3008done
3009
3010 ;;
3011esac
3012fi
3013ENT=$ac_cv_path_ENT
3014
3015if test -n "$ENT"; then
3016 echo "$as_me:$LINENO: result: $ENT" >&5
3017echo "${ECHO_T}$ENT" >&6
3018else
3019 echo "$as_me:$LINENO: result: no" >&5
3020echo "${ECHO_T}no" >&6
3021fi
3022
3023
3024# Extract the first word of "bash", so it can be a program name with args.
3025set dummy bash; ac_word=$2
3026echo "$as_me:$LINENO: checking for $ac_word" >&5
3027echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3028if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
3029 echo $ECHO_N "(cached) $ECHO_C" >&6
3030else
3031 case $TEST_MINUS_S_SH in
3032 [\\/]* | ?:[\\/]*)
3033 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
3034 ;;
3035 *)
3036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037for as_dir in $PATH
3038do
3039 IFS=$as_save_IFS
3040 test -z "$as_dir" && as_dir=.
3041 for ac_exec_ext in '' $ac_executable_extensions; do
3042 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3043 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
3044 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3045 break 2
3046 fi
3047done
3048done
3049
3050 ;;
3051esac
3052fi
3053TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
3054
3055if test -n "$TEST_MINUS_S_SH"; then
3056 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
3057echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
3058else
3059 echo "$as_me:$LINENO: result: no" >&5
3060echo "${ECHO_T}no" >&6
3061fi
3062
3063# Extract the first word of "ksh", so it can be a program name with args.
3064set dummy ksh; ac_word=$2
3065echo "$as_me:$LINENO: checking for $ac_word" >&5
3066echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3067if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
3068 echo $ECHO_N "(cached) $ECHO_C" >&6
3069else
3070 case $TEST_MINUS_S_SH in
3071 [\\/]* | ?:[\\/]*)
3072 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
3073 ;;
3074 *)
3075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3076for as_dir in $PATH
3077do
3078 IFS=$as_save_IFS
3079 test -z "$as_dir" && as_dir=.
3080 for ac_exec_ext in '' $ac_executable_extensions; do
3081 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3082 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
3083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3084 break 2
3085 fi
3086done
3087done
3088
3089 ;;
3090esac
3091fi
3092TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
3093
3094if test -n "$TEST_MINUS_S_SH"; then
3095 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
3096echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
3097else
3098 echo "$as_me:$LINENO: result: no" >&5
3099echo "${ECHO_T}no" >&6
3100fi
3101
3102# Extract the first word of "sh", so it can be a program name with args.
3103set dummy sh; ac_word=$2
3104echo "$as_me:$LINENO: checking for $ac_word" >&5
3105echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3106if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
3107 echo $ECHO_N "(cached) $ECHO_C" >&6
3108else
3109 case $TEST_MINUS_S_SH in
3110 [\\/]* | ?:[\\/]*)
3111 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
3112 ;;
3113 *)
3114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3115for as_dir in $PATH
3116do
3117 IFS=$as_save_IFS
3118 test -z "$as_dir" && as_dir=.
3119 for ac_exec_ext in '' $ac_executable_extensions; do
3120 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3121 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
3122 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3123 break 2
3124 fi
3125done
3126done
3127
3128 ;;
3129esac
3130fi
3131TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
3132
3133if test -n "$TEST_MINUS_S_SH"; then
3134 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
3135echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
3136else
3137 echo "$as_me:$LINENO: result: no" >&5
3138echo "${ECHO_T}no" >&6
3139fi
3140
3141# Extract the first word of "sh", so it can be a program name with args.
3142set dummy sh; ac_word=$2
3143echo "$as_me:$LINENO: checking for $ac_word" >&5
3144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3145if test "${ac_cv_path_SH+set}" = set; then
3146 echo $ECHO_N "(cached) $ECHO_C" >&6
3147else
3148 case $SH in
3149 [\\/]* | ?:[\\/]*)
3150 ac_cv_path_SH="$SH" # Let the user override the test with a path.
3151 ;;
3152 *)
3153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3154for as_dir in $PATH
3155do
3156 IFS=$as_save_IFS
3157 test -z "$as_dir" && as_dir=.
3158 for ac_exec_ext in '' $ac_executable_extensions; do
3159 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3160 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
3161 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3162 break 2
3163 fi
3164done
3165done
3166
3167 ;;
3168esac
3169fi
3170SH=$ac_cv_path_SH
3171
3172if test -n "$SH"; then
3173 echo "$as_me:$LINENO: result: $SH" >&5
3174echo "${ECHO_T}$SH" >&6
3175else
3176 echo "$as_me:$LINENO: result: no" >&5
3177echo "${ECHO_T}no" >&6
3178fi
3179
3180
3181# System features
3182# Check whether --enable-largefile or --disable-largefile was given.
3183if test "${enable_largefile+set}" = set; then
3184 enableval="$enable_largefile"
3185
3186fi;
3187if test "$enable_largefile" != no; then
3188
3189 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
3190echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3191if test "${ac_cv_sys_largefile_CC+set}" = set; then
3192 echo $ECHO_N "(cached) $ECHO_C" >&6
3193else
3194 ac_cv_sys_largefile_CC=no
3195 if test "$GCC" != yes; then
3196 ac_save_CC=$CC
3197 while :; do
3198 # IRIX 6.2 and later do not support large files by default,
3199 # so use the C compiler's -n32 option if that helps.
3200 cat >conftest.$ac_ext <<_ACEOF
3201#line $LINENO "configure"
3202/* confdefs.h. */
3203_ACEOF
3204cat confdefs.h >>conftest.$ac_ext
3205cat >>conftest.$ac_ext <<_ACEOF
3206/* end confdefs.h. */
3207@%:@include <sys/types.h>
3208 /* Check that off_t can represent 2**63 - 1 correctly.
3209 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3210 since some C++ compilers masquerading as C compilers
3211 incorrectly reject 9223372036854775807. */
3212@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3213 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3214 && LARGE_OFF_T % 2147483647 == 1)
3215 ? 1 : -1];
3216int
3217main ()
3218{
3219
3220 ;
3221 return 0;
3222}
3223_ACEOF
3224 rm -f conftest.$ac_objext
3225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3226 (eval $ac_compile) 2>&5
3227 ac_status=$?
3228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3229 (exit $ac_status); } &&
3230 { ac_try='test -s conftest.$ac_objext'
3231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3232 (eval $ac_try) 2>&5
3233 ac_status=$?
3234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3235 (exit $ac_status); }; }; then
3236 break
3237else
3238 echo "$as_me: failed program was:" >&5
3239sed 's/^/| /' conftest.$ac_ext >&5
3240
3241fi
3242rm -f conftest.$ac_objext
3243 CC="$CC -n32"
3244 rm -f conftest.$ac_objext
3245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3246 (eval $ac_compile) 2>&5
3247 ac_status=$?
3248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249 (exit $ac_status); } &&
3250 { ac_try='test -s conftest.$ac_objext'
3251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3252 (eval $ac_try) 2>&5
3253 ac_status=$?
3254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3255 (exit $ac_status); }; }; then
3256 ac_cv_sys_largefile_CC=' -n32'; break
3257else
3258 echo "$as_me: failed program was:" >&5
3259sed 's/^/| /' conftest.$ac_ext >&5
3260
3261fi
3262rm -f conftest.$ac_objext
3263 break
3264 done
3265 CC=$ac_save_CC
3266 rm -f conftest.$ac_ext
3267 fi
3268fi
3269echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
3270echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3271 if test "$ac_cv_sys_largefile_CC" != no; then
3272 CC=$CC$ac_cv_sys_largefile_CC
3273 fi
3274
3275 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3276echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3277if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3278 echo $ECHO_N "(cached) $ECHO_C" >&6
3279else
3280 while :; do
3281 ac_cv_sys_file_offset_bits=no
3282 cat >conftest.$ac_ext <<_ACEOF
3283#line $LINENO "configure"
3284/* confdefs.h. */
3285_ACEOF
3286cat confdefs.h >>conftest.$ac_ext
3287cat >>conftest.$ac_ext <<_ACEOF
3288/* end confdefs.h. */
3289@%:@include <sys/types.h>
3290 /* Check that off_t can represent 2**63 - 1 correctly.
3291 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3292 since some C++ compilers masquerading as C compilers
3293 incorrectly reject 9223372036854775807. */
3294@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3295 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3296 && LARGE_OFF_T % 2147483647 == 1)
3297 ? 1 : -1];
3298int
3299main ()
3300{
3301
3302 ;
3303 return 0;
3304}
3305_ACEOF
3306rm -f conftest.$ac_objext
3307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3308 (eval $ac_compile) 2>&5
3309 ac_status=$?
3310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3311 (exit $ac_status); } &&
3312 { ac_try='test -s conftest.$ac_objext'
3313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3314 (eval $ac_try) 2>&5
3315 ac_status=$?
3316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3317 (exit $ac_status); }; }; then
3318 break
3319else
3320 echo "$as_me: failed program was:" >&5
3321sed 's/^/| /' conftest.$ac_ext >&5
3322
3323fi
3324rm -f conftest.$ac_objext conftest.$ac_ext
3325 cat >conftest.$ac_ext <<_ACEOF
3326#line $LINENO "configure"
3327/* confdefs.h. */
3328_ACEOF
3329cat confdefs.h >>conftest.$ac_ext
3330cat >>conftest.$ac_ext <<_ACEOF
3331/* end confdefs.h. */
3332@%:@define _FILE_OFFSET_BITS 64
3333@%:@include <sys/types.h>
3334 /* Check that off_t can represent 2**63 - 1 correctly.
3335 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3336 since some C++ compilers masquerading as C compilers
3337 incorrectly reject 9223372036854775807. */
3338@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3339 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3340 && LARGE_OFF_T % 2147483647 == 1)
3341 ? 1 : -1];
3342int
3343main ()
3344{
3345
3346 ;
3347 return 0;
3348}
3349_ACEOF
3350rm -f conftest.$ac_objext
3351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3352 (eval $ac_compile) 2>&5
3353 ac_status=$?
3354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3355 (exit $ac_status); } &&
3356 { ac_try='test -s conftest.$ac_objext'
3357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3358 (eval $ac_try) 2>&5
3359 ac_status=$?
3360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3361 (exit $ac_status); }; }; then
3362 ac_cv_sys_file_offset_bits=64; break
3363else
3364 echo "$as_me: failed program was:" >&5
3365sed 's/^/| /' conftest.$ac_ext >&5
3366
3367fi
3368rm -f conftest.$ac_objext conftest.$ac_ext
3369 break
3370done
3371fi
3372echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
3373echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3374if test "$ac_cv_sys_file_offset_bits" != no; then
3375
3376cat >>confdefs.h <<_ACEOF
3377@%:@define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
3378_ACEOF
3379
3380fi
3381rm -f conftest*
3382 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
3383echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3384if test "${ac_cv_sys_large_files+set}" = set; then
3385 echo $ECHO_N "(cached) $ECHO_C" >&6
3386else
3387 while :; do
3388 ac_cv_sys_large_files=no
3389 cat >conftest.$ac_ext <<_ACEOF
3390#line $LINENO "configure"
3391/* confdefs.h. */
3392_ACEOF
3393cat confdefs.h >>conftest.$ac_ext
3394cat >>conftest.$ac_ext <<_ACEOF
3395/* end confdefs.h. */
3396@%:@include <sys/types.h>
3397 /* Check that off_t can represent 2**63 - 1 correctly.
3398 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3399 since some C++ compilers masquerading as C compilers
3400 incorrectly reject 9223372036854775807. */
3401@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3402 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3403 && LARGE_OFF_T % 2147483647 == 1)
3404 ? 1 : -1];
3405int
3406main ()
3407{
3408
3409 ;
3410 return 0;
3411}
3412_ACEOF
3413rm -f conftest.$ac_objext
3414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3415 (eval $ac_compile) 2>&5
3416 ac_status=$?
3417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3418 (exit $ac_status); } &&
3419 { ac_try='test -s conftest.$ac_objext'
3420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3421 (eval $ac_try) 2>&5
3422 ac_status=$?
3423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3424 (exit $ac_status); }; }; then
3425 break
3426else
3427 echo "$as_me: failed program was:" >&5
3428sed 's/^/| /' conftest.$ac_ext >&5
3429
3430fi
3431rm -f conftest.$ac_objext conftest.$ac_ext
3432 cat >conftest.$ac_ext <<_ACEOF
3433#line $LINENO "configure"
3434/* confdefs.h. */
3435_ACEOF
3436cat confdefs.h >>conftest.$ac_ext
3437cat >>conftest.$ac_ext <<_ACEOF
3438/* end confdefs.h. */
3439@%:@define _LARGE_FILES 1
3440@%:@include <sys/types.h>
3441 /* Check that off_t can represent 2**63 - 1 correctly.
3442 We can't simply define LARGE_OFF_T to be 9223372036854775807,
3443 since some C++ compilers masquerading as C compilers
3444 incorrectly reject 9223372036854775807. */
3445@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3446 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3447 && LARGE_OFF_T % 2147483647 == 1)
3448 ? 1 : -1];
3449int
3450main ()
3451{
3452
3453 ;
3454 return 0;
3455}
3456_ACEOF
3457rm -f conftest.$ac_objext
3458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3459 (eval $ac_compile) 2>&5
3460 ac_status=$?
3461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3462 (exit $ac_status); } &&
3463 { ac_try='test -s conftest.$ac_objext'
3464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3465 (eval $ac_try) 2>&5
3466 ac_status=$?
3467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3468 (exit $ac_status); }; }; then
3469 ac_cv_sys_large_files=1; break
3470else
3471 echo "$as_me: failed program was:" >&5
3472sed 's/^/| /' conftest.$ac_ext >&5
3473
3474fi
3475rm -f conftest.$ac_objext conftest.$ac_ext
3476 break
3477done
3478fi
3479echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
3480echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3481if test "$ac_cv_sys_large_files" != no; then
3482
3483cat >>confdefs.h <<_ACEOF
3484@%:@define _LARGE_FILES $ac_cv_sys_large_files
3485_ACEOF
3486
3487fi
3488rm -f conftest*
3489fi
3490
3491
3492if test -z "$AR" ; then
3493 { { echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
3494echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
3495 { (exit 1); exit 1; }; }
3496fi
3497
3498# Use LOGIN_PROGRAM from environment if possible
3499if test ! -z "$LOGIN_PROGRAM" ; then
3500 cat >>confdefs.h <<_ACEOF
3501@%:@define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
3502_ACEOF
3503
3504else
3505 # Search for login
3506 # Extract the first word of "login", so it can be a program name with args.
3507set dummy login; ac_word=$2
3508echo "$as_me:$LINENO: checking for $ac_word" >&5
3509echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3510if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then
3511 echo $ECHO_N "(cached) $ECHO_C" >&6
3512else
3513 case $LOGIN_PROGRAM_FALLBACK in
3514 [\\/]* | ?:[\\/]*)
3515 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path.
3516 ;;
3517 *)
3518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3519for as_dir in $PATH
3520do
3521 IFS=$as_save_IFS
3522 test -z "$as_dir" && as_dir=.
3523 for ac_exec_ext in '' $ac_executable_extensions; do
3524 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3525 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
3526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3527 break 2
3528 fi
3529done
3530done
3531
3532 ;;
3533esac
3534fi
3535LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
3536
3537if test -n "$LOGIN_PROGRAM_FALLBACK"; then
3538 echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5
3539echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6
3540else
3541 echo "$as_me:$LINENO: result: no" >&5
3542echo "${ECHO_T}no" >&6
3543fi
3544
3545 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
3546 cat >>confdefs.h <<_ACEOF
3547@%:@define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
3548_ACEOF
3549
3550 fi
3551fi
3552
3553if test -z "$LD" ; then
3554 LD=$CC
3555fi
3556
3557
3558echo "$as_me:$LINENO: checking for inline" >&5
3559echo $ECHO_N "checking for inline... $ECHO_C" >&6
3560if test "${ac_cv_c_inline+set}" = set; then
3561 echo $ECHO_N "(cached) $ECHO_C" >&6
3562else
3563 ac_cv_c_inline=no
3564for ac_kw in inline __inline__ __inline; do
3565 cat >conftest.$ac_ext <<_ACEOF
3566#line $LINENO "configure"
3567/* confdefs.h. */
3568_ACEOF
3569cat confdefs.h >>conftest.$ac_ext
3570cat >>conftest.$ac_ext <<_ACEOF
3571/* end confdefs.h. */
3572#ifndef __cplusplus
3573typedef int foo_t;
3574static $ac_kw foo_t static_foo () {return 0; }
3575$ac_kw foo_t foo () {return 0; }
3576#endif
3577
3578_ACEOF
3579rm -f conftest.$ac_objext
3580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3581 (eval $ac_compile) 2>&5
3582 ac_status=$?
3583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3584 (exit $ac_status); } &&
3585 { ac_try='test -s conftest.$ac_objext'
3586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3587 (eval $ac_try) 2>&5
3588 ac_status=$?
3589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3590 (exit $ac_status); }; }; then
3591 ac_cv_c_inline=$ac_kw; break
3592else
3593 echo "$as_me: failed program was:" >&5
3594sed 's/^/| /' conftest.$ac_ext >&5
3595
3596fi
3597rm -f conftest.$ac_objext conftest.$ac_ext
3598done
3599
3600fi
3601echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3602echo "${ECHO_T}$ac_cv_c_inline" >&6
3603case $ac_cv_c_inline in
3604 inline | yes) ;;
3605 no)
3606cat >>confdefs.h <<\_ACEOF
3607@%:@define inline
3608_ACEOF
3609 ;;
3610 *) cat >>confdefs.h <<_ACEOF
3611@%:@define inline $ac_cv_c_inline
3612_ACEOF
3613 ;;
3614esac
3615
3616if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
3617 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
3618fi
3619
3620# Check for some target-specific stuff
3621case "$host" in
3622*-*-aix*)
3623 AFS_LIBS="-lld"
3624 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
3625 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3626 echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5
3627echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6
3628 if (test -z "$blibpath"); then
3629 blibpath="/usr/lib:/lib:/usr/local/lib"
3630 fi
3631 saved_LDFLAGS="$LDFLAGS"
3632 for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do
3633 if (test -z "$blibflags"); then
3634 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
3635 cat >conftest.$ac_ext <<_ACEOF
3636#line $LINENO "configure"
3637/* confdefs.h. */
3638_ACEOF
3639cat confdefs.h >>conftest.$ac_ext
3640cat >>conftest.$ac_ext <<_ACEOF
3641/* end confdefs.h. */
3642
3643int
3644main ()
3645{
3646
3647 ;
3648 return 0;
3649}
3650_ACEOF
3651rm -f conftest.$ac_objext conftest$ac_exeext
3652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3653 (eval $ac_link) 2>&5
3654 ac_status=$?
3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656 (exit $ac_status); } &&
3657 { ac_try='test -s conftest$ac_exeext'
3658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3659 (eval $ac_try) 2>&5
3660 ac_status=$?
3661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3662 (exit $ac_status); }; }; then
3663 blibflags=$tryflags
3664else
3665 echo "$as_me: failed program was:" >&5
3666sed 's/^/| /' conftest.$ac_ext >&5
3667
3668fi
3669rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3670 fi
3671 done
3672 if (test -z "$blibflags"); then
3673 echo "$as_me:$LINENO: result: not found" >&5
3674echo "${ECHO_T}not found" >&6
3675 { { echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5
3676echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;}
3677 { (exit 1); exit 1; }; }
3678 else
3679 echo "$as_me:$LINENO: result: $blibflags" >&5
3680echo "${ECHO_T}$blibflags" >&6
3681 fi
3682 LDFLAGS="$saved_LDFLAGS"
3683 echo "$as_me:$LINENO: checking for authenticate" >&5
3684echo $ECHO_N "checking for authenticate... $ECHO_C" >&6
3685if test "${ac_cv_func_authenticate+set}" = set; then
3686 echo $ECHO_N "(cached) $ECHO_C" >&6
3687else
3688 cat >conftest.$ac_ext <<_ACEOF
3689#line $LINENO "configure"
3690/* confdefs.h. */
3691_ACEOF
3692cat confdefs.h >>conftest.$ac_ext
3693cat >>conftest.$ac_ext <<_ACEOF
3694/* end confdefs.h. */
3695/* System header to define __stub macros and hopefully few prototypes,
3696 which can conflict with char authenticate (); below.
3697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3698 <limits.h> exists even on freestanding compilers. */
3699#ifdef __STDC__
3700# include <limits.h>
3701#else
3702# include <assert.h>
3703#endif
3704/* Override any gcc2 internal prototype to avoid an error. */
3705#ifdef __cplusplus
3706extern "C"
3707{
3708#endif
3709/* We use char because int might match the return type of a gcc2
3710 builtin and then its argument prototype would still apply. */
3711char authenticate ();
3712/* The GNU C library defines this for functions which it implements
3713 to always fail with ENOSYS. Some functions are actually named
3714 something starting with __ and the normal name is an alias. */
3715#if defined (__stub_authenticate) || defined (__stub___authenticate)
3716choke me
3717#else
3718char (*f) () = authenticate;
3719#endif
3720#ifdef __cplusplus
3721}
3722#endif
3723
3724int
3725main ()
3726{
3727return f != authenticate;
3728 ;
3729 return 0;
3730}
3731_ACEOF
3732rm -f conftest.$ac_objext conftest$ac_exeext
3733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3734 (eval $ac_link) 2>&5
3735 ac_status=$?
3736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3737 (exit $ac_status); } &&
3738 { ac_try='test -s conftest$ac_exeext'
3739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3740 (eval $ac_try) 2>&5
3741 ac_status=$?
3742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3743 (exit $ac_status); }; }; then
3744 ac_cv_func_authenticate=yes
3745else
3746 echo "$as_me: failed program was:" >&5
3747sed 's/^/| /' conftest.$ac_ext >&5
3748
3749ac_cv_func_authenticate=no
3750fi
3751rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3752fi
3753echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5
3754echo "${ECHO_T}$ac_cv_func_authenticate" >&6
3755if test $ac_cv_func_authenticate = yes; then
3756 cat >>confdefs.h <<\_ACEOF
3757@%:@define WITH_AIXAUTHENTICATE 1
3758_ACEOF
3759
3760else
3761 echo "$as_me:$LINENO: checking for authenticate in -ls" >&5
3762echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6
3763if test "${ac_cv_lib_s_authenticate+set}" = set; then
3764 echo $ECHO_N "(cached) $ECHO_C" >&6
3765else
3766 ac_check_lib_save_LIBS=$LIBS
3767LIBS="-ls $LIBS"
3768cat >conftest.$ac_ext <<_ACEOF
3769#line $LINENO "configure"
3770/* confdefs.h. */
3771_ACEOF
3772cat confdefs.h >>conftest.$ac_ext
3773cat >>conftest.$ac_ext <<_ACEOF
3774/* end confdefs.h. */
3775
3776/* Override any gcc2 internal prototype to avoid an error. */
3777#ifdef __cplusplus
3778extern "C"
3779#endif
3780/* We use char because int might match the return type of a gcc2
3781 builtin and then its argument prototype would still apply. */
3782char authenticate ();
3783int
3784main ()
3785{
3786authenticate ();
3787 ;
3788 return 0;
3789}
3790_ACEOF
3791rm -f conftest.$ac_objext conftest$ac_exeext
3792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3793 (eval $ac_link) 2>&5
3794 ac_status=$?
3795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3796 (exit $ac_status); } &&
3797 { ac_try='test -s conftest$ac_exeext'
3798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3799 (eval $ac_try) 2>&5
3800 ac_status=$?
3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802 (exit $ac_status); }; }; then
3803 ac_cv_lib_s_authenticate=yes
3804else
3805 echo "$as_me: failed program was:" >&5
3806sed 's/^/| /' conftest.$ac_ext >&5
3807
3808ac_cv_lib_s_authenticate=no
3809fi
3810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3811LIBS=$ac_check_lib_save_LIBS
3812fi
3813echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5
3814echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6
3815if test $ac_cv_lib_s_authenticate = yes; then
3816 cat >>confdefs.h <<\_ACEOF
3817@%:@define WITH_AIXAUTHENTICATE 1
3818_ACEOF
3819
3820 LIBS="$LIBS -ls"
3821
3822fi
3823
3824
3825fi
3826
3827 cat >>confdefs.h <<\_ACEOF
3828@%:@define BROKEN_GETADDRINFO 1
3829_ACEOF
3830
3831 cat >>confdefs.h <<\_ACEOF
3832@%:@define BROKEN_REALPATH 1
3833_ACEOF
3834
3835 cat >>confdefs.h <<\_ACEOF
3836@%:@define DISABLE_LASTLOG 1
3837_ACEOF
3838
3839 cat >>confdefs.h <<\_ACEOF
3840@%:@define LOGIN_NEEDS_UTMPX 1
3841_ACEOF
3842
3843 cat >>confdefs.h <<\_ACEOF
3844@%:@define SETPROCTITLE_STRATEGY PS_USE_CLOBBER_ARGV
3845_ACEOF
3846
3847 cat >>confdefs.h <<\_ACEOF
3848@%:@define SETPROCTITLE_PS_PADDING '\0'
3849_ACEOF
3850
3851 ;;
3852*-*-cygwin*)
3853 check_for_libcrypt_later=1
3854 LIBS="$LIBS /usr/lib/textmode.o"
3855 cat >>confdefs.h <<\_ACEOF
3856@%:@define HAVE_CYGWIN 1
3857_ACEOF
3858
3859 cat >>confdefs.h <<\_ACEOF
3860@%:@define USE_PIPES 1
3861_ACEOF
3862
3863 cat >>confdefs.h <<\_ACEOF
3864@%:@define DISABLE_SHADOW 1
3865_ACEOF
3866
3867 cat >>confdefs.h <<\_ACEOF
3868@%:@define IPV4_DEFAULT 1
3869_ACEOF
3870
3871 cat >>confdefs.h <<\_ACEOF
3872@%:@define IP_TOS_IS_BROKEN 1
3873_ACEOF
3874
3875 cat >>confdefs.h <<\_ACEOF
3876@%:@define NO_X11_UNIX_SOCKETS 1
3877_ACEOF
3878
3879 cat >>confdefs.h <<\_ACEOF
3880@%:@define NO_IPPORT_RESERVED_CONCEPT 1
3881_ACEOF
3882
3883 cat >>confdefs.h <<\_ACEOF
3884@%:@define DISABLE_FD_PASSING 1
3885_ACEOF
3886
3887 cat >>confdefs.h <<\_ACEOF
3888@%:@define SETGROUPS_NOOP 1
3889_ACEOF
3890
3891 ;;
3892*-*-dgux*)
3893 cat >>confdefs.h <<\_ACEOF
3894@%:@define IP_TOS_IS_BROKEN 1
3895_ACEOF
3896
3897 ;;
3898*-*-darwin*)
3899 echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5
3900echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6
3901 if test "$cross_compiling" = yes; then
3902 echo "$as_me:$LINENO: result: assume it is working" >&5
3903echo "${ECHO_T}assume it is working" >&6
3904else
3905 cat >conftest.$ac_ext <<_ACEOF
3906#line $LINENO "configure"
3907/* confdefs.h. */
3908_ACEOF
3909cat confdefs.h >>conftest.$ac_ext
3910cat >>conftest.$ac_ext <<_ACEOF
3911/* end confdefs.h. */
3912#include <mach-o/dyld.h>
3913main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
3914 exit(0);
3915 else
3916 exit(1);
3917}
3918_ACEOF
3919rm -f conftest$ac_exeext
3920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3921 (eval $ac_link) 2>&5
3922 ac_status=$?
3923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3926 (eval $ac_try) 2>&5
3927 ac_status=$?
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); }; }; then
3930 echo "$as_me:$LINENO: result: working" >&5
3931echo "${ECHO_T}working" >&6
3932else
3933 echo "$as_me: program exited with status $ac_status" >&5
3934echo "$as_me: failed program was:" >&5
3935sed 's/^/| /' conftest.$ac_ext >&5
3936
3937( exit $ac_status )
3938echo "$as_me:$LINENO: result: buggy" >&5
3939echo "${ECHO_T}buggy" >&6
3940 cat >>confdefs.h <<\_ACEOF
3941@%:@define BROKEN_GETADDRINFO 1
3942_ACEOF
3943
3944fi
3945rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3946fi
3947 ;;
3948*-*-hpux10.26)
3949 if test -z "$GCC"; then
3950 CFLAGS="$CFLAGS -Ae"
3951 fi
3952 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
3953 IPADDR_IN_DISPLAY=yes
3954 cat >>confdefs.h <<\_ACEOF
3955@%:@define HAVE_SECUREWARE 1
3956_ACEOF
3957
3958 cat >>confdefs.h <<\_ACEOF
3959@%:@define USE_PIPES 1
3960_ACEOF
3961
3962 cat >>confdefs.h <<\_ACEOF
3963@%:@define LOGIN_NO_ENDOPT 1
3964_ACEOF
3965
3966 cat >>confdefs.h <<\_ACEOF
3967@%:@define LOGIN_NEEDS_UTMPX 1
3968_ACEOF
3969
3970 cat >>confdefs.h <<\_ACEOF
3971@%:@define DISABLE_SHADOW 1
3972_ACEOF
3973
3974 cat >>confdefs.h <<\_ACEOF
3975@%:@define DISABLE_UTMP 1
3976_ACEOF
3977
3978 cat >>confdefs.h <<\_ACEOF
3979@%:@define SETPROCTITLE_STRATEGY PS_USE_PSTAT
3980_ACEOF
3981
3982 LIBS="$LIBS -lsec -lsecpw"
3983
3984echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
3985echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6
3986if test "${ac_cv_lib_xnet_t_error+set}" = set; then
3987 echo $ECHO_N "(cached) $ECHO_C" >&6
3988else
3989 ac_check_lib_save_LIBS=$LIBS
3990LIBS="-lxnet $LIBS"
3991cat >conftest.$ac_ext <<_ACEOF
3992#line $LINENO "configure"
3993/* confdefs.h. */
3994_ACEOF
3995cat confdefs.h >>conftest.$ac_ext
3996cat >>conftest.$ac_ext <<_ACEOF
3997/* end confdefs.h. */
3998
3999/* Override any gcc2 internal prototype to avoid an error. */
4000#ifdef __cplusplus
4001extern "C"
4002#endif
4003/* We use char because int might match the return type of a gcc2
4004 builtin and then its argument prototype would still apply. */
4005char t_error ();
4006int
4007main ()
4008{
4009t_error ();
4010 ;
4011 return 0;
4012}
4013_ACEOF
4014rm -f conftest.$ac_objext conftest$ac_exeext
4015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4016 (eval $ac_link) 2>&5
4017 ac_status=$?
4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4019 (exit $ac_status); } &&
4020 { ac_try='test -s conftest$ac_exeext'
4021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4022 (eval $ac_try) 2>&5
4023 ac_status=$?
4024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4025 (exit $ac_status); }; }; then
4026 ac_cv_lib_xnet_t_error=yes
4027else
4028 echo "$as_me: failed program was:" >&5
4029sed 's/^/| /' conftest.$ac_ext >&5
4030
4031ac_cv_lib_xnet_t_error=no
4032fi
4033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4034LIBS=$ac_check_lib_save_LIBS
4035fi
4036echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
4037echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6
4038if test $ac_cv_lib_xnet_t_error = yes; then
4039 cat >>confdefs.h <<_ACEOF
4040@%:@define HAVE_LIBXNET 1
4041_ACEOF
4042
4043 LIBS="-lxnet $LIBS"
4044
4045else
4046 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
4047echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
4048 { (exit 1); exit 1; }; }
4049fi
4050
4051 disable_ptmx_check=yes
4052 ;;
4053*-*-hpux10*)
4054 if test -z "$GCC"; then
4055 CFLAGS="$CFLAGS -Ae"
4056 fi
4057 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
4058 IPADDR_IN_DISPLAY=yes
4059 cat >>confdefs.h <<\_ACEOF
4060@%:@define USE_PIPES 1
4061_ACEOF
4062
4063 cat >>confdefs.h <<\_ACEOF
4064@%:@define LOGIN_NO_ENDOPT 1
4065_ACEOF
4066
4067 cat >>confdefs.h <<\_ACEOF
4068@%:@define LOGIN_NEEDS_UTMPX 1
4069_ACEOF
4070
4071 cat >>confdefs.h <<\_ACEOF
4072@%:@define DISABLE_SHADOW 1
4073_ACEOF
4074
4075 cat >>confdefs.h <<\_ACEOF
4076@%:@define DISABLE_UTMP 1
4077_ACEOF
4078
4079 cat >>confdefs.h <<\_ACEOF
4080@%:@define SETPROCTITLE_STRATEGY PS_USE_PSTAT
4081_ACEOF
4082
4083 LIBS="$LIBS -lsec"
4084
4085echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
4086echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6
4087if test "${ac_cv_lib_xnet_t_error+set}" = set; then
4088 echo $ECHO_N "(cached) $ECHO_C" >&6
4089else
4090 ac_check_lib_save_LIBS=$LIBS
4091LIBS="-lxnet $LIBS"
4092cat >conftest.$ac_ext <<_ACEOF
4093#line $LINENO "configure"
4094/* confdefs.h. */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h. */
4099
4100/* Override any gcc2 internal prototype to avoid an error. */
4101#ifdef __cplusplus
4102extern "C"
4103#endif
4104/* We use char because int might match the return type of a gcc2
4105 builtin and then its argument prototype would still apply. */
4106char t_error ();
4107int
4108main ()
4109{
4110t_error ();
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest.$ac_objext conftest$ac_exeext
4116if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4117 (eval $ac_link) 2>&5
4118 ac_status=$?
4119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4120 (exit $ac_status); } &&
4121 { ac_try='test -s conftest$ac_exeext'
4122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4123 (eval $ac_try) 2>&5
4124 ac_status=$?
4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); }; }; then
4127 ac_cv_lib_xnet_t_error=yes
4128else
4129 echo "$as_me: failed program was:" >&5
4130sed 's/^/| /' conftest.$ac_ext >&5
4131
4132ac_cv_lib_xnet_t_error=no
4133fi
4134rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4135LIBS=$ac_check_lib_save_LIBS
4136fi
4137echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
4138echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6
4139if test $ac_cv_lib_xnet_t_error = yes; then
4140 cat >>confdefs.h <<_ACEOF
4141@%:@define HAVE_LIBXNET 1
4142_ACEOF
4143
4144 LIBS="-lxnet $LIBS"
4145
4146else
4147 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
4148echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
4149 { (exit 1); exit 1; }; }
4150fi
4151
4152 ;;
4153*-*-hpux11*)
4154 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
4155 IPADDR_IN_DISPLAY=yes
4156 cat >>confdefs.h <<\_ACEOF
4157@%:@define PAM_SUN_CODEBASE 1
4158_ACEOF
4159
4160 cat >>confdefs.h <<\_ACEOF
4161@%:@define USE_PIPES 1
4162_ACEOF
4163
4164 cat >>confdefs.h <<\_ACEOF
4165@%:@define LOGIN_NO_ENDOPT 1
4166_ACEOF
4167
4168 cat >>confdefs.h <<\_ACEOF
4169@%:@define LOGIN_NEEDS_UTMPX 1
4170_ACEOF
4171
4172 cat >>confdefs.h <<\_ACEOF
4173@%:@define DISABLE_SHADOW 1
4174_ACEOF
4175
4176 cat >>confdefs.h <<\_ACEOF
4177@%:@define DISABLE_UTMP 1
4178_ACEOF
4179
4180 cat >>confdefs.h <<\_ACEOF
4181@%:@define SETPROCTITLE_STRATEGY PS_USE_PSTAT
4182_ACEOF
4183
4184 LIBS="$LIBS -lsec"
4185
4186echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
4187echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6
4188if test "${ac_cv_lib_xnet_t_error+set}" = set; then
4189 echo $ECHO_N "(cached) $ECHO_C" >&6
4190else
4191 ac_check_lib_save_LIBS=$LIBS
4192LIBS="-lxnet $LIBS"
4193cat >conftest.$ac_ext <<_ACEOF
4194#line $LINENO "configure"
4195/* confdefs.h. */
4196_ACEOF
4197cat confdefs.h >>conftest.$ac_ext
4198cat >>conftest.$ac_ext <<_ACEOF
4199/* end confdefs.h. */
4200
4201/* Override any gcc2 internal prototype to avoid an error. */
4202#ifdef __cplusplus
4203extern "C"
4204#endif
4205/* We use char because int might match the return type of a gcc2
4206 builtin and then its argument prototype would still apply. */
4207char t_error ();
4208int
4209main ()
4210{
4211t_error ();
4212 ;
4213 return 0;
4214}
4215_ACEOF
4216rm -f conftest.$ac_objext conftest$ac_exeext
4217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4218 (eval $ac_link) 2>&5
4219 ac_status=$?
4220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4221 (exit $ac_status); } &&
4222 { ac_try='test -s conftest$ac_exeext'
4223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4224 (eval $ac_try) 2>&5
4225 ac_status=$?
4226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4227 (exit $ac_status); }; }; then
4228 ac_cv_lib_xnet_t_error=yes
4229else
4230 echo "$as_me: failed program was:" >&5
4231sed 's/^/| /' conftest.$ac_ext >&5
4232
4233ac_cv_lib_xnet_t_error=no
4234fi
4235rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4236LIBS=$ac_check_lib_save_LIBS
4237fi
4238echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
4239echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6
4240if test $ac_cv_lib_xnet_t_error = yes; then
4241 cat >>confdefs.h <<_ACEOF
4242@%:@define HAVE_LIBXNET 1
4243_ACEOF
4244
4245 LIBS="-lxnet $LIBS"
4246
4247else
4248 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
4249echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
4250 { (exit 1); exit 1; }; }
4251fi
4252
4253 ;;
4254*-*-irix5*)
4255 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4256 LDFLAGS="$LDFLAGS"
4257 PATH="$PATH:/usr/etc"
4258 cat >>confdefs.h <<\_ACEOF
4259@%:@define BROKEN_INET_NTOA 1
4260_ACEOF
4261
4262 cat >>confdefs.h <<\_ACEOF
4263@%:@define WITH_ABBREV_NO_TTY 1
4264_ACEOF
4265
4266 ;;
4267*-*-irix6*)
4268 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4269 LDFLAGS="$LDFLAGS"
4270 PATH="$PATH:/usr/etc"
4271 cat >>confdefs.h <<\_ACEOF
4272@%:@define WITH_IRIX_ARRAY 1
4273_ACEOF
4274
4275 cat >>confdefs.h <<\_ACEOF
4276@%:@define WITH_IRIX_PROJECT 1
4277_ACEOF
4278
4279 cat >>confdefs.h <<\_ACEOF
4280@%:@define WITH_IRIX_AUDIT 1
4281_ACEOF
4282
4283 echo "$as_me:$LINENO: checking for jlimit_startjob" >&5
4284echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6
4285if test "${ac_cv_func_jlimit_startjob+set}" = set; then
4286 echo $ECHO_N "(cached) $ECHO_C" >&6
4287else
4288 cat >conftest.$ac_ext <<_ACEOF
4289#line $LINENO "configure"
4290/* confdefs.h. */
4291_ACEOF
4292cat confdefs.h >>conftest.$ac_ext
4293cat >>conftest.$ac_ext <<_ACEOF
4294/* end confdefs.h. */
4295/* System header to define __stub macros and hopefully few prototypes,
4296 which can conflict with char jlimit_startjob (); below.
4297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4298 <limits.h> exists even on freestanding compilers. */
4299#ifdef __STDC__
4300# include <limits.h>
4301#else
4302# include <assert.h>
4303#endif
4304/* Override any gcc2 internal prototype to avoid an error. */
4305#ifdef __cplusplus
4306extern "C"
4307{
4308#endif
4309/* We use char because int might match the return type of a gcc2
4310 builtin and then its argument prototype would still apply. */
4311char jlimit_startjob ();
4312/* The GNU C library defines this for functions which it implements
4313 to always fail with ENOSYS. Some functions are actually named
4314 something starting with __ and the normal name is an alias. */
4315#if defined (__stub_jlimit_startjob) || defined (__stub___jlimit_startjob)
4316choke me
4317#else
4318char (*f) () = jlimit_startjob;
4319#endif
4320#ifdef __cplusplus
4321}
4322#endif
4323
4324int
4325main ()
4326{
4327return f != jlimit_startjob;
4328 ;
4329 return 0;
4330}
4331_ACEOF
4332rm -f conftest.$ac_objext conftest$ac_exeext
4333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4334 (eval $ac_link) 2>&5
4335 ac_status=$?
4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4337 (exit $ac_status); } &&
4338 { ac_try='test -s conftest$ac_exeext'
4339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4340 (eval $ac_try) 2>&5
4341 ac_status=$?
4342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343 (exit $ac_status); }; }; then
4344 ac_cv_func_jlimit_startjob=yes
4345else
4346 echo "$as_me: failed program was:" >&5
4347sed 's/^/| /' conftest.$ac_ext >&5
4348
4349ac_cv_func_jlimit_startjob=no
4350fi
4351rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4352fi
4353echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5
4354echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6
4355if test $ac_cv_func_jlimit_startjob = yes; then
4356 cat >>confdefs.h <<\_ACEOF
4357@%:@define WITH_IRIX_JOBS 1
4358_ACEOF
4359
4360fi
4361
4362 cat >>confdefs.h <<\_ACEOF
4363@%:@define BROKEN_INET_NTOA 1
4364_ACEOF
4365
4366 cat >>confdefs.h <<\_ACEOF
4367@%:@define WITH_ABBREV_NO_TTY 1
4368_ACEOF
4369
4370 ;;
4371*-*-linux*)
4372 no_dev_ptmx=1
4373 check_for_libcrypt_later=1
4374 cat >>confdefs.h <<\_ACEOF
4375@%:@define DONT_TRY_OTHER_AF 1
4376_ACEOF
4377
4378 cat >>confdefs.h <<\_ACEOF
4379@%:@define PAM_TTY_KLUDGE 1
4380_ACEOF
4381
4382 cat >>confdefs.h <<\_ACEOF
4383@%:@define SETPROCTITLE_STRATEGY PS_USE_CLOBBER_ARGV
4384_ACEOF
4385
4386 cat >>confdefs.h <<\_ACEOF
4387@%:@define SETPROCTITLE_PS_PADDING '\0'
4388_ACEOF
4389
4390 inet6_default_4in6=yes
4391 ;;
4392mips-sony-bsd|mips-sony-newsos4)
4393 cat >>confdefs.h <<\_ACEOF
4394@%:@define HAVE_NEWS4 1
4395_ACEOF
4396
4397 SONY=1
4398 ;;
4399*-*-netbsd*)
4400 check_for_libcrypt_before=1
4401 need_dash_r=1
4402 ;;
4403*-*-freebsd*)
4404 check_for_libcrypt_later=1
4405 ;;
4406*-next-*)
4407 conf_lastlog_location="/usr/adm/lastlog"
4408 conf_utmp_location=/etc/utmp
4409 conf_wtmp_location=/usr/adm/wtmp
4410 MAIL=/usr/spool/mail
4411 cat >>confdefs.h <<\_ACEOF
4412@%:@define HAVE_NEXT 1
4413_ACEOF
4414
4415 cat >>confdefs.h <<\_ACEOF
4416@%:@define BROKEN_REALPATH 1
4417_ACEOF
4418
4419 cat >>confdefs.h <<\_ACEOF
4420@%:@define USE_PIPES 1
4421_ACEOF
4422
4423 cat >>confdefs.h <<\_ACEOF
4424@%:@define BROKEN_SAVED_UIDS 1
4425_ACEOF
4426
4427 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4428 CFLAGS="$CFLAGS"
4429 ;;
4430*-*-solaris*)
4431 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4432 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
4433 need_dash_r=1
4434 cat >>confdefs.h <<\_ACEOF
4435@%:@define PAM_SUN_CODEBASE 1
4436_ACEOF
4437
4438 cat >>confdefs.h <<\_ACEOF
4439@%:@define LOGIN_NEEDS_UTMPX 1
4440_ACEOF
4441
4442 cat >>confdefs.h <<\_ACEOF
4443@%:@define LOGIN_NEEDS_TERM 1
4444_ACEOF
4445
4446 cat >>confdefs.h <<\_ACEOF
4447@%:@define PAM_TTY_KLUDGE 1
4448_ACEOF
4449
4450 cat >>confdefs.h <<\_ACEOF
4451@%:@define STREAMS_PUSH_ACQUIRES_CTTY 1
4452_ACEOF
4453
4454 # hardwire lastlog location (can't detect it on some versions)
4455 conf_lastlog_location="/var/adm/lastlog"
4456 echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5
4457echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6
4458 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
4459 if test "$sol2ver" -ge 8; then
4460 echo "$as_me:$LINENO: result: yes" >&5
4461echo "${ECHO_T}yes" >&6
4462 cat >>confdefs.h <<\_ACEOF
4463@%:@define DISABLE_UTMP 1
4464_ACEOF
4465
4466 cat >>confdefs.h <<\_ACEOF
4467@%:@define DISABLE_WTMP 1
4468_ACEOF
4469
4470 else
4471 echo "$as_me:$LINENO: result: no" >&5
4472echo "${ECHO_T}no" >&6
4473 fi
4474 ;;
4475*-*-sunos4*)
4476 CPPFLAGS="$CPPFLAGS -DSUNOS4"
4477
4478for ac_func in getpwanam
4479do
4480as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4481echo "$as_me:$LINENO: checking for $ac_func" >&5
4482echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4483if eval "test \"\${$as_ac_var+set}\" = set"; then
4484 echo $ECHO_N "(cached) $ECHO_C" >&6
4485else
4486 cat >conftest.$ac_ext <<_ACEOF
4487#line $LINENO "configure"
4488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
4493/* System header to define __stub macros and hopefully few prototypes,
4494 which can conflict with char $ac_func (); below.
4495 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4496 <limits.h> exists even on freestanding compilers. */
4497#ifdef __STDC__
4498# include <limits.h>
4499#else
4500# include <assert.h>
4501#endif
4502/* Override any gcc2 internal prototype to avoid an error. */
4503#ifdef __cplusplus
4504extern "C"
4505{
4506#endif
4507/* We use char because int might match the return type of a gcc2
4508 builtin and then its argument prototype would still apply. */
4509char $ac_func ();
4510/* The GNU C library defines this for functions which it implements
4511 to always fail with ENOSYS. Some functions are actually named
4512 something starting with __ and the normal name is an alias. */
4513#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4514choke me
4515#else
4516char (*f) () = $ac_func;
4517#endif
4518#ifdef __cplusplus
4519}
4520#endif
4521
4522int
4523main ()
4524{
4525return f != $ac_func;
4526 ;
4527 return 0;
4528}
4529_ACEOF
4530rm -f conftest.$ac_objext conftest$ac_exeext
4531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4532 (eval $ac_link) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); } &&
4536 { ac_try='test -s conftest$ac_exeext'
4537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4538 (eval $ac_try) 2>&5
4539 ac_status=$?
4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541 (exit $ac_status); }; }; then
4542 eval "$as_ac_var=yes"
4543else
4544 echo "$as_me: failed program was:" >&5
4545sed 's/^/| /' conftest.$ac_ext >&5
4546
4547eval "$as_ac_var=no"
4548fi
4549rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4550fi
4551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4552echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4553if test `eval echo '${'$as_ac_var'}'` = yes; then
4554 cat >>confdefs.h <<_ACEOF
4555@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4556_ACEOF
4557
4558fi
4559done
4560
4561 cat >>confdefs.h <<\_ACEOF
4562@%:@define PAM_SUN_CODEBASE 1
4563_ACEOF
4564
4565 conf_utmp_location=/etc/utmp
4566 conf_wtmp_location=/var/adm/wtmp
4567 conf_lastlog_location=/var/adm/lastlog
4568 cat >>confdefs.h <<\_ACEOF
4569@%:@define USE_PIPES 1
4570_ACEOF
4571
4572 ;;
4573*-ncr-sysv*)
4574 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4575 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4576 LIBS="$LIBS -lc89"
4577 cat >>confdefs.h <<\_ACEOF
4578@%:@define USE_PIPES 1
4579_ACEOF
4580
4581 ;;
4582*-sni-sysv*)
4583 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4584 # /usr/ucblib MUST NOT be searched on ReliantUNIX
4585 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4586 IPADDR_IN_DISPLAY=yes
4587 cat >>confdefs.h <<\_ACEOF
4588@%:@define USE_PIPES 1
4589_ACEOF
4590
4591 cat >>confdefs.h <<\_ACEOF
4592@%:@define IP_TOS_IS_BROKEN 1
4593_ACEOF
4594
4595 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
4596 # Attention: always take care to bind libsocket and libnsl before libc,
4597 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
4598 ;;
4599*-*-sysv4.2*)
4600 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4601 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4602 cat >>confdefs.h <<\_ACEOF
4603@%:@define USE_PIPES 1
4604_ACEOF
4605
4606 ;;
4607*-*-sysv5*)
4608 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4609 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4610 cat >>confdefs.h <<\_ACEOF
4611@%:@define USE_PIPES 1
4612_ACEOF
4613
4614 ;;
4615*-*-sysv*)
4616 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4617 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4618 ;;
4619*-*-sco3.2v4*)
4620 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
4621 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4622 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
4623 RANLIB=true
4624 no_dev_ptmx=1
4625 cat >>confdefs.h <<\_ACEOF
4626@%:@define BROKEN_SYS_TERMIO_H 1
4627_ACEOF
4628
4629 cat >>confdefs.h <<\_ACEOF
4630@%:@define USE_PIPES 1
4631_ACEOF
4632
4633 cat >>confdefs.h <<\_ACEOF
4634@%:@define HAVE_SECUREWARE 1
4635_ACEOF
4636
4637 cat >>confdefs.h <<\_ACEOF
4638@%:@define DISABLE_SHADOW 1
4639_ACEOF
4640
4641 cat >>confdefs.h <<\_ACEOF
4642@%:@define BROKEN_SAVED_UIDS 1
4643_ACEOF
4644
4645
4646
4647for ac_func in getluid setluid
4648do
4649as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4650echo "$as_me:$LINENO: checking for $ac_func" >&5
4651echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4652if eval "test \"\${$as_ac_var+set}\" = set"; then
4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4654else
4655 cat >conftest.$ac_ext <<_ACEOF
4656#line $LINENO "configure"
4657/* confdefs.h. */
4658_ACEOF
4659cat confdefs.h >>conftest.$ac_ext
4660cat >>conftest.$ac_ext <<_ACEOF
4661/* end confdefs.h. */
4662/* System header to define __stub macros and hopefully few prototypes,
4663 which can conflict with char $ac_func (); below.
4664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4665 <limits.h> exists even on freestanding compilers. */
4666#ifdef __STDC__
4667# include <limits.h>
4668#else
4669# include <assert.h>
4670#endif
4671/* Override any gcc2 internal prototype to avoid an error. */
4672#ifdef __cplusplus
4673extern "C"
4674{
4675#endif
4676/* We use char because int might match the return type of a gcc2
4677 builtin and then its argument prototype would still apply. */
4678char $ac_func ();
4679/* The GNU C library defines this for functions which it implements
4680 to always fail with ENOSYS. Some functions are actually named
4681 something starting with __ and the normal name is an alias. */
4682#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4683choke me
4684#else
4685char (*f) () = $ac_func;
4686#endif
4687#ifdef __cplusplus
4688}
4689#endif
4690
4691int
4692main ()
4693{
4694return f != $ac_func;
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699rm -f conftest.$ac_objext conftest$ac_exeext
4700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4701 (eval $ac_link) 2>&5
4702 ac_status=$?
4703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704 (exit $ac_status); } &&
4705 { ac_try='test -s conftest$ac_exeext'
4706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4707 (eval $ac_try) 2>&5
4708 ac_status=$?
4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710 (exit $ac_status); }; }; then
4711 eval "$as_ac_var=yes"
4712else
4713 echo "$as_me: failed program was:" >&5
4714sed 's/^/| /' conftest.$ac_ext >&5
4715
4716eval "$as_ac_var=no"
4717fi
4718rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4719fi
4720echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4721echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4722if test `eval echo '${'$as_ac_var'}'` = yes; then
4723 cat >>confdefs.h <<_ACEOF
4724@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4725_ACEOF
4726
4727fi
4728done
4729
4730 MANTYPE=man
4731 do_sco3_extra_lib_check=yes
4732 ;;
4733*-*-sco3.2v5*)
4734 if test -z "$GCC"; then
4735 CFLAGS="$CFLAGS -belf"
4736 fi
4737 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4738 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4739 LIBS="$LIBS -lprot -lx -ltinfo -lm"
4740 no_dev_ptmx=1
4741 cat >>confdefs.h <<\_ACEOF
4742@%:@define USE_PIPES 1
4743_ACEOF
4744
4745 cat >>confdefs.h <<\_ACEOF
4746@%:@define HAVE_SECUREWARE 1
4747_ACEOF
4748
4749 cat >>confdefs.h <<\_ACEOF
4750@%:@define DISABLE_SHADOW 1
4751_ACEOF
4752
4753 cat >>confdefs.h <<\_ACEOF
4754@%:@define DISABLE_FD_PASSING 1
4755_ACEOF
4756
4757
4758
4759for ac_func in getluid setluid
4760do
4761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4762echo "$as_me:$LINENO: checking for $ac_func" >&5
4763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4764if eval "test \"\${$as_ac_var+set}\" = set"; then
4765 echo $ECHO_N "(cached) $ECHO_C" >&6
4766else
4767 cat >conftest.$ac_ext <<_ACEOF
4768#line $LINENO "configure"
4769/* confdefs.h. */
4770_ACEOF
4771cat confdefs.h >>conftest.$ac_ext
4772cat >>conftest.$ac_ext <<_ACEOF
4773/* end confdefs.h. */
4774/* System header to define __stub macros and hopefully few prototypes,
4775 which can conflict with char $ac_func (); below.
4776 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4777 <limits.h> exists even on freestanding compilers. */
4778#ifdef __STDC__
4779# include <limits.h>
4780#else
4781# include <assert.h>
4782#endif
4783/* Override any gcc2 internal prototype to avoid an error. */
4784#ifdef __cplusplus
4785extern "C"
4786{
4787#endif
4788/* We use char because int might match the return type of a gcc2
4789 builtin and then its argument prototype would still apply. */
4790char $ac_func ();
4791/* The GNU C library defines this for functions which it implements
4792 to always fail with ENOSYS. Some functions are actually named
4793 something starting with __ and the normal name is an alias. */
4794#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4795choke me
4796#else
4797char (*f) () = $ac_func;
4798#endif
4799#ifdef __cplusplus
4800}
4801#endif
4802
4803int
4804main ()
4805{
4806return f != $ac_func;
4807 ;
4808 return 0;
4809}
4810_ACEOF
4811rm -f conftest.$ac_objext conftest$ac_exeext
4812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4813 (eval $ac_link) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); } &&
4817 { ac_try='test -s conftest$ac_exeext'
4818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; }; then
4823 eval "$as_ac_var=yes"
4824else
4825 echo "$as_me: failed program was:" >&5
4826sed 's/^/| /' conftest.$ac_ext >&5
4827
4828eval "$as_ac_var=no"
4829fi
4830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4831fi
4832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4833echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4834if test `eval echo '${'$as_ac_var'}'` = yes; then
4835 cat >>confdefs.h <<_ACEOF
4836@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4837_ACEOF
4838
4839fi
4840done
4841
4842 MANTYPE=man
4843 ;;
4844*-*-unicosmk*)
4845 cat >>confdefs.h <<\_ACEOF
4846@%:@define USE_PIPES 1
4847_ACEOF
4848
4849 cat >>confdefs.h <<\_ACEOF
4850@%:@define DISABLE_FD_PASSING 1
4851_ACEOF
4852
4853 LDFLAGS="$LDFLAGS"
4854 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
4855 MANTYPE=cat
4856 ;;
4857*-*-unicos*)
4858 cat >>confdefs.h <<\_ACEOF
4859@%:@define USE_PIPES 1
4860_ACEOF
4861
4862 cat >>confdefs.h <<\_ACEOF
4863@%:@define DISABLE_FD_PASSING 1
4864_ACEOF
4865
4866 cat >>confdefs.h <<\_ACEOF
4867@%:@define NO_SSH_LASTLOG 1
4868_ACEOF
4869
4870 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
4871 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
4872 MANTYPE=cat
4873 ;;
4874*-dec-osf*)
4875 echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5
4876echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6
4877 no_osfsia=""
4878
4879# Check whether --with-osfsia or --without-osfsia was given.
4880if test "${with_osfsia+set}" = set; then
4881 withval="$with_osfsia"
4882
4883 if test "x$withval" = "xno" ; then
4884 echo "$as_me:$LINENO: result: disabled" >&5
4885echo "${ECHO_T}disabled" >&6
4886 no_osfsia=1
4887 fi
4888
4889fi;
4890 if test -z "$no_osfsia" ; then
4891 if test -f /etc/sia/matrix.conf; then
4892 echo "$as_me:$LINENO: result: yes" >&5
4893echo "${ECHO_T}yes" >&6
4894 cat >>confdefs.h <<\_ACEOF
4895@%:@define HAVE_OSF_SIA 1
4896_ACEOF
4897
4898 cat >>confdefs.h <<\_ACEOF
4899@%:@define DISABLE_LOGIN 1
4900_ACEOF
4901
4902 cat >>confdefs.h <<\_ACEOF
4903@%:@define DISABLE_FD_PASSING 1
4904_ACEOF
4905
4906 LIBS="$LIBS -lsecurity -ldb -lm -laud"
4907 else
4908 echo "$as_me:$LINENO: result: no" >&5
4909echo "${ECHO_T}no" >&6
4910 fi
4911 fi
4912 cat >>confdefs.h <<\_ACEOF
4913@%:@define DISABLE_FD_PASSING 1
4914_ACEOF
4915
4916 ;;
4917
4918*-*-nto-qnx)
4919 cat >>confdefs.h <<\_ACEOF
4920@%:@define USE_PIPES 1
4921_ACEOF
4922
4923 cat >>confdefs.h <<\_ACEOF
4924@%:@define NO_X11_UNIX_SOCKETS 1
4925_ACEOF
4926
4927 cat >>confdefs.h <<\_ACEOF
4928@%:@define MISSING_NFDBITS 1
4929_ACEOF
4930
4931 cat >>confdefs.h <<\_ACEOF
4932@%:@define MISSING_HOWMANY 1
4933_ACEOF
4934
4935 cat >>confdefs.h <<\_ACEOF
4936@%:@define MISSING_FD_MASK 1
4937_ACEOF
4938
4939 ;;
4940esac
4941
4942# Allow user to specify flags
4943
4944# Check whether --with-cflags or --without-cflags was given.
4945if test "${with_cflags+set}" = set; then
4946 withval="$with_cflags"
4947
4948 if test "x$withval" != "xno" ; then
4949 CFLAGS="$CFLAGS $withval"
4950 fi
4951
4952
4953fi;
4954
4955# Check whether --with-cppflags or --without-cppflags was given.
4956if test "${with_cppflags+set}" = set; then
4957 withval="$with_cppflags"
4958
4959 if test "x$withval" != "xno"; then
4960 CPPFLAGS="$CPPFLAGS $withval"
4961 fi
4962
4963
4964fi;
4965
4966# Check whether --with-ldflags or --without-ldflags was given.
4967if test "${with_ldflags+set}" = set; then
4968 withval="$with_ldflags"
4969
4970 if test "x$withval" != "xno" ; then
4971 LDFLAGS="$LDFLAGS $withval"
4972 fi
4973
4974
4975fi;
4976
4977# Check whether --with-libs or --without-libs was given.
4978if test "${with_libs+set}" = set; then
4979 withval="$with_libs"
4980
4981 if test "x$withval" != "xno" ; then
4982 LIBS="$LIBS $withval"
4983 fi
4984
4985
4986fi;
4987
4988# Checks for header files.
4989
4990echo "$as_me:$LINENO: checking for egrep" >&5
4991echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4992if test "${ac_cv_prog_egrep+set}" = set; then
4993 echo $ECHO_N "(cached) $ECHO_C" >&6
4994else
4995 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4996 then ac_cv_prog_egrep='grep -E'
4997 else ac_cv_prog_egrep='egrep'
4998 fi
4999fi
5000echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5001echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5002 EGREP=$ac_cv_prog_egrep
5003
5004
5005echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5006echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5007if test "${ac_cv_header_stdc+set}" = set; then
5008 echo $ECHO_N "(cached) $ECHO_C" >&6
5009else
5010 cat >conftest.$ac_ext <<_ACEOF
5011#line $LINENO "configure"
5012/* confdefs.h. */
5013_ACEOF
5014cat confdefs.h >>conftest.$ac_ext
5015cat >>conftest.$ac_ext <<_ACEOF
5016/* end confdefs.h. */
5017#include <stdlib.h>
5018#include <stdarg.h>
5019#include <string.h>
5020#include <float.h>
5021
5022int
5023main ()
5024{
5025
5026 ;
5027 return 0;
5028}
5029_ACEOF
5030rm -f conftest.$ac_objext
5031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5032 (eval $ac_compile) 2>&5
5033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } &&
5036 { ac_try='test -s conftest.$ac_objext'
5037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5038 (eval $ac_try) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); }; }; then
5042 ac_cv_header_stdc=yes
5043else
5044 echo "$as_me: failed program was:" >&5
5045sed 's/^/| /' conftest.$ac_ext >&5
5046
5047ac_cv_header_stdc=no
5048fi
5049rm -f conftest.$ac_objext conftest.$ac_ext
5050
5051if test $ac_cv_header_stdc = yes; then
5052 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5053 cat >conftest.$ac_ext <<_ACEOF
5054#line $LINENO "configure"
5055/* confdefs.h. */
5056_ACEOF
5057cat confdefs.h >>conftest.$ac_ext
5058cat >>conftest.$ac_ext <<_ACEOF
5059/* end confdefs.h. */
5060#include <string.h>
5061
5062_ACEOF
5063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5064 $EGREP "memchr" >/dev/null 2>&1; then
5065 :
5066else
5067 ac_cv_header_stdc=no
5068fi
5069rm -f conftest*
5070
5071fi
5072
5073if test $ac_cv_header_stdc = yes; then
5074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5075 cat >conftest.$ac_ext <<_ACEOF
5076#line $LINENO "configure"
5077/* confdefs.h. */
5078_ACEOF
5079cat confdefs.h >>conftest.$ac_ext
5080cat >>conftest.$ac_ext <<_ACEOF
5081/* end confdefs.h. */
5082#include <stdlib.h>
5083
5084_ACEOF
5085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5086 $EGREP "free" >/dev/null 2>&1; then
5087 :
5088else
5089 ac_cv_header_stdc=no
5090fi
5091rm -f conftest*
5092
5093fi
5094
5095if test $ac_cv_header_stdc = yes; then
5096 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5097 if test "$cross_compiling" = yes; then
5098 :
5099else
5100 cat >conftest.$ac_ext <<_ACEOF
5101#line $LINENO "configure"
5102/* confdefs.h. */
5103_ACEOF
5104cat confdefs.h >>conftest.$ac_ext
5105cat >>conftest.$ac_ext <<_ACEOF
5106/* end confdefs.h. */
5107#include <ctype.h>
5108#if ((' ' & 0x0FF) == 0x020)
5109# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5110# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5111#else
5112# define ISLOWER(c) \
5113 (('a' <= (c) && (c) <= 'i') \
5114 || ('j' <= (c) && (c) <= 'r') \
5115 || ('s' <= (c) && (c) <= 'z'))
5116# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5117#endif
5118
5119#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5120int
5121main ()
5122{
5123 int i;
5124 for (i = 0; i < 256; i++)
5125 if (XOR (islower (i), ISLOWER (i))
5126 || toupper (i) != TOUPPER (i))
5127 exit(2);
5128 exit (0);
5129}
5130_ACEOF
5131rm -f conftest$ac_exeext
5132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5133 (eval $ac_link) 2>&5
5134 ac_status=$?
5135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138 (eval $ac_try) 2>&5
5139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); }; }; then
5142 :
5143else
5144 echo "$as_me: program exited with status $ac_status" >&5
5145echo "$as_me: failed program was:" >&5
5146sed 's/^/| /' conftest.$ac_ext >&5
5147
5148( exit $ac_status )
5149ac_cv_header_stdc=no
5150fi
5151rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5152fi
5153fi
5154fi
5155echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5156echo "${ECHO_T}$ac_cv_header_stdc" >&6
5157if test $ac_cv_header_stdc = yes; then
5158
5159cat >>confdefs.h <<\_ACEOF
5160@%:@define STDC_HEADERS 1
5161_ACEOF
5162
5163fi
5164
5165# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5176 inttypes.h stdint.h unistd.h
5177do
5178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5179echo "$as_me:$LINENO: checking for $ac_header" >&5
5180echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5181if eval "test \"\${$as_ac_Header+set}\" = set"; then
5182 echo $ECHO_N "(cached) $ECHO_C" >&6
5183else
5184 cat >conftest.$ac_ext <<_ACEOF
5185#line $LINENO "configure"
5186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
5191$ac_includes_default
5192
5193@%:@include <$ac_header>
5194_ACEOF
5195rm -f conftest.$ac_objext
5196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5197 (eval $ac_compile) 2>&5
5198 ac_status=$?
5199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200 (exit $ac_status); } &&
5201 { ac_try='test -s conftest.$ac_objext'
5202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5203 (eval $ac_try) 2>&5
5204 ac_status=$?
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); }; }; then
5207 eval "$as_ac_Header=yes"
5208else
5209 echo "$as_me: failed program was:" >&5
5210sed 's/^/| /' conftest.$ac_ext >&5
5211
5212eval "$as_ac_Header=no"
5213fi
5214rm -f conftest.$ac_objext conftest.$ac_ext
5215fi
5216echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5217echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5218if test `eval echo '${'$as_ac_Header'}'` = yes; then
5219 cat >>confdefs.h <<_ACEOF
5220@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5221_ACEOF
5222
5223fi
5224
5225done
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273for ac_header in bstring.h crypt.h endian.h floatingpoint.h \
5274 getopt.h glob.h ia.h lastlog.h libgen.h limits.h login.h \
5275 login_cap.h maillock.h netdb.h netgroup.h \
5276 netinet/in_systm.h paths.h pty.h readpassphrase.h \
5277 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
5278 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
5279 sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
5280 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
5281 sys/un.h time.h tmpdir.h ttyent.h usersec.h \
5282 util.h utime.h utmp.h utmpx.h
5283do
5284as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5285if eval "test \"\${$as_ac_Header+set}\" = set"; then
5286 echo "$as_me:$LINENO: checking for $ac_header" >&5
5287echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5288if eval "test \"\${$as_ac_Header+set}\" = set"; then
5289 echo $ECHO_N "(cached) $ECHO_C" >&6
5290fi
5291echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5292echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5293else
5294 # Is the header compilable?
5295echo "$as_me:$LINENO: checking $ac_header usability" >&5
5296echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5297cat >conftest.$ac_ext <<_ACEOF
5298#line $LINENO "configure"
5299/* confdefs.h. */
5300_ACEOF
5301cat confdefs.h >>conftest.$ac_ext
5302cat >>conftest.$ac_ext <<_ACEOF
5303/* end confdefs.h. */
5304$ac_includes_default
5305@%:@include <$ac_header>
5306_ACEOF
5307rm -f conftest.$ac_objext
5308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5309 (eval $ac_compile) 2>&5
5310 ac_status=$?
5311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312 (exit $ac_status); } &&
5313 { ac_try='test -s conftest.$ac_objext'
5314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315 (eval $ac_try) 2>&5
5316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); }; }; then
5319 ac_header_compiler=yes
5320else
5321 echo "$as_me: failed program was:" >&5
5322sed 's/^/| /' conftest.$ac_ext >&5
5323
5324ac_header_compiler=no
5325fi
5326rm -f conftest.$ac_objext conftest.$ac_ext
5327echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5328echo "${ECHO_T}$ac_header_compiler" >&6
5329
5330# Is the header present?
5331echo "$as_me:$LINENO: checking $ac_header presence" >&5
5332echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5333cat >conftest.$ac_ext <<_ACEOF
5334#line $LINENO "configure"
5335/* confdefs.h. */
5336_ACEOF
5337cat confdefs.h >>conftest.$ac_ext
5338cat >>conftest.$ac_ext <<_ACEOF
5339/* end confdefs.h. */
5340@%:@include <$ac_header>
5341_ACEOF
5342if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5344 ac_status=$?
5345 grep -v '^ *+' conftest.er1 >conftest.err
5346 rm -f conftest.er1
5347 cat conftest.err >&5
5348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349 (exit $ac_status); } >/dev/null; then
5350 if test -s conftest.err; then
5351 ac_cpp_err=$ac_c_preproc_warn_flag
5352 else
5353 ac_cpp_err=
5354 fi
5355else
5356 ac_cpp_err=yes
5357fi
5358if test -z "$ac_cpp_err"; then
5359 ac_header_preproc=yes
5360else
5361 echo "$as_me: failed program was:" >&5
5362sed 's/^/| /' conftest.$ac_ext >&5
5363
5364 ac_header_preproc=no
5365fi
5366rm -f conftest.err conftest.$ac_ext
5367echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5368echo "${ECHO_T}$ac_header_preproc" >&6
5369
5370# So? What about this header?
5371case $ac_header_compiler:$ac_header_preproc in
5372 yes:no )
5373 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5374echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5375 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5376echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5377 (
5378 cat <<\_ASBOX
5379@%:@@%:@ ------------------------------------ @%:@@%:@
5380@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
5381@%:@@%:@ ------------------------------------ @%:@@%:@
5382_ASBOX
5383 ) |
5384 sed "s/^/$as_me: WARNING: /" >&2
5385 ;;
5386 no:yes )
5387 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5388echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5389 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5390echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5391 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5392echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5393 (
5394 cat <<\_ASBOX
5395@%:@@%:@ ------------------------------------ @%:@@%:@
5396@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
5397@%:@@%:@ ------------------------------------ @%:@@%:@
5398_ASBOX
5399 ) |
5400 sed "s/^/$as_me: WARNING: /" >&2
5401 ;;
5402esac
5403echo "$as_me:$LINENO: checking for $ac_header" >&5
5404echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5405if eval "test \"\${$as_ac_Header+set}\" = set"; then
5406 echo $ECHO_N "(cached) $ECHO_C" >&6
5407else
5408 eval "$as_ac_Header=$ac_header_preproc"
5409fi
5410echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5411echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5412
5413fi
5414if test `eval echo '${'$as_ac_Header'}'` = yes; then
5415 cat >>confdefs.h <<_ACEOF
5416@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5417_ACEOF
5418
5419fi
5420
5421done
5422
5423
5424# Checks for libraries.
5425echo "$as_me:$LINENO: checking for yp_match" >&5
5426echo $ECHO_N "checking for yp_match... $ECHO_C" >&6
5427if test "${ac_cv_func_yp_match+set}" = set; then
5428 echo $ECHO_N "(cached) $ECHO_C" >&6
5429else
5430 cat >conftest.$ac_ext <<_ACEOF
5431#line $LINENO "configure"
5432/* confdefs.h. */
5433_ACEOF
5434cat confdefs.h >>conftest.$ac_ext
5435cat >>conftest.$ac_ext <<_ACEOF
5436/* end confdefs.h. */
5437/* System header to define __stub macros and hopefully few prototypes,
5438 which can conflict with char yp_match (); below.
5439 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5440 <limits.h> exists even on freestanding compilers. */
5441#ifdef __STDC__
5442# include <limits.h>
5443#else
5444# include <assert.h>
5445#endif
5446/* Override any gcc2 internal prototype to avoid an error. */
5447#ifdef __cplusplus
5448extern "C"
5449{
5450#endif
5451/* We use char because int might match the return type of a gcc2
5452 builtin and then its argument prototype would still apply. */
5453char yp_match ();
5454/* The GNU C library defines this for functions which it implements
5455 to always fail with ENOSYS. Some functions are actually named
5456 something starting with __ and the normal name is an alias. */
5457#if defined (__stub_yp_match) || defined (__stub___yp_match)
5458choke me
5459#else
5460char (*f) () = yp_match;
5461#endif
5462#ifdef __cplusplus
5463}
5464#endif
5465
5466int
5467main ()
5468{
5469return f != yp_match;
5470 ;
5471 return 0;
5472}
5473_ACEOF
5474rm -f conftest.$ac_objext conftest$ac_exeext
5475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5476 (eval $ac_link) 2>&5
5477 ac_status=$?
5478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5479 (exit $ac_status); } &&
5480 { ac_try='test -s conftest$ac_exeext'
5481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5482 (eval $ac_try) 2>&5
5483 ac_status=$?
5484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5485 (exit $ac_status); }; }; then
5486 ac_cv_func_yp_match=yes
5487else
5488 echo "$as_me: failed program was:" >&5
5489sed 's/^/| /' conftest.$ac_ext >&5
5490
5491ac_cv_func_yp_match=no
5492fi
5493rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5494fi
5495echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5
5496echo "${ECHO_T}$ac_cv_func_yp_match" >&6
5497if test $ac_cv_func_yp_match = yes; then
5498 :
5499else
5500
5501echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5
5502echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6
5503if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
5504 echo $ECHO_N "(cached) $ECHO_C" >&6
5505else
5506 ac_check_lib_save_LIBS=$LIBS
5507LIBS="-lnsl $LIBS"
5508cat >conftest.$ac_ext <<_ACEOF
5509#line $LINENO "configure"
5510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
5515
5516/* Override any gcc2 internal prototype to avoid an error. */
5517#ifdef __cplusplus
5518extern "C"
5519#endif
5520/* We use char because int might match the return type of a gcc2
5521 builtin and then its argument prototype would still apply. */
5522char yp_match ();
5523int
5524main ()
5525{
5526yp_match ();
5527 ;
5528 return 0;
5529}
5530_ACEOF
5531rm -f conftest.$ac_objext conftest$ac_exeext
5532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5533 (eval $ac_link) 2>&5
5534 ac_status=$?
5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5536 (exit $ac_status); } &&
5537 { ac_try='test -s conftest$ac_exeext'
5538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5539 (eval $ac_try) 2>&5
5540 ac_status=$?
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); }; }; then
5543 ac_cv_lib_nsl_yp_match=yes
5544else
5545 echo "$as_me: failed program was:" >&5
5546sed 's/^/| /' conftest.$ac_ext >&5
5547
5548ac_cv_lib_nsl_yp_match=no
5549fi
5550rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5551LIBS=$ac_check_lib_save_LIBS
5552fi
5553echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5
5554echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6
5555if test $ac_cv_lib_nsl_yp_match = yes; then
5556 cat >>confdefs.h <<_ACEOF
5557@%:@define HAVE_LIBNSL 1
5558_ACEOF
5559
5560 LIBS="-lnsl $LIBS"
5561
5562fi
5563
5564fi
5565
5566echo "$as_me:$LINENO: checking for setsockopt" >&5
5567echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
5568if test "${ac_cv_func_setsockopt+set}" = set; then
5569 echo $ECHO_N "(cached) $ECHO_C" >&6
5570else
5571 cat >conftest.$ac_ext <<_ACEOF
5572#line $LINENO "configure"
5573/* confdefs.h. */
5574_ACEOF
5575cat confdefs.h >>conftest.$ac_ext
5576cat >>conftest.$ac_ext <<_ACEOF
5577/* end confdefs.h. */
5578/* System header to define __stub macros and hopefully few prototypes,
5579 which can conflict with char setsockopt (); below.
5580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5581 <limits.h> exists even on freestanding compilers. */
5582#ifdef __STDC__
5583# include <limits.h>
5584#else
5585# include <assert.h>
5586#endif
5587/* Override any gcc2 internal prototype to avoid an error. */
5588#ifdef __cplusplus
5589extern "C"
5590{
5591#endif
5592/* We use char because int might match the return type of a gcc2
5593 builtin and then its argument prototype would still apply. */
5594char setsockopt ();
5595/* The GNU C library defines this for functions which it implements
5596 to always fail with ENOSYS. Some functions are actually named
5597 something starting with __ and the normal name is an alias. */
5598#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
5599choke me
5600#else
5601char (*f) () = setsockopt;
5602#endif
5603#ifdef __cplusplus
5604}
5605#endif
5606
5607int
5608main ()
5609{
5610return f != setsockopt;
5611 ;
5612 return 0;
5613}
5614_ACEOF
5615rm -f conftest.$ac_objext conftest$ac_exeext
5616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5617 (eval $ac_link) 2>&5
5618 ac_status=$?
5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5620 (exit $ac_status); } &&
5621 { ac_try='test -s conftest$ac_exeext'
5622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5623 (eval $ac_try) 2>&5
5624 ac_status=$?
5625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5626 (exit $ac_status); }; }; then
5627 ac_cv_func_setsockopt=yes
5628else
5629 echo "$as_me: failed program was:" >&5
5630sed 's/^/| /' conftest.$ac_ext >&5
5631
5632ac_cv_func_setsockopt=no
5633fi
5634rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5635fi
5636echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5637echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
5638if test $ac_cv_func_setsockopt = yes; then
5639 :
5640else
5641
5642echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5643echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
5644if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5645 echo $ECHO_N "(cached) $ECHO_C" >&6
5646else
5647 ac_check_lib_save_LIBS=$LIBS
5648LIBS="-lsocket $LIBS"
5649cat >conftest.$ac_ext <<_ACEOF
5650#line $LINENO "configure"
5651/* confdefs.h. */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h. */
5656
5657/* Override any gcc2 internal prototype to avoid an error. */
5658#ifdef __cplusplus
5659extern "C"
5660#endif
5661/* We use char because int might match the return type of a gcc2
5662 builtin and then its argument prototype would still apply. */
5663char setsockopt ();
5664int
5665main ()
5666{
5667setsockopt ();
5668 ;
5669 return 0;
5670}
5671_ACEOF
5672rm -f conftest.$ac_objext conftest$ac_exeext
5673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5674 (eval $ac_link) 2>&5
5675 ac_status=$?
5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677 (exit $ac_status); } &&
5678 { ac_try='test -s conftest$ac_exeext'
5679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680 (eval $ac_try) 2>&5
5681 ac_status=$?
5682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683 (exit $ac_status); }; }; then
5684 ac_cv_lib_socket_setsockopt=yes
5685else
5686 echo "$as_me: failed program was:" >&5
5687sed 's/^/| /' conftest.$ac_ext >&5
5688
5689ac_cv_lib_socket_setsockopt=no
5690fi
5691rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5692LIBS=$ac_check_lib_save_LIBS
5693fi
5694echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5695echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
5696if test $ac_cv_lib_socket_setsockopt = yes; then
5697 cat >>confdefs.h <<_ACEOF
5698@%:@define HAVE_LIBSOCKET 1
5699_ACEOF
5700
5701 LIBS="-lsocket $LIBS"
5702
5703fi
5704
5705fi
5706
5707
5708if test "x$with_tcp_wrappers" != "xno" ; then
5709 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
5710 echo "$as_me:$LINENO: checking for innetgr in -lrpc" >&5
5711echo $ECHO_N "checking for innetgr in -lrpc... $ECHO_C" >&6
5712if test "${ac_cv_lib_rpc_innetgr+set}" = set; then
5713 echo $ECHO_N "(cached) $ECHO_C" >&6
5714else
5715 ac_check_lib_save_LIBS=$LIBS
5716LIBS="-lrpc -lyp -lrpc $LIBS"
5717cat >conftest.$ac_ext <<_ACEOF
5718#line $LINENO "configure"
5719/* confdefs.h. */
5720_ACEOF
5721cat confdefs.h >>conftest.$ac_ext
5722cat >>conftest.$ac_ext <<_ACEOF
5723/* end confdefs.h. */
5724
5725/* Override any gcc2 internal prototype to avoid an error. */
5726#ifdef __cplusplus
5727extern "C"
5728#endif
5729/* We use char because int might match the return type of a gcc2
5730 builtin and then its argument prototype would still apply. */
5731char innetgr ();
5732int
5733main ()
5734{
5735innetgr ();
5736 ;
5737 return 0;
5738}
5739_ACEOF
5740rm -f conftest.$ac_objext conftest$ac_exeext
5741if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5742 (eval $ac_link) 2>&5
5743 ac_status=$?
5744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745 (exit $ac_status); } &&
5746 { ac_try='test -s conftest$ac_exeext'
5747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5748 (eval $ac_try) 2>&5
5749 ac_status=$?
5750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751 (exit $ac_status); }; }; then
5752 ac_cv_lib_rpc_innetgr=yes
5753else
5754 echo "$as_me: failed program was:" >&5
5755sed 's/^/| /' conftest.$ac_ext >&5
5756
5757ac_cv_lib_rpc_innetgr=no
5758fi
5759rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5760LIBS=$ac_check_lib_save_LIBS
5761fi
5762echo "$as_me:$LINENO: result: $ac_cv_lib_rpc_innetgr" >&5
5763echo "${ECHO_T}$ac_cv_lib_rpc_innetgr" >&6
5764if test $ac_cv_lib_rpc_innetgr = yes; then
5765 LIBS="-lrpc -lyp -lrpc $LIBS"
5766fi
5767
5768 fi
5769fi
5770
5771echo "$as_me:$LINENO: checking for getspnam" >&5
5772echo $ECHO_N "checking for getspnam... $ECHO_C" >&6
5773if test "${ac_cv_func_getspnam+set}" = set; then
5774 echo $ECHO_N "(cached) $ECHO_C" >&6
5775else
5776 cat >conftest.$ac_ext <<_ACEOF
5777#line $LINENO "configure"
5778/* confdefs.h. */
5779_ACEOF
5780cat confdefs.h >>conftest.$ac_ext
5781cat >>conftest.$ac_ext <<_ACEOF
5782/* end confdefs.h. */
5783/* System header to define __stub macros and hopefully few prototypes,
5784 which can conflict with char getspnam (); below.
5785 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5786 <limits.h> exists even on freestanding compilers. */
5787#ifdef __STDC__
5788# include <limits.h>
5789#else
5790# include <assert.h>
5791#endif
5792/* Override any gcc2 internal prototype to avoid an error. */
5793#ifdef __cplusplus
5794extern "C"
5795{
5796#endif
5797/* We use char because int might match the return type of a gcc2
5798 builtin and then its argument prototype would still apply. */
5799char getspnam ();
5800/* The GNU C library defines this for functions which it implements
5801 to always fail with ENOSYS. Some functions are actually named
5802 something starting with __ and the normal name is an alias. */
5803#if defined (__stub_getspnam) || defined (__stub___getspnam)
5804choke me
5805#else
5806char (*f) () = getspnam;
5807#endif
5808#ifdef __cplusplus
5809}
5810#endif
5811
5812int
5813main ()
5814{
5815return f != getspnam;
5816 ;
5817 return 0;
5818}
5819_ACEOF
5820rm -f conftest.$ac_objext conftest$ac_exeext
5821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5822 (eval $ac_link) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); } &&
5826 { ac_try='test -s conftest$ac_exeext'
5827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5828 (eval $ac_try) 2>&5
5829 ac_status=$?
5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831 (exit $ac_status); }; }; then
5832 ac_cv_func_getspnam=yes
5833else
5834 echo "$as_me: failed program was:" >&5
5835sed 's/^/| /' conftest.$ac_ext >&5
5836
5837ac_cv_func_getspnam=no
5838fi
5839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5840fi
5841echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
5842echo "${ECHO_T}$ac_cv_func_getspnam" >&6
5843if test $ac_cv_func_getspnam = yes; then
5844 :
5845else
5846 echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
5847echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
5848if test "${ac_cv_lib_gen_getspnam+set}" = set; then
5849 echo $ECHO_N "(cached) $ECHO_C" >&6
5850else
5851 ac_check_lib_save_LIBS=$LIBS
5852LIBS="-lgen $LIBS"
5853cat >conftest.$ac_ext <<_ACEOF
5854#line $LINENO "configure"
5855/* confdefs.h. */
5856_ACEOF
5857cat confdefs.h >>conftest.$ac_ext
5858cat >>conftest.$ac_ext <<_ACEOF
5859/* end confdefs.h. */
5860
5861/* Override any gcc2 internal prototype to avoid an error. */
5862#ifdef __cplusplus
5863extern "C"
5864#endif
5865/* We use char because int might match the return type of a gcc2
5866 builtin and then its argument prototype would still apply. */
5867char getspnam ();
5868int
5869main ()
5870{
5871getspnam ();
5872 ;
5873 return 0;
5874}
5875_ACEOF
5876rm -f conftest.$ac_objext conftest$ac_exeext
5877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5878 (eval $ac_link) 2>&5
5879 ac_status=$?
5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881 (exit $ac_status); } &&
5882 { ac_try='test -s conftest$ac_exeext'
5883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5884 (eval $ac_try) 2>&5
5885 ac_status=$?
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887 (exit $ac_status); }; }; then
5888 ac_cv_lib_gen_getspnam=yes
5889else
5890 echo "$as_me: failed program was:" >&5
5891sed 's/^/| /' conftest.$ac_ext >&5
5892
5893ac_cv_lib_gen_getspnam=no
5894fi
5895rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5896LIBS=$ac_check_lib_save_LIBS
5897fi
5898echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
5899echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
5900if test $ac_cv_lib_gen_getspnam = yes; then
5901 LIBS="$LIBS -lgen"
5902fi
5903
5904fi
5905
5906
5907
5908# Check whether --with-rpath or --without-rpath was given.
5909if test "${with_rpath+set}" = set; then
5910 withval="$with_rpath"
5911
5912 if test "x$withval" = "xno" ; then
5913 need_dash_r=""
5914 fi
5915 if test "x$withval" = "xyes" ; then
5916 need_dash_r=1
5917 fi
5918
5919
5920fi;
5921
5922
5923# Check whether --with-zlib or --without-zlib was given.
5924if test "${with_zlib+set}" = set; then
5925 withval="$with_zlib"
5926
5927 if test "x$withval" = "xno" ; then
5928 { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5
5929echo "$as_me: error: *** zlib is required ***" >&2;}
5930 { (exit 1); exit 1; }; }
5931 fi
5932 if test -d "$withval/lib"; then
5933 if test -n "${need_dash_r}"; then
5934 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
5935 else
5936 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
5937 fi
5938 else
5939 if test -n "${need_dash_r}"; then
5940 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
5941 else
5942 LDFLAGS="-L${withval} ${LDFLAGS}"
5943 fi
5944 fi
5945 if test -d "$withval/include"; then
5946 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
5947 else
5948 CPPFLAGS="-I${withval} ${CPPFLAGS}"
5949 fi
5950
5951
5952fi;
5953
5954
5955echo "$as_me:$LINENO: checking for deflate in -lz" >&5
5956echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
5957if test "${ac_cv_lib_z_deflate+set}" = set; then
5958 echo $ECHO_N "(cached) $ECHO_C" >&6
5959else
5960 ac_check_lib_save_LIBS=$LIBS
5961LIBS="-lz $LIBS"
5962cat >conftest.$ac_ext <<_ACEOF
5963#line $LINENO "configure"
5964/* confdefs.h. */
5965_ACEOF
5966cat confdefs.h >>conftest.$ac_ext
5967cat >>conftest.$ac_ext <<_ACEOF
5968/* end confdefs.h. */
5969
5970/* Override any gcc2 internal prototype to avoid an error. */
5971#ifdef __cplusplus
5972extern "C"
5973#endif
5974/* We use char because int might match the return type of a gcc2
5975 builtin and then its argument prototype would still apply. */
5976char deflate ();
5977int
5978main ()
5979{
5980deflate ();
5981 ;
5982 return 0;
5983}
5984_ACEOF
5985rm -f conftest.$ac_objext conftest$ac_exeext
5986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5987 (eval $ac_link) 2>&5
5988 ac_status=$?
5989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5990 (exit $ac_status); } &&
5991 { ac_try='test -s conftest$ac_exeext'
5992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5993 (eval $ac_try) 2>&5
5994 ac_status=$?
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); }; }; then
5997 ac_cv_lib_z_deflate=yes
5998else
5999 echo "$as_me: failed program was:" >&5
6000sed 's/^/| /' conftest.$ac_ext >&5
6001
6002ac_cv_lib_z_deflate=no
6003fi
6004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6005LIBS=$ac_check_lib_save_LIBS
6006fi
6007echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
6008echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
6009if test $ac_cv_lib_z_deflate = yes; then
6010 cat >>confdefs.h <<_ACEOF
6011@%:@define HAVE_LIBZ 1
6012_ACEOF
6013
6014 LIBS="-lz $LIBS"
6015
6016else
6017 { { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5
6018echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
6019 { (exit 1); exit 1; }; }
6020fi
6021
6022
6023echo "$as_me:$LINENO: checking for strcasecmp" >&5
6024echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6
6025if test "${ac_cv_func_strcasecmp+set}" = set; then
6026 echo $ECHO_N "(cached) $ECHO_C" >&6
6027else
6028 cat >conftest.$ac_ext <<_ACEOF
6029#line $LINENO "configure"
6030/* confdefs.h. */
6031_ACEOF
6032cat confdefs.h >>conftest.$ac_ext
6033cat >>conftest.$ac_ext <<_ACEOF
6034/* end confdefs.h. */
6035/* System header to define __stub macros and hopefully few prototypes,
6036 which can conflict with char strcasecmp (); below.
6037 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6038 <limits.h> exists even on freestanding compilers. */
6039#ifdef __STDC__
6040# include <limits.h>
6041#else
6042# include <assert.h>
6043#endif
6044/* Override any gcc2 internal prototype to avoid an error. */
6045#ifdef __cplusplus
6046extern "C"
6047{
6048#endif
6049/* We use char because int might match the return type of a gcc2
6050 builtin and then its argument prototype would still apply. */
6051char strcasecmp ();
6052/* The GNU C library defines this for functions which it implements
6053 to always fail with ENOSYS. Some functions are actually named
6054 something starting with __ and the normal name is an alias. */
6055#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
6056choke me
6057#else
6058char (*f) () = strcasecmp;
6059#endif
6060#ifdef __cplusplus
6061}
6062#endif
6063
6064int
6065main ()
6066{
6067return f != strcasecmp;
6068 ;
6069 return 0;
6070}
6071_ACEOF
6072rm -f conftest.$ac_objext conftest$ac_exeext
6073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6074 (eval $ac_link) 2>&5
6075 ac_status=$?
6076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6077 (exit $ac_status); } &&
6078 { ac_try='test -s conftest$ac_exeext'
6079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6080 (eval $ac_try) 2>&5
6081 ac_status=$?
6082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083 (exit $ac_status); }; }; then
6084 ac_cv_func_strcasecmp=yes
6085else
6086 echo "$as_me: failed program was:" >&5
6087sed 's/^/| /' conftest.$ac_ext >&5
6088
6089ac_cv_func_strcasecmp=no
6090fi
6091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6092fi
6093echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
6094echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6
6095if test $ac_cv_func_strcasecmp = yes; then
6096 :
6097else
6098 echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
6099echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
6100if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
6101 echo $ECHO_N "(cached) $ECHO_C" >&6
6102else
6103 ac_check_lib_save_LIBS=$LIBS
6104LIBS="-lresolv $LIBS"
6105cat >conftest.$ac_ext <<_ACEOF
6106#line $LINENO "configure"
6107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
6112
6113/* Override any gcc2 internal prototype to avoid an error. */
6114#ifdef __cplusplus
6115extern "C"
6116#endif
6117/* We use char because int might match the return type of a gcc2
6118 builtin and then its argument prototype would still apply. */
6119char strcasecmp ();
6120int
6121main ()
6122{
6123strcasecmp ();
6124 ;
6125 return 0;
6126}
6127_ACEOF
6128rm -f conftest.$ac_objext conftest$ac_exeext
6129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6130 (eval $ac_link) 2>&5
6131 ac_status=$?
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); } &&
6134 { ac_try='test -s conftest$ac_exeext'
6135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6136 (eval $ac_try) 2>&5
6137 ac_status=$?
6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139 (exit $ac_status); }; }; then
6140 ac_cv_lib_resolv_strcasecmp=yes
6141else
6142 echo "$as_me: failed program was:" >&5
6143sed 's/^/| /' conftest.$ac_ext >&5
6144
6145ac_cv_lib_resolv_strcasecmp=no
6146fi
6147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6148LIBS=$ac_check_lib_save_LIBS
6149fi
6150echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5
6151echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
6152if test $ac_cv_lib_resolv_strcasecmp = yes; then
6153 LIBS="$LIBS -lresolv"
6154fi
6155
6156
6157fi
6158
6159echo "$as_me:$LINENO: checking for utimes" >&5
6160echo $ECHO_N "checking for utimes... $ECHO_C" >&6
6161if test "${ac_cv_func_utimes+set}" = set; then
6162 echo $ECHO_N "(cached) $ECHO_C" >&6
6163else
6164 cat >conftest.$ac_ext <<_ACEOF
6165#line $LINENO "configure"
6166/* confdefs.h. */
6167_ACEOF
6168cat confdefs.h >>conftest.$ac_ext
6169cat >>conftest.$ac_ext <<_ACEOF
6170/* end confdefs.h. */
6171/* System header to define __stub macros and hopefully few prototypes,
6172 which can conflict with char utimes (); below.
6173 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6174 <limits.h> exists even on freestanding compilers. */
6175#ifdef __STDC__
6176# include <limits.h>
6177#else
6178# include <assert.h>
6179#endif
6180/* Override any gcc2 internal prototype to avoid an error. */
6181#ifdef __cplusplus
6182extern "C"
6183{
6184#endif
6185/* We use char because int might match the return type of a gcc2
6186 builtin and then its argument prototype would still apply. */
6187char utimes ();
6188/* The GNU C library defines this for functions which it implements
6189 to always fail with ENOSYS. Some functions are actually named
6190 something starting with __ and the normal name is an alias. */
6191#if defined (__stub_utimes) || defined (__stub___utimes)
6192choke me
6193#else
6194char (*f) () = utimes;
6195#endif
6196#ifdef __cplusplus
6197}
6198#endif
6199
6200int
6201main ()
6202{
6203return f != utimes;
6204 ;
6205 return 0;
6206}
6207_ACEOF
6208rm -f conftest.$ac_objext conftest$ac_exeext
6209if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6210 (eval $ac_link) 2>&5
6211 ac_status=$?
6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6213 (exit $ac_status); } &&
6214 { ac_try='test -s conftest$ac_exeext'
6215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6216 (eval $ac_try) 2>&5
6217 ac_status=$?
6218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6219 (exit $ac_status); }; }; then
6220 ac_cv_func_utimes=yes
6221else
6222 echo "$as_me: failed program was:" >&5
6223sed 's/^/| /' conftest.$ac_ext >&5
6224
6225ac_cv_func_utimes=no
6226fi
6227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6228fi
6229echo "$as_me:$LINENO: result: $ac_cv_func_utimes" >&5
6230echo "${ECHO_T}$ac_cv_func_utimes" >&6
6231if test $ac_cv_func_utimes = yes; then
6232 :
6233else
6234 echo "$as_me:$LINENO: checking for utimes in -lc89" >&5
6235echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6
6236if test "${ac_cv_lib_c89_utimes+set}" = set; then
6237 echo $ECHO_N "(cached) $ECHO_C" >&6
6238else
6239 ac_check_lib_save_LIBS=$LIBS
6240LIBS="-lc89 $LIBS"
6241cat >conftest.$ac_ext <<_ACEOF
6242#line $LINENO "configure"
6243/* confdefs.h. */
6244_ACEOF
6245cat confdefs.h >>conftest.$ac_ext
6246cat >>conftest.$ac_ext <<_ACEOF
6247/* end confdefs.h. */
6248
6249/* Override any gcc2 internal prototype to avoid an error. */
6250#ifdef __cplusplus
6251extern "C"
6252#endif
6253/* We use char because int might match the return type of a gcc2
6254 builtin and then its argument prototype would still apply. */
6255char utimes ();
6256int
6257main ()
6258{
6259utimes ();
6260 ;
6261 return 0;
6262}
6263_ACEOF
6264rm -f conftest.$ac_objext conftest$ac_exeext
6265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6266 (eval $ac_link) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); } &&
6270 { ac_try='test -s conftest$ac_exeext'
6271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6272 (eval $ac_try) 2>&5
6273 ac_status=$?
6274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275 (exit $ac_status); }; }; then
6276 ac_cv_lib_c89_utimes=yes
6277else
6278 echo "$as_me: failed program was:" >&5
6279sed 's/^/| /' conftest.$ac_ext >&5
6280
6281ac_cv_lib_c89_utimes=no
6282fi
6283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6284LIBS=$ac_check_lib_save_LIBS
6285fi
6286echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5
6287echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6
6288if test $ac_cv_lib_c89_utimes = yes; then
6289 cat >>confdefs.h <<\_ACEOF
6290@%:@define HAVE_UTIMES 1
6291_ACEOF
6292
6293 LIBS="$LIBS -lc89"
6294fi
6295
6296
6297fi
6298
6299
6300
6301for ac_header in libutil.h
6302do
6303as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6304if eval "test \"\${$as_ac_Header+set}\" = set"; then
6305 echo "$as_me:$LINENO: checking for $ac_header" >&5
6306echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6307if eval "test \"\${$as_ac_Header+set}\" = set"; then
6308 echo $ECHO_N "(cached) $ECHO_C" >&6
6309fi
6310echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6311echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6312else
6313 # Is the header compilable?
6314echo "$as_me:$LINENO: checking $ac_header usability" >&5
6315echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6316cat >conftest.$ac_ext <<_ACEOF
6317#line $LINENO "configure"
6318/* confdefs.h. */
6319_ACEOF
6320cat confdefs.h >>conftest.$ac_ext
6321cat >>conftest.$ac_ext <<_ACEOF
6322/* end confdefs.h. */
6323$ac_includes_default
6324@%:@include <$ac_header>
6325_ACEOF
6326rm -f conftest.$ac_objext
6327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6328 (eval $ac_compile) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); } &&
6332 { ac_try='test -s conftest.$ac_objext'
6333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6334 (eval $ac_try) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); }; }; then
6338 ac_header_compiler=yes
6339else
6340 echo "$as_me: failed program was:" >&5
6341sed 's/^/| /' conftest.$ac_ext >&5
6342
6343ac_header_compiler=no
6344fi
6345rm -f conftest.$ac_objext conftest.$ac_ext
6346echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6347echo "${ECHO_T}$ac_header_compiler" >&6
6348
6349# Is the header present?
6350echo "$as_me:$LINENO: checking $ac_header presence" >&5
6351echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6352cat >conftest.$ac_ext <<_ACEOF
6353#line $LINENO "configure"
6354/* confdefs.h. */
6355_ACEOF
6356cat confdefs.h >>conftest.$ac_ext
6357cat >>conftest.$ac_ext <<_ACEOF
6358/* end confdefs.h. */
6359@%:@include <$ac_header>
6360_ACEOF
6361if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6362 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6363 ac_status=$?
6364 grep -v '^ *+' conftest.er1 >conftest.err
6365 rm -f conftest.er1
6366 cat conftest.err >&5
6367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368 (exit $ac_status); } >/dev/null; then
6369 if test -s conftest.err; then
6370 ac_cpp_err=$ac_c_preproc_warn_flag
6371 else
6372 ac_cpp_err=
6373 fi
6374else
6375 ac_cpp_err=yes
6376fi
6377if test -z "$ac_cpp_err"; then
6378 ac_header_preproc=yes
6379else
6380 echo "$as_me: failed program was:" >&5
6381sed 's/^/| /' conftest.$ac_ext >&5
6382
6383 ac_header_preproc=no
6384fi
6385rm -f conftest.err conftest.$ac_ext
6386echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6387echo "${ECHO_T}$ac_header_preproc" >&6
6388
6389# So? What about this header?
6390case $ac_header_compiler:$ac_header_preproc in
6391 yes:no )
6392 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6393echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6394 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6395echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6396 (
6397 cat <<\_ASBOX
6398@%:@@%:@ ------------------------------------ @%:@@%:@
6399@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
6400@%:@@%:@ ------------------------------------ @%:@@%:@
6401_ASBOX
6402 ) |
6403 sed "s/^/$as_me: WARNING: /" >&2
6404 ;;
6405 no:yes )
6406 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6407echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6408 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6409echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6410 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6411echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6412 (
6413 cat <<\_ASBOX
6414@%:@@%:@ ------------------------------------ @%:@@%:@
6415@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
6416@%:@@%:@ ------------------------------------ @%:@@%:@
6417_ASBOX
6418 ) |
6419 sed "s/^/$as_me: WARNING: /" >&2
6420 ;;
6421esac
6422echo "$as_me:$LINENO: checking for $ac_header" >&5
6423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6424if eval "test \"\${$as_ac_Header+set}\" = set"; then
6425 echo $ECHO_N "(cached) $ECHO_C" >&6
6426else
6427 eval "$as_ac_Header=$ac_header_preproc"
6428fi
6429echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6430echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6431
6432fi
6433if test `eval echo '${'$as_ac_Header'}'` = yes; then
6434 cat >>confdefs.h <<_ACEOF
6435@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6436_ACEOF
6437
6438fi
6439
6440done
6441
6442echo "$as_me:$LINENO: checking for library containing login" >&5
6443echo $ECHO_N "checking for library containing login... $ECHO_C" >&6
6444if test "${ac_cv_search_login+set}" = set; then
6445 echo $ECHO_N "(cached) $ECHO_C" >&6
6446else
6447 ac_func_search_save_LIBS=$LIBS
6448ac_cv_search_login=no
6449cat >conftest.$ac_ext <<_ACEOF
6450#line $LINENO "configure"
6451/* confdefs.h. */
6452_ACEOF
6453cat confdefs.h >>conftest.$ac_ext
6454cat >>conftest.$ac_ext <<_ACEOF
6455/* end confdefs.h. */
6456
6457/* Override any gcc2 internal prototype to avoid an error. */
6458#ifdef __cplusplus
6459extern "C"
6460#endif
6461/* We use char because int might match the return type of a gcc2
6462 builtin and then its argument prototype would still apply. */
6463char login ();
6464int
6465main ()
6466{
6467login ();
6468 ;
6469 return 0;
6470}
6471_ACEOF
6472rm -f conftest.$ac_objext conftest$ac_exeext
6473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6474 (eval $ac_link) 2>&5
6475 ac_status=$?
6476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6477 (exit $ac_status); } &&
6478 { ac_try='test -s conftest$ac_exeext'
6479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6480 (eval $ac_try) 2>&5
6481 ac_status=$?
6482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6483 (exit $ac_status); }; }; then
6484 ac_cv_search_login="none required"
6485else
6486 echo "$as_me: failed program was:" >&5
6487sed 's/^/| /' conftest.$ac_ext >&5
6488
6489fi
6490rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6491if test "$ac_cv_search_login" = no; then
6492 for ac_lib in util bsd; do
6493 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6494 cat >conftest.$ac_ext <<_ACEOF
6495#line $LINENO "configure"
6496/* confdefs.h. */
6497_ACEOF
6498cat confdefs.h >>conftest.$ac_ext
6499cat >>conftest.$ac_ext <<_ACEOF
6500/* end confdefs.h. */
6501
6502/* Override any gcc2 internal prototype to avoid an error. */
6503#ifdef __cplusplus
6504extern "C"
6505#endif
6506/* We use char because int might match the return type of a gcc2
6507 builtin and then its argument prototype would still apply. */
6508char login ();
6509int
6510main ()
6511{
6512login ();
6513 ;
6514 return 0;
6515}
6516_ACEOF
6517rm -f conftest.$ac_objext conftest$ac_exeext
6518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6519 (eval $ac_link) 2>&5
6520 ac_status=$?
6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522 (exit $ac_status); } &&
6523 { ac_try='test -s conftest$ac_exeext'
6524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6525 (eval $ac_try) 2>&5
6526 ac_status=$?
6527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528 (exit $ac_status); }; }; then
6529 ac_cv_search_login="-l$ac_lib"
6530break
6531else
6532 echo "$as_me: failed program was:" >&5
6533sed 's/^/| /' conftest.$ac_ext >&5
6534
6535fi
6536rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6537 done
6538fi
6539LIBS=$ac_func_search_save_LIBS
6540fi
6541echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5
6542echo "${ECHO_T}$ac_cv_search_login" >&6
6543if test "$ac_cv_search_login" != no; then
6544 test "$ac_cv_search_login" = "none required" || LIBS="$ac_cv_search_login $LIBS"
6545 cat >>confdefs.h <<\_ACEOF
6546@%:@define HAVE_LOGIN 1
6547_ACEOF
6548
6549fi
6550
6551
6552
6553
6554for ac_func in logout updwtmp logwtmp
6555do
6556as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6557echo "$as_me:$LINENO: checking for $ac_func" >&5
6558echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6559if eval "test \"\${$as_ac_var+set}\" = set"; then
6560 echo $ECHO_N "(cached) $ECHO_C" >&6
6561else
6562 cat >conftest.$ac_ext <<_ACEOF
6563#line $LINENO "configure"
6564/* confdefs.h. */
6565_ACEOF
6566cat confdefs.h >>conftest.$ac_ext
6567cat >>conftest.$ac_ext <<_ACEOF
6568/* end confdefs.h. */
6569/* System header to define __stub macros and hopefully few prototypes,
6570 which can conflict with char $ac_func (); below.
6571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6572 <limits.h> exists even on freestanding compilers. */
6573#ifdef __STDC__
6574# include <limits.h>
6575#else
6576# include <assert.h>
6577#endif
6578/* Override any gcc2 internal prototype to avoid an error. */
6579#ifdef __cplusplus
6580extern "C"
6581{
6582#endif
6583/* We use char because int might match the return type of a gcc2
6584 builtin and then its argument prototype would still apply. */
6585char $ac_func ();
6586/* The GNU C library defines this for functions which it implements
6587 to always fail with ENOSYS. Some functions are actually named
6588 something starting with __ and the normal name is an alias. */
6589#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6590choke me
6591#else
6592char (*f) () = $ac_func;
6593#endif
6594#ifdef __cplusplus
6595}
6596#endif
6597
6598int
6599main ()
6600{
6601return f != $ac_func;
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext conftest$ac_exeext
6607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6608 (eval $ac_link) 2>&5
6609 ac_status=$?
6610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6611 (exit $ac_status); } &&
6612 { ac_try='test -s conftest$ac_exeext'
6613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6614 (eval $ac_try) 2>&5
6615 ac_status=$?
6616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6617 (exit $ac_status); }; }; then
6618 eval "$as_ac_var=yes"
6619else
6620 echo "$as_me: failed program was:" >&5
6621sed 's/^/| /' conftest.$ac_ext >&5
6622
6623eval "$as_ac_var=no"
6624fi
6625rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6626fi
6627echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6628echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6629if test `eval echo '${'$as_ac_var'}'` = yes; then
6630 cat >>confdefs.h <<_ACEOF
6631@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6632_ACEOF
6633
6634fi
6635done
6636
6637
6638
6639for ac_func in strftime
6640do
6641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6642echo "$as_me:$LINENO: checking for $ac_func" >&5
6643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6644if eval "test \"\${$as_ac_var+set}\" = set"; then
6645 echo $ECHO_N "(cached) $ECHO_C" >&6
6646else
6647 cat >conftest.$ac_ext <<_ACEOF
6648#line $LINENO "configure"
6649/* confdefs.h. */
6650_ACEOF
6651cat confdefs.h >>conftest.$ac_ext
6652cat >>conftest.$ac_ext <<_ACEOF
6653/* end confdefs.h. */
6654/* System header to define __stub macros and hopefully few prototypes,
6655 which can conflict with char $ac_func (); below.
6656 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6657 <limits.h> exists even on freestanding compilers. */
6658#ifdef __STDC__
6659# include <limits.h>
6660#else
6661# include <assert.h>
6662#endif
6663/* Override any gcc2 internal prototype to avoid an error. */
6664#ifdef __cplusplus
6665extern "C"
6666{
6667#endif
6668/* We use char because int might match the return type of a gcc2
6669 builtin and then its argument prototype would still apply. */
6670char $ac_func ();
6671/* The GNU C library defines this for functions which it implements
6672 to always fail with ENOSYS. Some functions are actually named
6673 something starting with __ and the normal name is an alias. */
6674#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6675choke me
6676#else
6677char (*f) () = $ac_func;
6678#endif
6679#ifdef __cplusplus
6680}
6681#endif
6682
6683int
6684main ()
6685{
6686return f != $ac_func;
6687 ;
6688 return 0;
6689}
6690_ACEOF
6691rm -f conftest.$ac_objext conftest$ac_exeext
6692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6693 (eval $ac_link) 2>&5
6694 ac_status=$?
6695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6696 (exit $ac_status); } &&
6697 { ac_try='test -s conftest$ac_exeext'
6698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6699 (eval $ac_try) 2>&5
6700 ac_status=$?
6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702 (exit $ac_status); }; }; then
6703 eval "$as_ac_var=yes"
6704else
6705 echo "$as_me: failed program was:" >&5
6706sed 's/^/| /' conftest.$ac_ext >&5
6707
6708eval "$as_ac_var=no"
6709fi
6710rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6711fi
6712echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6713echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6714if test `eval echo '${'$as_ac_var'}'` = yes; then
6715 cat >>confdefs.h <<_ACEOF
6716@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6717_ACEOF
6718
6719else
6720 # strftime is in -lintl on SCO UNIX.
6721echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
6722echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
6723if test "${ac_cv_lib_intl_strftime+set}" = set; then
6724 echo $ECHO_N "(cached) $ECHO_C" >&6
6725else
6726 ac_check_lib_save_LIBS=$LIBS
6727LIBS="-lintl $LIBS"
6728cat >conftest.$ac_ext <<_ACEOF
6729#line $LINENO "configure"
6730/* confdefs.h. */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h. */
6735
6736/* Override any gcc2 internal prototype to avoid an error. */
6737#ifdef __cplusplus
6738extern "C"
6739#endif
6740/* We use char because int might match the return type of a gcc2
6741 builtin and then its argument prototype would still apply. */
6742char strftime ();
6743int
6744main ()
6745{
6746strftime ();
6747 ;
6748 return 0;
6749}
6750_ACEOF
6751rm -f conftest.$ac_objext conftest$ac_exeext
6752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6753 (eval $ac_link) 2>&5
6754 ac_status=$?
6755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6756 (exit $ac_status); } &&
6757 { ac_try='test -s conftest$ac_exeext'
6758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6759 (eval $ac_try) 2>&5
6760 ac_status=$?
6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6762 (exit $ac_status); }; }; then
6763 ac_cv_lib_intl_strftime=yes
6764else
6765 echo "$as_me: failed program was:" >&5
6766sed 's/^/| /' conftest.$ac_ext >&5
6767
6768ac_cv_lib_intl_strftime=no
6769fi
6770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6771LIBS=$ac_check_lib_save_LIBS
6772fi
6773echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
6774echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
6775if test $ac_cv_lib_intl_strftime = yes; then
6776 cat >>confdefs.h <<\_ACEOF
6777@%:@define HAVE_STRFTIME 1
6778_ACEOF
6779
6780LIBS="-lintl $LIBS"
6781fi
6782
6783fi
6784done
6785
6786
6787# Check for ALTDIRFUNC glob() extension
6788echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5
6789echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6
6790cat >conftest.$ac_ext <<_ACEOF
6791#line $LINENO "configure"
6792/* confdefs.h. */
6793_ACEOF
6794cat confdefs.h >>conftest.$ac_ext
6795cat >>conftest.$ac_ext <<_ACEOF
6796/* end confdefs.h. */
6797
6798 #include <glob.h>
6799 #ifdef GLOB_ALTDIRFUNC
6800 FOUNDIT
6801 #endif
6802
6803_ACEOF
6804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6805 $EGREP "FOUNDIT" >/dev/null 2>&1; then
6806
6807 cat >>confdefs.h <<\_ACEOF
6808@%:@define GLOB_HAS_ALTDIRFUNC 1
6809_ACEOF
6810
6811 echo "$as_me:$LINENO: result: yes" >&5
6812echo "${ECHO_T}yes" >&6
6813
6814else
6815
6816 echo "$as_me:$LINENO: result: no" >&5
6817echo "${ECHO_T}no" >&6
6818
6819
6820fi
6821rm -f conftest*
6822
6823
6824# Check for g.gl_matchc glob() extension
6825echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5
6826echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6
6827cat >conftest.$ac_ext <<_ACEOF
6828#line $LINENO "configure"
6829/* confdefs.h. */
6830_ACEOF
6831cat confdefs.h >>conftest.$ac_ext
6832cat >>conftest.$ac_ext <<_ACEOF
6833/* end confdefs.h. */
6834
6835 #include <glob.h>
6836 int main(void){glob_t g; g.gl_matchc = 1;}
6837
6838_ACEOF
6839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6840 $EGREP "FOUNDIT" >/dev/null 2>&1; then
6841
6842 cat >>confdefs.h <<\_ACEOF
6843@%:@define GLOB_HAS_GL_MATCHC 1
6844_ACEOF
6845
6846 echo "$as_me:$LINENO: result: yes" >&5
6847echo "${ECHO_T}yes" >&6
6848
6849else
6850
6851 echo "$as_me:$LINENO: result: no" >&5
6852echo "${ECHO_T}no" >&6
6853
6854
6855fi
6856rm -f conftest*
6857
6858
6859echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5
6860echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6
6861if test "$cross_compiling" = yes; then
6862 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6863See \`config.log' for more details." >&5
6864echo "$as_me: error: cannot run test program while cross compiling
6865See \`config.log' for more details." >&2;}
6866 { (exit 1); exit 1; }; }
6867else
6868 cat >conftest.$ac_ext <<_ACEOF
6869#line $LINENO "configure"
6870/* confdefs.h. */
6871_ACEOF
6872cat confdefs.h >>conftest.$ac_ext
6873cat >>conftest.$ac_ext <<_ACEOF
6874/* end confdefs.h. */
6875
6876#include <sys/types.h>
6877#include <dirent.h>
6878int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
6879
6880_ACEOF
6881rm -f conftest$ac_exeext
6882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6883 (eval $ac_link) 2>&5
6884 ac_status=$?
6885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6888 (eval $ac_try) 2>&5
6889 ac_status=$?
6890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6891 (exit $ac_status); }; }; then
6892 echo "$as_me:$LINENO: result: yes" >&5
6893echo "${ECHO_T}yes" >&6
6894else
6895 echo "$as_me: program exited with status $ac_status" >&5
6896echo "$as_me: failed program was:" >&5
6897sed 's/^/| /' conftest.$ac_ext >&5
6898
6899( exit $ac_status )
6900
6901 echo "$as_me:$LINENO: result: no" >&5
6902echo "${ECHO_T}no" >&6
6903 cat >>confdefs.h <<\_ACEOF
6904@%:@define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
6905_ACEOF
6906
6907
6908
6909fi
6910rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6911fi
6912
6913# Check whether user wants S/Key support
6914SKEY_MSG="no"
6915
6916# Check whether --with-skey or --without-skey was given.
6917if test "${with_skey+set}" = set; then
6918 withval="$with_skey"
6919
6920 if test "x$withval" != "xno" ; then
6921
6922 if test "x$withval" != "xyes" ; then
6923 CPPFLAGS="$CPPFLAGS -I${withval}/include"
6924 LDFLAGS="$LDFLAGS -L${withval}/lib"
6925 fi
6926
6927 cat >>confdefs.h <<\_ACEOF
6928@%:@define SKEY 1
6929_ACEOF
6930
6931 LIBS="-lskey $LIBS"
6932 SKEY_MSG="yes"
6933
6934 echo "$as_me:$LINENO: checking for s/key support" >&5
6935echo $ECHO_N "checking for s/key support... $ECHO_C" >&6
6936 if test "$cross_compiling" = yes; then
6937 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6938See \`config.log' for more details." >&5
6939echo "$as_me: error: cannot run test program while cross compiling
6940See \`config.log' for more details." >&2;}
6941 { (exit 1); exit 1; }; }
6942else
6943 cat >conftest.$ac_ext <<_ACEOF
6944#line $LINENO "configure"
6945/* confdefs.h. */
6946_ACEOF
6947cat confdefs.h >>conftest.$ac_ext
6948cat >>conftest.$ac_ext <<_ACEOF
6949/* end confdefs.h. */
6950
6951#include <stdio.h>
6952#include <skey.h>
6953int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
6954
6955_ACEOF
6956rm -f conftest$ac_exeext
6957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6958 (eval $ac_link) 2>&5
6959 ac_status=$?
6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6963 (eval $ac_try) 2>&5
6964 ac_status=$?
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); }; }; then
6967 echo "$as_me:$LINENO: result: yes" >&5
6968echo "${ECHO_T}yes" >&6
6969else
6970 echo "$as_me: program exited with status $ac_status" >&5
6971echo "$as_me: failed program was:" >&5
6972sed 's/^/| /' conftest.$ac_ext >&5
6973
6974( exit $ac_status )
6975
6976 echo "$as_me:$LINENO: result: no" >&5
6977echo "${ECHO_T}no" >&6
6978 { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5
6979echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
6980 { (exit 1); exit 1; }; }
6981
6982fi
6983rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6984fi
6985 fi
6986
6987
6988fi;
6989
6990# Check whether user wants TCP wrappers support
6991TCPW_MSG="no"
6992
6993# Check whether --with-tcp-wrappers or --without-tcp-wrappers was given.
6994if test "${with_tcp_wrappers+set}" = set; then
6995 withval="$with_tcp_wrappers"
6996
6997 if test "x$withval" != "xno" ; then
6998 saved_LIBS="$LIBS"
6999 saved_LDFLAGS="$LDFLAGS"
7000 saved_CPPFLAGS="$CPPFLAGS"
7001 if test -n "${withval}" -a "${withval}" != "yes"; then
7002 if test -d "${withval}/lib"; then
7003 if test -n "${need_dash_r}"; then
7004 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
7005 else
7006 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
7007 fi
7008 else
7009 if test -n "${need_dash_r}"; then
7010 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
7011 else
7012 LDFLAGS="-L${withval} ${LDFLAGS}"
7013 fi
7014 fi
7015 if test -d "${withval}/include"; then
7016 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
7017 else
7018 CPPFLAGS="-I${withval} ${CPPFLAGS}"
7019 fi
7020 fi
7021 LIBWRAP="-lwrap"
7022 LIBS="$LIBWRAP $LIBS"
7023 echo "$as_me:$LINENO: checking for libwrap" >&5
7024echo $ECHO_N "checking for libwrap... $ECHO_C" >&6
7025 cat >conftest.$ac_ext <<_ACEOF
7026#line $LINENO "configure"
7027/* confdefs.h. */
7028_ACEOF
7029cat confdefs.h >>conftest.$ac_ext
7030cat >>conftest.$ac_ext <<_ACEOF
7031/* end confdefs.h. */
7032
7033#include <tcpd.h>
7034 int deny_severity = 0, allow_severity = 0;
7035
7036int
7037main ()
7038{
7039hosts_access(0);
7040 ;
7041 return 0;
7042}
7043_ACEOF
7044rm -f conftest.$ac_objext conftest$ac_exeext
7045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7046 (eval $ac_link) 2>&5
7047 ac_status=$?
7048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7049 (exit $ac_status); } &&
7050 { ac_try='test -s conftest$ac_exeext'
7051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7052 (eval $ac_try) 2>&5
7053 ac_status=$?
7054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055 (exit $ac_status); }; }; then
7056
7057 echo "$as_me:$LINENO: result: yes" >&5
7058echo "${ECHO_T}yes" >&6
7059 cat >>confdefs.h <<\_ACEOF
7060@%:@define LIBWRAP 1
7061_ACEOF
7062
7063
7064 TCPW_MSG="yes"
7065
7066else
7067 echo "$as_me: failed program was:" >&5
7068sed 's/^/| /' conftest.$ac_ext >&5
7069
7070
7071 { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
7072echo "$as_me: error: *** libwrap missing" >&2;}
7073 { (exit 1); exit 1; }; }
7074
7075
7076fi
7077rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7078 LIBS="$saved_LIBS"
7079 fi
7080
7081
7082fi;
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157for ac_func in \
7158 arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename bcopy \
7159 bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
7160 gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
7161 getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \
7162 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
7163 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openpty pstat \
7164 readpassphrase realpath recvmsg rresvport_af sendmsg setdtablesize \
7165 setegid setenv seteuid setgroups setlogin setpcred setproctitle \
7166 setresgid setreuid setrlimit setsid setvbuf sigaction sigvec \
7167 snprintf socketpair strerror strlcat strlcpy strmode strnvis \
7168 sysconf tcgetpgrp truncate utimes vhangup vsnprintf waitpid \
7169
7170do
7171as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7172echo "$as_me:$LINENO: checking for $ac_func" >&5
7173echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7174if eval "test \"\${$as_ac_var+set}\" = set"; then
7175 echo $ECHO_N "(cached) $ECHO_C" >&6
7176else
7177 cat >conftest.$ac_ext <<_ACEOF
7178#line $LINENO "configure"
7179/* confdefs.h. */
7180_ACEOF
7181cat confdefs.h >>conftest.$ac_ext
7182cat >>conftest.$ac_ext <<_ACEOF
7183/* end confdefs.h. */
7184/* System header to define __stub macros and hopefully few prototypes,
7185 which can conflict with char $ac_func (); below.
7186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7187 <limits.h> exists even on freestanding compilers. */
7188#ifdef __STDC__
7189# include <limits.h>
7190#else
7191# include <assert.h>
7192#endif
7193/* Override any gcc2 internal prototype to avoid an error. */
7194#ifdef __cplusplus
7195extern "C"
7196{
7197#endif
7198/* We use char because int might match the return type of a gcc2
7199 builtin and then its argument prototype would still apply. */
7200char $ac_func ();
7201/* The GNU C library defines this for functions which it implements
7202 to always fail with ENOSYS. Some functions are actually named
7203 something starting with __ and the normal name is an alias. */
7204#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7205choke me
7206#else
7207char (*f) () = $ac_func;
7208#endif
7209#ifdef __cplusplus
7210}
7211#endif
7212
7213int
7214main ()
7215{
7216return f != $ac_func;
7217 ;
7218 return 0;
7219}
7220_ACEOF
7221rm -f conftest.$ac_objext conftest$ac_exeext
7222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7223 (eval $ac_link) 2>&5
7224 ac_status=$?
7225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7226 (exit $ac_status); } &&
7227 { ac_try='test -s conftest$ac_exeext'
7228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7229 (eval $ac_try) 2>&5
7230 ac_status=$?
7231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7232 (exit $ac_status); }; }; then
7233 eval "$as_ac_var=yes"
7234else
7235 echo "$as_me: failed program was:" >&5
7236sed 's/^/| /' conftest.$ac_ext >&5
7237
7238eval "$as_ac_var=no"
7239fi
7240rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7241fi
7242echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7243echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7244if test `eval echo '${'$as_ac_var'}'` = yes; then
7245 cat >>confdefs.h <<_ACEOF
7246@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7247_ACEOF
7248
7249fi
7250done
7251
7252
7253echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
7254echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6
7255if test "${ac_cv_search_nanosleep+set}" = set; then
7256 echo $ECHO_N "(cached) $ECHO_C" >&6
7257else
7258 ac_func_search_save_LIBS=$LIBS
7259ac_cv_search_nanosleep=no
7260cat >conftest.$ac_ext <<_ACEOF
7261#line $LINENO "configure"
7262/* confdefs.h. */
7263_ACEOF
7264cat confdefs.h >>conftest.$ac_ext
7265cat >>conftest.$ac_ext <<_ACEOF
7266/* end confdefs.h. */
7267
7268/* Override any gcc2 internal prototype to avoid an error. */
7269#ifdef __cplusplus
7270extern "C"
7271#endif
7272/* We use char because int might match the return type of a gcc2
7273 builtin and then its argument prototype would still apply. */
7274char nanosleep ();
7275int
7276main ()
7277{
7278nanosleep ();
7279 ;
7280 return 0;
7281}
7282_ACEOF
7283rm -f conftest.$ac_objext conftest$ac_exeext
7284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7285 (eval $ac_link) 2>&5
7286 ac_status=$?
7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7288 (exit $ac_status); } &&
7289 { ac_try='test -s conftest$ac_exeext'
7290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7291 (eval $ac_try) 2>&5
7292 ac_status=$?
7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); }; }; then
7295 ac_cv_search_nanosleep="none required"
7296else
7297 echo "$as_me: failed program was:" >&5
7298sed 's/^/| /' conftest.$ac_ext >&5
7299
7300fi
7301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7302if test "$ac_cv_search_nanosleep" = no; then
7303 for ac_lib in rt posix4; do
7304 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7305 cat >conftest.$ac_ext <<_ACEOF
7306#line $LINENO "configure"
7307/* confdefs.h. */
7308_ACEOF
7309cat confdefs.h >>conftest.$ac_ext
7310cat >>conftest.$ac_ext <<_ACEOF
7311/* end confdefs.h. */
7312
7313/* Override any gcc2 internal prototype to avoid an error. */
7314#ifdef __cplusplus
7315extern "C"
7316#endif
7317/* We use char because int might match the return type of a gcc2
7318 builtin and then its argument prototype would still apply. */
7319char nanosleep ();
7320int
7321main ()
7322{
7323nanosleep ();
7324 ;
7325 return 0;
7326}
7327_ACEOF
7328rm -f conftest.$ac_objext conftest$ac_exeext
7329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7330 (eval $ac_link) 2>&5
7331 ac_status=$?
7332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7333 (exit $ac_status); } &&
7334 { ac_try='test -s conftest$ac_exeext'
7335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7336 (eval $ac_try) 2>&5
7337 ac_status=$?
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); }; }; then
7340 ac_cv_search_nanosleep="-l$ac_lib"
7341break
7342else
7343 echo "$as_me: failed program was:" >&5
7344sed 's/^/| /' conftest.$ac_ext >&5
7345
7346fi
7347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7348 done
7349fi
7350LIBS=$ac_func_search_save_LIBS
7351fi
7352echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
7353echo "${ECHO_T}$ac_cv_search_nanosleep" >&6
7354if test "$ac_cv_search_nanosleep" != no; then
7355 test "$ac_cv_search_nanosleep" = "none required" || LIBS="$ac_cv_search_nanosleep $LIBS"
7356 cat >>confdefs.h <<\_ACEOF
7357@%:@define HAVE_NANOSLEEP 1
7358_ACEOF
7359
7360fi
7361
7362echo "$as_me:$LINENO: checking for library containing basename" >&5
7363echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6
7364if test "${ac_cv_search_basename+set}" = set; then
7365 echo $ECHO_N "(cached) $ECHO_C" >&6
7366else
7367 ac_func_search_save_LIBS=$LIBS
7368ac_cv_search_basename=no
7369cat >conftest.$ac_ext <<_ACEOF
7370#line $LINENO "configure"
7371/* confdefs.h. */
7372_ACEOF
7373cat confdefs.h >>conftest.$ac_ext
7374cat >>conftest.$ac_ext <<_ACEOF
7375/* end confdefs.h. */
7376
7377/* Override any gcc2 internal prototype to avoid an error. */
7378#ifdef __cplusplus
7379extern "C"
7380#endif
7381/* We use char because int might match the return type of a gcc2
7382 builtin and then its argument prototype would still apply. */
7383char basename ();
7384int
7385main ()
7386{
7387basename ();
7388 ;
7389 return 0;
7390}
7391_ACEOF
7392rm -f conftest.$ac_objext conftest$ac_exeext
7393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7394 (eval $ac_link) 2>&5
7395 ac_status=$?
7396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); } &&
7398 { ac_try='test -s conftest$ac_exeext'
7399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7400 (eval $ac_try) 2>&5
7401 ac_status=$?
7402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403 (exit $ac_status); }; }; then
7404 ac_cv_search_basename="none required"
7405else
7406 echo "$as_me: failed program was:" >&5
7407sed 's/^/| /' conftest.$ac_ext >&5
7408
7409fi
7410rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7411if test "$ac_cv_search_basename" = no; then
7412 for ac_lib in gen; do
7413 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7414 cat >conftest.$ac_ext <<_ACEOF
7415#line $LINENO "configure"
7416/* confdefs.h. */
7417_ACEOF
7418cat confdefs.h >>conftest.$ac_ext
7419cat >>conftest.$ac_ext <<_ACEOF
7420/* end confdefs.h. */
7421
7422/* Override any gcc2 internal prototype to avoid an error. */
7423#ifdef __cplusplus
7424extern "C"
7425#endif
7426/* We use char because int might match the return type of a gcc2
7427 builtin and then its argument prototype would still apply. */
7428char basename ();
7429int
7430main ()
7431{
7432basename ();
7433 ;
7434 return 0;
7435}
7436_ACEOF
7437rm -f conftest.$ac_objext conftest$ac_exeext
7438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7439 (eval $ac_link) 2>&5
7440 ac_status=$?
7441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7442 (exit $ac_status); } &&
7443 { ac_try='test -s conftest$ac_exeext'
7444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7445 (eval $ac_try) 2>&5
7446 ac_status=$?
7447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7448 (exit $ac_status); }; }; then
7449 ac_cv_search_basename="-l$ac_lib"
7450break
7451else
7452 echo "$as_me: failed program was:" >&5
7453sed 's/^/| /' conftest.$ac_ext >&5
7454
7455fi
7456rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7457 done
7458fi
7459LIBS=$ac_func_search_save_LIBS
7460fi
7461echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5
7462echo "${ECHO_T}$ac_cv_search_basename" >&6
7463if test "$ac_cv_search_basename" != no; then
7464 test "$ac_cv_search_basename" = "none required" || LIBS="$ac_cv_search_basename $LIBS"
7465 cat >>confdefs.h <<\_ACEOF
7466@%:@define HAVE_BASENAME 1
7467_ACEOF
7468
7469fi
7470
7471
7472echo "$as_me:$LINENO: checking whether strsep is declared" >&5
7473echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6
7474if test "${ac_cv_have_decl_strsep+set}" = set; then
7475 echo $ECHO_N "(cached) $ECHO_C" >&6
7476else
7477 cat >conftest.$ac_ext <<_ACEOF
7478#line $LINENO "configure"
7479/* confdefs.h. */
7480_ACEOF
7481cat confdefs.h >>conftest.$ac_ext
7482cat >>conftest.$ac_ext <<_ACEOF
7483/* end confdefs.h. */
7484$ac_includes_default
7485int
7486main ()
7487{
7488#ifndef strsep
7489 char *p = (char *) strsep;
7490#endif
7491
7492 ;
7493 return 0;
7494}
7495_ACEOF
7496rm -f conftest.$ac_objext
7497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7498 (eval $ac_compile) 2>&5
7499 ac_status=$?
7500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7501 (exit $ac_status); } &&
7502 { ac_try='test -s conftest.$ac_objext'
7503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7504 (eval $ac_try) 2>&5
7505 ac_status=$?
7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7507 (exit $ac_status); }; }; then
7508 ac_cv_have_decl_strsep=yes
7509else
7510 echo "$as_me: failed program was:" >&5
7511sed 's/^/| /' conftest.$ac_ext >&5
7512
7513ac_cv_have_decl_strsep=no
7514fi
7515rm -f conftest.$ac_objext conftest.$ac_ext
7516fi
7517echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5
7518echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6
7519if test $ac_cv_have_decl_strsep = yes; then
7520
7521for ac_func in strsep
7522do
7523as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7524echo "$as_me:$LINENO: checking for $ac_func" >&5
7525echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7526if eval "test \"\${$as_ac_var+set}\" = set"; then
7527 echo $ECHO_N "(cached) $ECHO_C" >&6
7528else
7529 cat >conftest.$ac_ext <<_ACEOF
7530#line $LINENO "configure"
7531/* confdefs.h. */
7532_ACEOF
7533cat confdefs.h >>conftest.$ac_ext
7534cat >>conftest.$ac_ext <<_ACEOF
7535/* end confdefs.h. */
7536/* System header to define __stub macros and hopefully few prototypes,
7537 which can conflict with char $ac_func (); below.
7538 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7539 <limits.h> exists even on freestanding compilers. */
7540#ifdef __STDC__
7541# include <limits.h>
7542#else
7543# include <assert.h>
7544#endif
7545/* Override any gcc2 internal prototype to avoid an error. */
7546#ifdef __cplusplus
7547extern "C"
7548{
7549#endif
7550/* We use char because int might match the return type of a gcc2
7551 builtin and then its argument prototype would still apply. */
7552char $ac_func ();
7553/* The GNU C library defines this for functions which it implements
7554 to always fail with ENOSYS. Some functions are actually named
7555 something starting with __ and the normal name is an alias. */
7556#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7557choke me
7558#else
7559char (*f) () = $ac_func;
7560#endif
7561#ifdef __cplusplus
7562}
7563#endif
7564
7565int
7566main ()
7567{
7568return f != $ac_func;
7569 ;
7570 return 0;
7571}
7572_ACEOF
7573rm -f conftest.$ac_objext conftest$ac_exeext
7574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7575 (eval $ac_link) 2>&5
7576 ac_status=$?
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); } &&
7579 { ac_try='test -s conftest$ac_exeext'
7580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7581 (eval $ac_try) 2>&5
7582 ac_status=$?
7583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7584 (exit $ac_status); }; }; then
7585 eval "$as_ac_var=yes"
7586else
7587 echo "$as_me: failed program was:" >&5
7588sed 's/^/| /' conftest.$ac_ext >&5
7589
7590eval "$as_ac_var=no"
7591fi
7592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7593fi
7594echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7595echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7596if test `eval echo '${'$as_ac_var'}'` = yes; then
7597 cat >>confdefs.h <<_ACEOF
7598@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7599_ACEOF
7600
7601fi
7602done
7603
7604fi
7605
7606
7607
7608for ac_func in dirname
7609do
7610as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7611echo "$as_me:$LINENO: checking for $ac_func" >&5
7612echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7613if eval "test \"\${$as_ac_var+set}\" = set"; then
7614 echo $ECHO_N "(cached) $ECHO_C" >&6
7615else
7616 cat >conftest.$ac_ext <<_ACEOF
7617#line $LINENO "configure"
7618/* confdefs.h. */
7619_ACEOF
7620cat confdefs.h >>conftest.$ac_ext
7621cat >>conftest.$ac_ext <<_ACEOF
7622/* end confdefs.h. */
7623/* System header to define __stub macros and hopefully few prototypes,
7624 which can conflict with char $ac_func (); below.
7625 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7626 <limits.h> exists even on freestanding compilers. */
7627#ifdef __STDC__
7628# include <limits.h>
7629#else
7630# include <assert.h>
7631#endif
7632/* Override any gcc2 internal prototype to avoid an error. */
7633#ifdef __cplusplus
7634extern "C"
7635{
7636#endif
7637/* We use char because int might match the return type of a gcc2
7638 builtin and then its argument prototype would still apply. */
7639char $ac_func ();
7640/* The GNU C library defines this for functions which it implements
7641 to always fail with ENOSYS. Some functions are actually named
7642 something starting with __ and the normal name is an alias. */
7643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7644choke me
7645#else
7646char (*f) () = $ac_func;
7647#endif
7648#ifdef __cplusplus
7649}
7650#endif
7651
7652int
7653main ()
7654{
7655return f != $ac_func;
7656 ;
7657 return 0;
7658}
7659_ACEOF
7660rm -f conftest.$ac_objext conftest$ac_exeext
7661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7662 (eval $ac_link) 2>&5
7663 ac_status=$?
7664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7665 (exit $ac_status); } &&
7666 { ac_try='test -s conftest$ac_exeext'
7667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7668 (eval $ac_try) 2>&5
7669 ac_status=$?
7670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7671 (exit $ac_status); }; }; then
7672 eval "$as_ac_var=yes"
7673else
7674 echo "$as_me: failed program was:" >&5
7675sed 's/^/| /' conftest.$ac_ext >&5
7676
7677eval "$as_ac_var=no"
7678fi
7679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7680fi
7681echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7682echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7683if test `eval echo '${'$as_ac_var'}'` = yes; then
7684 cat >>confdefs.h <<_ACEOF
7685@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7686_ACEOF
7687
7688for ac_header in libgen.h
7689do
7690as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7691if eval "test \"\${$as_ac_Header+set}\" = set"; then
7692 echo "$as_me:$LINENO: checking for $ac_header" >&5
7693echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7694if eval "test \"\${$as_ac_Header+set}\" = set"; then
7695 echo $ECHO_N "(cached) $ECHO_C" >&6
7696fi
7697echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7698echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7699else
7700 # Is the header compilable?
7701echo "$as_me:$LINENO: checking $ac_header usability" >&5
7702echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7703cat >conftest.$ac_ext <<_ACEOF
7704#line $LINENO "configure"
7705/* confdefs.h. */
7706_ACEOF
7707cat confdefs.h >>conftest.$ac_ext
7708cat >>conftest.$ac_ext <<_ACEOF
7709/* end confdefs.h. */
7710$ac_includes_default
7711@%:@include <$ac_header>
7712_ACEOF
7713rm -f conftest.$ac_objext
7714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7715 (eval $ac_compile) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); } &&
7719 { ac_try='test -s conftest.$ac_objext'
7720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); }; }; then
7725 ac_header_compiler=yes
7726else
7727 echo "$as_me: failed program was:" >&5
7728sed 's/^/| /' conftest.$ac_ext >&5
7729
7730ac_header_compiler=no
7731fi
7732rm -f conftest.$ac_objext conftest.$ac_ext
7733echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7734echo "${ECHO_T}$ac_header_compiler" >&6
7735
7736# Is the header present?
7737echo "$as_me:$LINENO: checking $ac_header presence" >&5
7738echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7739cat >conftest.$ac_ext <<_ACEOF
7740#line $LINENO "configure"
7741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
7746@%:@include <$ac_header>
7747_ACEOF
7748if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7749 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7750 ac_status=$?
7751 grep -v '^ *+' conftest.er1 >conftest.err
7752 rm -f conftest.er1
7753 cat conftest.err >&5
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); } >/dev/null; then
7756 if test -s conftest.err; then
7757 ac_cpp_err=$ac_c_preproc_warn_flag
7758 else
7759 ac_cpp_err=
7760 fi
7761else
7762 ac_cpp_err=yes
7763fi
7764if test -z "$ac_cpp_err"; then
7765 ac_header_preproc=yes
7766else
7767 echo "$as_me: failed program was:" >&5
7768sed 's/^/| /' conftest.$ac_ext >&5
7769
7770 ac_header_preproc=no
7771fi
7772rm -f conftest.err conftest.$ac_ext
7773echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7774echo "${ECHO_T}$ac_header_preproc" >&6
7775
7776# So? What about this header?
7777case $ac_header_compiler:$ac_header_preproc in
7778 yes:no )
7779 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7780echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7781 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7782echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7783 (
7784 cat <<\_ASBOX
7785@%:@@%:@ ------------------------------------ @%:@@%:@
7786@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
7787@%:@@%:@ ------------------------------------ @%:@@%:@
7788_ASBOX
7789 ) |
7790 sed "s/^/$as_me: WARNING: /" >&2
7791 ;;
7792 no:yes )
7793 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7794echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7795 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7796echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7797 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7798echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7799 (
7800 cat <<\_ASBOX
7801@%:@@%:@ ------------------------------------ @%:@@%:@
7802@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
7803@%:@@%:@ ------------------------------------ @%:@@%:@
7804_ASBOX
7805 ) |
7806 sed "s/^/$as_me: WARNING: /" >&2
7807 ;;
7808esac
7809echo "$as_me:$LINENO: checking for $ac_header" >&5
7810echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7811if eval "test \"\${$as_ac_Header+set}\" = set"; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
7813else
7814 eval "$as_ac_Header=$ac_header_preproc"
7815fi
7816echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7817echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7818
7819fi
7820if test `eval echo '${'$as_ac_Header'}'` = yes; then
7821 cat >>confdefs.h <<_ACEOF
7822@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7823_ACEOF
7824
7825fi
7826
7827done
7828
7829else
7830
7831 echo "$as_me:$LINENO: checking for dirname in -lgen" >&5
7832echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6
7833if test "${ac_cv_lib_gen_dirname+set}" = set; then
7834 echo $ECHO_N "(cached) $ECHO_C" >&6
7835else
7836 ac_check_lib_save_LIBS=$LIBS
7837LIBS="-lgen $LIBS"
7838cat >conftest.$ac_ext <<_ACEOF
7839#line $LINENO "configure"
7840/* confdefs.h. */
7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
7845
7846/* Override any gcc2 internal prototype to avoid an error. */
7847#ifdef __cplusplus
7848extern "C"
7849#endif
7850/* We use char because int might match the return type of a gcc2
7851 builtin and then its argument prototype would still apply. */
7852char dirname ();
7853int
7854main ()
7855{
7856dirname ();
7857 ;
7858 return 0;
7859}
7860_ACEOF
7861rm -f conftest.$ac_objext conftest$ac_exeext
7862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7863 (eval $ac_link) 2>&5
7864 ac_status=$?
7865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866 (exit $ac_status); } &&
7867 { ac_try='test -s conftest$ac_exeext'
7868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7869 (eval $ac_try) 2>&5
7870 ac_status=$?
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); }; }; then
7873 ac_cv_lib_gen_dirname=yes
7874else
7875 echo "$as_me: failed program was:" >&5
7876sed 's/^/| /' conftest.$ac_ext >&5
7877
7878ac_cv_lib_gen_dirname=no
7879fi
7880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7881LIBS=$ac_check_lib_save_LIBS
7882fi
7883echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5
7884echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6
7885if test $ac_cv_lib_gen_dirname = yes; then
7886
7887 echo "$as_me:$LINENO: checking for broken dirname" >&5
7888echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6
7889if test "${ac_cv_have_broken_dirname+set}" = set; then
7890 echo $ECHO_N "(cached) $ECHO_C" >&6
7891else
7892
7893 save_LIBS="$LIBS"
7894 LIBS="$LIBS -lgen"
7895 if test "$cross_compiling" = yes; then
7896 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7897See \`config.log' for more details." >&5
7898echo "$as_me: error: cannot run test program while cross compiling
7899See \`config.log' for more details." >&2;}
7900 { (exit 1); exit 1; }; }
7901else
7902 cat >conftest.$ac_ext <<_ACEOF
7903#line $LINENO "configure"
7904/* confdefs.h. */
7905_ACEOF
7906cat confdefs.h >>conftest.$ac_ext
7907cat >>conftest.$ac_ext <<_ACEOF
7908/* end confdefs.h. */
7909
7910#include <libgen.h>
7911#include <string.h>
7912
7913int main(int argc, char **argv) {
7914 char *s, buf[32];
7915
7916 strncpy(buf,"/etc", 32);
7917 s = dirname(buf);
7918 if (!s || strncmp(s, "/", 32) != 0) {
7919 exit(1);
7920 } else {
7921 exit(0);
7922 }
7923}
7924
7925_ACEOF
7926rm -f conftest$ac_exeext
7927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7928 (eval $ac_link) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_cv_have_broken_dirname="no"
7938else
7939 echo "$as_me: program exited with status $ac_status" >&5
7940echo "$as_me: failed program was:" >&5
7941sed 's/^/| /' conftest.$ac_ext >&5
7942
7943( exit $ac_status )
7944 ac_cv_have_broken_dirname="yes"
7945
7946fi
7947rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7948fi
7949 LIBS="$save_LIBS"
7950
7951fi
7952echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5
7953echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6
7954 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
7955 LIBS="$LIBS -lgen"
7956 cat >>confdefs.h <<\_ACEOF
7957@%:@define HAVE_DIRNAME 1
7958_ACEOF
7959
7960
7961for ac_header in libgen.h
7962do
7963as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7964if eval "test \"\${$as_ac_Header+set}\" = set"; then
7965 echo "$as_me:$LINENO: checking for $ac_header" >&5
7966echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7967if eval "test \"\${$as_ac_Header+set}\" = set"; then
7968 echo $ECHO_N "(cached) $ECHO_C" >&6
7969fi
7970echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7971echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7972else
7973 # Is the header compilable?
7974echo "$as_me:$LINENO: checking $ac_header usability" >&5
7975echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7976cat >conftest.$ac_ext <<_ACEOF
7977#line $LINENO "configure"
7978/* confdefs.h. */
7979_ACEOF
7980cat confdefs.h >>conftest.$ac_ext
7981cat >>conftest.$ac_ext <<_ACEOF
7982/* end confdefs.h. */
7983$ac_includes_default
7984@%:@include <$ac_header>
7985_ACEOF
7986rm -f conftest.$ac_objext
7987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7988 (eval $ac_compile) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); } &&
7992 { ac_try='test -s conftest.$ac_objext'
7993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7994 (eval $ac_try) 2>&5
7995 ac_status=$?
7996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997 (exit $ac_status); }; }; then
7998 ac_header_compiler=yes
7999else
8000 echo "$as_me: failed program was:" >&5
8001sed 's/^/| /' conftest.$ac_ext >&5
8002
8003ac_header_compiler=no
8004fi
8005rm -f conftest.$ac_objext conftest.$ac_ext
8006echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8007echo "${ECHO_T}$ac_header_compiler" >&6
8008
8009# Is the header present?
8010echo "$as_me:$LINENO: checking $ac_header presence" >&5
8011echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8012cat >conftest.$ac_ext <<_ACEOF
8013#line $LINENO "configure"
8014/* confdefs.h. */
8015_ACEOF
8016cat confdefs.h >>conftest.$ac_ext
8017cat >>conftest.$ac_ext <<_ACEOF
8018/* end confdefs.h. */
8019@%:@include <$ac_header>
8020_ACEOF
8021if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8022 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8023 ac_status=$?
8024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); } >/dev/null; then
8029 if test -s conftest.err; then
8030 ac_cpp_err=$ac_c_preproc_warn_flag
8031 else
8032 ac_cpp_err=
8033 fi
8034else
8035 ac_cpp_err=yes
8036fi
8037if test -z "$ac_cpp_err"; then
8038 ac_header_preproc=yes
8039else
8040 echo "$as_me: failed program was:" >&5
8041sed 's/^/| /' conftest.$ac_ext >&5
8042
8043 ac_header_preproc=no
8044fi
8045rm -f conftest.err conftest.$ac_ext
8046echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8047echo "${ECHO_T}$ac_header_preproc" >&6
8048
8049# So? What about this header?
8050case $ac_header_compiler:$ac_header_preproc in
8051 yes:no )
8052 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8053echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8054 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8055echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8056 (
8057 cat <<\_ASBOX
8058@%:@@%:@ ------------------------------------ @%:@@%:@
8059@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
8060@%:@@%:@ ------------------------------------ @%:@@%:@
8061_ASBOX
8062 ) |
8063 sed "s/^/$as_me: WARNING: /" >&2
8064 ;;
8065 no:yes )
8066 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8067echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8068 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8069echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8070 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8071echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8072 (
8073 cat <<\_ASBOX
8074@%:@@%:@ ------------------------------------ @%:@@%:@
8075@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
8076@%:@@%:@ ------------------------------------ @%:@@%:@
8077_ASBOX
8078 ) |
8079 sed "s/^/$as_me: WARNING: /" >&2
8080 ;;
8081esac
8082echo "$as_me:$LINENO: checking for $ac_header" >&5
8083echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8084if eval "test \"\${$as_ac_Header+set}\" = set"; then
8085 echo $ECHO_N "(cached) $ECHO_C" >&6
8086else
8087 eval "$as_ac_Header=$ac_header_preproc"
8088fi
8089echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8090echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8091
8092fi
8093if test `eval echo '${'$as_ac_Header'}'` = yes; then
8094 cat >>confdefs.h <<_ACEOF
8095@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8096_ACEOF
8097
8098fi
8099
8100done
8101
8102 fi
8103
8104fi
8105
8106
8107fi
8108done
8109
8110
8111
8112
8113for ac_func in gettimeofday time
8114do
8115as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8116echo "$as_me:$LINENO: checking for $ac_func" >&5
8117echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8118if eval "test \"\${$as_ac_var+set}\" = set"; then
8119 echo $ECHO_N "(cached) $ECHO_C" >&6
8120else
8121 cat >conftest.$ac_ext <<_ACEOF
8122#line $LINENO "configure"
8123/* confdefs.h. */
8124_ACEOF
8125cat confdefs.h >>conftest.$ac_ext
8126cat >>conftest.$ac_ext <<_ACEOF
8127/* end confdefs.h. */
8128/* System header to define __stub macros and hopefully few prototypes,
8129 which can conflict with char $ac_func (); below.
8130 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8131 <limits.h> exists even on freestanding compilers. */
8132#ifdef __STDC__
8133# include <limits.h>
8134#else
8135# include <assert.h>
8136#endif
8137/* Override any gcc2 internal prototype to avoid an error. */
8138#ifdef __cplusplus
8139extern "C"
8140{
8141#endif
8142/* We use char because int might match the return type of a gcc2
8143 builtin and then its argument prototype would still apply. */
8144char $ac_func ();
8145/* The GNU C library defines this for functions which it implements
8146 to always fail with ENOSYS. Some functions are actually named
8147 something starting with __ and the normal name is an alias. */
8148#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8149choke me
8150#else
8151char (*f) () = $ac_func;
8152#endif
8153#ifdef __cplusplus
8154}
8155#endif
8156
8157int
8158main ()
8159{
8160return f != $ac_func;
8161 ;
8162 return 0;
8163}
8164_ACEOF
8165rm -f conftest.$ac_objext conftest$ac_exeext
8166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8167 (eval $ac_link) 2>&5
8168 ac_status=$?
8169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8170 (exit $ac_status); } &&
8171 { ac_try='test -s conftest$ac_exeext'
8172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8173 (eval $ac_try) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); }; }; then
8177 eval "$as_ac_var=yes"
8178else
8179 echo "$as_me: failed program was:" >&5
8180sed 's/^/| /' conftest.$ac_ext >&5
8181
8182eval "$as_ac_var=no"
8183fi
8184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8185fi
8186echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8187echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8188if test `eval echo '${'$as_ac_var'}'` = yes; then
8189 cat >>confdefs.h <<_ACEOF
8190@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8191_ACEOF
8192
8193fi
8194done
8195
8196
8197
8198
8199
8200
8201
8202for ac_func in endutent getutent getutid getutline pututline setutent
8203do
8204as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8205echo "$as_me:$LINENO: checking for $ac_func" >&5
8206echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8207if eval "test \"\${$as_ac_var+set}\" = set"; then
8208 echo $ECHO_N "(cached) $ECHO_C" >&6
8209else
8210 cat >conftest.$ac_ext <<_ACEOF
8211#line $LINENO "configure"
8212/* confdefs.h. */
8213_ACEOF
8214cat confdefs.h >>conftest.$ac_ext
8215cat >>conftest.$ac_ext <<_ACEOF
8216/* end confdefs.h. */
8217/* System header to define __stub macros and hopefully few prototypes,
8218 which can conflict with char $ac_func (); below.
8219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8220 <limits.h> exists even on freestanding compilers. */
8221#ifdef __STDC__
8222# include <limits.h>
8223#else
8224# include <assert.h>
8225#endif
8226/* Override any gcc2 internal prototype to avoid an error. */
8227#ifdef __cplusplus
8228extern "C"
8229{
8230#endif
8231/* We use char because int might match the return type of a gcc2
8232 builtin and then its argument prototype would still apply. */
8233char $ac_func ();
8234/* The GNU C library defines this for functions which it implements
8235 to always fail with ENOSYS. Some functions are actually named
8236 something starting with __ and the normal name is an alias. */
8237#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8238choke me
8239#else
8240char (*f) () = $ac_func;
8241#endif
8242#ifdef __cplusplus
8243}
8244#endif
8245
8246int
8247main ()
8248{
8249return f != $ac_func;
8250 ;
8251 return 0;
8252}
8253_ACEOF
8254rm -f conftest.$ac_objext conftest$ac_exeext
8255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8256 (eval $ac_link) 2>&5
8257 ac_status=$?
8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8259 (exit $ac_status); } &&
8260 { ac_try='test -s conftest$ac_exeext'
8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8262 (eval $ac_try) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); }; }; then
8266 eval "$as_ac_var=yes"
8267else
8268 echo "$as_me: failed program was:" >&5
8269sed 's/^/| /' conftest.$ac_ext >&5
8270
8271eval "$as_ac_var=no"
8272fi
8273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8274fi
8275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8277if test `eval echo '${'$as_ac_var'}'` = yes; then
8278 cat >>confdefs.h <<_ACEOF
8279@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8280_ACEOF
8281
8282fi
8283done
8284
8285
8286for ac_func in utmpname
8287do
8288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8289echo "$as_me:$LINENO: checking for $ac_func" >&5
8290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8291if eval "test \"\${$as_ac_var+set}\" = set"; then
8292 echo $ECHO_N "(cached) $ECHO_C" >&6
8293else
8294 cat >conftest.$ac_ext <<_ACEOF
8295#line $LINENO "configure"
8296/* confdefs.h. */
8297_ACEOF
8298cat confdefs.h >>conftest.$ac_ext
8299cat >>conftest.$ac_ext <<_ACEOF
8300/* end confdefs.h. */
8301/* System header to define __stub macros and hopefully few prototypes,
8302 which can conflict with char $ac_func (); below.
8303 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8304 <limits.h> exists even on freestanding compilers. */
8305#ifdef __STDC__
8306# include <limits.h>
8307#else
8308# include <assert.h>
8309#endif
8310/* Override any gcc2 internal prototype to avoid an error. */
8311#ifdef __cplusplus
8312extern "C"
8313{
8314#endif
8315/* We use char because int might match the return type of a gcc2
8316 builtin and then its argument prototype would still apply. */
8317char $ac_func ();
8318/* The GNU C library defines this for functions which it implements
8319 to always fail with ENOSYS. Some functions are actually named
8320 something starting with __ and the normal name is an alias. */
8321#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8322choke me
8323#else
8324char (*f) () = $ac_func;
8325#endif
8326#ifdef __cplusplus
8327}
8328#endif
8329
8330int
8331main ()
8332{
8333return f != $ac_func;
8334 ;
8335 return 0;
8336}
8337_ACEOF
8338rm -f conftest.$ac_objext conftest$ac_exeext
8339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8340 (eval $ac_link) 2>&5
8341 ac_status=$?
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); } &&
8344 { ac_try='test -s conftest$ac_exeext'
8345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8346 (eval $ac_try) 2>&5
8347 ac_status=$?
8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349 (exit $ac_status); }; }; then
8350 eval "$as_ac_var=yes"
8351else
8352 echo "$as_me: failed program was:" >&5
8353sed 's/^/| /' conftest.$ac_ext >&5
8354
8355eval "$as_ac_var=no"
8356fi
8357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8358fi
8359echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8360echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8361if test `eval echo '${'$as_ac_var'}'` = yes; then
8362 cat >>confdefs.h <<_ACEOF
8363@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8364_ACEOF
8365
8366fi
8367done
8368
8369
8370
8371
8372
8373
8374for ac_func in endutxent getutxent getutxid getutxline pututxline
8375do
8376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8377echo "$as_me:$LINENO: checking for $ac_func" >&5
8378echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8379if eval "test \"\${$as_ac_var+set}\" = set"; then
8380 echo $ECHO_N "(cached) $ECHO_C" >&6
8381else
8382 cat >conftest.$ac_ext <<_ACEOF
8383#line $LINENO "configure"
8384/* confdefs.h. */
8385_ACEOF
8386cat confdefs.h >>conftest.$ac_ext
8387cat >>conftest.$ac_ext <<_ACEOF
8388/* end confdefs.h. */
8389/* System header to define __stub macros and hopefully few prototypes,
8390 which can conflict with char $ac_func (); below.
8391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8392 <limits.h> exists even on freestanding compilers. */
8393#ifdef __STDC__
8394# include <limits.h>
8395#else
8396# include <assert.h>
8397#endif
8398/* Override any gcc2 internal prototype to avoid an error. */
8399#ifdef __cplusplus
8400extern "C"
8401{
8402#endif
8403/* We use char because int might match the return type of a gcc2
8404 builtin and then its argument prototype would still apply. */
8405char $ac_func ();
8406/* The GNU C library defines this for functions which it implements
8407 to always fail with ENOSYS. Some functions are actually named
8408 something starting with __ and the normal name is an alias. */
8409#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8410choke me
8411#else
8412char (*f) () = $ac_func;
8413#endif
8414#ifdef __cplusplus
8415}
8416#endif
8417
8418int
8419main ()
8420{
8421return f != $ac_func;
8422 ;
8423 return 0;
8424}
8425_ACEOF
8426rm -f conftest.$ac_objext conftest$ac_exeext
8427if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8428 (eval $ac_link) 2>&5
8429 ac_status=$?
8430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8431 (exit $ac_status); } &&
8432 { ac_try='test -s conftest$ac_exeext'
8433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8434 (eval $ac_try) 2>&5
8435 ac_status=$?
8436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437 (exit $ac_status); }; }; then
8438 eval "$as_ac_var=yes"
8439else
8440 echo "$as_me: failed program was:" >&5
8441sed 's/^/| /' conftest.$ac_ext >&5
8442
8443eval "$as_ac_var=no"
8444fi
8445rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8446fi
8447echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8448echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8449if test `eval echo '${'$as_ac_var'}'` = yes; then
8450 cat >>confdefs.h <<_ACEOF
8451@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8452_ACEOF
8453
8454fi
8455done
8456
8457
8458
8459for ac_func in setutxent utmpxname
8460do
8461as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8462echo "$as_me:$LINENO: checking for $ac_func" >&5
8463echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8464if eval "test \"\${$as_ac_var+set}\" = set"; then
8465 echo $ECHO_N "(cached) $ECHO_C" >&6
8466else
8467 cat >conftest.$ac_ext <<_ACEOF
8468#line $LINENO "configure"
8469/* confdefs.h. */
8470_ACEOF
8471cat confdefs.h >>conftest.$ac_ext
8472cat >>conftest.$ac_ext <<_ACEOF
8473/* end confdefs.h. */
8474/* System header to define __stub macros and hopefully few prototypes,
8475 which can conflict with char $ac_func (); below.
8476 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8477 <limits.h> exists even on freestanding compilers. */
8478#ifdef __STDC__
8479# include <limits.h>
8480#else
8481# include <assert.h>
8482#endif
8483/* Override any gcc2 internal prototype to avoid an error. */
8484#ifdef __cplusplus
8485extern "C"
8486{
8487#endif
8488/* We use char because int might match the return type of a gcc2
8489 builtin and then its argument prototype would still apply. */
8490char $ac_func ();
8491/* The GNU C library defines this for functions which it implements
8492 to always fail with ENOSYS. Some functions are actually named
8493 something starting with __ and the normal name is an alias. */
8494#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8495choke me
8496#else
8497char (*f) () = $ac_func;
8498#endif
8499#ifdef __cplusplus
8500}
8501#endif
8502
8503int
8504main ()
8505{
8506return f != $ac_func;
8507 ;
8508 return 0;
8509}
8510_ACEOF
8511rm -f conftest.$ac_objext conftest$ac_exeext
8512if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8513 (eval $ac_link) 2>&5
8514 ac_status=$?
8515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8516 (exit $ac_status); } &&
8517 { ac_try='test -s conftest$ac_exeext'
8518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8519 (eval $ac_try) 2>&5
8520 ac_status=$?
8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522 (exit $ac_status); }; }; then
8523 eval "$as_ac_var=yes"
8524else
8525 echo "$as_me: failed program was:" >&5
8526sed 's/^/| /' conftest.$ac_ext >&5
8527
8528eval "$as_ac_var=no"
8529fi
8530rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8531fi
8532echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8533echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8534if test `eval echo '${'$as_ac_var'}'` = yes; then
8535 cat >>confdefs.h <<_ACEOF
8536@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8537_ACEOF
8538
8539fi
8540done
8541
8542
8543echo "$as_me:$LINENO: checking for daemon" >&5
8544echo $ECHO_N "checking for daemon... $ECHO_C" >&6
8545if test "${ac_cv_func_daemon+set}" = set; then
8546 echo $ECHO_N "(cached) $ECHO_C" >&6
8547else
8548 cat >conftest.$ac_ext <<_ACEOF
8549#line $LINENO "configure"
8550/* confdefs.h. */
8551_ACEOF
8552cat confdefs.h >>conftest.$ac_ext
8553cat >>conftest.$ac_ext <<_ACEOF
8554/* end confdefs.h. */
8555/* System header to define __stub macros and hopefully few prototypes,
8556 which can conflict with char daemon (); below.
8557 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8558 <limits.h> exists even on freestanding compilers. */
8559#ifdef __STDC__
8560# include <limits.h>
8561#else
8562# include <assert.h>
8563#endif
8564/* Override any gcc2 internal prototype to avoid an error. */
8565#ifdef __cplusplus
8566extern "C"
8567{
8568#endif
8569/* We use char because int might match the return type of a gcc2
8570 builtin and then its argument prototype would still apply. */
8571char daemon ();
8572/* The GNU C library defines this for functions which it implements
8573 to always fail with ENOSYS. Some functions are actually named
8574 something starting with __ and the normal name is an alias. */
8575#if defined (__stub_daemon) || defined (__stub___daemon)
8576choke me
8577#else
8578char (*f) () = daemon;
8579#endif
8580#ifdef __cplusplus
8581}
8582#endif
8583
8584int
8585main ()
8586{
8587return f != daemon;
8588 ;
8589 return 0;
8590}
8591_ACEOF
8592rm -f conftest.$ac_objext conftest$ac_exeext
8593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8594 (eval $ac_link) 2>&5
8595 ac_status=$?
8596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8597 (exit $ac_status); } &&
8598 { ac_try='test -s conftest$ac_exeext'
8599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8600 (eval $ac_try) 2>&5
8601 ac_status=$?
8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8603 (exit $ac_status); }; }; then
8604 ac_cv_func_daemon=yes
8605else
8606 echo "$as_me: failed program was:" >&5
8607sed 's/^/| /' conftest.$ac_ext >&5
8608
8609ac_cv_func_daemon=no
8610fi
8611rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8612fi
8613echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
8614echo "${ECHO_T}$ac_cv_func_daemon" >&6
8615if test $ac_cv_func_daemon = yes; then
8616 cat >>confdefs.h <<\_ACEOF
8617@%:@define HAVE_DAEMON 1
8618_ACEOF
8619
8620else
8621 echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5
8622echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6
8623if test "${ac_cv_lib_bsd_daemon+set}" = set; then
8624 echo $ECHO_N "(cached) $ECHO_C" >&6
8625else
8626 ac_check_lib_save_LIBS=$LIBS
8627LIBS="-lbsd $LIBS"
8628cat >conftest.$ac_ext <<_ACEOF
8629#line $LINENO "configure"
8630/* confdefs.h. */
8631_ACEOF
8632cat confdefs.h >>conftest.$ac_ext
8633cat >>conftest.$ac_ext <<_ACEOF
8634/* end confdefs.h. */
8635
8636/* Override any gcc2 internal prototype to avoid an error. */
8637#ifdef __cplusplus
8638extern "C"
8639#endif
8640/* We use char because int might match the return type of a gcc2
8641 builtin and then its argument prototype would still apply. */
8642char daemon ();
8643int
8644main ()
8645{
8646daemon ();
8647 ;
8648 return 0;
8649}
8650_ACEOF
8651rm -f conftest.$ac_objext conftest$ac_exeext
8652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8653 (eval $ac_link) 2>&5
8654 ac_status=$?
8655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8656 (exit $ac_status); } &&
8657 { ac_try='test -s conftest$ac_exeext'
8658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8659 (eval $ac_try) 2>&5
8660 ac_status=$?
8661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8662 (exit $ac_status); }; }; then
8663 ac_cv_lib_bsd_daemon=yes
8664else
8665 echo "$as_me: failed program was:" >&5
8666sed 's/^/| /' conftest.$ac_ext >&5
8667
8668ac_cv_lib_bsd_daemon=no
8669fi
8670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8671LIBS=$ac_check_lib_save_LIBS
8672fi
8673echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5
8674echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6
8675if test $ac_cv_lib_bsd_daemon = yes; then
8676 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
8677@%:@define HAVE_DAEMON 1
8678_ACEOF
8679
8680fi
8681
8682
8683fi
8684
8685
8686echo "$as_me:$LINENO: checking for getpagesize" >&5
8687echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
8688if test "${ac_cv_func_getpagesize+set}" = set; then
8689 echo $ECHO_N "(cached) $ECHO_C" >&6
8690else
8691 cat >conftest.$ac_ext <<_ACEOF
8692#line $LINENO "configure"
8693/* confdefs.h. */
8694_ACEOF
8695cat confdefs.h >>conftest.$ac_ext
8696cat >>conftest.$ac_ext <<_ACEOF
8697/* end confdefs.h. */
8698/* System header to define __stub macros and hopefully few prototypes,
8699 which can conflict with char getpagesize (); below.
8700 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8701 <limits.h> exists even on freestanding compilers. */
8702#ifdef __STDC__
8703# include <limits.h>
8704#else
8705# include <assert.h>
8706#endif
8707/* Override any gcc2 internal prototype to avoid an error. */
8708#ifdef __cplusplus
8709extern "C"
8710{
8711#endif
8712/* We use char because int might match the return type of a gcc2
8713 builtin and then its argument prototype would still apply. */
8714char getpagesize ();
8715/* The GNU C library defines this for functions which it implements
8716 to always fail with ENOSYS. Some functions are actually named
8717 something starting with __ and the normal name is an alias. */
8718#if defined (__stub_getpagesize) || defined (__stub___getpagesize)
8719choke me
8720#else
8721char (*f) () = getpagesize;
8722#endif
8723#ifdef __cplusplus
8724}
8725#endif
8726
8727int
8728main ()
8729{
8730return f != getpagesize;
8731 ;
8732 return 0;
8733}
8734_ACEOF
8735rm -f conftest.$ac_objext conftest$ac_exeext
8736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8737 (eval $ac_link) 2>&5
8738 ac_status=$?
8739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8740 (exit $ac_status); } &&
8741 { ac_try='test -s conftest$ac_exeext'
8742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8743 (eval $ac_try) 2>&5
8744 ac_status=$?
8745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8746 (exit $ac_status); }; }; then
8747 ac_cv_func_getpagesize=yes
8748else
8749 echo "$as_me: failed program was:" >&5
8750sed 's/^/| /' conftest.$ac_ext >&5
8751
8752ac_cv_func_getpagesize=no
8753fi
8754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8755fi
8756echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
8757echo "${ECHO_T}$ac_cv_func_getpagesize" >&6
8758if test $ac_cv_func_getpagesize = yes; then
8759 cat >>confdefs.h <<\_ACEOF
8760@%:@define HAVE_GETPAGESIZE 1
8761_ACEOF
8762
8763else
8764 echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5
8765echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6
8766if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
8767 echo $ECHO_N "(cached) $ECHO_C" >&6
8768else
8769 ac_check_lib_save_LIBS=$LIBS
8770LIBS="-lucb $LIBS"
8771cat >conftest.$ac_ext <<_ACEOF
8772#line $LINENO "configure"
8773/* confdefs.h. */
8774_ACEOF
8775cat confdefs.h >>conftest.$ac_ext
8776cat >>conftest.$ac_ext <<_ACEOF
8777/* end confdefs.h. */
8778
8779/* Override any gcc2 internal prototype to avoid an error. */
8780#ifdef __cplusplus
8781extern "C"
8782#endif
8783/* We use char because int might match the return type of a gcc2
8784 builtin and then its argument prototype would still apply. */
8785char getpagesize ();
8786int
8787main ()
8788{
8789getpagesize ();
8790 ;
8791 return 0;
8792}
8793_ACEOF
8794rm -f conftest.$ac_objext conftest$ac_exeext
8795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8796 (eval $ac_link) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); } &&
8800 { ac_try='test -s conftest$ac_exeext'
8801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_cv_lib_ucb_getpagesize=yes
8807else
8808 echo "$as_me: failed program was:" >&5
8809sed 's/^/| /' conftest.$ac_ext >&5
8810
8811ac_cv_lib_ucb_getpagesize=no
8812fi
8813rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8814LIBS=$ac_check_lib_save_LIBS
8815fi
8816echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5
8817echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6
8818if test $ac_cv_lib_ucb_getpagesize = yes; then
8819 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
8820@%:@define HAVE_GETPAGESIZE 1
8821_ACEOF
8822
8823fi
8824
8825
8826fi
8827
8828
8829# Check for broken snprintf
8830if test "x$ac_cv_func_snprintf" = "xyes" ; then
8831 echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5
8832echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6
8833 if test "$cross_compiling" = yes; then
8834 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8835See \`config.log' for more details." >&5
8836echo "$as_me: error: cannot run test program while cross compiling
8837See \`config.log' for more details." >&2;}
8838 { (exit 1); exit 1; }; }
8839else
8840 cat >conftest.$ac_ext <<_ACEOF
8841#line $LINENO "configure"
8842/* confdefs.h. */
8843_ACEOF
8844cat confdefs.h >>conftest.$ac_ext
8845cat >>conftest.$ac_ext <<_ACEOF
8846/* end confdefs.h. */
8847
8848#include <stdio.h>
8849int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
8850
8851_ACEOF
8852rm -f conftest$ac_exeext
8853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8854 (eval $ac_link) 2>&5
8855 ac_status=$?
8856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8857 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8859 (eval $ac_try) 2>&5
8860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); }; }; then
8863 echo "$as_me:$LINENO: result: yes" >&5
8864echo "${ECHO_T}yes" >&6
8865else
8866 echo "$as_me: program exited with status $ac_status" >&5
8867echo "$as_me: failed program was:" >&5
8868sed 's/^/| /' conftest.$ac_ext >&5
8869
8870( exit $ac_status )
8871
8872 echo "$as_me:$LINENO: result: no" >&5
8873echo "${ECHO_T}no" >&6
8874 cat >>confdefs.h <<\_ACEOF
8875@%:@define BROKEN_SNPRINTF 1
8876_ACEOF
8877
8878 { echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
8879echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
8880
8881
8882fi
8883rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8884fi
8885fi
8886
8887if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
8888echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5
8889echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6
8890if test "$cross_compiling" = yes; then
8891
8892 echo "$as_me:$LINENO: result: yes" >&5
8893echo "${ECHO_T}yes" >&6
8894 cat >>confdefs.h <<\_ACEOF
8895@%:@define HAVE_STRICT_MKSTEMP 1
8896_ACEOF
8897
8898
8899
8900else
8901 cat >conftest.$ac_ext <<_ACEOF
8902#line $LINENO "configure"
8903/* confdefs.h. */
8904_ACEOF
8905cat confdefs.h >>conftest.$ac_ext
8906cat >>conftest.$ac_ext <<_ACEOF
8907/* end confdefs.h. */
8908
8909#include <stdlib.h>
8910main() { char template[]="conftest.mkstemp-test";
8911if (mkstemp(template) == -1)
8912 exit(1);
8913unlink(template); exit(0);
8914}
8915
8916_ACEOF
8917rm -f conftest$ac_exeext
8918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8919 (eval $ac_link) 2>&5
8920 ac_status=$?
8921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8924 (eval $ac_try) 2>&5
8925 ac_status=$?
8926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927 (exit $ac_status); }; }; then
8928
8929 echo "$as_me:$LINENO: result: no" >&5
8930echo "${ECHO_T}no" >&6
8931
8932else
8933 echo "$as_me: program exited with status $ac_status" >&5
8934echo "$as_me: failed program was:" >&5
8935sed 's/^/| /' conftest.$ac_ext >&5
8936
8937( exit $ac_status )
8938
8939 echo "$as_me:$LINENO: result: yes" >&5
8940echo "${ECHO_T}yes" >&6
8941 cat >>confdefs.h <<\_ACEOF
8942@%:@define HAVE_STRICT_MKSTEMP 1
8943_ACEOF
8944
8945
8946fi
8947rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8948fi
8949fi
8950
8951echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
8952echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
8953if test "${ac_cv_func_getpgrp_void+set}" = set; then
8954 echo $ECHO_N "(cached) $ECHO_C" >&6
8955else
8956 # Use it with a single arg.
8957cat >conftest.$ac_ext <<_ACEOF
8958#line $LINENO "configure"
8959/* confdefs.h. */
8960_ACEOF
8961cat confdefs.h >>conftest.$ac_ext
8962cat >>conftest.$ac_ext <<_ACEOF
8963/* end confdefs.h. */
8964$ac_includes_default
8965int
8966main ()
8967{
8968getpgrp (0);
8969 ;
8970 return 0;
8971}
8972_ACEOF
8973rm -f conftest.$ac_objext
8974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8975 (eval $ac_compile) 2>&5
8976 ac_status=$?
8977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8978 (exit $ac_status); } &&
8979 { ac_try='test -s conftest.$ac_objext'
8980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8981 (eval $ac_try) 2>&5
8982 ac_status=$?
8983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8984 (exit $ac_status); }; }; then
8985 ac_cv_func_getpgrp_void=no
8986else
8987 echo "$as_me: failed program was:" >&5
8988sed 's/^/| /' conftest.$ac_ext >&5
8989
8990ac_cv_func_getpgrp_void=yes
8991fi
8992rm -f conftest.$ac_objext conftest.$ac_ext
8993
8994fi
8995echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
8996echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
8997if test $ac_cv_func_getpgrp_void = yes; then
8998
8999cat >>confdefs.h <<\_ACEOF
9000@%:@define GETPGRP_VOID 1
9001_ACEOF
9002
9003fi
9004
9005
9006# Check for PAM libs
9007PAM_MSG="no"
9008
9009# Check whether --with-pam or --without-pam was given.
9010if test "${with_pam+set}" = set; then
9011 withval="$with_pam"
9012
9013 if test "x$withval" != "xno" ; then
9014 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
9015 { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
9016echo "$as_me: error: PAM headers not found" >&2;}
9017 { (exit 1); exit 1; }; }
9018 fi
9019
9020
9021echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9022echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9023if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9024 echo $ECHO_N "(cached) $ECHO_C" >&6
9025else
9026 ac_check_lib_save_LIBS=$LIBS
9027LIBS="-ldl $LIBS"
9028cat >conftest.$ac_ext <<_ACEOF
9029#line $LINENO "configure"
9030/* confdefs.h. */
9031_ACEOF
9032cat confdefs.h >>conftest.$ac_ext
9033cat >>conftest.$ac_ext <<_ACEOF
9034/* end confdefs.h. */
9035
9036/* Override any gcc2 internal prototype to avoid an error. */
9037#ifdef __cplusplus
9038extern "C"
9039#endif
9040/* We use char because int might match the return type of a gcc2
9041 builtin and then its argument prototype would still apply. */
9042char dlopen ();
9043int
9044main ()
9045{
9046dlopen ();
9047 ;
9048 return 0;
9049}
9050_ACEOF
9051rm -f conftest.$ac_objext conftest$ac_exeext
9052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9053 (eval $ac_link) 2>&5
9054 ac_status=$?
9055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056 (exit $ac_status); } &&
9057 { ac_try='test -s conftest$ac_exeext'
9058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9059 (eval $ac_try) 2>&5
9060 ac_status=$?
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9062 (exit $ac_status); }; }; then
9063 ac_cv_lib_dl_dlopen=yes
9064else
9065 echo "$as_me: failed program was:" >&5
9066sed 's/^/| /' conftest.$ac_ext >&5
9067
9068ac_cv_lib_dl_dlopen=no
9069fi
9070rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9071LIBS=$ac_check_lib_save_LIBS
9072fi
9073echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9074echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9075if test $ac_cv_lib_dl_dlopen = yes; then
9076 cat >>confdefs.h <<_ACEOF
9077@%:@define HAVE_LIBDL 1
9078_ACEOF
9079
9080 LIBS="-ldl $LIBS"
9081
9082fi
9083
9084
9085echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5
9086echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6
9087if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
9088 echo $ECHO_N "(cached) $ECHO_C" >&6
9089else
9090 ac_check_lib_save_LIBS=$LIBS
9091LIBS="-lpam $LIBS"
9092cat >conftest.$ac_ext <<_ACEOF
9093#line $LINENO "configure"
9094/* confdefs.h. */
9095_ACEOF
9096cat confdefs.h >>conftest.$ac_ext
9097cat >>conftest.$ac_ext <<_ACEOF
9098/* end confdefs.h. */
9099
9100/* Override any gcc2 internal prototype to avoid an error. */
9101#ifdef __cplusplus
9102extern "C"
9103#endif
9104/* We use char because int might match the return type of a gcc2
9105 builtin and then its argument prototype would still apply. */
9106char pam_set_item ();
9107int
9108main ()
9109{
9110pam_set_item ();
9111 ;
9112 return 0;
9113}
9114_ACEOF
9115rm -f conftest.$ac_objext conftest$ac_exeext
9116if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9117 (eval $ac_link) 2>&5
9118 ac_status=$?
9119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120 (exit $ac_status); } &&
9121 { ac_try='test -s conftest$ac_exeext'
9122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123 (eval $ac_try) 2>&5
9124 ac_status=$?
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); }; }; then
9127 ac_cv_lib_pam_pam_set_item=yes
9128else
9129 echo "$as_me: failed program was:" >&5
9130sed 's/^/| /' conftest.$ac_ext >&5
9131
9132ac_cv_lib_pam_pam_set_item=no
9133fi
9134rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9135LIBS=$ac_check_lib_save_LIBS
9136fi
9137echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5
9138echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6
9139if test $ac_cv_lib_pam_pam_set_item = yes; then
9140 cat >>confdefs.h <<_ACEOF
9141@%:@define HAVE_LIBPAM 1
9142_ACEOF
9143
9144 LIBS="-lpam $LIBS"
9145
9146else
9147 { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
9148echo "$as_me: error: *** libpam missing" >&2;}
9149 { (exit 1); exit 1; }; }
9150fi
9151
9152
9153for ac_func in pam_getenvlist
9154do
9155as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9156echo "$as_me:$LINENO: checking for $ac_func" >&5
9157echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9158if eval "test \"\${$as_ac_var+set}\" = set"; then
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
9161 cat >conftest.$ac_ext <<_ACEOF
9162#line $LINENO "configure"
9163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
9168/* System header to define __stub macros and hopefully few prototypes,
9169 which can conflict with char $ac_func (); below.
9170 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9171 <limits.h> exists even on freestanding compilers. */
9172#ifdef __STDC__
9173# include <limits.h>
9174#else
9175# include <assert.h>
9176#endif
9177/* Override any gcc2 internal prototype to avoid an error. */
9178#ifdef __cplusplus
9179extern "C"
9180{
9181#endif
9182/* We use char because int might match the return type of a gcc2
9183 builtin and then its argument prototype would still apply. */
9184char $ac_func ();
9185/* The GNU C library defines this for functions which it implements
9186 to always fail with ENOSYS. Some functions are actually named
9187 something starting with __ and the normal name is an alias. */
9188#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9189choke me
9190#else
9191char (*f) () = $ac_func;
9192#endif
9193#ifdef __cplusplus
9194}
9195#endif
9196
9197int
9198main ()
9199{
9200return f != $ac_func;
9201 ;
9202 return 0;
9203}
9204_ACEOF
9205rm -f conftest.$ac_objext conftest$ac_exeext
9206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9207 (eval $ac_link) 2>&5
9208 ac_status=$?
9209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9210 (exit $ac_status); } &&
9211 { ac_try='test -s conftest$ac_exeext'
9212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9213 (eval $ac_try) 2>&5
9214 ac_status=$?
9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216 (exit $ac_status); }; }; then
9217 eval "$as_ac_var=yes"
9218else
9219 echo "$as_me: failed program was:" >&5
9220sed 's/^/| /' conftest.$ac_ext >&5
9221
9222eval "$as_ac_var=no"
9223fi
9224rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9225fi
9226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9227echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9228if test `eval echo '${'$as_ac_var'}'` = yes; then
9229 cat >>confdefs.h <<_ACEOF
9230@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9231_ACEOF
9232
9233fi
9234done
9235
9236
9237 disable_shadow=yes
9238 PAM_MSG="yes"
9239
9240 cat >>confdefs.h <<\_ACEOF
9241@%:@define USE_PAM 1
9242_ACEOF
9243
9244 if test $ac_cv_lib_dl_dlopen = yes; then
9245 LIBPAM="-lpam -ldl"
9246 else
9247 LIBPAM="-lpam"
9248 fi
9249
9250 fi
9251
9252
9253fi;
9254
9255# Check for older PAM
9256if test "x$PAM_MSG" = "xyes" ; then
9257 # Check PAM strerror arguments (old PAM)
9258 echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5
9259echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6
9260 cat >conftest.$ac_ext <<_ACEOF
9261#line $LINENO "configure"
9262/* confdefs.h. */
9263_ACEOF
9264cat confdefs.h >>conftest.$ac_ext
9265cat >>conftest.$ac_ext <<_ACEOF
9266/* end confdefs.h. */
9267
9268#include <stdlib.h>
9269#include <security/pam_appl.h>
9270
9271int
9272main ()
9273{
9274(void)pam_strerror((pam_handle_t *)NULL, -1);
9275 ;
9276 return 0;
9277}
9278_ACEOF
9279rm -f conftest.$ac_objext
9280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9281 (eval $ac_compile) 2>&5
9282 ac_status=$?
9283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9284 (exit $ac_status); } &&
9285 { ac_try='test -s conftest.$ac_objext'
9286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9287 (eval $ac_try) 2>&5
9288 ac_status=$?
9289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9290 (exit $ac_status); }; }; then
9291 echo "$as_me:$LINENO: result: no" >&5
9292echo "${ECHO_T}no" >&6
9293else
9294 echo "$as_me: failed program was:" >&5
9295sed 's/^/| /' conftest.$ac_ext >&5
9296
9297
9298 cat >>confdefs.h <<\_ACEOF
9299@%:@define HAVE_OLD_PAM 1
9300_ACEOF
9301
9302 echo "$as_me:$LINENO: result: yes" >&5
9303echo "${ECHO_T}yes" >&6
9304 PAM_MSG="yes (old library)"
9305
9306
9307fi
9308rm -f conftest.$ac_objext conftest.$ac_ext
9309fi
9310
9311# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
9312# because the system crypt() is more featureful.
9313if test "x$check_for_libcrypt_before" = "x1"; then
9314
9315echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
9316echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
9317if test "${ac_cv_lib_crypt_crypt+set}" = set; then
9318 echo $ECHO_N "(cached) $ECHO_C" >&6
9319else
9320 ac_check_lib_save_LIBS=$LIBS
9321LIBS="-lcrypt $LIBS"
9322cat >conftest.$ac_ext <<_ACEOF
9323#line $LINENO "configure"
9324/* confdefs.h. */
9325_ACEOF
9326cat confdefs.h >>conftest.$ac_ext
9327cat >>conftest.$ac_ext <<_ACEOF
9328/* end confdefs.h. */
9329
9330/* Override any gcc2 internal prototype to avoid an error. */
9331#ifdef __cplusplus
9332extern "C"
9333#endif
9334/* We use char because int might match the return type of a gcc2
9335 builtin and then its argument prototype would still apply. */
9336char crypt ();
9337int
9338main ()
9339{
9340crypt ();
9341 ;
9342 return 0;
9343}
9344_ACEOF
9345rm -f conftest.$ac_objext conftest$ac_exeext
9346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9347 (eval $ac_link) 2>&5
9348 ac_status=$?
9349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9350 (exit $ac_status); } &&
9351 { ac_try='test -s conftest$ac_exeext'
9352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9353 (eval $ac_try) 2>&5
9354 ac_status=$?
9355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9356 (exit $ac_status); }; }; then
9357 ac_cv_lib_crypt_crypt=yes
9358else
9359 echo "$as_me: failed program was:" >&5
9360sed 's/^/| /' conftest.$ac_ext >&5
9361
9362ac_cv_lib_crypt_crypt=no
9363fi
9364rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9365LIBS=$ac_check_lib_save_LIBS
9366fi
9367echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
9368echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
9369if test $ac_cv_lib_crypt_crypt = yes; then
9370 cat >>confdefs.h <<_ACEOF
9371@%:@define HAVE_LIBCRYPT 1
9372_ACEOF
9373
9374 LIBS="-lcrypt $LIBS"
9375
9376fi
9377
9378fi
9379
9380# Search for OpenSSL
9381saved_CPPFLAGS="$CPPFLAGS"
9382saved_LDFLAGS="$LDFLAGS"
9383
9384# Check whether --with-ssl-dir or --without-ssl-dir was given.
9385if test "${with_ssl_dir+set}" = set; then
9386 withval="$with_ssl_dir"
9387
9388 if test "x$withval" != "xno" ; then
9389 if test -d "$withval/lib"; then
9390 if test -n "${need_dash_r}"; then
9391 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
9392 else
9393 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9394 fi
9395 else
9396 if test -n "${need_dash_r}"; then
9397 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
9398 else
9399 LDFLAGS="-L${withval} ${LDFLAGS}"
9400 fi
9401 fi
9402 if test -d "$withval/include"; then
9403 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
9404 else
9405 CPPFLAGS="-I${withval} ${CPPFLAGS}"
9406 fi
9407 fi
9408
9409
9410fi;
9411LIBS="$LIBS -lcrypto"
9412cat >conftest.$ac_ext <<_ACEOF
9413#line $LINENO "configure"
9414/* confdefs.h. */
9415_ACEOF
9416cat confdefs.h >>conftest.$ac_ext
9417cat >>conftest.$ac_ext <<_ACEOF
9418/* end confdefs.h. */
9419
9420/* Override any gcc2 internal prototype to avoid an error. */
9421#ifdef __cplusplus
9422extern "C"
9423#endif
9424/* We use char because int might match the return type of a gcc2
9425 builtin and then its argument prototype would still apply. */
9426char RAND_add ();
9427int
9428main ()
9429{
9430RAND_add ();
9431 ;
9432 return 0;
9433}
9434_ACEOF
9435rm -f conftest.$ac_objext conftest$ac_exeext
9436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9437 (eval $ac_link) 2>&5
9438 ac_status=$?
9439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9440 (exit $ac_status); } &&
9441 { ac_try='test -s conftest$ac_exeext'
9442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9443 (eval $ac_try) 2>&5
9444 ac_status=$?
9445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9446 (exit $ac_status); }; }; then
9447 cat >>confdefs.h <<\_ACEOF
9448@%:@define HAVE_OPENSSL 1
9449_ACEOF
9450
9451else
9452 echo "$as_me: failed program was:" >&5
9453sed 's/^/| /' conftest.$ac_ext >&5
9454
9455
9456 if test -n "${need_dash_r}"; then
9457 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
9458 else
9459 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
9460 fi
9461 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
9462 cat >conftest.$ac_ext <<_ACEOF
9463#line $LINENO "configure"
9464/* confdefs.h. */
9465_ACEOF
9466cat confdefs.h >>conftest.$ac_ext
9467cat >>conftest.$ac_ext <<_ACEOF
9468/* end confdefs.h. */
9469
9470/* Override any gcc2 internal prototype to avoid an error. */
9471#ifdef __cplusplus
9472extern "C"
9473#endif
9474/* We use char because int might match the return type of a gcc2
9475 builtin and then its argument prototype would still apply. */
9476char RAND_add ();
9477int
9478main ()
9479{
9480RAND_add ();
9481 ;
9482 return 0;
9483}
9484_ACEOF
9485rm -f conftest.$ac_objext conftest$ac_exeext
9486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9487 (eval $ac_link) 2>&5
9488 ac_status=$?
9489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490 (exit $ac_status); } &&
9491 { ac_try='test -s conftest$ac_exeext'
9492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9493 (eval $ac_try) 2>&5
9494 ac_status=$?
9495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9496 (exit $ac_status); }; }; then
9497 cat >>confdefs.h <<\_ACEOF
9498@%:@define HAVE_OPENSSL 1
9499_ACEOF
9500
9501else
9502 echo "$as_me: failed program was:" >&5
9503sed 's/^/| /' conftest.$ac_ext >&5
9504
9505
9506 { { echo "$as_me:$LINENO: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5
9507echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;}
9508 { (exit 1); exit 1; }; }
9509
9510
9511fi
9512rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9513
9514
9515fi
9516rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9517
9518# Determine OpenSSL header version
9519echo "$as_me:$LINENO: checking OpenSSL header version" >&5
9520echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6
9521if test "$cross_compiling" = yes; then
9522 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9523See \`config.log' for more details." >&5
9524echo "$as_me: error: cannot run test program while cross compiling
9525See \`config.log' for more details." >&2;}
9526 { (exit 1); exit 1; }; }
9527else
9528 cat >conftest.$ac_ext <<_ACEOF
9529#line $LINENO "configure"
9530/* confdefs.h. */
9531_ACEOF
9532cat confdefs.h >>conftest.$ac_ext
9533cat >>conftest.$ac_ext <<_ACEOF
9534/* end confdefs.h. */
9535
9536#include <stdio.h>
9537#include <string.h>
9538#include <openssl/opensslv.h>
9539#define DATA "conftest.sslincver"
9540int main(void) {
9541 FILE *fd;
9542 int rc;
9543
9544 fd = fopen(DATA,"w");
9545 if(fd == NULL)
9546 exit(1);
9547
9548 if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
9549 exit(1);
9550
9551 exit(0);
9552}
9553
9554_ACEOF
9555rm -f conftest$ac_exeext
9556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9557 (eval $ac_link) 2>&5
9558 ac_status=$?
9559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9562 (eval $ac_try) 2>&5
9563 ac_status=$?
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9565 (exit $ac_status); }; }; then
9566
9567 ssl_header_ver=`cat conftest.sslincver`
9568 echo "$as_me:$LINENO: result: $ssl_header_ver" >&5
9569echo "${ECHO_T}$ssl_header_ver" >&6
9570
9571else
9572 echo "$as_me: program exited with status $ac_status" >&5
9573echo "$as_me: failed program was:" >&5
9574sed 's/^/| /' conftest.$ac_ext >&5
9575
9576( exit $ac_status )
9577
9578 echo "$as_me:$LINENO: result: not found" >&5
9579echo "${ECHO_T}not found" >&6
9580 { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5
9581echo "$as_me: error: OpenSSL version header not found." >&2;}
9582 { (exit 1); exit 1; }; }
9583
9584
9585fi
9586rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9587fi
9588
9589# Determine OpenSSL library version
9590echo "$as_me:$LINENO: checking OpenSSL library version" >&5
9591echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6
9592if test "$cross_compiling" = yes; then
9593 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9594See \`config.log' for more details." >&5
9595echo "$as_me: error: cannot run test program while cross compiling
9596See \`config.log' for more details." >&2;}
9597 { (exit 1); exit 1; }; }
9598else
9599 cat >conftest.$ac_ext <<_ACEOF
9600#line $LINENO "configure"
9601/* confdefs.h. */
9602_ACEOF
9603cat confdefs.h >>conftest.$ac_ext
9604cat >>conftest.$ac_ext <<_ACEOF
9605/* end confdefs.h. */
9606
9607#include <stdio.h>
9608#include <string.h>
9609#include <openssl/opensslv.h>
9610#include <openssl/crypto.h>
9611#define DATA "conftest.ssllibver"
9612int main(void) {
9613 FILE *fd;
9614 int rc;
9615
9616 fd = fopen(DATA,"w");
9617 if(fd == NULL)
9618 exit(1);
9619
9620 if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
9621 exit(1);
9622
9623 exit(0);
9624}
9625
9626_ACEOF
9627rm -f conftest$ac_exeext
9628if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9629 (eval $ac_link) 2>&5
9630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9634 (eval $ac_try) 2>&5
9635 ac_status=$?
9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9637 (exit $ac_status); }; }; then
9638
9639 ssl_library_ver=`cat conftest.ssllibver`
9640 echo "$as_me:$LINENO: result: $ssl_library_ver" >&5
9641echo "${ECHO_T}$ssl_library_ver" >&6
9642
9643else
9644 echo "$as_me: program exited with status $ac_status" >&5
9645echo "$as_me: failed program was:" >&5
9646sed 's/^/| /' conftest.$ac_ext >&5
9647
9648( exit $ac_status )
9649
9650 echo "$as_me:$LINENO: result: not found" >&5
9651echo "${ECHO_T}not found" >&6
9652 { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5
9653echo "$as_me: error: OpenSSL library not found." >&2;}
9654 { (exit 1); exit 1; }; }
9655
9656
9657fi
9658rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9659fi
9660
9661# Sanity check OpenSSL headers
9662echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5
9663echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6
9664if test "$cross_compiling" = yes; then
9665 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9666See \`config.log' for more details." >&5
9667echo "$as_me: error: cannot run test program while cross compiling
9668See \`config.log' for more details." >&2;}
9669 { (exit 1); exit 1; }; }
9670else
9671 cat >conftest.$ac_ext <<_ACEOF
9672#line $LINENO "configure"
9673/* confdefs.h. */
9674_ACEOF
9675cat confdefs.h >>conftest.$ac_ext
9676cat >>conftest.$ac_ext <<_ACEOF
9677/* end confdefs.h. */
9678
9679#include <string.h>
9680#include <openssl/opensslv.h>
9681int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
9682
9683_ACEOF
9684rm -f conftest$ac_exeext
9685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9686 (eval $ac_link) 2>&5
9687 ac_status=$?
9688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9691 (eval $ac_try) 2>&5
9692 ac_status=$?
9693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9694 (exit $ac_status); }; }; then
9695
9696 echo "$as_me:$LINENO: result: yes" >&5
9697echo "${ECHO_T}yes" >&6
9698
9699else
9700 echo "$as_me: program exited with status $ac_status" >&5
9701echo "$as_me: failed program was:" >&5
9702sed 's/^/| /' conftest.$ac_ext >&5
9703
9704( exit $ac_status )
9705
9706 echo "$as_me:$LINENO: result: no" >&5
9707echo "${ECHO_T}no" >&6
9708 { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your library" >&5
9709echo "$as_me: error: Your OpenSSL headers do not match your library" >&2;}
9710 { (exit 1); exit 1; }; }
9711
9712
9713fi
9714rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9715fi
9716
9717# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
9718# version in OpenSSL. Skip this for PAM
9719if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
9720 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
9721echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
9722if test "${ac_cv_lib_crypt_crypt+set}" = set; then
9723 echo $ECHO_N "(cached) $ECHO_C" >&6
9724else
9725 ac_check_lib_save_LIBS=$LIBS
9726LIBS="-lcrypt $LIBS"
9727cat >conftest.$ac_ext <<_ACEOF
9728#line $LINENO "configure"
9729/* confdefs.h. */
9730_ACEOF
9731cat confdefs.h >>conftest.$ac_ext
9732cat >>conftest.$ac_ext <<_ACEOF
9733/* end confdefs.h. */
9734
9735/* Override any gcc2 internal prototype to avoid an error. */
9736#ifdef __cplusplus
9737extern "C"
9738#endif
9739/* We use char because int might match the return type of a gcc2
9740 builtin and then its argument prototype would still apply. */
9741char crypt ();
9742int
9743main ()
9744{
9745crypt ();
9746 ;
9747 return 0;
9748}
9749_ACEOF
9750rm -f conftest.$ac_objext conftest$ac_exeext
9751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9752 (eval $ac_link) 2>&5
9753 ac_status=$?
9754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9755 (exit $ac_status); } &&
9756 { ac_try='test -s conftest$ac_exeext'
9757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9758 (eval $ac_try) 2>&5
9759 ac_status=$?
9760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9761 (exit $ac_status); }; }; then
9762 ac_cv_lib_crypt_crypt=yes
9763else
9764 echo "$as_me: failed program was:" >&5
9765sed 's/^/| /' conftest.$ac_ext >&5
9766
9767ac_cv_lib_crypt_crypt=no
9768fi
9769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9770LIBS=$ac_check_lib_save_LIBS
9771fi
9772echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
9773echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
9774if test $ac_cv_lib_crypt_crypt = yes; then
9775 LIBS="$LIBS -lcrypt"
9776fi
9777
9778fi
9779
9780
9781### Configure cryptographic random number support
9782
9783# Check wheter OpenSSL seeds itself
9784echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5
9785echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6
9786if test "$cross_compiling" = yes; then
9787 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9788See \`config.log' for more details." >&5
9789echo "$as_me: error: cannot run test program while cross compiling
9790See \`config.log' for more details." >&2;}
9791 { (exit 1); exit 1; }; }
9792else
9793 cat >conftest.$ac_ext <<_ACEOF
9794#line $LINENO "configure"
9795/* confdefs.h. */
9796_ACEOF
9797cat confdefs.h >>conftest.$ac_ext
9798cat >>conftest.$ac_ext <<_ACEOF
9799/* end confdefs.h. */
9800
9801#include <string.h>
9802#include <openssl/rand.h>
9803int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
9804
9805_ACEOF
9806rm -f conftest$ac_exeext
9807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9808 (eval $ac_link) 2>&5
9809 ac_status=$?
9810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9813 (eval $ac_try) 2>&5
9814 ac_status=$?
9815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9816 (exit $ac_status); }; }; then
9817
9818 OPENSSL_SEEDS_ITSELF=yes
9819 echo "$as_me:$LINENO: result: yes" >&5
9820echo "${ECHO_T}yes" >&6
9821
9822else
9823 echo "$as_me: program exited with status $ac_status" >&5
9824echo "$as_me: failed program was:" >&5
9825sed 's/^/| /' conftest.$ac_ext >&5
9826
9827( exit $ac_status )
9828
9829 echo "$as_me:$LINENO: result: no" >&5
9830echo "${ECHO_T}no" >&6
9831 # Default to use of the rand helper if OpenSSL doesn't
9832 # seed itself
9833 USE_RAND_HELPER=yes
9834
9835
9836fi
9837rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9838fi
9839
9840
9841# Do we want to force the use of the rand helper?
9842
9843# Check whether --with-rand-helper or --without-rand-helper was given.
9844if test "${with_rand_helper+set}" = set; then
9845 withval="$with_rand_helper"
9846
9847 if test "x$withval" = "xno" ; then
9848 # Force use of OpenSSL's internal RNG, even if
9849 # the previous test showed it to be unseeded.
9850 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
9851 { echo "$as_me:$LINENO: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&5
9852echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;}
9853 OPENSSL_SEEDS_ITSELF=yes
9854 USE_RAND_HELPER=""
9855 fi
9856 else
9857 USE_RAND_HELPER=yes
9858 fi
9859
9860fi;
9861
9862# Which randomness source do we use?
9863if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
9864 # OpenSSL only
9865 cat >>confdefs.h <<\_ACEOF
9866@%:@define OPENSSL_PRNG_ONLY 1
9867_ACEOF
9868
9869 RAND_MSG="OpenSSL internal ONLY"
9870 INSTALL_SSH_RAND_HELPER=""
9871elif test ! -z "$USE_RAND_HELPER" ; then
9872 # install rand helper
9873 RAND_MSG="ssh-rand-helper"
9874 INSTALL_SSH_RAND_HELPER="yes"
9875fi
9876
9877
9878### Configuration of ssh-rand-helper
9879
9880# PRNGD TCP socket
9881
9882# Check whether --with-prngd-port or --without-prngd-port was given.
9883if test "${with_prngd_port+set}" = set; then
9884 withval="$with_prngd_port"
9885
9886 case "$withval" in
9887 no)
9888 withval=""
9889 ;;
9890 [0-9]*)
9891 ;;
9892 *)
9893 { { echo "$as_me:$LINENO: error: You must specify a numeric port number for --with-prngd-port" >&5
9894echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;}
9895 { (exit 1); exit 1; }; }
9896 ;;
9897 esac
9898 if test ! -z "$withval" ; then
9899 PRNGD_PORT="$withval"
9900 cat >>confdefs.h <<_ACEOF
9901@%:@define PRNGD_PORT $PRNGD_PORT
9902_ACEOF
9903
9904 fi
9905
9906
9907fi;
9908
9909# PRNGD Unix domain socket
9910
9911# Check whether --with-prngd-socket or --without-prngd-socket was given.
9912if test "${with_prngd_socket+set}" = set; then
9913 withval="$with_prngd_socket"
9914
9915 case "$withval" in
9916 yes)
9917 withval="/var/run/egd-pool"
9918 ;;
9919 no)
9920 withval=""
9921 ;;
9922 /*)
9923 ;;
9924 *)
9925 { { echo "$as_me:$LINENO: error: You must specify an absolute path to the entropy socket" >&5
9926echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;}
9927 { (exit 1); exit 1; }; }
9928 ;;
9929 esac
9930
9931 if test ! -z "$withval" ; then
9932 if test ! -z "$PRNGD_PORT" ; then
9933 { { echo "$as_me:$LINENO: error: You may not specify both a PRNGD/EGD port and socket" >&5
9934echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;}
9935 { (exit 1); exit 1; }; }
9936 fi
9937 if test ! -r "$withval" ; then
9938 { echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5
9939echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
9940 fi
9941 PRNGD_SOCKET="$withval"
9942 cat >>confdefs.h <<_ACEOF
9943@%:@define PRNGD_SOCKET "$PRNGD_SOCKET"
9944_ACEOF
9945
9946 fi
9947
9948else
9949
9950 # Check for existing socket only if we don't have a random device already
9951 if test "$USE_RAND_HELPER" = yes ; then
9952 echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
9953echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6
9954 # Insert other locations here
9955 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
9956 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
9957 PRNGD_SOCKET="$sock"
9958 cat >>confdefs.h <<_ACEOF
9959@%:@define PRNGD_SOCKET "$PRNGD_SOCKET"
9960_ACEOF
9961
9962 break;
9963 fi
9964 done
9965 if test ! -z "$PRNGD_SOCKET" ; then
9966 echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
9967echo "${ECHO_T}$PRNGD_SOCKET" >&6
9968 else
9969 echo "$as_me:$LINENO: result: not found" >&5
9970echo "${ECHO_T}not found" >&6
9971 fi
9972 fi
9973
9974
9975fi;
9976
9977# Change default command timeout for hashing entropy source
9978entropy_timeout=200
9979
9980# Check whether --with-entropy-timeout or --without-entropy-timeout was given.
9981if test "${with_entropy_timeout+set}" = set; then
9982 withval="$with_entropy_timeout"
9983
9984 if test "x$withval" != "xno" ; then
9985 entropy_timeout=$withval
9986 fi
9987
9988
9989fi;
9990cat >>confdefs.h <<_ACEOF
9991@%:@define ENTROPY_TIMEOUT_MSEC $entropy_timeout
9992_ACEOF
9993
9994
9995SSH_PRIVSEP_USER=sshd
9996
9997# Check whether --with-privsep-user or --without-privsep-user was given.
9998if test "${with_privsep_user+set}" = set; then
9999 withval="$with_privsep_user"
10000
10001 if test -n "$withval"; then
10002 SSH_PRIVSEP_USER=$withval
10003 fi
10004
10005
10006fi;
10007cat >>confdefs.h <<_ACEOF
10008@%:@define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
10009_ACEOF
10010
10011
10012
10013# We do this little dance with the search path to insure
10014# that programs that we select for use by installed programs
10015# (which may be run by the super-user) come from trusted
10016# locations before they come from the user's private area.
10017# This should help avoid accidentally configuring some
10018# random version of a program in someone's personal bin.
10019
10020OPATH=$PATH
10021PATH=/bin:/usr/bin
10022test -h /bin 2> /dev/null && PATH=/usr/bin
10023test -d /sbin && PATH=$PATH:/sbin
10024test -d /usr/sbin && PATH=$PATH:/usr/sbin
10025PATH=$PATH:/etc:$OPATH
10026
10027# These programs are used by the command hashing source to gather entropy
10028
10029 # Extract the first word of "ls", so it can be a program name with args.
10030set dummy ls; ac_word=$2
10031echo "$as_me:$LINENO: checking for $ac_word" >&5
10032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10033if test "${ac_cv_path_PROG_LS+set}" = set; then
10034 echo $ECHO_N "(cached) $ECHO_C" >&6
10035else
10036 case $PROG_LS in
10037 [\\/]* | ?:[\\/]*)
10038 ac_cv_path_PROG_LS="$PROG_LS" # Let the user override the test with a path.
10039 ;;
10040 *)
10041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10042for as_dir in $PATH
10043do
10044 IFS=$as_save_IFS
10045 test -z "$as_dir" && as_dir=.
10046 for ac_exec_ext in '' $ac_executable_extensions; do
10047 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10048 ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext"
10049 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10050 break 2
10051 fi
10052done
10053done
10054
10055 ;;
10056esac
10057fi
10058PROG_LS=$ac_cv_path_PROG_LS
10059
10060if test -n "$PROG_LS"; then
10061 echo "$as_me:$LINENO: result: $PROG_LS" >&5
10062echo "${ECHO_T}$PROG_LS" >&6
10063else
10064 echo "$as_me:$LINENO: result: no" >&5
10065echo "${ECHO_T}no" >&6
10066fi
10067
10068 if test -z "$PROG_LS" ; then
10069 PROG_LS="undef"
10070 fi
10071
10072
10073
10074 # Extract the first word of "netstat", so it can be a program name with args.
10075set dummy netstat; ac_word=$2
10076echo "$as_me:$LINENO: checking for $ac_word" >&5
10077echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10078if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
10079 echo $ECHO_N "(cached) $ECHO_C" >&6
10080else
10081 case $PROG_NETSTAT in
10082 [\\/]* | ?:[\\/]*)
10083 ac_cv_path_PROG_NETSTAT="$PROG_NETSTAT" # Let the user override the test with a path.
10084 ;;
10085 *)
10086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10087for as_dir in $PATH
10088do
10089 IFS=$as_save_IFS
10090 test -z "$as_dir" && as_dir=.
10091 for ac_exec_ext in '' $ac_executable_extensions; do
10092 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10093 ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext"
10094 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10095 break 2
10096 fi
10097done
10098done
10099
10100 ;;
10101esac
10102fi
10103PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
10104
10105if test -n "$PROG_NETSTAT"; then
10106 echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5
10107echo "${ECHO_T}$PROG_NETSTAT" >&6
10108else
10109 echo "$as_me:$LINENO: result: no" >&5
10110echo "${ECHO_T}no" >&6
10111fi
10112
10113 if test -z "$PROG_NETSTAT" ; then
10114 PROG_NETSTAT="undef"
10115 fi
10116
10117
10118
10119 # Extract the first word of "arp", so it can be a program name with args.
10120set dummy arp; ac_word=$2
10121echo "$as_me:$LINENO: checking for $ac_word" >&5
10122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10123if test "${ac_cv_path_PROG_ARP+set}" = set; then
10124 echo $ECHO_N "(cached) $ECHO_C" >&6
10125else
10126 case $PROG_ARP in
10127 [\\/]* | ?:[\\/]*)
10128 ac_cv_path_PROG_ARP="$PROG_ARP" # Let the user override the test with a path.
10129 ;;
10130 *)
10131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10132for as_dir in $PATH
10133do
10134 IFS=$as_save_IFS
10135 test -z "$as_dir" && as_dir=.
10136 for ac_exec_ext in '' $ac_executable_extensions; do
10137 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10138 ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext"
10139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10140 break 2
10141 fi
10142done
10143done
10144
10145 ;;
10146esac
10147fi
10148PROG_ARP=$ac_cv_path_PROG_ARP
10149
10150if test -n "$PROG_ARP"; then
10151 echo "$as_me:$LINENO: result: $PROG_ARP" >&5
10152echo "${ECHO_T}$PROG_ARP" >&6
10153else
10154 echo "$as_me:$LINENO: result: no" >&5
10155echo "${ECHO_T}no" >&6
10156fi
10157
10158 if test -z "$PROG_ARP" ; then
10159 PROG_ARP="undef"
10160 fi
10161
10162
10163
10164 # Extract the first word of "ifconfig", so it can be a program name with args.
10165set dummy ifconfig; ac_word=$2
10166echo "$as_me:$LINENO: checking for $ac_word" >&5
10167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10168if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
10169 echo $ECHO_N "(cached) $ECHO_C" >&6
10170else
10171 case $PROG_IFCONFIG in
10172 [\\/]* | ?:[\\/]*)
10173 ac_cv_path_PROG_IFCONFIG="$PROG_IFCONFIG" # Let the user override the test with a path.
10174 ;;
10175 *)
10176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10177for as_dir in $PATH
10178do
10179 IFS=$as_save_IFS
10180 test -z "$as_dir" && as_dir=.
10181 for ac_exec_ext in '' $ac_executable_extensions; do
10182 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10183 ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext"
10184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10185 break 2
10186 fi
10187done
10188done
10189
10190 ;;
10191esac
10192fi
10193PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
10194
10195if test -n "$PROG_IFCONFIG"; then
10196 echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5
10197echo "${ECHO_T}$PROG_IFCONFIG" >&6
10198else
10199 echo "$as_me:$LINENO: result: no" >&5
10200echo "${ECHO_T}no" >&6
10201fi
10202
10203 if test -z "$PROG_IFCONFIG" ; then
10204 PROG_IFCONFIG="undef"
10205 fi
10206
10207
10208
10209 # Extract the first word of "jstat", so it can be a program name with args.
10210set dummy jstat; ac_word=$2
10211echo "$as_me:$LINENO: checking for $ac_word" >&5
10212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10213if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
10214 echo $ECHO_N "(cached) $ECHO_C" >&6
10215else
10216 case $PROG_JSTAT in
10217 [\\/]* | ?:[\\/]*)
10218 ac_cv_path_PROG_JSTAT="$PROG_JSTAT" # Let the user override the test with a path.
10219 ;;
10220 *)
10221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10222for as_dir in $PATH
10223do
10224 IFS=$as_save_IFS
10225 test -z "$as_dir" && as_dir=.
10226 for ac_exec_ext in '' $ac_executable_extensions; do
10227 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10228 ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext"
10229 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10230 break 2
10231 fi
10232done
10233done
10234
10235 ;;
10236esac
10237fi
10238PROG_JSTAT=$ac_cv_path_PROG_JSTAT
10239
10240if test -n "$PROG_JSTAT"; then
10241 echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5
10242echo "${ECHO_T}$PROG_JSTAT" >&6
10243else
10244 echo "$as_me:$LINENO: result: no" >&5
10245echo "${ECHO_T}no" >&6
10246fi
10247
10248 if test -z "$PROG_JSTAT" ; then
10249 PROG_JSTAT="undef"
10250 fi
10251
10252
10253
10254 # Extract the first word of "ps", so it can be a program name with args.
10255set dummy ps; ac_word=$2
10256echo "$as_me:$LINENO: checking for $ac_word" >&5
10257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10258if test "${ac_cv_path_PROG_PS+set}" = set; then
10259 echo $ECHO_N "(cached) $ECHO_C" >&6
10260else
10261 case $PROG_PS in
10262 [\\/]* | ?:[\\/]*)
10263 ac_cv_path_PROG_PS="$PROG_PS" # Let the user override the test with a path.
10264 ;;
10265 *)
10266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10267for as_dir in $PATH
10268do
10269 IFS=$as_save_IFS
10270 test -z "$as_dir" && as_dir=.
10271 for ac_exec_ext in '' $ac_executable_extensions; do
10272 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10273 ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext"
10274 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10275 break 2
10276 fi
10277done
10278done
10279
10280 ;;
10281esac
10282fi
10283PROG_PS=$ac_cv_path_PROG_PS
10284
10285if test -n "$PROG_PS"; then
10286 echo "$as_me:$LINENO: result: $PROG_PS" >&5
10287echo "${ECHO_T}$PROG_PS" >&6
10288else
10289 echo "$as_me:$LINENO: result: no" >&5
10290echo "${ECHO_T}no" >&6
10291fi
10292
10293 if test -z "$PROG_PS" ; then
10294 PROG_PS="undef"
10295 fi
10296
10297
10298
10299 # Extract the first word of "sar", so it can be a program name with args.
10300set dummy sar; ac_word=$2
10301echo "$as_me:$LINENO: checking for $ac_word" >&5
10302echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10303if test "${ac_cv_path_PROG_SAR+set}" = set; then
10304 echo $ECHO_N "(cached) $ECHO_C" >&6
10305else
10306 case $PROG_SAR in
10307 [\\/]* | ?:[\\/]*)
10308 ac_cv_path_PROG_SAR="$PROG_SAR" # Let the user override the test with a path.
10309 ;;
10310 *)
10311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312for as_dir in $PATH
10313do
10314 IFS=$as_save_IFS
10315 test -z "$as_dir" && as_dir=.
10316 for ac_exec_ext in '' $ac_executable_extensions; do
10317 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10318 ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext"
10319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10320 break 2
10321 fi
10322done
10323done
10324
10325 ;;
10326esac
10327fi
10328PROG_SAR=$ac_cv_path_PROG_SAR
10329
10330if test -n "$PROG_SAR"; then
10331 echo "$as_me:$LINENO: result: $PROG_SAR" >&5
10332echo "${ECHO_T}$PROG_SAR" >&6
10333else
10334 echo "$as_me:$LINENO: result: no" >&5
10335echo "${ECHO_T}no" >&6
10336fi
10337
10338 if test -z "$PROG_SAR" ; then
10339 PROG_SAR="undef"
10340 fi
10341
10342
10343
10344 # Extract the first word of "w", so it can be a program name with args.
10345set dummy w; ac_word=$2
10346echo "$as_me:$LINENO: checking for $ac_word" >&5
10347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10348if test "${ac_cv_path_PROG_W+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
10350else
10351 case $PROG_W in
10352 [\\/]* | ?:[\\/]*)
10353 ac_cv_path_PROG_W="$PROG_W" # Let the user override the test with a path.
10354 ;;
10355 *)
10356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10357for as_dir in $PATH
10358do
10359 IFS=$as_save_IFS
10360 test -z "$as_dir" && as_dir=.
10361 for ac_exec_ext in '' $ac_executable_extensions; do
10362 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10363 ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext"
10364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10365 break 2
10366 fi
10367done
10368done
10369
10370 ;;
10371esac
10372fi
10373PROG_W=$ac_cv_path_PROG_W
10374
10375if test -n "$PROG_W"; then
10376 echo "$as_me:$LINENO: result: $PROG_W" >&5
10377echo "${ECHO_T}$PROG_W" >&6
10378else
10379 echo "$as_me:$LINENO: result: no" >&5
10380echo "${ECHO_T}no" >&6
10381fi
10382
10383 if test -z "$PROG_W" ; then
10384 PROG_W="undef"
10385 fi
10386
10387
10388
10389 # Extract the first word of "who", so it can be a program name with args.
10390set dummy who; ac_word=$2
10391echo "$as_me:$LINENO: checking for $ac_word" >&5
10392echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10393if test "${ac_cv_path_PROG_WHO+set}" = set; then
10394 echo $ECHO_N "(cached) $ECHO_C" >&6
10395else
10396 case $PROG_WHO in
10397 [\\/]* | ?:[\\/]*)
10398 ac_cv_path_PROG_WHO="$PROG_WHO" # Let the user override the test with a path.
10399 ;;
10400 *)
10401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10402for as_dir in $PATH
10403do
10404 IFS=$as_save_IFS
10405 test -z "$as_dir" && as_dir=.
10406 for ac_exec_ext in '' $ac_executable_extensions; do
10407 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10408 ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext"
10409 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10410 break 2
10411 fi
10412done
10413done
10414
10415 ;;
10416esac
10417fi
10418PROG_WHO=$ac_cv_path_PROG_WHO
10419
10420if test -n "$PROG_WHO"; then
10421 echo "$as_me:$LINENO: result: $PROG_WHO" >&5
10422echo "${ECHO_T}$PROG_WHO" >&6
10423else
10424 echo "$as_me:$LINENO: result: no" >&5
10425echo "${ECHO_T}no" >&6
10426fi
10427
10428 if test -z "$PROG_WHO" ; then
10429 PROG_WHO="undef"
10430 fi
10431
10432
10433
10434 # Extract the first word of "last", so it can be a program name with args.
10435set dummy last; ac_word=$2
10436echo "$as_me:$LINENO: checking for $ac_word" >&5
10437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10438if test "${ac_cv_path_PROG_LAST+set}" = set; then
10439 echo $ECHO_N "(cached) $ECHO_C" >&6
10440else
10441 case $PROG_LAST in
10442 [\\/]* | ?:[\\/]*)
10443 ac_cv_path_PROG_LAST="$PROG_LAST" # Let the user override the test with a path.
10444 ;;
10445 *)
10446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10447for as_dir in $PATH
10448do
10449 IFS=$as_save_IFS
10450 test -z "$as_dir" && as_dir=.
10451 for ac_exec_ext in '' $ac_executable_extensions; do
10452 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10453 ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext"
10454 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10455 break 2
10456 fi
10457done
10458done
10459
10460 ;;
10461esac
10462fi
10463PROG_LAST=$ac_cv_path_PROG_LAST
10464
10465if test -n "$PROG_LAST"; then
10466 echo "$as_me:$LINENO: result: $PROG_LAST" >&5
10467echo "${ECHO_T}$PROG_LAST" >&6
10468else
10469 echo "$as_me:$LINENO: result: no" >&5
10470echo "${ECHO_T}no" >&6
10471fi
10472
10473 if test -z "$PROG_LAST" ; then
10474 PROG_LAST="undef"
10475 fi
10476
10477
10478
10479 # Extract the first word of "lastlog", so it can be a program name with args.
10480set dummy lastlog; ac_word=$2
10481echo "$as_me:$LINENO: checking for $ac_word" >&5
10482echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10483if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
10484 echo $ECHO_N "(cached) $ECHO_C" >&6
10485else
10486 case $PROG_LASTLOG in
10487 [\\/]* | ?:[\\/]*)
10488 ac_cv_path_PROG_LASTLOG="$PROG_LASTLOG" # Let the user override the test with a path.
10489 ;;
10490 *)
10491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10492for as_dir in $PATH
10493do
10494 IFS=$as_save_IFS
10495 test -z "$as_dir" && as_dir=.
10496 for ac_exec_ext in '' $ac_executable_extensions; do
10497 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10498 ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext"
10499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10500 break 2
10501 fi
10502done
10503done
10504
10505 ;;
10506esac
10507fi
10508PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
10509
10510if test -n "$PROG_LASTLOG"; then
10511 echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5
10512echo "${ECHO_T}$PROG_LASTLOG" >&6
10513else
10514 echo "$as_me:$LINENO: result: no" >&5
10515echo "${ECHO_T}no" >&6
10516fi
10517
10518 if test -z "$PROG_LASTLOG" ; then
10519 PROG_LASTLOG="undef"
10520 fi
10521
10522
10523
10524 # Extract the first word of "df", so it can be a program name with args.
10525set dummy df; ac_word=$2
10526echo "$as_me:$LINENO: checking for $ac_word" >&5
10527echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10528if test "${ac_cv_path_PROG_DF+set}" = set; then
10529 echo $ECHO_N "(cached) $ECHO_C" >&6
10530else
10531 case $PROG_DF in
10532 [\\/]* | ?:[\\/]*)
10533 ac_cv_path_PROG_DF="$PROG_DF" # Let the user override the test with a path.
10534 ;;
10535 *)
10536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10537for as_dir in $PATH
10538do
10539 IFS=$as_save_IFS
10540 test -z "$as_dir" && as_dir=.
10541 for ac_exec_ext in '' $ac_executable_extensions; do
10542 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10543 ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext"
10544 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10545 break 2
10546 fi
10547done
10548done
10549
10550 ;;
10551esac
10552fi
10553PROG_DF=$ac_cv_path_PROG_DF
10554
10555if test -n "$PROG_DF"; then
10556 echo "$as_me:$LINENO: result: $PROG_DF" >&5
10557echo "${ECHO_T}$PROG_DF" >&6
10558else
10559 echo "$as_me:$LINENO: result: no" >&5
10560echo "${ECHO_T}no" >&6
10561fi
10562
10563 if test -z "$PROG_DF" ; then
10564 PROG_DF="undef"
10565 fi
10566
10567
10568
10569 # Extract the first word of "vmstat", so it can be a program name with args.
10570set dummy vmstat; ac_word=$2
10571echo "$as_me:$LINENO: checking for $ac_word" >&5
10572echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10573if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
10574 echo $ECHO_N "(cached) $ECHO_C" >&6
10575else
10576 case $PROG_VMSTAT in
10577 [\\/]* | ?:[\\/]*)
10578 ac_cv_path_PROG_VMSTAT="$PROG_VMSTAT" # Let the user override the test with a path.
10579 ;;
10580 *)
10581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10582for as_dir in $PATH
10583do
10584 IFS=$as_save_IFS
10585 test -z "$as_dir" && as_dir=.
10586 for ac_exec_ext in '' $ac_executable_extensions; do
10587 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10588 ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext"
10589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10590 break 2
10591 fi
10592done
10593done
10594
10595 ;;
10596esac
10597fi
10598PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
10599
10600if test -n "$PROG_VMSTAT"; then
10601 echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5
10602echo "${ECHO_T}$PROG_VMSTAT" >&6
10603else
10604 echo "$as_me:$LINENO: result: no" >&5
10605echo "${ECHO_T}no" >&6
10606fi
10607
10608 if test -z "$PROG_VMSTAT" ; then
10609 PROG_VMSTAT="undef"
10610 fi
10611
10612
10613
10614 # Extract the first word of "uptime", so it can be a program name with args.
10615set dummy uptime; ac_word=$2
10616echo "$as_me:$LINENO: checking for $ac_word" >&5
10617echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10618if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
10619 echo $ECHO_N "(cached) $ECHO_C" >&6
10620else
10621 case $PROG_UPTIME in
10622 [\\/]* | ?:[\\/]*)
10623 ac_cv_path_PROG_UPTIME="$PROG_UPTIME" # Let the user override the test with a path.
10624 ;;
10625 *)
10626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10627for as_dir in $PATH
10628do
10629 IFS=$as_save_IFS
10630 test -z "$as_dir" && as_dir=.
10631 for ac_exec_ext in '' $ac_executable_extensions; do
10632 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10633 ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext"
10634 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10635 break 2
10636 fi
10637done
10638done
10639
10640 ;;
10641esac
10642fi
10643PROG_UPTIME=$ac_cv_path_PROG_UPTIME
10644
10645if test -n "$PROG_UPTIME"; then
10646 echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5
10647echo "${ECHO_T}$PROG_UPTIME" >&6
10648else
10649 echo "$as_me:$LINENO: result: no" >&5
10650echo "${ECHO_T}no" >&6
10651fi
10652
10653 if test -z "$PROG_UPTIME" ; then
10654 PROG_UPTIME="undef"
10655 fi
10656
10657
10658
10659 # Extract the first word of "ipcs", so it can be a program name with args.
10660set dummy ipcs; ac_word=$2
10661echo "$as_me:$LINENO: checking for $ac_word" >&5
10662echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10663if test "${ac_cv_path_PROG_IPCS+set}" = set; then
10664 echo $ECHO_N "(cached) $ECHO_C" >&6
10665else
10666 case $PROG_IPCS in
10667 [\\/]* | ?:[\\/]*)
10668 ac_cv_path_PROG_IPCS="$PROG_IPCS" # Let the user override the test with a path.
10669 ;;
10670 *)
10671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10672for as_dir in $PATH
10673do
10674 IFS=$as_save_IFS
10675 test -z "$as_dir" && as_dir=.
10676 for ac_exec_ext in '' $ac_executable_extensions; do
10677 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10678 ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext"
10679 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10680 break 2
10681 fi
10682done
10683done
10684
10685 ;;
10686esac
10687fi
10688PROG_IPCS=$ac_cv_path_PROG_IPCS
10689
10690if test -n "$PROG_IPCS"; then
10691 echo "$as_me:$LINENO: result: $PROG_IPCS" >&5
10692echo "${ECHO_T}$PROG_IPCS" >&6
10693else
10694 echo "$as_me:$LINENO: result: no" >&5
10695echo "${ECHO_T}no" >&6
10696fi
10697
10698 if test -z "$PROG_IPCS" ; then
10699 PROG_IPCS="undef"
10700 fi
10701
10702
10703
10704 # Extract the first word of "tail", so it can be a program name with args.
10705set dummy tail; ac_word=$2
10706echo "$as_me:$LINENO: checking for $ac_word" >&5
10707echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10708if test "${ac_cv_path_PROG_TAIL+set}" = set; then
10709 echo $ECHO_N "(cached) $ECHO_C" >&6
10710else
10711 case $PROG_TAIL in
10712 [\\/]* | ?:[\\/]*)
10713 ac_cv_path_PROG_TAIL="$PROG_TAIL" # Let the user override the test with a path.
10714 ;;
10715 *)
10716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10717for as_dir in $PATH
10718do
10719 IFS=$as_save_IFS
10720 test -z "$as_dir" && as_dir=.
10721 for ac_exec_ext in '' $ac_executable_extensions; do
10722 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10723 ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext"
10724 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10725 break 2
10726 fi
10727done
10728done
10729
10730 ;;
10731esac
10732fi
10733PROG_TAIL=$ac_cv_path_PROG_TAIL
10734
10735if test -n "$PROG_TAIL"; then
10736 echo "$as_me:$LINENO: result: $PROG_TAIL" >&5
10737echo "${ECHO_T}$PROG_TAIL" >&6
10738else
10739 echo "$as_me:$LINENO: result: no" >&5
10740echo "${ECHO_T}no" >&6
10741fi
10742
10743 if test -z "$PROG_TAIL" ; then
10744 PROG_TAIL="undef"
10745 fi
10746
10747
10748# restore PATH
10749PATH=$OPATH
10750
10751# Where does ssh-rand-helper get its randomness from?
10752INSTALL_SSH_PRNG_CMDS=""
10753if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
10754 if test ! -z "$PRNGD_PORT" ; then
10755 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
10756 elif test ! -z "$PRNGD_SOCKET" ; then
10757 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
10758 else
10759 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
10760 RAND_HELPER_CMDHASH=yes
10761 INSTALL_SSH_PRNG_CMDS="yes"
10762 fi
10763fi
10764
10765
10766
10767# Cheap hack to ensure NEWS-OS libraries are arranged right.
10768if test ! -z "$SONY" ; then
10769 LIBS="$LIBS -liberty";
10770fi
10771
10772# Checks for data types
10773echo "$as_me:$LINENO: checking for char" >&5
10774echo $ECHO_N "checking for char... $ECHO_C" >&6
10775if test "${ac_cv_type_char+set}" = set; then
10776 echo $ECHO_N "(cached) $ECHO_C" >&6
10777else
10778 cat >conftest.$ac_ext <<_ACEOF
10779#line $LINENO "configure"
10780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
10785$ac_includes_default
10786int
10787main ()
10788{
10789if ((char *) 0)
10790 return 0;
10791if (sizeof (char))
10792 return 0;
10793 ;
10794 return 0;
10795}
10796_ACEOF
10797rm -f conftest.$ac_objext
10798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10799 (eval $ac_compile) 2>&5
10800 ac_status=$?
10801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10802 (exit $ac_status); } &&
10803 { ac_try='test -s conftest.$ac_objext'
10804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10805 (eval $ac_try) 2>&5
10806 ac_status=$?
10807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10808 (exit $ac_status); }; }; then
10809 ac_cv_type_char=yes
10810else
10811 echo "$as_me: failed program was:" >&5
10812sed 's/^/| /' conftest.$ac_ext >&5
10813
10814ac_cv_type_char=no
10815fi
10816rm -f conftest.$ac_objext conftest.$ac_ext
10817fi
10818echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
10819echo "${ECHO_T}$ac_cv_type_char" >&6
10820
10821echo "$as_me:$LINENO: checking size of char" >&5
10822echo $ECHO_N "checking size of char... $ECHO_C" >&6
10823if test "${ac_cv_sizeof_char+set}" = set; then
10824 echo $ECHO_N "(cached) $ECHO_C" >&6
10825else
10826 if test "$ac_cv_type_char" = yes; then
10827 # The cast to unsigned long works around a bug in the HP C Compiler
10828 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10829 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10830 # This bug is HP SR number 8606223364.
10831 if test "$cross_compiling" = yes; then
10832 # Depending upon the size, compute the lo and hi bounds.
10833cat >conftest.$ac_ext <<_ACEOF
10834#line $LINENO "configure"
10835/* confdefs.h. */
10836_ACEOF
10837cat confdefs.h >>conftest.$ac_ext
10838cat >>conftest.$ac_ext <<_ACEOF
10839/* end confdefs.h. */
10840$ac_includes_default
10841int
10842main ()
10843{
10844static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) >= 0)@:>@;
10845test_array @<:@0@:>@ = 0
10846
10847 ;
10848 return 0;
10849}
10850_ACEOF
10851rm -f conftest.$ac_objext
10852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10853 (eval $ac_compile) 2>&5
10854 ac_status=$?
10855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856 (exit $ac_status); } &&
10857 { ac_try='test -s conftest.$ac_objext'
10858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10859 (eval $ac_try) 2>&5
10860 ac_status=$?
10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10862 (exit $ac_status); }; }; then
10863 ac_lo=0 ac_mid=0
10864 while :; do
10865 cat >conftest.$ac_ext <<_ACEOF
10866#line $LINENO "configure"
10867/* confdefs.h. */
10868_ACEOF
10869cat confdefs.h >>conftest.$ac_ext
10870cat >>conftest.$ac_ext <<_ACEOF
10871/* end confdefs.h. */
10872$ac_includes_default
10873int
10874main ()
10875{
10876static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)@:>@;
10877test_array @<:@0@:>@ = 0
10878
10879 ;
10880 return 0;
10881}
10882_ACEOF
10883rm -f conftest.$ac_objext
10884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10885 (eval $ac_compile) 2>&5
10886 ac_status=$?
10887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10888 (exit $ac_status); } &&
10889 { ac_try='test -s conftest.$ac_objext'
10890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10891 (eval $ac_try) 2>&5
10892 ac_status=$?
10893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10894 (exit $ac_status); }; }; then
10895 ac_hi=$ac_mid; break
10896else
10897 echo "$as_me: failed program was:" >&5
10898sed 's/^/| /' conftest.$ac_ext >&5
10899
10900ac_lo=`expr $ac_mid + 1`
10901 if test $ac_lo -le $ac_mid; then
10902 ac_lo= ac_hi=
10903 break
10904 fi
10905 ac_mid=`expr 2 '*' $ac_mid + 1`
10906fi
10907rm -f conftest.$ac_objext conftest.$ac_ext
10908 done
10909else
10910 echo "$as_me: failed program was:" >&5
10911sed 's/^/| /' conftest.$ac_ext >&5
10912
10913cat >conftest.$ac_ext <<_ACEOF
10914#line $LINENO "configure"
10915/* confdefs.h. */
10916_ACEOF
10917cat confdefs.h >>conftest.$ac_ext
10918cat >>conftest.$ac_ext <<_ACEOF
10919/* end confdefs.h. */
10920$ac_includes_default
10921int
10922main ()
10923{
10924static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) < 0)@:>@;
10925test_array @<:@0@:>@ = 0
10926
10927 ;
10928 return 0;
10929}
10930_ACEOF
10931rm -f conftest.$ac_objext
10932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10933 (eval $ac_compile) 2>&5
10934 ac_status=$?
10935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10936 (exit $ac_status); } &&
10937 { ac_try='test -s conftest.$ac_objext'
10938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10939 (eval $ac_try) 2>&5
10940 ac_status=$?
10941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10942 (exit $ac_status); }; }; then
10943 ac_hi=-1 ac_mid=-1
10944 while :; do
10945 cat >conftest.$ac_ext <<_ACEOF
10946#line $LINENO "configure"
10947/* confdefs.h. */
10948_ACEOF
10949cat confdefs.h >>conftest.$ac_ext
10950cat >>conftest.$ac_ext <<_ACEOF
10951/* end confdefs.h. */
10952$ac_includes_default
10953int
10954main ()
10955{
10956static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)@:>@;
10957test_array @<:@0@:>@ = 0
10958
10959 ;
10960 return 0;
10961}
10962_ACEOF
10963rm -f conftest.$ac_objext
10964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10965 (eval $ac_compile) 2>&5
10966 ac_status=$?
10967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10968 (exit $ac_status); } &&
10969 { ac_try='test -s conftest.$ac_objext'
10970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10971 (eval $ac_try) 2>&5
10972 ac_status=$?
10973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10974 (exit $ac_status); }; }; then
10975 ac_lo=$ac_mid; break
10976else
10977 echo "$as_me: failed program was:" >&5
10978sed 's/^/| /' conftest.$ac_ext >&5
10979
10980ac_hi=`expr '(' $ac_mid ')' - 1`
10981 if test $ac_mid -le $ac_hi; then
10982 ac_lo= ac_hi=
10983 break
10984 fi
10985 ac_mid=`expr 2 '*' $ac_mid`
10986fi
10987rm -f conftest.$ac_objext conftest.$ac_ext
10988 done
10989else
10990 echo "$as_me: failed program was:" >&5
10991sed 's/^/| /' conftest.$ac_ext >&5
10992
10993ac_lo= ac_hi=
10994fi
10995rm -f conftest.$ac_objext conftest.$ac_ext
10996fi
10997rm -f conftest.$ac_objext conftest.$ac_ext
10998# Binary search between lo and hi bounds.
10999while test "x$ac_lo" != "x$ac_hi"; do
11000 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11001 cat >conftest.$ac_ext <<_ACEOF
11002#line $LINENO "configure"
11003/* confdefs.h. */
11004_ACEOF
11005cat confdefs.h >>conftest.$ac_ext
11006cat >>conftest.$ac_ext <<_ACEOF
11007/* end confdefs.h. */
11008$ac_includes_default
11009int
11010main ()
11011{
11012static int test_array @<:@1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)@:>@;
11013test_array @<:@0@:>@ = 0
11014
11015 ;
11016 return 0;
11017}
11018_ACEOF
11019rm -f conftest.$ac_objext
11020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11021 (eval $ac_compile) 2>&5
11022 ac_status=$?
11023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11024 (exit $ac_status); } &&
11025 { ac_try='test -s conftest.$ac_objext'
11026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11027 (eval $ac_try) 2>&5
11028 ac_status=$?
11029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11030 (exit $ac_status); }; }; then
11031 ac_hi=$ac_mid
11032else
11033 echo "$as_me: failed program was:" >&5
11034sed 's/^/| /' conftest.$ac_ext >&5
11035
11036ac_lo=`expr '(' $ac_mid ')' + 1`
11037fi
11038rm -f conftest.$ac_objext conftest.$ac_ext
11039done
11040case $ac_lo in
11041?*) ac_cv_sizeof_char=$ac_lo;;
11042'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
11043See \`config.log' for more details." >&5
11044echo "$as_me: error: cannot compute sizeof (char), 77
11045See \`config.log' for more details." >&2;}
11046 { (exit 1); exit 1; }; } ;;
11047esac
11048else
11049 if test "$cross_compiling" = yes; then
11050 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11051See \`config.log' for more details." >&5
11052echo "$as_me: error: cannot run test program while cross compiling
11053See \`config.log' for more details." >&2;}
11054 { (exit 1); exit 1; }; }
11055else
11056 cat >conftest.$ac_ext <<_ACEOF
11057#line $LINENO "configure"
11058/* confdefs.h. */
11059_ACEOF
11060cat confdefs.h >>conftest.$ac_ext
11061cat >>conftest.$ac_ext <<_ACEOF
11062/* end confdefs.h. */
11063$ac_includes_default
11064long longval () { return (long) (sizeof (char)); }
11065unsigned long ulongval () { return (long) (sizeof (char)); }
11066@%:@include <stdio.h>
11067@%:@include <stdlib.h>
11068int
11069main ()
11070{
11071
11072 FILE *f = fopen ("conftest.val", "w");
11073 if (! f)
11074 exit (1);
11075 if (((long) (sizeof (char))) < 0)
11076 {
11077 long i = longval ();
11078 if (i != ((long) (sizeof (char))))
11079 exit (1);
11080 fprintf (f, "%ld\n", i);
11081 }
11082 else
11083 {
11084 unsigned long i = ulongval ();
11085 if (i != ((long) (sizeof (char))))
11086 exit (1);
11087 fprintf (f, "%lu\n", i);
11088 }
11089 exit (ferror (f) || fclose (f) != 0);
11090
11091 ;
11092 return 0;
11093}
11094_ACEOF
11095rm -f conftest$ac_exeext
11096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11097 (eval $ac_link) 2>&5
11098 ac_status=$?
11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11102 (eval $ac_try) 2>&5
11103 ac_status=$?
11104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11105 (exit $ac_status); }; }; then
11106 ac_cv_sizeof_char=`cat conftest.val`
11107else
11108 echo "$as_me: program exited with status $ac_status" >&5
11109echo "$as_me: failed program was:" >&5
11110sed 's/^/| /' conftest.$ac_ext >&5
11111
11112( exit $ac_status )
11113{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
11114See \`config.log' for more details." >&5
11115echo "$as_me: error: cannot compute sizeof (char), 77
11116See \`config.log' for more details." >&2;}
11117 { (exit 1); exit 1; }; }
11118fi
11119rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11120fi
11121fi
11122rm -f conftest.val
11123else
11124 ac_cv_sizeof_char=0
11125fi
11126fi
11127echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
11128echo "${ECHO_T}$ac_cv_sizeof_char" >&6
11129cat >>confdefs.h <<_ACEOF
11130@%:@define SIZEOF_CHAR $ac_cv_sizeof_char
11131_ACEOF
11132
11133
11134echo "$as_me:$LINENO: checking for short int" >&5
11135echo $ECHO_N "checking for short int... $ECHO_C" >&6
11136if test "${ac_cv_type_short_int+set}" = set; then
11137 echo $ECHO_N "(cached) $ECHO_C" >&6
11138else
11139 cat >conftest.$ac_ext <<_ACEOF
11140#line $LINENO "configure"
11141/* confdefs.h. */
11142_ACEOF
11143cat confdefs.h >>conftest.$ac_ext
11144cat >>conftest.$ac_ext <<_ACEOF
11145/* end confdefs.h. */
11146$ac_includes_default
11147int
11148main ()
11149{
11150if ((short int *) 0)
11151 return 0;
11152if (sizeof (short int))
11153 return 0;
11154 ;
11155 return 0;
11156}
11157_ACEOF
11158rm -f conftest.$ac_objext
11159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11160 (eval $ac_compile) 2>&5
11161 ac_status=$?
11162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11163 (exit $ac_status); } &&
11164 { ac_try='test -s conftest.$ac_objext'
11165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11166 (eval $ac_try) 2>&5
11167 ac_status=$?
11168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11169 (exit $ac_status); }; }; then
11170 ac_cv_type_short_int=yes
11171else
11172 echo "$as_me: failed program was:" >&5
11173sed 's/^/| /' conftest.$ac_ext >&5
11174
11175ac_cv_type_short_int=no
11176fi
11177rm -f conftest.$ac_objext conftest.$ac_ext
11178fi
11179echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5
11180echo "${ECHO_T}$ac_cv_type_short_int" >&6
11181
11182echo "$as_me:$LINENO: checking size of short int" >&5
11183echo $ECHO_N "checking size of short int... $ECHO_C" >&6
11184if test "${ac_cv_sizeof_short_int+set}" = set; then
11185 echo $ECHO_N "(cached) $ECHO_C" >&6
11186else
11187 if test "$ac_cv_type_short_int" = yes; then
11188 # The cast to unsigned long works around a bug in the HP C Compiler
11189 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11190 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11191 # This bug is HP SR number 8606223364.
11192 if test "$cross_compiling" = yes; then
11193 # Depending upon the size, compute the lo and hi bounds.
11194cat >conftest.$ac_ext <<_ACEOF
11195#line $LINENO "configure"
11196/* confdefs.h. */
11197_ACEOF
11198cat confdefs.h >>conftest.$ac_ext
11199cat >>conftest.$ac_ext <<_ACEOF
11200/* end confdefs.h. */
11201$ac_includes_default
11202int
11203main ()
11204{
11205static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) >= 0)@:>@;
11206test_array @<:@0@:>@ = 0
11207
11208 ;
11209 return 0;
11210}
11211_ACEOF
11212rm -f conftest.$ac_objext
11213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11214 (eval $ac_compile) 2>&5
11215 ac_status=$?
11216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11217 (exit $ac_status); } &&
11218 { ac_try='test -s conftest.$ac_objext'
11219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11220 (eval $ac_try) 2>&5
11221 ac_status=$?
11222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11223 (exit $ac_status); }; }; then
11224 ac_lo=0 ac_mid=0
11225 while :; do
11226 cat >conftest.$ac_ext <<_ACEOF
11227#line $LINENO "configure"
11228/* confdefs.h. */
11229_ACEOF
11230cat confdefs.h >>conftest.$ac_ext
11231cat >>conftest.$ac_ext <<_ACEOF
11232/* end confdefs.h. */
11233$ac_includes_default
11234int
11235main ()
11236{
11237static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)@:>@;
11238test_array @<:@0@:>@ = 0
11239
11240 ;
11241 return 0;
11242}
11243_ACEOF
11244rm -f conftest.$ac_objext
11245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11246 (eval $ac_compile) 2>&5
11247 ac_status=$?
11248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11249 (exit $ac_status); } &&
11250 { ac_try='test -s conftest.$ac_objext'
11251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11252 (eval $ac_try) 2>&5
11253 ac_status=$?
11254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11255 (exit $ac_status); }; }; then
11256 ac_hi=$ac_mid; break
11257else
11258 echo "$as_me: failed program was:" >&5
11259sed 's/^/| /' conftest.$ac_ext >&5
11260
11261ac_lo=`expr $ac_mid + 1`
11262 if test $ac_lo -le $ac_mid; then
11263 ac_lo= ac_hi=
11264 break
11265 fi
11266 ac_mid=`expr 2 '*' $ac_mid + 1`
11267fi
11268rm -f conftest.$ac_objext conftest.$ac_ext
11269 done
11270else
11271 echo "$as_me: failed program was:" >&5
11272sed 's/^/| /' conftest.$ac_ext >&5
11273
11274cat >conftest.$ac_ext <<_ACEOF
11275#line $LINENO "configure"
11276/* confdefs.h. */
11277_ACEOF
11278cat confdefs.h >>conftest.$ac_ext
11279cat >>conftest.$ac_ext <<_ACEOF
11280/* end confdefs.h. */
11281$ac_includes_default
11282int
11283main ()
11284{
11285static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) < 0)@:>@;
11286test_array @<:@0@:>@ = 0
11287
11288 ;
11289 return 0;
11290}
11291_ACEOF
11292rm -f conftest.$ac_objext
11293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11294 (eval $ac_compile) 2>&5
11295 ac_status=$?
11296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11297 (exit $ac_status); } &&
11298 { ac_try='test -s conftest.$ac_objext'
11299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11300 (eval $ac_try) 2>&5
11301 ac_status=$?
11302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11303 (exit $ac_status); }; }; then
11304 ac_hi=-1 ac_mid=-1
11305 while :; do
11306 cat >conftest.$ac_ext <<_ACEOF
11307#line $LINENO "configure"
11308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
11313$ac_includes_default
11314int
11315main ()
11316{
11317static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) >= $ac_mid)@:>@;
11318test_array @<:@0@:>@ = 0
11319
11320 ;
11321 return 0;
11322}
11323_ACEOF
11324rm -f conftest.$ac_objext
11325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11326 (eval $ac_compile) 2>&5
11327 ac_status=$?
11328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329 (exit $ac_status); } &&
11330 { ac_try='test -s conftest.$ac_objext'
11331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11332 (eval $ac_try) 2>&5
11333 ac_status=$?
11334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11335 (exit $ac_status); }; }; then
11336 ac_lo=$ac_mid; break
11337else
11338 echo "$as_me: failed program was:" >&5
11339sed 's/^/| /' conftest.$ac_ext >&5
11340
11341ac_hi=`expr '(' $ac_mid ')' - 1`
11342 if test $ac_mid -le $ac_hi; then
11343 ac_lo= ac_hi=
11344 break
11345 fi
11346 ac_mid=`expr 2 '*' $ac_mid`
11347fi
11348rm -f conftest.$ac_objext conftest.$ac_ext
11349 done
11350else
11351 echo "$as_me: failed program was:" >&5
11352sed 's/^/| /' conftest.$ac_ext >&5
11353
11354ac_lo= ac_hi=
11355fi
11356rm -f conftest.$ac_objext conftest.$ac_ext
11357fi
11358rm -f conftest.$ac_objext conftest.$ac_ext
11359# Binary search between lo and hi bounds.
11360while test "x$ac_lo" != "x$ac_hi"; do
11361 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11362 cat >conftest.$ac_ext <<_ACEOF
11363#line $LINENO "configure"
11364/* confdefs.h. */
11365_ACEOF
11366cat confdefs.h >>conftest.$ac_ext
11367cat >>conftest.$ac_ext <<_ACEOF
11368/* end confdefs.h. */
11369$ac_includes_default
11370int
11371main ()
11372{
11373static int test_array @<:@1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)@:>@;
11374test_array @<:@0@:>@ = 0
11375
11376 ;
11377 return 0;
11378}
11379_ACEOF
11380rm -f conftest.$ac_objext
11381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11382 (eval $ac_compile) 2>&5
11383 ac_status=$?
11384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11385 (exit $ac_status); } &&
11386 { ac_try='test -s conftest.$ac_objext'
11387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11388 (eval $ac_try) 2>&5
11389 ac_status=$?
11390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11391 (exit $ac_status); }; }; then
11392 ac_hi=$ac_mid
11393else
11394 echo "$as_me: failed program was:" >&5
11395sed 's/^/| /' conftest.$ac_ext >&5
11396
11397ac_lo=`expr '(' $ac_mid ')' + 1`
11398fi
11399rm -f conftest.$ac_objext conftest.$ac_ext
11400done
11401case $ac_lo in
11402?*) ac_cv_sizeof_short_int=$ac_lo;;
11403'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77
11404See \`config.log' for more details." >&5
11405echo "$as_me: error: cannot compute sizeof (short int), 77
11406See \`config.log' for more details." >&2;}
11407 { (exit 1); exit 1; }; } ;;
11408esac
11409else
11410 if test "$cross_compiling" = yes; then
11411 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11412See \`config.log' for more details." >&5
11413echo "$as_me: error: cannot run test program while cross compiling
11414See \`config.log' for more details." >&2;}
11415 { (exit 1); exit 1; }; }
11416else
11417 cat >conftest.$ac_ext <<_ACEOF
11418#line $LINENO "configure"
11419/* confdefs.h. */
11420_ACEOF
11421cat confdefs.h >>conftest.$ac_ext
11422cat >>conftest.$ac_ext <<_ACEOF
11423/* end confdefs.h. */
11424$ac_includes_default
11425long longval () { return (long) (sizeof (short int)); }
11426unsigned long ulongval () { return (long) (sizeof (short int)); }
11427@%:@include <stdio.h>
11428@%:@include <stdlib.h>
11429int
11430main ()
11431{
11432
11433 FILE *f = fopen ("conftest.val", "w");
11434 if (! f)
11435 exit (1);
11436 if (((long) (sizeof (short int))) < 0)
11437 {
11438 long i = longval ();
11439 if (i != ((long) (sizeof (short int))))
11440 exit (1);
11441 fprintf (f, "%ld\n", i);
11442 }
11443 else
11444 {
11445 unsigned long i = ulongval ();
11446 if (i != ((long) (sizeof (short int))))
11447 exit (1);
11448 fprintf (f, "%lu\n", i);
11449 }
11450 exit (ferror (f) || fclose (f) != 0);
11451
11452 ;
11453 return 0;
11454}
11455_ACEOF
11456rm -f conftest$ac_exeext
11457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11458 (eval $ac_link) 2>&5
11459 ac_status=$?
11460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11463 (eval $ac_try) 2>&5
11464 ac_status=$?
11465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11466 (exit $ac_status); }; }; then
11467 ac_cv_sizeof_short_int=`cat conftest.val`
11468else
11469 echo "$as_me: program exited with status $ac_status" >&5
11470echo "$as_me: failed program was:" >&5
11471sed 's/^/| /' conftest.$ac_ext >&5
11472
11473( exit $ac_status )
11474{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77
11475See \`config.log' for more details." >&5
11476echo "$as_me: error: cannot compute sizeof (short int), 77
11477See \`config.log' for more details." >&2;}
11478 { (exit 1); exit 1; }; }
11479fi
11480rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11481fi
11482fi
11483rm -f conftest.val
11484else
11485 ac_cv_sizeof_short_int=0
11486fi
11487fi
11488echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
11489echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6
11490cat >>confdefs.h <<_ACEOF
11491@%:@define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
11492_ACEOF
11493
11494
11495echo "$as_me:$LINENO: checking for int" >&5
11496echo $ECHO_N "checking for int... $ECHO_C" >&6
11497if test "${ac_cv_type_int+set}" = set; then
11498 echo $ECHO_N "(cached) $ECHO_C" >&6
11499else
11500 cat >conftest.$ac_ext <<_ACEOF
11501#line $LINENO "configure"
11502/* confdefs.h. */
11503_ACEOF
11504cat confdefs.h >>conftest.$ac_ext
11505cat >>conftest.$ac_ext <<_ACEOF
11506/* end confdefs.h. */
11507$ac_includes_default
11508int
11509main ()
11510{
11511if ((int *) 0)
11512 return 0;
11513if (sizeof (int))
11514 return 0;
11515 ;
11516 return 0;
11517}
11518_ACEOF
11519rm -f conftest.$ac_objext
11520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11521 (eval $ac_compile) 2>&5
11522 ac_status=$?
11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524 (exit $ac_status); } &&
11525 { ac_try='test -s conftest.$ac_objext'
11526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11527 (eval $ac_try) 2>&5
11528 ac_status=$?
11529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530 (exit $ac_status); }; }; then
11531 ac_cv_type_int=yes
11532else
11533 echo "$as_me: failed program was:" >&5
11534sed 's/^/| /' conftest.$ac_ext >&5
11535
11536ac_cv_type_int=no
11537fi
11538rm -f conftest.$ac_objext conftest.$ac_ext
11539fi
11540echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
11541echo "${ECHO_T}$ac_cv_type_int" >&6
11542
11543echo "$as_me:$LINENO: checking size of int" >&5
11544echo $ECHO_N "checking size of int... $ECHO_C" >&6
11545if test "${ac_cv_sizeof_int+set}" = set; then
11546 echo $ECHO_N "(cached) $ECHO_C" >&6
11547else
11548 if test "$ac_cv_type_int" = yes; then
11549 # The cast to unsigned long works around a bug in the HP C Compiler
11550 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11551 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11552 # This bug is HP SR number 8606223364.
11553 if test "$cross_compiling" = yes; then
11554 # Depending upon the size, compute the lo and hi bounds.
11555cat >conftest.$ac_ext <<_ACEOF
11556#line $LINENO "configure"
11557/* confdefs.h. */
11558_ACEOF
11559cat confdefs.h >>conftest.$ac_ext
11560cat >>conftest.$ac_ext <<_ACEOF
11561/* end confdefs.h. */
11562$ac_includes_default
11563int
11564main ()
11565{
11566static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) >= 0)@:>@;
11567test_array @<:@0@:>@ = 0
11568
11569 ;
11570 return 0;
11571}
11572_ACEOF
11573rm -f conftest.$ac_objext
11574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11575 (eval $ac_compile) 2>&5
11576 ac_status=$?
11577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11578 (exit $ac_status); } &&
11579 { ac_try='test -s conftest.$ac_objext'
11580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11581 (eval $ac_try) 2>&5
11582 ac_status=$?
11583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11584 (exit $ac_status); }; }; then
11585 ac_lo=0 ac_mid=0
11586 while :; do
11587 cat >conftest.$ac_ext <<_ACEOF
11588#line $LINENO "configure"
11589/* confdefs.h. */
11590_ACEOF
11591cat confdefs.h >>conftest.$ac_ext
11592cat >>conftest.$ac_ext <<_ACEOF
11593/* end confdefs.h. */
11594$ac_includes_default
11595int
11596main ()
11597{
11598static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)@:>@;
11599test_array @<:@0@:>@ = 0
11600
11601 ;
11602 return 0;
11603}
11604_ACEOF
11605rm -f conftest.$ac_objext
11606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11607 (eval $ac_compile) 2>&5
11608 ac_status=$?
11609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610 (exit $ac_status); } &&
11611 { ac_try='test -s conftest.$ac_objext'
11612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11613 (eval $ac_try) 2>&5
11614 ac_status=$?
11615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11616 (exit $ac_status); }; }; then
11617 ac_hi=$ac_mid; break
11618else
11619 echo "$as_me: failed program was:" >&5
11620sed 's/^/| /' conftest.$ac_ext >&5
11621
11622ac_lo=`expr $ac_mid + 1`
11623 if test $ac_lo -le $ac_mid; then
11624 ac_lo= ac_hi=
11625 break
11626 fi
11627 ac_mid=`expr 2 '*' $ac_mid + 1`
11628fi
11629rm -f conftest.$ac_objext conftest.$ac_ext
11630 done
11631else
11632 echo "$as_me: failed program was:" >&5
11633sed 's/^/| /' conftest.$ac_ext >&5
11634
11635cat >conftest.$ac_ext <<_ACEOF
11636#line $LINENO "configure"
11637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
11642$ac_includes_default
11643int
11644main ()
11645{
11646static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) < 0)@:>@;
11647test_array @<:@0@:>@ = 0
11648
11649 ;
11650 return 0;
11651}
11652_ACEOF
11653rm -f conftest.$ac_objext
11654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11655 (eval $ac_compile) 2>&5
11656 ac_status=$?
11657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 (exit $ac_status); } &&
11659 { ac_try='test -s conftest.$ac_objext'
11660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661 (eval $ac_try) 2>&5
11662 ac_status=$?
11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 (exit $ac_status); }; }; then
11665 ac_hi=-1 ac_mid=-1
11666 while :; do
11667 cat >conftest.$ac_ext <<_ACEOF
11668#line $LINENO "configure"
11669/* confdefs.h. */
11670_ACEOF
11671cat confdefs.h >>conftest.$ac_ext
11672cat >>conftest.$ac_ext <<_ACEOF
11673/* end confdefs.h. */
11674$ac_includes_default
11675int
11676main ()
11677{
11678static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)@:>@;
11679test_array @<:@0@:>@ = 0
11680
11681 ;
11682 return 0;
11683}
11684_ACEOF
11685rm -f conftest.$ac_objext
11686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11687 (eval $ac_compile) 2>&5
11688 ac_status=$?
11689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11690 (exit $ac_status); } &&
11691 { ac_try='test -s conftest.$ac_objext'
11692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11693 (eval $ac_try) 2>&5
11694 ac_status=$?
11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11696 (exit $ac_status); }; }; then
11697 ac_lo=$ac_mid; break
11698else
11699 echo "$as_me: failed program was:" >&5
11700sed 's/^/| /' conftest.$ac_ext >&5
11701
11702ac_hi=`expr '(' $ac_mid ')' - 1`
11703 if test $ac_mid -le $ac_hi; then
11704 ac_lo= ac_hi=
11705 break
11706 fi
11707 ac_mid=`expr 2 '*' $ac_mid`
11708fi
11709rm -f conftest.$ac_objext conftest.$ac_ext
11710 done
11711else
11712 echo "$as_me: failed program was:" >&5
11713sed 's/^/| /' conftest.$ac_ext >&5
11714
11715ac_lo= ac_hi=
11716fi
11717rm -f conftest.$ac_objext conftest.$ac_ext
11718fi
11719rm -f conftest.$ac_objext conftest.$ac_ext
11720# Binary search between lo and hi bounds.
11721while test "x$ac_lo" != "x$ac_hi"; do
11722 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11723 cat >conftest.$ac_ext <<_ACEOF
11724#line $LINENO "configure"
11725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
11730$ac_includes_default
11731int
11732main ()
11733{
11734static int test_array @<:@1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)@:>@;
11735test_array @<:@0@:>@ = 0
11736
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11743 (eval $ac_compile) 2>&5
11744 ac_status=$?
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11746 (exit $ac_status); } &&
11747 { ac_try='test -s conftest.$ac_objext'
11748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11749 (eval $ac_try) 2>&5
11750 ac_status=$?
11751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11752 (exit $ac_status); }; }; then
11753 ac_hi=$ac_mid
11754else
11755 echo "$as_me: failed program was:" >&5
11756sed 's/^/| /' conftest.$ac_ext >&5
11757
11758ac_lo=`expr '(' $ac_mid ')' + 1`
11759fi
11760rm -f conftest.$ac_objext conftest.$ac_ext
11761done
11762case $ac_lo in
11763?*) ac_cv_sizeof_int=$ac_lo;;
11764'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
11765See \`config.log' for more details." >&5
11766echo "$as_me: error: cannot compute sizeof (int), 77
11767See \`config.log' for more details." >&2;}
11768 { (exit 1); exit 1; }; } ;;
11769esac
11770else
11771 if test "$cross_compiling" = yes; then
11772 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11773See \`config.log' for more details." >&5
11774echo "$as_me: error: cannot run test program while cross compiling
11775See \`config.log' for more details." >&2;}
11776 { (exit 1); exit 1; }; }
11777else
11778 cat >conftest.$ac_ext <<_ACEOF
11779#line $LINENO "configure"
11780/* confdefs.h. */
11781_ACEOF
11782cat confdefs.h >>conftest.$ac_ext
11783cat >>conftest.$ac_ext <<_ACEOF
11784/* end confdefs.h. */
11785$ac_includes_default
11786long longval () { return (long) (sizeof (int)); }
11787unsigned long ulongval () { return (long) (sizeof (int)); }
11788@%:@include <stdio.h>
11789@%:@include <stdlib.h>
11790int
11791main ()
11792{
11793
11794 FILE *f = fopen ("conftest.val", "w");
11795 if (! f)
11796 exit (1);
11797 if (((long) (sizeof (int))) < 0)
11798 {
11799 long i = longval ();
11800 if (i != ((long) (sizeof (int))))
11801 exit (1);
11802 fprintf (f, "%ld\n", i);
11803 }
11804 else
11805 {
11806 unsigned long i = ulongval ();
11807 if (i != ((long) (sizeof (int))))
11808 exit (1);
11809 fprintf (f, "%lu\n", i);
11810 }
11811 exit (ferror (f) || fclose (f) != 0);
11812
11813 ;
11814 return 0;
11815}
11816_ACEOF
11817rm -f conftest$ac_exeext
11818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11819 (eval $ac_link) 2>&5
11820 ac_status=$?
11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11824 (eval $ac_try) 2>&5
11825 ac_status=$?
11826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11827 (exit $ac_status); }; }; then
11828 ac_cv_sizeof_int=`cat conftest.val`
11829else
11830 echo "$as_me: program exited with status $ac_status" >&5
11831echo "$as_me: failed program was:" >&5
11832sed 's/^/| /' conftest.$ac_ext >&5
11833
11834( exit $ac_status )
11835{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
11836See \`config.log' for more details." >&5
11837echo "$as_me: error: cannot compute sizeof (int), 77
11838See \`config.log' for more details." >&2;}
11839 { (exit 1); exit 1; }; }
11840fi
11841rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11842fi
11843fi
11844rm -f conftest.val
11845else
11846 ac_cv_sizeof_int=0
11847fi
11848fi
11849echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
11850echo "${ECHO_T}$ac_cv_sizeof_int" >&6
11851cat >>confdefs.h <<_ACEOF
11852@%:@define SIZEOF_INT $ac_cv_sizeof_int
11853_ACEOF
11854
11855
11856echo "$as_me:$LINENO: checking for long int" >&5
11857echo $ECHO_N "checking for long int... $ECHO_C" >&6
11858if test "${ac_cv_type_long_int+set}" = set; then
11859 echo $ECHO_N "(cached) $ECHO_C" >&6
11860else
11861 cat >conftest.$ac_ext <<_ACEOF
11862#line $LINENO "configure"
11863/* confdefs.h. */
11864_ACEOF
11865cat confdefs.h >>conftest.$ac_ext
11866cat >>conftest.$ac_ext <<_ACEOF
11867/* end confdefs.h. */
11868$ac_includes_default
11869int
11870main ()
11871{
11872if ((long int *) 0)
11873 return 0;
11874if (sizeof (long int))
11875 return 0;
11876 ;
11877 return 0;
11878}
11879_ACEOF
11880rm -f conftest.$ac_objext
11881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11882 (eval $ac_compile) 2>&5
11883 ac_status=$?
11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885 (exit $ac_status); } &&
11886 { ac_try='test -s conftest.$ac_objext'
11887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11888 (eval $ac_try) 2>&5
11889 ac_status=$?
11890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11891 (exit $ac_status); }; }; then
11892 ac_cv_type_long_int=yes
11893else
11894 echo "$as_me: failed program was:" >&5
11895sed 's/^/| /' conftest.$ac_ext >&5
11896
11897ac_cv_type_long_int=no
11898fi
11899rm -f conftest.$ac_objext conftest.$ac_ext
11900fi
11901echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5
11902echo "${ECHO_T}$ac_cv_type_long_int" >&6
11903
11904echo "$as_me:$LINENO: checking size of long int" >&5
11905echo $ECHO_N "checking size of long int... $ECHO_C" >&6
11906if test "${ac_cv_sizeof_long_int+set}" = set; then
11907 echo $ECHO_N "(cached) $ECHO_C" >&6
11908else
11909 if test "$ac_cv_type_long_int" = yes; then
11910 # The cast to unsigned long works around a bug in the HP C Compiler
11911 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11912 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11913 # This bug is HP SR number 8606223364.
11914 if test "$cross_compiling" = yes; then
11915 # Depending upon the size, compute the lo and hi bounds.
11916cat >conftest.$ac_ext <<_ACEOF
11917#line $LINENO "configure"
11918/* confdefs.h. */
11919_ACEOF
11920cat confdefs.h >>conftest.$ac_ext
11921cat >>conftest.$ac_ext <<_ACEOF
11922/* end confdefs.h. */
11923$ac_includes_default
11924int
11925main ()
11926{
11927static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) >= 0)@:>@;
11928test_array @<:@0@:>@ = 0
11929
11930 ;
11931 return 0;
11932}
11933_ACEOF
11934rm -f conftest.$ac_objext
11935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11936 (eval $ac_compile) 2>&5
11937 ac_status=$?
11938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11939 (exit $ac_status); } &&
11940 { ac_try='test -s conftest.$ac_objext'
11941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11942 (eval $ac_try) 2>&5
11943 ac_status=$?
11944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11945 (exit $ac_status); }; }; then
11946 ac_lo=0 ac_mid=0
11947 while :; do
11948 cat >conftest.$ac_ext <<_ACEOF
11949#line $LINENO "configure"
11950/* confdefs.h. */
11951_ACEOF
11952cat confdefs.h >>conftest.$ac_ext
11953cat >>conftest.$ac_ext <<_ACEOF
11954/* end confdefs.h. */
11955$ac_includes_default
11956int
11957main ()
11958{
11959static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)@:>@;
11960test_array @<:@0@:>@ = 0
11961
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966rm -f conftest.$ac_objext
11967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11968 (eval $ac_compile) 2>&5
11969 ac_status=$?
11970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971 (exit $ac_status); } &&
11972 { ac_try='test -s conftest.$ac_objext'
11973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11974 (eval $ac_try) 2>&5
11975 ac_status=$?
11976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11977 (exit $ac_status); }; }; then
11978 ac_hi=$ac_mid; break
11979else
11980 echo "$as_me: failed program was:" >&5
11981sed 's/^/| /' conftest.$ac_ext >&5
11982
11983ac_lo=`expr $ac_mid + 1`
11984 if test $ac_lo -le $ac_mid; then
11985 ac_lo= ac_hi=
11986 break
11987 fi
11988 ac_mid=`expr 2 '*' $ac_mid + 1`
11989fi
11990rm -f conftest.$ac_objext conftest.$ac_ext
11991 done
11992else
11993 echo "$as_me: failed program was:" >&5
11994sed 's/^/| /' conftest.$ac_ext >&5
11995
11996cat >conftest.$ac_ext <<_ACEOF
11997#line $LINENO "configure"
11998/* confdefs.h. */
11999_ACEOF
12000cat confdefs.h >>conftest.$ac_ext
12001cat >>conftest.$ac_ext <<_ACEOF
12002/* end confdefs.h. */
12003$ac_includes_default
12004int
12005main ()
12006{
12007static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) < 0)@:>@;
12008test_array @<:@0@:>@ = 0
12009
12010 ;
12011 return 0;
12012}
12013_ACEOF
12014rm -f conftest.$ac_objext
12015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12016 (eval $ac_compile) 2>&5
12017 ac_status=$?
12018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019 (exit $ac_status); } &&
12020 { ac_try='test -s conftest.$ac_objext'
12021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12022 (eval $ac_try) 2>&5
12023 ac_status=$?
12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025 (exit $ac_status); }; }; then
12026 ac_hi=-1 ac_mid=-1
12027 while :; do
12028 cat >conftest.$ac_ext <<_ACEOF
12029#line $LINENO "configure"
12030/* confdefs.h. */
12031_ACEOF
12032cat confdefs.h >>conftest.$ac_ext
12033cat >>conftest.$ac_ext <<_ACEOF
12034/* end confdefs.h. */
12035$ac_includes_default
12036int
12037main ()
12038{
12039static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) >= $ac_mid)@:>@;
12040test_array @<:@0@:>@ = 0
12041
12042 ;
12043 return 0;
12044}
12045_ACEOF
12046rm -f conftest.$ac_objext
12047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12048 (eval $ac_compile) 2>&5
12049 ac_status=$?
12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12051 (exit $ac_status); } &&
12052 { ac_try='test -s conftest.$ac_objext'
12053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12054 (eval $ac_try) 2>&5
12055 ac_status=$?
12056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12057 (exit $ac_status); }; }; then
12058 ac_lo=$ac_mid; break
12059else
12060 echo "$as_me: failed program was:" >&5
12061sed 's/^/| /' conftest.$ac_ext >&5
12062
12063ac_hi=`expr '(' $ac_mid ')' - 1`
12064 if test $ac_mid -le $ac_hi; then
12065 ac_lo= ac_hi=
12066 break
12067 fi
12068 ac_mid=`expr 2 '*' $ac_mid`
12069fi
12070rm -f conftest.$ac_objext conftest.$ac_ext
12071 done
12072else
12073 echo "$as_me: failed program was:" >&5
12074sed 's/^/| /' conftest.$ac_ext >&5
12075
12076ac_lo= ac_hi=
12077fi
12078rm -f conftest.$ac_objext conftest.$ac_ext
12079fi
12080rm -f conftest.$ac_objext conftest.$ac_ext
12081# Binary search between lo and hi bounds.
12082while test "x$ac_lo" != "x$ac_hi"; do
12083 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12084 cat >conftest.$ac_ext <<_ACEOF
12085#line $LINENO "configure"
12086/* confdefs.h. */
12087_ACEOF
12088cat confdefs.h >>conftest.$ac_ext
12089cat >>conftest.$ac_ext <<_ACEOF
12090/* end confdefs.h. */
12091$ac_includes_default
12092int
12093main ()
12094{
12095static int test_array @<:@1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)@:>@;
12096test_array @<:@0@:>@ = 0
12097
12098 ;
12099 return 0;
12100}
12101_ACEOF
12102rm -f conftest.$ac_objext
12103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12104 (eval $ac_compile) 2>&5
12105 ac_status=$?
12106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107 (exit $ac_status); } &&
12108 { ac_try='test -s conftest.$ac_objext'
12109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12110 (eval $ac_try) 2>&5
12111 ac_status=$?
12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113 (exit $ac_status); }; }; then
12114 ac_hi=$ac_mid
12115else
12116 echo "$as_me: failed program was:" >&5
12117sed 's/^/| /' conftest.$ac_ext >&5
12118
12119ac_lo=`expr '(' $ac_mid ')' + 1`
12120fi
12121rm -f conftest.$ac_objext conftest.$ac_ext
12122done
12123case $ac_lo in
12124?*) ac_cv_sizeof_long_int=$ac_lo;;
12125'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77
12126See \`config.log' for more details." >&5
12127echo "$as_me: error: cannot compute sizeof (long int), 77
12128See \`config.log' for more details." >&2;}
12129 { (exit 1); exit 1; }; } ;;
12130esac
12131else
12132 if test "$cross_compiling" = yes; then
12133 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12134See \`config.log' for more details." >&5
12135echo "$as_me: error: cannot run test program while cross compiling
12136See \`config.log' for more details." >&2;}
12137 { (exit 1); exit 1; }; }
12138else
12139 cat >conftest.$ac_ext <<_ACEOF
12140#line $LINENO "configure"
12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
12146$ac_includes_default
12147long longval () { return (long) (sizeof (long int)); }
12148unsigned long ulongval () { return (long) (sizeof (long int)); }
12149@%:@include <stdio.h>
12150@%:@include <stdlib.h>
12151int
12152main ()
12153{
12154
12155 FILE *f = fopen ("conftest.val", "w");
12156 if (! f)
12157 exit (1);
12158 if (((long) (sizeof (long int))) < 0)
12159 {
12160 long i = longval ();
12161 if (i != ((long) (sizeof (long int))))
12162 exit (1);
12163 fprintf (f, "%ld\n", i);
12164 }
12165 else
12166 {
12167 unsigned long i = ulongval ();
12168 if (i != ((long) (sizeof (long int))))
12169 exit (1);
12170 fprintf (f, "%lu\n", i);
12171 }
12172 exit (ferror (f) || fclose (f) != 0);
12173
12174 ;
12175 return 0;
12176}
12177_ACEOF
12178rm -f conftest$ac_exeext
12179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12180 (eval $ac_link) 2>&5
12181 ac_status=$?
12182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12185 (eval $ac_try) 2>&5
12186 ac_status=$?
12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12188 (exit $ac_status); }; }; then
12189 ac_cv_sizeof_long_int=`cat conftest.val`
12190else
12191 echo "$as_me: program exited with status $ac_status" >&5
12192echo "$as_me: failed program was:" >&5
12193sed 's/^/| /' conftest.$ac_ext >&5
12194
12195( exit $ac_status )
12196{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77
12197See \`config.log' for more details." >&5
12198echo "$as_me: error: cannot compute sizeof (long int), 77
12199See \`config.log' for more details." >&2;}
12200 { (exit 1); exit 1; }; }
12201fi
12202rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12203fi
12204fi
12205rm -f conftest.val
12206else
12207 ac_cv_sizeof_long_int=0
12208fi
12209fi
12210echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
12211echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6
12212cat >>confdefs.h <<_ACEOF
12213@%:@define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
12214_ACEOF
12215
12216
12217echo "$as_me:$LINENO: checking for long long int" >&5
12218echo $ECHO_N "checking for long long int... $ECHO_C" >&6
12219if test "${ac_cv_type_long_long_int+set}" = set; then
12220 echo $ECHO_N "(cached) $ECHO_C" >&6
12221else
12222 cat >conftest.$ac_ext <<_ACEOF
12223#line $LINENO "configure"
12224/* confdefs.h. */
12225_ACEOF
12226cat confdefs.h >>conftest.$ac_ext
12227cat >>conftest.$ac_ext <<_ACEOF
12228/* end confdefs.h. */
12229$ac_includes_default
12230int
12231main ()
12232{
12233if ((long long int *) 0)
12234 return 0;
12235if (sizeof (long long int))
12236 return 0;
12237 ;
12238 return 0;
12239}
12240_ACEOF
12241rm -f conftest.$ac_objext
12242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12243 (eval $ac_compile) 2>&5
12244 ac_status=$?
12245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12246 (exit $ac_status); } &&
12247 { ac_try='test -s conftest.$ac_objext'
12248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12249 (eval $ac_try) 2>&5
12250 ac_status=$?
12251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12252 (exit $ac_status); }; }; then
12253 ac_cv_type_long_long_int=yes
12254else
12255 echo "$as_me: failed program was:" >&5
12256sed 's/^/| /' conftest.$ac_ext >&5
12257
12258ac_cv_type_long_long_int=no
12259fi
12260rm -f conftest.$ac_objext conftest.$ac_ext
12261fi
12262echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
12263echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
12264
12265echo "$as_me:$LINENO: checking size of long long int" >&5
12266echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
12267if test "${ac_cv_sizeof_long_long_int+set}" = set; then
12268 echo $ECHO_N "(cached) $ECHO_C" >&6
12269else
12270 if test "$ac_cv_type_long_long_int" = yes; then
12271 # The cast to unsigned long works around a bug in the HP C Compiler
12272 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12273 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12274 # This bug is HP SR number 8606223364.
12275 if test "$cross_compiling" = yes; then
12276 # Depending upon the size, compute the lo and hi bounds.
12277cat >conftest.$ac_ext <<_ACEOF
12278#line $LINENO "configure"
12279/* confdefs.h. */
12280_ACEOF
12281cat confdefs.h >>conftest.$ac_ext
12282cat >>conftest.$ac_ext <<_ACEOF
12283/* end confdefs.h. */
12284$ac_includes_default
12285int
12286main ()
12287{
12288static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= 0)@:>@;
12289test_array @<:@0@:>@ = 0
12290
12291 ;
12292 return 0;
12293}
12294_ACEOF
12295rm -f conftest.$ac_objext
12296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12297 (eval $ac_compile) 2>&5
12298 ac_status=$?
12299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12300 (exit $ac_status); } &&
12301 { ac_try='test -s conftest.$ac_objext'
12302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12303 (eval $ac_try) 2>&5
12304 ac_status=$?
12305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12306 (exit $ac_status); }; }; then
12307 ac_lo=0 ac_mid=0
12308 while :; do
12309 cat >conftest.$ac_ext <<_ACEOF
12310#line $LINENO "configure"
12311/* confdefs.h. */
12312_ACEOF
12313cat confdefs.h >>conftest.$ac_ext
12314cat >>conftest.$ac_ext <<_ACEOF
12315/* end confdefs.h. */
12316$ac_includes_default
12317int
12318main ()
12319{
12320static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
12321test_array @<:@0@:>@ = 0
12322
12323 ;
12324 return 0;
12325}
12326_ACEOF
12327rm -f conftest.$ac_objext
12328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12329 (eval $ac_compile) 2>&5
12330 ac_status=$?
12331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12332 (exit $ac_status); } &&
12333 { ac_try='test -s conftest.$ac_objext'
12334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12335 (eval $ac_try) 2>&5
12336 ac_status=$?
12337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12338 (exit $ac_status); }; }; then
12339 ac_hi=$ac_mid; break
12340else
12341 echo "$as_me: failed program was:" >&5
12342sed 's/^/| /' conftest.$ac_ext >&5
12343
12344ac_lo=`expr $ac_mid + 1`
12345 if test $ac_lo -le $ac_mid; then
12346 ac_lo= ac_hi=
12347 break
12348 fi
12349 ac_mid=`expr 2 '*' $ac_mid + 1`
12350fi
12351rm -f conftest.$ac_objext conftest.$ac_ext
12352 done
12353else
12354 echo "$as_me: failed program was:" >&5
12355sed 's/^/| /' conftest.$ac_ext >&5
12356
12357cat >conftest.$ac_ext <<_ACEOF
12358#line $LINENO "configure"
12359/* confdefs.h. */
12360_ACEOF
12361cat confdefs.h >>conftest.$ac_ext
12362cat >>conftest.$ac_ext <<_ACEOF
12363/* end confdefs.h. */
12364$ac_includes_default
12365int
12366main ()
12367{
12368static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) < 0)@:>@;
12369test_array @<:@0@:>@ = 0
12370
12371 ;
12372 return 0;
12373}
12374_ACEOF
12375rm -f conftest.$ac_objext
12376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12377 (eval $ac_compile) 2>&5
12378 ac_status=$?
12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12380 (exit $ac_status); } &&
12381 { ac_try='test -s conftest.$ac_objext'
12382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12383 (eval $ac_try) 2>&5
12384 ac_status=$?
12385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12386 (exit $ac_status); }; }; then
12387 ac_hi=-1 ac_mid=-1
12388 while :; do
12389 cat >conftest.$ac_ext <<_ACEOF
12390#line $LINENO "configure"
12391/* confdefs.h. */
12392_ACEOF
12393cat confdefs.h >>conftest.$ac_ext
12394cat >>conftest.$ac_ext <<_ACEOF
12395/* end confdefs.h. */
12396$ac_includes_default
12397int
12398main ()
12399{
12400static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)@:>@;
12401test_array @<:@0@:>@ = 0
12402
12403 ;
12404 return 0;
12405}
12406_ACEOF
12407rm -f conftest.$ac_objext
12408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12409 (eval $ac_compile) 2>&5
12410 ac_status=$?
12411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12412 (exit $ac_status); } &&
12413 { ac_try='test -s conftest.$ac_objext'
12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); }; }; then
12419 ac_lo=$ac_mid; break
12420else
12421 echo "$as_me: failed program was:" >&5
12422sed 's/^/| /' conftest.$ac_ext >&5
12423
12424ac_hi=`expr '(' $ac_mid ')' - 1`
12425 if test $ac_mid -le $ac_hi; then
12426 ac_lo= ac_hi=
12427 break
12428 fi
12429 ac_mid=`expr 2 '*' $ac_mid`
12430fi
12431rm -f conftest.$ac_objext conftest.$ac_ext
12432 done
12433else
12434 echo "$as_me: failed program was:" >&5
12435sed 's/^/| /' conftest.$ac_ext >&5
12436
12437ac_lo= ac_hi=
12438fi
12439rm -f conftest.$ac_objext conftest.$ac_ext
12440fi
12441rm -f conftest.$ac_objext conftest.$ac_ext
12442# Binary search between lo and hi bounds.
12443while test "x$ac_lo" != "x$ac_hi"; do
12444 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12445 cat >conftest.$ac_ext <<_ACEOF
12446#line $LINENO "configure"
12447/* confdefs.h. */
12448_ACEOF
12449cat confdefs.h >>conftest.$ac_ext
12450cat >>conftest.$ac_ext <<_ACEOF
12451/* end confdefs.h. */
12452$ac_includes_default
12453int
12454main ()
12455{
12456static int test_array @<:@1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)@:>@;
12457test_array @<:@0@:>@ = 0
12458
12459 ;
12460 return 0;
12461}
12462_ACEOF
12463rm -f conftest.$ac_objext
12464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12465 (eval $ac_compile) 2>&5
12466 ac_status=$?
12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468 (exit $ac_status); } &&
12469 { ac_try='test -s conftest.$ac_objext'
12470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12471 (eval $ac_try) 2>&5
12472 ac_status=$?
12473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474 (exit $ac_status); }; }; then
12475 ac_hi=$ac_mid
12476else
12477 echo "$as_me: failed program was:" >&5
12478sed 's/^/| /' conftest.$ac_ext >&5
12479
12480ac_lo=`expr '(' $ac_mid ')' + 1`
12481fi
12482rm -f conftest.$ac_objext conftest.$ac_ext
12483done
12484case $ac_lo in
12485?*) ac_cv_sizeof_long_long_int=$ac_lo;;
12486'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
12487See \`config.log' for more details." >&5
12488echo "$as_me: error: cannot compute sizeof (long long int), 77
12489See \`config.log' for more details." >&2;}
12490 { (exit 1); exit 1; }; } ;;
12491esac
12492else
12493 if test "$cross_compiling" = yes; then
12494 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12495See \`config.log' for more details." >&5
12496echo "$as_me: error: cannot run test program while cross compiling
12497See \`config.log' for more details." >&2;}
12498 { (exit 1); exit 1; }; }
12499else
12500 cat >conftest.$ac_ext <<_ACEOF
12501#line $LINENO "configure"
12502/* confdefs.h. */
12503_ACEOF
12504cat confdefs.h >>conftest.$ac_ext
12505cat >>conftest.$ac_ext <<_ACEOF
12506/* end confdefs.h. */
12507$ac_includes_default
12508long longval () { return (long) (sizeof (long long int)); }
12509unsigned long ulongval () { return (long) (sizeof (long long int)); }
12510@%:@include <stdio.h>
12511@%:@include <stdlib.h>
12512int
12513main ()
12514{
12515
12516 FILE *f = fopen ("conftest.val", "w");
12517 if (! f)
12518 exit (1);
12519 if (((long) (sizeof (long long int))) < 0)
12520 {
12521 long i = longval ();
12522 if (i != ((long) (sizeof (long long int))))
12523 exit (1);
12524 fprintf (f, "%ld\n", i);
12525 }
12526 else
12527 {
12528 unsigned long i = ulongval ();
12529 if (i != ((long) (sizeof (long long int))))
12530 exit (1);
12531 fprintf (f, "%lu\n", i);
12532 }
12533 exit (ferror (f) || fclose (f) != 0);
12534
12535 ;
12536 return 0;
12537}
12538_ACEOF
12539rm -f conftest$ac_exeext
12540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12541 (eval $ac_link) 2>&5
12542 ac_status=$?
12543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12546 (eval $ac_try) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); }; }; then
12550 ac_cv_sizeof_long_long_int=`cat conftest.val`
12551else
12552 echo "$as_me: program exited with status $ac_status" >&5
12553echo "$as_me: failed program was:" >&5
12554sed 's/^/| /' conftest.$ac_ext >&5
12555
12556( exit $ac_status )
12557{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
12558See \`config.log' for more details." >&5
12559echo "$as_me: error: cannot compute sizeof (long long int), 77
12560See \`config.log' for more details." >&2;}
12561 { (exit 1); exit 1; }; }
12562fi
12563rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12564fi
12565fi
12566rm -f conftest.val
12567else
12568 ac_cv_sizeof_long_long_int=0
12569fi
12570fi
12571echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
12572echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
12573cat >>confdefs.h <<_ACEOF
12574@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
12575_ACEOF
12576
12577
12578
12579# Sanity check long long for some platforms (AIX)
12580if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
12581 ac_cv_sizeof_long_long_int=0
12582fi
12583
12584# More checks for data types
12585echo "$as_me:$LINENO: checking for u_int type" >&5
12586echo $ECHO_N "checking for u_int type... $ECHO_C" >&6
12587if test "${ac_cv_have_u_int+set}" = set; then
12588 echo $ECHO_N "(cached) $ECHO_C" >&6
12589else
12590
12591 cat >conftest.$ac_ext <<_ACEOF
12592#line $LINENO "configure"
12593/* confdefs.h. */
12594_ACEOF
12595cat confdefs.h >>conftest.$ac_ext
12596cat >>conftest.$ac_ext <<_ACEOF
12597/* end confdefs.h. */
12598 #include <sys/types.h>
12599int
12600main ()
12601{
12602 u_int a; a = 1;
12603 ;
12604 return 0;
12605}
12606_ACEOF
12607rm -f conftest.$ac_objext
12608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12609 (eval $ac_compile) 2>&5
12610 ac_status=$?
12611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12612 (exit $ac_status); } &&
12613 { ac_try='test -s conftest.$ac_objext'
12614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12615 (eval $ac_try) 2>&5
12616 ac_status=$?
12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); }; }; then
12619 ac_cv_have_u_int="yes"
12620else
12621 echo "$as_me: failed program was:" >&5
12622sed 's/^/| /' conftest.$ac_ext >&5
12623
12624 ac_cv_have_u_int="no"
12625
12626fi
12627rm -f conftest.$ac_objext conftest.$ac_ext
12628
12629fi
12630echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5
12631echo "${ECHO_T}$ac_cv_have_u_int" >&6
12632if test "x$ac_cv_have_u_int" = "xyes" ; then
12633 cat >>confdefs.h <<\_ACEOF
12634@%:@define HAVE_U_INT 1
12635_ACEOF
12636
12637 have_u_int=1
12638fi
12639
12640echo "$as_me:$LINENO: checking for intXX_t types" >&5
12641echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6
12642if test "${ac_cv_have_intxx_t+set}" = set; then
12643 echo $ECHO_N "(cached) $ECHO_C" >&6
12644else
12645
12646 cat >conftest.$ac_ext <<_ACEOF
12647#line $LINENO "configure"
12648/* confdefs.h. */
12649_ACEOF
12650cat confdefs.h >>conftest.$ac_ext
12651cat >>conftest.$ac_ext <<_ACEOF
12652/* end confdefs.h. */
12653 #include <sys/types.h>
12654int
12655main ()
12656{
12657 int8_t a; int16_t b; int32_t c; a = b = c = 1;
12658 ;
12659 return 0;
12660}
12661_ACEOF
12662rm -f conftest.$ac_objext
12663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12664 (eval $ac_compile) 2>&5
12665 ac_status=$?
12666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667 (exit $ac_status); } &&
12668 { ac_try='test -s conftest.$ac_objext'
12669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12670 (eval $ac_try) 2>&5
12671 ac_status=$?
12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673 (exit $ac_status); }; }; then
12674 ac_cv_have_intxx_t="yes"
12675else
12676 echo "$as_me: failed program was:" >&5
12677sed 's/^/| /' conftest.$ac_ext >&5
12678
12679 ac_cv_have_intxx_t="no"
12680
12681fi
12682rm -f conftest.$ac_objext conftest.$ac_ext
12683
12684fi
12685echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5
12686echo "${ECHO_T}$ac_cv_have_intxx_t" >&6
12687if test "x$ac_cv_have_intxx_t" = "xyes" ; then
12688 cat >>confdefs.h <<\_ACEOF
12689@%:@define HAVE_INTXX_T 1
12690_ACEOF
12691
12692 have_intxx_t=1
12693fi
12694
12695if (test -z "$have_intxx_t" && \
12696 test "x$ac_cv_header_stdint_h" = "xyes")
12697then
12698 echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5
12699echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6
12700 cat >conftest.$ac_ext <<_ACEOF
12701#line $LINENO "configure"
12702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
12707 #include <stdint.h>
12708int
12709main ()
12710{
12711 int8_t a; int16_t b; int32_t c; a = b = c = 1;
12712 ;
12713 return 0;
12714}
12715_ACEOF
12716rm -f conftest.$ac_objext
12717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12718 (eval $ac_compile) 2>&5
12719 ac_status=$?
12720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12721 (exit $ac_status); } &&
12722 { ac_try='test -s conftest.$ac_objext'
12723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12724 (eval $ac_try) 2>&5
12725 ac_status=$?
12726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12727 (exit $ac_status); }; }; then
12728
12729 cat >>confdefs.h <<\_ACEOF
12730@%:@define HAVE_INTXX_T 1
12731_ACEOF
12732
12733 echo "$as_me:$LINENO: result: yes" >&5
12734echo "${ECHO_T}yes" >&6
12735
12736else
12737 echo "$as_me: failed program was:" >&5
12738sed 's/^/| /' conftest.$ac_ext >&5
12739
12740 echo "$as_me:$LINENO: result: no" >&5
12741echo "${ECHO_T}no" >&6
12742
12743fi
12744rm -f conftest.$ac_objext conftest.$ac_ext
12745fi
12746
12747echo "$as_me:$LINENO: checking for int64_t type" >&5
12748echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6
12749if test "${ac_cv_have_int64_t+set}" = set; then
12750 echo $ECHO_N "(cached) $ECHO_C" >&6
12751else
12752
12753 cat >conftest.$ac_ext <<_ACEOF
12754#line $LINENO "configure"
12755/* confdefs.h. */
12756_ACEOF
12757cat confdefs.h >>conftest.$ac_ext
12758cat >>conftest.$ac_ext <<_ACEOF
12759/* end confdefs.h. */
12760
12761#include <sys/types.h>
12762#ifdef HAVE_STDINT_H
12763# include <stdint.h>
12764#endif
12765#include <sys/socket.h>
12766#ifdef HAVE_SYS_BITYPES_H
12767# include <sys/bitypes.h>
12768#endif
12769
12770int
12771main ()
12772{
12773 int64_t a; a = 1;
12774 ;
12775 return 0;
12776}
12777_ACEOF
12778rm -f conftest.$ac_objext
12779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12780 (eval $ac_compile) 2>&5
12781 ac_status=$?
12782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783 (exit $ac_status); } &&
12784 { ac_try='test -s conftest.$ac_objext'
12785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12786 (eval $ac_try) 2>&5
12787 ac_status=$?
12788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12789 (exit $ac_status); }; }; then
12790 ac_cv_have_int64_t="yes"
12791else
12792 echo "$as_me: failed program was:" >&5
12793sed 's/^/| /' conftest.$ac_ext >&5
12794
12795 ac_cv_have_int64_t="no"
12796
12797fi
12798rm -f conftest.$ac_objext conftest.$ac_ext
12799
12800fi
12801echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5
12802echo "${ECHO_T}$ac_cv_have_int64_t" >&6
12803if test "x$ac_cv_have_int64_t" = "xyes" ; then
12804 cat >>confdefs.h <<\_ACEOF
12805@%:@define HAVE_INT64_T 1
12806_ACEOF
12807
12808fi
12809
12810echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
12811echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6
12812if test "${ac_cv_have_u_intxx_t+set}" = set; then
12813 echo $ECHO_N "(cached) $ECHO_C" >&6
12814else
12815
12816 cat >conftest.$ac_ext <<_ACEOF
12817#line $LINENO "configure"
12818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
12823 #include <sys/types.h>
12824int
12825main ()
12826{
12827 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
12828 ;
12829 return 0;
12830}
12831_ACEOF
12832rm -f conftest.$ac_objext
12833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12834 (eval $ac_compile) 2>&5
12835 ac_status=$?
12836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837 (exit $ac_status); } &&
12838 { ac_try='test -s conftest.$ac_objext'
12839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12840 (eval $ac_try) 2>&5
12841 ac_status=$?
12842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12843 (exit $ac_status); }; }; then
12844 ac_cv_have_u_intxx_t="yes"
12845else
12846 echo "$as_me: failed program was:" >&5
12847sed 's/^/| /' conftest.$ac_ext >&5
12848
12849 ac_cv_have_u_intxx_t="no"
12850
12851fi
12852rm -f conftest.$ac_objext conftest.$ac_ext
12853
12854fi
12855echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5
12856echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6
12857if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
12858 cat >>confdefs.h <<\_ACEOF
12859@%:@define HAVE_U_INTXX_T 1
12860_ACEOF
12861
12862 have_u_intxx_t=1
12863fi
12864
12865if test -z "$have_u_intxx_t" ; then
12866 echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5
12867echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6
12868 cat >conftest.$ac_ext <<_ACEOF
12869#line $LINENO "configure"
12870/* confdefs.h. */
12871_ACEOF
12872cat confdefs.h >>conftest.$ac_ext
12873cat >>conftest.$ac_ext <<_ACEOF
12874/* end confdefs.h. */
12875 #include <sys/socket.h>
12876int
12877main ()
12878{
12879 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
12880 ;
12881 return 0;
12882}
12883_ACEOF
12884rm -f conftest.$ac_objext
12885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12886 (eval $ac_compile) 2>&5
12887 ac_status=$?
12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); } &&
12890 { ac_try='test -s conftest.$ac_objext'
12891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12892 (eval $ac_try) 2>&5
12893 ac_status=$?
12894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12895 (exit $ac_status); }; }; then
12896
12897 cat >>confdefs.h <<\_ACEOF
12898@%:@define HAVE_U_INTXX_T 1
12899_ACEOF
12900
12901 echo "$as_me:$LINENO: result: yes" >&5
12902echo "${ECHO_T}yes" >&6
12903
12904else
12905 echo "$as_me: failed program was:" >&5
12906sed 's/^/| /' conftest.$ac_ext >&5
12907
12908 echo "$as_me:$LINENO: result: no" >&5
12909echo "${ECHO_T}no" >&6
12910
12911fi
12912rm -f conftest.$ac_objext conftest.$ac_ext
12913fi
12914
12915echo "$as_me:$LINENO: checking for u_int64_t types" >&5
12916echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6
12917if test "${ac_cv_have_u_int64_t+set}" = set; then
12918 echo $ECHO_N "(cached) $ECHO_C" >&6
12919else
12920
12921 cat >conftest.$ac_ext <<_ACEOF
12922#line $LINENO "configure"
12923/* confdefs.h. */
12924_ACEOF
12925cat confdefs.h >>conftest.$ac_ext
12926cat >>conftest.$ac_ext <<_ACEOF
12927/* end confdefs.h. */
12928 #include <sys/types.h>
12929int
12930main ()
12931{
12932 u_int64_t a; a = 1;
12933 ;
12934 return 0;
12935}
12936_ACEOF
12937rm -f conftest.$ac_objext
12938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12939 (eval $ac_compile) 2>&5
12940 ac_status=$?
12941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942 (exit $ac_status); } &&
12943 { ac_try='test -s conftest.$ac_objext'
12944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12945 (eval $ac_try) 2>&5
12946 ac_status=$?
12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12948 (exit $ac_status); }; }; then
12949 ac_cv_have_u_int64_t="yes"
12950else
12951 echo "$as_me: failed program was:" >&5
12952sed 's/^/| /' conftest.$ac_ext >&5
12953
12954 ac_cv_have_u_int64_t="no"
12955
12956fi
12957rm -f conftest.$ac_objext conftest.$ac_ext
12958
12959fi
12960echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5
12961echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6
12962if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
12963 cat >>confdefs.h <<\_ACEOF
12964@%:@define HAVE_U_INT64_T 1
12965_ACEOF
12966
12967 have_u_int64_t=1
12968fi
12969
12970if test -z "$have_u_int64_t" ; then
12971 echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5
12972echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6
12973 cat >conftest.$ac_ext <<_ACEOF
12974#line $LINENO "configure"
12975/* confdefs.h. */
12976_ACEOF
12977cat confdefs.h >>conftest.$ac_ext
12978cat >>conftest.$ac_ext <<_ACEOF
12979/* end confdefs.h. */
12980 #include <sys/bitypes.h>
12981int
12982main ()
12983{
12984 u_int64_t a; a = 1
12985 ;
12986 return 0;
12987}
12988_ACEOF
12989rm -f conftest.$ac_objext
12990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12991 (eval $ac_compile) 2>&5
12992 ac_status=$?
12993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994 (exit $ac_status); } &&
12995 { ac_try='test -s conftest.$ac_objext'
12996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12997 (eval $ac_try) 2>&5
12998 ac_status=$?
12999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13000 (exit $ac_status); }; }; then
13001
13002 cat >>confdefs.h <<\_ACEOF
13003@%:@define HAVE_U_INT64_T 1
13004_ACEOF
13005
13006 echo "$as_me:$LINENO: result: yes" >&5
13007echo "${ECHO_T}yes" >&6
13008
13009else
13010 echo "$as_me: failed program was:" >&5
13011sed 's/^/| /' conftest.$ac_ext >&5
13012
13013 echo "$as_me:$LINENO: result: no" >&5
13014echo "${ECHO_T}no" >&6
13015
13016fi
13017rm -f conftest.$ac_objext conftest.$ac_ext
13018fi
13019
13020if test -z "$have_u_intxx_t" ; then
13021 echo "$as_me:$LINENO: checking for uintXX_t types" >&5
13022echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6
13023if test "${ac_cv_have_uintxx_t+set}" = set; then
13024 echo $ECHO_N "(cached) $ECHO_C" >&6
13025else
13026
13027 cat >conftest.$ac_ext <<_ACEOF
13028#line $LINENO "configure"
13029/* confdefs.h. */
13030_ACEOF
13031cat confdefs.h >>conftest.$ac_ext
13032cat >>conftest.$ac_ext <<_ACEOF
13033/* end confdefs.h. */
13034
13035#include <sys/types.h>
13036
13037int
13038main ()
13039{
13040 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
13041 ;
13042 return 0;
13043}
13044_ACEOF
13045rm -f conftest.$ac_objext
13046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13047 (eval $ac_compile) 2>&5
13048 ac_status=$?
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); } &&
13051 { ac_try='test -s conftest.$ac_objext'
13052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13053 (eval $ac_try) 2>&5
13054 ac_status=$?
13055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13056 (exit $ac_status); }; }; then
13057 ac_cv_have_uintxx_t="yes"
13058else
13059 echo "$as_me: failed program was:" >&5
13060sed 's/^/| /' conftest.$ac_ext >&5
13061
13062 ac_cv_have_uintxx_t="no"
13063
13064fi
13065rm -f conftest.$ac_objext conftest.$ac_ext
13066
13067fi
13068echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5
13069echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6
13070 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
13071 cat >>confdefs.h <<\_ACEOF
13072@%:@define HAVE_UINTXX_T 1
13073_ACEOF
13074
13075 fi
13076fi
13077
13078if test -z "$have_uintxx_t" ; then
13079 echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5
13080echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6
13081 cat >conftest.$ac_ext <<_ACEOF
13082#line $LINENO "configure"
13083/* confdefs.h. */
13084_ACEOF
13085cat confdefs.h >>conftest.$ac_ext
13086cat >>conftest.$ac_ext <<_ACEOF
13087/* end confdefs.h. */
13088 #include <stdint.h>
13089int
13090main ()
13091{
13092 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
13093 ;
13094 return 0;
13095}
13096_ACEOF
13097rm -f conftest.$ac_objext
13098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13099 (eval $ac_compile) 2>&5
13100 ac_status=$?
13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13102 (exit $ac_status); } &&
13103 { ac_try='test -s conftest.$ac_objext'
13104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13105 (eval $ac_try) 2>&5
13106 ac_status=$?
13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); }; }; then
13109
13110 cat >>confdefs.h <<\_ACEOF
13111@%:@define HAVE_UINTXX_T 1
13112_ACEOF
13113
13114 echo "$as_me:$LINENO: result: yes" >&5
13115echo "${ECHO_T}yes" >&6
13116
13117else
13118 echo "$as_me: failed program was:" >&5
13119sed 's/^/| /' conftest.$ac_ext >&5
13120
13121 echo "$as_me:$LINENO: result: no" >&5
13122echo "${ECHO_T}no" >&6
13123
13124fi
13125rm -f conftest.$ac_objext conftest.$ac_ext
13126fi
13127
13128if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
13129 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
13130then
13131 echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
13132echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6
13133 cat >conftest.$ac_ext <<_ACEOF
13134#line $LINENO "configure"
13135/* confdefs.h. */
13136_ACEOF
13137cat confdefs.h >>conftest.$ac_ext
13138cat >>conftest.$ac_ext <<_ACEOF
13139/* end confdefs.h. */
13140
13141#include <sys/bitypes.h>
13142
13143int
13144main ()
13145{
13146
13147 int8_t a; int16_t b; int32_t c;
13148 u_int8_t e; u_int16_t f; u_int32_t g;
13149 a = b = c = e = f = g = 1;
13150
13151 ;
13152 return 0;
13153}
13154_ACEOF
13155rm -f conftest.$ac_objext
13156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13157 (eval $ac_compile) 2>&5
13158 ac_status=$?
13159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13160 (exit $ac_status); } &&
13161 { ac_try='test -s conftest.$ac_objext'
13162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13163 (eval $ac_try) 2>&5
13164 ac_status=$?
13165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13166 (exit $ac_status); }; }; then
13167
13168 cat >>confdefs.h <<\_ACEOF
13169@%:@define HAVE_U_INTXX_T 1
13170_ACEOF
13171
13172 cat >>confdefs.h <<\_ACEOF
13173@%:@define HAVE_INTXX_T 1
13174_ACEOF
13175
13176 echo "$as_me:$LINENO: result: yes" >&5
13177echo "${ECHO_T}yes" >&6
13178
13179else
13180 echo "$as_me: failed program was:" >&5
13181sed 's/^/| /' conftest.$ac_ext >&5
13182
13183echo "$as_me:$LINENO: result: no" >&5
13184echo "${ECHO_T}no" >&6
13185
13186fi
13187rm -f conftest.$ac_objext conftest.$ac_ext
13188fi
13189
13190
13191echo "$as_me:$LINENO: checking for u_char" >&5
13192echo $ECHO_N "checking for u_char... $ECHO_C" >&6
13193if test "${ac_cv_have_u_char+set}" = set; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
13195else
13196
13197 cat >conftest.$ac_ext <<_ACEOF
13198#line $LINENO "configure"
13199/* confdefs.h. */
13200_ACEOF
13201cat confdefs.h >>conftest.$ac_ext
13202cat >>conftest.$ac_ext <<_ACEOF
13203/* end confdefs.h. */
13204
13205#include <sys/types.h>
13206
13207int
13208main ()
13209{
13210 u_char foo; foo = 125;
13211 ;
13212 return 0;
13213}
13214_ACEOF
13215rm -f conftest.$ac_objext
13216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13217 (eval $ac_compile) 2>&5
13218 ac_status=$?
13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220 (exit $ac_status); } &&
13221 { ac_try='test -s conftest.$ac_objext'
13222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13223 (eval $ac_try) 2>&5
13224 ac_status=$?
13225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13226 (exit $ac_status); }; }; then
13227 ac_cv_have_u_char="yes"
13228else
13229 echo "$as_me: failed program was:" >&5
13230sed 's/^/| /' conftest.$ac_ext >&5
13231
13232 ac_cv_have_u_char="no"
13233
13234fi
13235rm -f conftest.$ac_objext conftest.$ac_ext
13236
13237fi
13238echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5
13239echo "${ECHO_T}$ac_cv_have_u_char" >&6
13240if test "x$ac_cv_have_u_char" = "xyes" ; then
13241 cat >>confdefs.h <<\_ACEOF
13242@%:@define HAVE_U_CHAR 1
13243_ACEOF
13244
13245fi
13246
13247
13248 echo "$as_me:$LINENO: checking for socklen_t" >&5
13249echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
13250if test "${ac_cv_type_socklen_t+set}" = set; then
13251 echo $ECHO_N "(cached) $ECHO_C" >&6
13252else
13253 cat >conftest.$ac_ext <<_ACEOF
13254#line $LINENO "configure"
13255/* confdefs.h. */
13256_ACEOF
13257cat confdefs.h >>conftest.$ac_ext
13258cat >>conftest.$ac_ext <<_ACEOF
13259/* end confdefs.h. */
13260#include <sys/types.h>
13261#include <sys/socket.h>
13262
13263int
13264main ()
13265{
13266if ((socklen_t *) 0)
13267 return 0;
13268if (sizeof (socklen_t))
13269 return 0;
13270 ;
13271 return 0;
13272}
13273_ACEOF
13274rm -f conftest.$ac_objext
13275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13276 (eval $ac_compile) 2>&5
13277 ac_status=$?
13278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13279 (exit $ac_status); } &&
13280 { ac_try='test -s conftest.$ac_objext'
13281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13282 (eval $ac_try) 2>&5
13283 ac_status=$?
13284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285 (exit $ac_status); }; }; then
13286 ac_cv_type_socklen_t=yes
13287else
13288 echo "$as_me: failed program was:" >&5
13289sed 's/^/| /' conftest.$ac_ext >&5
13290
13291ac_cv_type_socklen_t=no
13292fi
13293rm -f conftest.$ac_objext conftest.$ac_ext
13294fi
13295echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
13296echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
13297if test $ac_cv_type_socklen_t = yes; then
13298 :
13299else
13300
13301 echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
13302echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6
13303 if test "${curl_cv_socklen_t_equiv+set}" = set; then
13304 echo $ECHO_N "(cached) $ECHO_C" >&6
13305else
13306
13307 # Systems have either "struct sockaddr *" or
13308 # "void *" as the second argument to getpeername
13309 curl_cv_socklen_t_equiv=
13310 for arg2 in "struct sockaddr" void; do
13311 for t in int size_t unsigned long "unsigned long"; do
13312 cat >conftest.$ac_ext <<_ACEOF
13313#line $LINENO "configure"
13314/* confdefs.h. */
13315_ACEOF
13316cat confdefs.h >>conftest.$ac_ext
13317cat >>conftest.$ac_ext <<_ACEOF
13318/* end confdefs.h. */
13319
13320 #include <sys/types.h>
13321 #include <sys/socket.h>
13322
13323 int getpeername (int, $arg2 *, $t *);
13324
13325int
13326main ()
13327{
13328
13329 $t len;
13330 getpeername(0,0,&len);
13331
13332 ;
13333 return 0;
13334}
13335_ACEOF
13336rm -f conftest.$ac_objext
13337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13338 (eval $ac_compile) 2>&5
13339 ac_status=$?
13340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13341 (exit $ac_status); } &&
13342 { ac_try='test -s conftest.$ac_objext'
13343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13344 (eval $ac_try) 2>&5
13345 ac_status=$?
13346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13347 (exit $ac_status); }; }; then
13348
13349 curl_cv_socklen_t_equiv="$t"
13350 break
13351
13352else
13353 echo "$as_me: failed program was:" >&5
13354sed 's/^/| /' conftest.$ac_ext >&5
13355
13356fi
13357rm -f conftest.$ac_objext conftest.$ac_ext
13358 done
13359 done
13360
13361 if test "x$curl_cv_socklen_t_equiv" = x; then
13362 { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5
13363echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
13364 { (exit 1); exit 1; }; }
13365 fi
13366
13367fi
13368
13369 echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
13370echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6
13371
13372cat >>confdefs.h <<_ACEOF
13373@%:@define socklen_t $curl_cv_socklen_t_equiv
13374_ACEOF
13375
13376fi
13377
13378
13379
13380echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
13381echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
13382if test "${ac_cv_type_sig_atomic_t+set}" = set; then
13383 echo $ECHO_N "(cached) $ECHO_C" >&6
13384else
13385 cat >conftest.$ac_ext <<_ACEOF
13386#line $LINENO "configure"
13387/* confdefs.h. */
13388_ACEOF
13389cat confdefs.h >>conftest.$ac_ext
13390cat >>conftest.$ac_ext <<_ACEOF
13391/* end confdefs.h. */
13392#include <signal.h>
13393
13394int
13395main ()
13396{
13397if ((sig_atomic_t *) 0)
13398 return 0;
13399if (sizeof (sig_atomic_t))
13400 return 0;
13401 ;
13402 return 0;
13403}
13404_ACEOF
13405rm -f conftest.$ac_objext
13406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13407 (eval $ac_compile) 2>&5
13408 ac_status=$?
13409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13410 (exit $ac_status); } &&
13411 { ac_try='test -s conftest.$ac_objext'
13412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13413 (eval $ac_try) 2>&5
13414 ac_status=$?
13415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13416 (exit $ac_status); }; }; then
13417 ac_cv_type_sig_atomic_t=yes
13418else
13419 echo "$as_me: failed program was:" >&5
13420sed 's/^/| /' conftest.$ac_ext >&5
13421
13422ac_cv_type_sig_atomic_t=no
13423fi
13424rm -f conftest.$ac_objext conftest.$ac_ext
13425fi
13426echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
13427echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
13428if test $ac_cv_type_sig_atomic_t = yes; then
13429
13430cat >>confdefs.h <<_ACEOF
13431@%:@define HAVE_SIG_ATOMIC_T 1
13432_ACEOF
13433
13434
13435fi
13436
13437
13438echo "$as_me:$LINENO: checking for size_t" >&5
13439echo $ECHO_N "checking for size_t... $ECHO_C" >&6
13440if test "${ac_cv_have_size_t+set}" = set; then
13441 echo $ECHO_N "(cached) $ECHO_C" >&6
13442else
13443
13444 cat >conftest.$ac_ext <<_ACEOF
13445#line $LINENO "configure"
13446/* confdefs.h. */
13447_ACEOF
13448cat confdefs.h >>conftest.$ac_ext
13449cat >>conftest.$ac_ext <<_ACEOF
13450/* end confdefs.h. */
13451
13452#include <sys/types.h>
13453
13454int
13455main ()
13456{
13457 size_t foo; foo = 1235;
13458 ;
13459 return 0;
13460}
13461_ACEOF
13462rm -f conftest.$ac_objext
13463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13464 (eval $ac_compile) 2>&5
13465 ac_status=$?
13466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13467 (exit $ac_status); } &&
13468 { ac_try='test -s conftest.$ac_objext'
13469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13470 (eval $ac_try) 2>&5
13471 ac_status=$?
13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473 (exit $ac_status); }; }; then
13474 ac_cv_have_size_t="yes"
13475else
13476 echo "$as_me: failed program was:" >&5
13477sed 's/^/| /' conftest.$ac_ext >&5
13478
13479 ac_cv_have_size_t="no"
13480
13481fi
13482rm -f conftest.$ac_objext conftest.$ac_ext
13483
13484fi
13485echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5
13486echo "${ECHO_T}$ac_cv_have_size_t" >&6
13487if test "x$ac_cv_have_size_t" = "xyes" ; then
13488 cat >>confdefs.h <<\_ACEOF
13489@%:@define HAVE_SIZE_T 1
13490_ACEOF
13491
13492fi
13493
13494echo "$as_me:$LINENO: checking for ssize_t" >&5
13495echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
13496if test "${ac_cv_have_ssize_t+set}" = set; then
13497 echo $ECHO_N "(cached) $ECHO_C" >&6
13498else
13499
13500 cat >conftest.$ac_ext <<_ACEOF
13501#line $LINENO "configure"
13502/* confdefs.h. */
13503_ACEOF
13504cat confdefs.h >>conftest.$ac_ext
13505cat >>conftest.$ac_ext <<_ACEOF
13506/* end confdefs.h. */
13507
13508#include <sys/types.h>
13509
13510int
13511main ()
13512{
13513 ssize_t foo; foo = 1235;
13514 ;
13515 return 0;
13516}
13517_ACEOF
13518rm -f conftest.$ac_objext
13519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13520 (eval $ac_compile) 2>&5
13521 ac_status=$?
13522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523 (exit $ac_status); } &&
13524 { ac_try='test -s conftest.$ac_objext'
13525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13526 (eval $ac_try) 2>&5
13527 ac_status=$?
13528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13529 (exit $ac_status); }; }; then
13530 ac_cv_have_ssize_t="yes"
13531else
13532 echo "$as_me: failed program was:" >&5
13533sed 's/^/| /' conftest.$ac_ext >&5
13534
13535 ac_cv_have_ssize_t="no"
13536
13537fi
13538rm -f conftest.$ac_objext conftest.$ac_ext
13539
13540fi
13541echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5
13542echo "${ECHO_T}$ac_cv_have_ssize_t" >&6
13543if test "x$ac_cv_have_ssize_t" = "xyes" ; then
13544 cat >>confdefs.h <<\_ACEOF
13545@%:@define HAVE_SSIZE_T 1
13546_ACEOF
13547
13548fi
13549
13550echo "$as_me:$LINENO: checking for clock_t" >&5
13551echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
13552if test "${ac_cv_have_clock_t+set}" = set; then
13553 echo $ECHO_N "(cached) $ECHO_C" >&6
13554else
13555
13556 cat >conftest.$ac_ext <<_ACEOF
13557#line $LINENO "configure"
13558/* confdefs.h. */
13559_ACEOF
13560cat confdefs.h >>conftest.$ac_ext
13561cat >>conftest.$ac_ext <<_ACEOF
13562/* end confdefs.h. */
13563
13564#include <time.h>
13565
13566int
13567main ()
13568{
13569 clock_t foo; foo = 1235;
13570 ;
13571 return 0;
13572}
13573_ACEOF
13574rm -f conftest.$ac_objext
13575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13576 (eval $ac_compile) 2>&5
13577 ac_status=$?
13578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579 (exit $ac_status); } &&
13580 { ac_try='test -s conftest.$ac_objext'
13581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13582 (eval $ac_try) 2>&5
13583 ac_status=$?
13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585 (exit $ac_status); }; }; then
13586 ac_cv_have_clock_t="yes"
13587else
13588 echo "$as_me: failed program was:" >&5
13589sed 's/^/| /' conftest.$ac_ext >&5
13590
13591 ac_cv_have_clock_t="no"
13592
13593fi
13594rm -f conftest.$ac_objext conftest.$ac_ext
13595
13596fi
13597echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5
13598echo "${ECHO_T}$ac_cv_have_clock_t" >&6
13599if test "x$ac_cv_have_clock_t" = "xyes" ; then
13600 cat >>confdefs.h <<\_ACEOF
13601@%:@define HAVE_CLOCK_T 1
13602_ACEOF
13603
13604fi
13605
13606echo "$as_me:$LINENO: checking for sa_family_t" >&5
13607echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6
13608if test "${ac_cv_have_sa_family_t+set}" = set; then
13609 echo $ECHO_N "(cached) $ECHO_C" >&6
13610else
13611
13612 cat >conftest.$ac_ext <<_ACEOF
13613#line $LINENO "configure"
13614/* confdefs.h. */
13615_ACEOF
13616cat confdefs.h >>conftest.$ac_ext
13617cat >>conftest.$ac_ext <<_ACEOF
13618/* end confdefs.h. */
13619
13620#include <sys/types.h>
13621#include <sys/socket.h>
13622
13623int
13624main ()
13625{
13626 sa_family_t foo; foo = 1235;
13627 ;
13628 return 0;
13629}
13630_ACEOF
13631rm -f conftest.$ac_objext
13632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13633 (eval $ac_compile) 2>&5
13634 ac_status=$?
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); } &&
13637 { ac_try='test -s conftest.$ac_objext'
13638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13639 (eval $ac_try) 2>&5
13640 ac_status=$?
13641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13642 (exit $ac_status); }; }; then
13643 ac_cv_have_sa_family_t="yes"
13644else
13645 echo "$as_me: failed program was:" >&5
13646sed 's/^/| /' conftest.$ac_ext >&5
13647
13648 cat >conftest.$ac_ext <<_ACEOF
13649#line $LINENO "configure"
13650/* confdefs.h. */
13651_ACEOF
13652cat confdefs.h >>conftest.$ac_ext
13653cat >>conftest.$ac_ext <<_ACEOF
13654/* end confdefs.h. */
13655
13656#include <sys/types.h>
13657#include <sys/socket.h>
13658#include <netinet/in.h>
13659
13660int
13661main ()
13662{
13663 sa_family_t foo; foo = 1235;
13664 ;
13665 return 0;
13666}
13667_ACEOF
13668rm -f conftest.$ac_objext
13669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13670 (eval $ac_compile) 2>&5
13671 ac_status=$?
13672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673 (exit $ac_status); } &&
13674 { ac_try='test -s conftest.$ac_objext'
13675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13676 (eval $ac_try) 2>&5
13677 ac_status=$?
13678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679 (exit $ac_status); }; }; then
13680 ac_cv_have_sa_family_t="yes"
13681else
13682 echo "$as_me: failed program was:" >&5
13683sed 's/^/| /' conftest.$ac_ext >&5
13684
13685 ac_cv_have_sa_family_t="no"
13686
13687fi
13688rm -f conftest.$ac_objext conftest.$ac_ext
13689
13690fi
13691rm -f conftest.$ac_objext conftest.$ac_ext
13692
13693fi
13694echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5
13695echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6
13696if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
13697 cat >>confdefs.h <<\_ACEOF
13698@%:@define HAVE_SA_FAMILY_T 1
13699_ACEOF
13700
13701fi
13702
13703echo "$as_me:$LINENO: checking for pid_t" >&5
13704echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
13705if test "${ac_cv_have_pid_t+set}" = set; then
13706 echo $ECHO_N "(cached) $ECHO_C" >&6
13707else
13708
13709 cat >conftest.$ac_ext <<_ACEOF
13710#line $LINENO "configure"
13711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
13716
13717#include <sys/types.h>
13718
13719int
13720main ()
13721{
13722 pid_t foo; foo = 1235;
13723 ;
13724 return 0;
13725}
13726_ACEOF
13727rm -f conftest.$ac_objext
13728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13729 (eval $ac_compile) 2>&5
13730 ac_status=$?
13731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13732 (exit $ac_status); } &&
13733 { ac_try='test -s conftest.$ac_objext'
13734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13735 (eval $ac_try) 2>&5
13736 ac_status=$?
13737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738 (exit $ac_status); }; }; then
13739 ac_cv_have_pid_t="yes"
13740else
13741 echo "$as_me: failed program was:" >&5
13742sed 's/^/| /' conftest.$ac_ext >&5
13743
13744 ac_cv_have_pid_t="no"
13745
13746fi
13747rm -f conftest.$ac_objext conftest.$ac_ext
13748
13749fi
13750echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5
13751echo "${ECHO_T}$ac_cv_have_pid_t" >&6
13752if test "x$ac_cv_have_pid_t" = "xyes" ; then
13753 cat >>confdefs.h <<\_ACEOF
13754@%:@define HAVE_PID_T 1
13755_ACEOF
13756
13757fi
13758
13759echo "$as_me:$LINENO: checking for mode_t" >&5
13760echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
13761if test "${ac_cv_have_mode_t+set}" = set; then
13762 echo $ECHO_N "(cached) $ECHO_C" >&6
13763else
13764
13765 cat >conftest.$ac_ext <<_ACEOF
13766#line $LINENO "configure"
13767/* confdefs.h. */
13768_ACEOF
13769cat confdefs.h >>conftest.$ac_ext
13770cat >>conftest.$ac_ext <<_ACEOF
13771/* end confdefs.h. */
13772
13773#include <sys/types.h>
13774
13775int
13776main ()
13777{
13778 mode_t foo; foo = 1235;
13779 ;
13780 return 0;
13781}
13782_ACEOF
13783rm -f conftest.$ac_objext
13784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13785 (eval $ac_compile) 2>&5
13786 ac_status=$?
13787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13788 (exit $ac_status); } &&
13789 { ac_try='test -s conftest.$ac_objext'
13790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13791 (eval $ac_try) 2>&5
13792 ac_status=$?
13793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794 (exit $ac_status); }; }; then
13795 ac_cv_have_mode_t="yes"
13796else
13797 echo "$as_me: failed program was:" >&5
13798sed 's/^/| /' conftest.$ac_ext >&5
13799
13800 ac_cv_have_mode_t="no"
13801
13802fi
13803rm -f conftest.$ac_objext conftest.$ac_ext
13804
13805fi
13806echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5
13807echo "${ECHO_T}$ac_cv_have_mode_t" >&6
13808if test "x$ac_cv_have_mode_t" = "xyes" ; then
13809 cat >>confdefs.h <<\_ACEOF
13810@%:@define HAVE_MODE_T 1
13811_ACEOF
13812
13813fi
13814
13815
13816echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
13817echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
13818if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
13819 echo $ECHO_N "(cached) $ECHO_C" >&6
13820else
13821
13822 cat >conftest.$ac_ext <<_ACEOF
13823#line $LINENO "configure"
13824/* confdefs.h. */
13825_ACEOF
13826cat confdefs.h >>conftest.$ac_ext
13827cat >>conftest.$ac_ext <<_ACEOF
13828/* end confdefs.h. */
13829
13830#include <sys/types.h>
13831#include <sys/socket.h>
13832
13833int
13834main ()
13835{
13836 struct sockaddr_storage s;
13837 ;
13838 return 0;
13839}
13840_ACEOF
13841rm -f conftest.$ac_objext
13842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13843 (eval $ac_compile) 2>&5
13844 ac_status=$?
13845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13846 (exit $ac_status); } &&
13847 { ac_try='test -s conftest.$ac_objext'
13848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13849 (eval $ac_try) 2>&5
13850 ac_status=$?
13851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13852 (exit $ac_status); }; }; then
13853 ac_cv_have_struct_sockaddr_storage="yes"
13854else
13855 echo "$as_me: failed program was:" >&5
13856sed 's/^/| /' conftest.$ac_ext >&5
13857
13858 ac_cv_have_struct_sockaddr_storage="no"
13859
13860fi
13861rm -f conftest.$ac_objext conftest.$ac_ext
13862
13863fi
13864echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5
13865echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6
13866if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
13867 cat >>confdefs.h <<\_ACEOF
13868@%:@define HAVE_STRUCT_SOCKADDR_STORAGE 1
13869_ACEOF
13870
13871fi
13872
13873echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13874echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13875if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
13876 echo $ECHO_N "(cached) $ECHO_C" >&6
13877else
13878
13879 cat >conftest.$ac_ext <<_ACEOF
13880#line $LINENO "configure"
13881/* confdefs.h. */
13882_ACEOF
13883cat confdefs.h >>conftest.$ac_ext
13884cat >>conftest.$ac_ext <<_ACEOF
13885/* end confdefs.h. */
13886
13887#include <sys/types.h>
13888#include <netinet/in.h>
13889
13890int
13891main ()
13892{
13893 struct sockaddr_in6 s; s.sin6_family = 0;
13894 ;
13895 return 0;
13896}
13897_ACEOF
13898rm -f conftest.$ac_objext
13899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13900 (eval $ac_compile) 2>&5
13901 ac_status=$?
13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13903 (exit $ac_status); } &&
13904 { ac_try='test -s conftest.$ac_objext'
13905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13906 (eval $ac_try) 2>&5
13907 ac_status=$?
13908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13909 (exit $ac_status); }; }; then
13910 ac_cv_have_struct_sockaddr_in6="yes"
13911else
13912 echo "$as_me: failed program was:" >&5
13913sed 's/^/| /' conftest.$ac_ext >&5
13914
13915 ac_cv_have_struct_sockaddr_in6="no"
13916
13917fi
13918rm -f conftest.$ac_objext conftest.$ac_ext
13919
13920fi
13921echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5
13922echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6
13923if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
13924 cat >>confdefs.h <<\_ACEOF
13925@%:@define HAVE_STRUCT_SOCKADDR_IN6 1
13926_ACEOF
13927
13928fi
13929
13930echo "$as_me:$LINENO: checking for struct in6_addr" >&5
13931echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6
13932if test "${ac_cv_have_struct_in6_addr+set}" = set; then
13933 echo $ECHO_N "(cached) $ECHO_C" >&6
13934else
13935
13936 cat >conftest.$ac_ext <<_ACEOF
13937#line $LINENO "configure"
13938/* confdefs.h. */
13939_ACEOF
13940cat confdefs.h >>conftest.$ac_ext
13941cat >>conftest.$ac_ext <<_ACEOF
13942/* end confdefs.h. */
13943
13944#include <sys/types.h>
13945#include <netinet/in.h>
13946
13947int
13948main ()
13949{
13950 struct in6_addr s; s.s6_addr[0] = 0;
13951 ;
13952 return 0;
13953}
13954_ACEOF
13955rm -f conftest.$ac_objext
13956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13957 (eval $ac_compile) 2>&5
13958 ac_status=$?
13959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13960 (exit $ac_status); } &&
13961 { ac_try='test -s conftest.$ac_objext'
13962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13963 (eval $ac_try) 2>&5
13964 ac_status=$?
13965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13966 (exit $ac_status); }; }; then
13967 ac_cv_have_struct_in6_addr="yes"
13968else
13969 echo "$as_me: failed program was:" >&5
13970sed 's/^/| /' conftest.$ac_ext >&5
13971
13972 ac_cv_have_struct_in6_addr="no"
13973
13974fi
13975rm -f conftest.$ac_objext conftest.$ac_ext
13976
13977fi
13978echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5
13979echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6
13980if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
13981 cat >>confdefs.h <<\_ACEOF
13982@%:@define HAVE_STRUCT_IN6_ADDR 1
13983_ACEOF
13984
13985fi
13986
13987echo "$as_me:$LINENO: checking for struct addrinfo" >&5
13988echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
13989if test "${ac_cv_have_struct_addrinfo+set}" = set; then
13990 echo $ECHO_N "(cached) $ECHO_C" >&6
13991else
13992
13993 cat >conftest.$ac_ext <<_ACEOF
13994#line $LINENO "configure"
13995/* confdefs.h. */
13996_ACEOF
13997cat confdefs.h >>conftest.$ac_ext
13998cat >>conftest.$ac_ext <<_ACEOF
13999/* end confdefs.h. */
14000
14001#include <sys/types.h>
14002#include <sys/socket.h>
14003#include <netdb.h>
14004
14005int
14006main ()
14007{
14008 struct addrinfo s; s.ai_flags = AI_PASSIVE;
14009 ;
14010 return 0;
14011}
14012_ACEOF
14013rm -f conftest.$ac_objext
14014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14015 (eval $ac_compile) 2>&5
14016 ac_status=$?
14017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14018 (exit $ac_status); } &&
14019 { ac_try='test -s conftest.$ac_objext'
14020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14021 (eval $ac_try) 2>&5
14022 ac_status=$?
14023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14024 (exit $ac_status); }; }; then
14025 ac_cv_have_struct_addrinfo="yes"
14026else
14027 echo "$as_me: failed program was:" >&5
14028sed 's/^/| /' conftest.$ac_ext >&5
14029
14030 ac_cv_have_struct_addrinfo="no"
14031
14032fi
14033rm -f conftest.$ac_objext conftest.$ac_ext
14034
14035fi
14036echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5
14037echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6
14038if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
14039 cat >>confdefs.h <<\_ACEOF
14040@%:@define HAVE_STRUCT_ADDRINFO 1
14041_ACEOF
14042
14043fi
14044
14045echo "$as_me:$LINENO: checking for struct timeval" >&5
14046echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
14047if test "${ac_cv_have_struct_timeval+set}" = set; then
14048 echo $ECHO_N "(cached) $ECHO_C" >&6
14049else
14050
14051 cat >conftest.$ac_ext <<_ACEOF
14052#line $LINENO "configure"
14053/* confdefs.h. */
14054_ACEOF
14055cat confdefs.h >>conftest.$ac_ext
14056cat >>conftest.$ac_ext <<_ACEOF
14057/* end confdefs.h. */
14058 #include <sys/time.h>
14059int
14060main ()
14061{
14062 struct timeval tv; tv.tv_sec = 1;
14063 ;
14064 return 0;
14065}
14066_ACEOF
14067rm -f conftest.$ac_objext
14068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14069 (eval $ac_compile) 2>&5
14070 ac_status=$?
14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14072 (exit $ac_status); } &&
14073 { ac_try='test -s conftest.$ac_objext'
14074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14075 (eval $ac_try) 2>&5
14076 ac_status=$?
14077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14078 (exit $ac_status); }; }; then
14079 ac_cv_have_struct_timeval="yes"
14080else
14081 echo "$as_me: failed program was:" >&5
14082sed 's/^/| /' conftest.$ac_ext >&5
14083
14084 ac_cv_have_struct_timeval="no"
14085
14086fi
14087rm -f conftest.$ac_objext conftest.$ac_ext
14088
14089fi
14090echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5
14091echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6
14092if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
14093 cat >>confdefs.h <<\_ACEOF
14094@%:@define HAVE_STRUCT_TIMEVAL 1
14095_ACEOF
14096
14097 have_struct_timeval=1
14098fi
14099
14100echo "$as_me:$LINENO: checking for struct timespec" >&5
14101echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6
14102if test "${ac_cv_type_struct_timespec+set}" = set; then
14103 echo $ECHO_N "(cached) $ECHO_C" >&6
14104else
14105 cat >conftest.$ac_ext <<_ACEOF
14106#line $LINENO "configure"
14107/* confdefs.h. */
14108_ACEOF
14109cat confdefs.h >>conftest.$ac_ext
14110cat >>conftest.$ac_ext <<_ACEOF
14111/* end confdefs.h. */
14112$ac_includes_default
14113int
14114main ()
14115{
14116if ((struct timespec *) 0)
14117 return 0;
14118if (sizeof (struct timespec))
14119 return 0;
14120 ;
14121 return 0;
14122}
14123_ACEOF
14124rm -f conftest.$ac_objext
14125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14126 (eval $ac_compile) 2>&5
14127 ac_status=$?
14128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14129 (exit $ac_status); } &&
14130 { ac_try='test -s conftest.$ac_objext'
14131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14132 (eval $ac_try) 2>&5
14133 ac_status=$?
14134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14135 (exit $ac_status); }; }; then
14136 ac_cv_type_struct_timespec=yes
14137else
14138 echo "$as_me: failed program was:" >&5
14139sed 's/^/| /' conftest.$ac_ext >&5
14140
14141ac_cv_type_struct_timespec=no
14142fi
14143rm -f conftest.$ac_objext conftest.$ac_ext
14144fi
14145echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5
14146echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6
14147if test $ac_cv_type_struct_timespec = yes; then
14148
14149cat >>confdefs.h <<_ACEOF
14150@%:@define HAVE_STRUCT_TIMESPEC 1
14151_ACEOF
14152
14153
14154fi
14155
14156
14157# We need int64_t or else certian parts of the compile will fail.
14158if test "x$ac_cv_have_int64_t" = "xno" -a \
14159 "x$ac_cv_sizeof_long_int" != "x8" -a \
14160 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
14161 echo "OpenSSH requires int64_t support. Contact your vendor or install"
14162 echo "an alternative compiler (I.E., GCC) before continuing."
14163 echo ""
14164 exit 1;
14165else
14166 if test "$cross_compiling" = yes; then
14167 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
14168See \`config.log' for more details." >&5
14169echo "$as_me: error: cannot run test program while cross compiling
14170See \`config.log' for more details." >&2;}
14171 { (exit 1); exit 1; }; }
14172else
14173 cat >conftest.$ac_ext <<_ACEOF
14174#line $LINENO "configure"
14175/* confdefs.h. */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h. */
14180
14181#include <stdio.h>
14182#include <string.h>
14183#ifdef HAVE_SNPRINTF
14184main()
14185{
14186 char buf[50];
14187 char expected_out[50];
14188 int mazsize = 50 ;
14189#if (SIZEOF_LONG_INT == 8)
14190 long int num = 0x7fffffffffffffff;
14191#else
14192 long long num = 0x7fffffffffffffffll;
14193#endif
14194 strcpy(expected_out, "9223372036854775807");
14195 snprintf(buf, mazsize, "%lld", num);
14196 if(strcmp(buf, expected_out) != 0)
14197 exit(1);
14198 exit(0);
14199}
14200#else
14201main() { exit(0); }
14202#endif
14203
14204_ACEOF
14205rm -f conftest$ac_exeext
14206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14207 (eval $ac_link) 2>&5
14208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14212 (eval $ac_try) 2>&5
14213 ac_status=$?
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); }; }; then
14216 true
14217else
14218 echo "$as_me: program exited with status $ac_status" >&5
14219echo "$as_me: failed program was:" >&5
14220sed 's/^/| /' conftest.$ac_ext >&5
14221
14222( exit $ac_status )
14223 cat >>confdefs.h <<\_ACEOF
14224@%:@define BROKEN_SNPRINTF 1
14225_ACEOF
14226
14227
14228fi
14229rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14230fi
14231fi
14232
14233
14234# look for field 'ut_host' in header 'utmp.h'
14235 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14236 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
14237 echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5
14238echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6
14239 if eval "test \"\${$ossh_varname+set}\" = set"; then
14240 echo $ECHO_N "(cached) $ECHO_C" >&6
14241else
14242
14243 cat >conftest.$ac_ext <<_ACEOF
14244#line $LINENO "configure"
14245/* confdefs.h. */
14246_ACEOF
14247cat confdefs.h >>conftest.$ac_ext
14248cat >>conftest.$ac_ext <<_ACEOF
14249/* end confdefs.h. */
14250#include <utmp.h>
14251
14252_ACEOF
14253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14254 $EGREP "ut_host" >/dev/null 2>&1; then
14255 eval "$ossh_varname=yes"
14256else
14257 eval "$ossh_varname=no"
14258fi
14259rm -f conftest*
14260
14261fi
14262
14263 ossh_result=`eval 'echo $'"$ossh_varname"`
14264 if test -n "`echo $ossh_varname`"; then
14265 echo "$as_me:$LINENO: result: $ossh_result" >&5
14266echo "${ECHO_T}$ossh_result" >&6
14267 if test "x$ossh_result" = "xyes"; then
14268 cat >>confdefs.h <<\_ACEOF
14269@%:@define HAVE_HOST_IN_UTMP 1
14270_ACEOF
14271
14272 fi
14273 else
14274 echo "$as_me:$LINENO: result: no" >&5
14275echo "${ECHO_T}no" >&6
14276 fi
14277
14278
14279# look for field 'ut_host' in header 'utmpx.h'
14280 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14281 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
14282 echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5
14283echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6
14284 if eval "test \"\${$ossh_varname+set}\" = set"; then
14285 echo $ECHO_N "(cached) $ECHO_C" >&6
14286else
14287
14288 cat >conftest.$ac_ext <<_ACEOF
14289#line $LINENO "configure"
14290/* confdefs.h. */
14291_ACEOF
14292cat confdefs.h >>conftest.$ac_ext
14293cat >>conftest.$ac_ext <<_ACEOF
14294/* end confdefs.h. */
14295#include <utmpx.h>
14296
14297_ACEOF
14298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14299 $EGREP "ut_host" >/dev/null 2>&1; then
14300 eval "$ossh_varname=yes"
14301else
14302 eval "$ossh_varname=no"
14303fi
14304rm -f conftest*
14305
14306fi
14307
14308 ossh_result=`eval 'echo $'"$ossh_varname"`
14309 if test -n "`echo $ossh_varname`"; then
14310 echo "$as_me:$LINENO: result: $ossh_result" >&5
14311echo "${ECHO_T}$ossh_result" >&6
14312 if test "x$ossh_result" = "xyes"; then
14313 cat >>confdefs.h <<\_ACEOF
14314@%:@define HAVE_HOST_IN_UTMPX 1
14315_ACEOF
14316
14317 fi
14318 else
14319 echo "$as_me:$LINENO: result: no" >&5
14320echo "${ECHO_T}no" >&6
14321 fi
14322
14323
14324# look for field 'syslen' in header 'utmpx.h'
14325 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14326 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
14327 echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5
14328echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6
14329 if eval "test \"\${$ossh_varname+set}\" = set"; then
14330 echo $ECHO_N "(cached) $ECHO_C" >&6
14331else
14332
14333 cat >conftest.$ac_ext <<_ACEOF
14334#line $LINENO "configure"
14335/* confdefs.h. */
14336_ACEOF
14337cat confdefs.h >>conftest.$ac_ext
14338cat >>conftest.$ac_ext <<_ACEOF
14339/* end confdefs.h. */
14340#include <utmpx.h>
14341
14342_ACEOF
14343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14344 $EGREP "syslen" >/dev/null 2>&1; then
14345 eval "$ossh_varname=yes"
14346else
14347 eval "$ossh_varname=no"
14348fi
14349rm -f conftest*
14350
14351fi
14352
14353 ossh_result=`eval 'echo $'"$ossh_varname"`
14354 if test -n "`echo $ossh_varname`"; then
14355 echo "$as_me:$LINENO: result: $ossh_result" >&5
14356echo "${ECHO_T}$ossh_result" >&6
14357 if test "x$ossh_result" = "xyes"; then
14358 cat >>confdefs.h <<\_ACEOF
14359@%:@define HAVE_SYSLEN_IN_UTMPX 1
14360_ACEOF
14361
14362 fi
14363 else
14364 echo "$as_me:$LINENO: result: no" >&5
14365echo "${ECHO_T}no" >&6
14366 fi
14367
14368
14369# look for field 'ut_pid' in header 'utmp.h'
14370 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14371 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
14372 echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5
14373echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6
14374 if eval "test \"\${$ossh_varname+set}\" = set"; then
14375 echo $ECHO_N "(cached) $ECHO_C" >&6
14376else
14377
14378 cat >conftest.$ac_ext <<_ACEOF
14379#line $LINENO "configure"
14380/* confdefs.h. */
14381_ACEOF
14382cat confdefs.h >>conftest.$ac_ext
14383cat >>conftest.$ac_ext <<_ACEOF
14384/* end confdefs.h. */
14385#include <utmp.h>
14386
14387_ACEOF
14388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14389 $EGREP "ut_pid" >/dev/null 2>&1; then
14390 eval "$ossh_varname=yes"
14391else
14392 eval "$ossh_varname=no"
14393fi
14394rm -f conftest*
14395
14396fi
14397
14398 ossh_result=`eval 'echo $'"$ossh_varname"`
14399 if test -n "`echo $ossh_varname`"; then
14400 echo "$as_me:$LINENO: result: $ossh_result" >&5
14401echo "${ECHO_T}$ossh_result" >&6
14402 if test "x$ossh_result" = "xyes"; then
14403 cat >>confdefs.h <<\_ACEOF
14404@%:@define HAVE_PID_IN_UTMP 1
14405_ACEOF
14406
14407 fi
14408 else
14409 echo "$as_me:$LINENO: result: no" >&5
14410echo "${ECHO_T}no" >&6
14411 fi
14412
14413
14414# look for field 'ut_type' in header 'utmp.h'
14415 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14416 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
14417 echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5
14418echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6
14419 if eval "test \"\${$ossh_varname+set}\" = set"; then
14420 echo $ECHO_N "(cached) $ECHO_C" >&6
14421else
14422
14423 cat >conftest.$ac_ext <<_ACEOF
14424#line $LINENO "configure"
14425/* confdefs.h. */
14426_ACEOF
14427cat confdefs.h >>conftest.$ac_ext
14428cat >>conftest.$ac_ext <<_ACEOF
14429/* end confdefs.h. */
14430#include <utmp.h>
14431
14432_ACEOF
14433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14434 $EGREP "ut_type" >/dev/null 2>&1; then
14435 eval "$ossh_varname=yes"
14436else
14437 eval "$ossh_varname=no"
14438fi
14439rm -f conftest*
14440
14441fi
14442
14443 ossh_result=`eval 'echo $'"$ossh_varname"`
14444 if test -n "`echo $ossh_varname`"; then
14445 echo "$as_me:$LINENO: result: $ossh_result" >&5
14446echo "${ECHO_T}$ossh_result" >&6
14447 if test "x$ossh_result" = "xyes"; then
14448 cat >>confdefs.h <<\_ACEOF
14449@%:@define HAVE_TYPE_IN_UTMP 1
14450_ACEOF
14451
14452 fi
14453 else
14454 echo "$as_me:$LINENO: result: no" >&5
14455echo "${ECHO_T}no" >&6
14456 fi
14457
14458
14459# look for field 'ut_type' in header 'utmpx.h'
14460 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14461 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
14462 echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5
14463echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6
14464 if eval "test \"\${$ossh_varname+set}\" = set"; then
14465 echo $ECHO_N "(cached) $ECHO_C" >&6
14466else
14467
14468 cat >conftest.$ac_ext <<_ACEOF
14469#line $LINENO "configure"
14470/* confdefs.h. */
14471_ACEOF
14472cat confdefs.h >>conftest.$ac_ext
14473cat >>conftest.$ac_ext <<_ACEOF
14474/* end confdefs.h. */
14475#include <utmpx.h>
14476
14477_ACEOF
14478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14479 $EGREP "ut_type" >/dev/null 2>&1; then
14480 eval "$ossh_varname=yes"
14481else
14482 eval "$ossh_varname=no"
14483fi
14484rm -f conftest*
14485
14486fi
14487
14488 ossh_result=`eval 'echo $'"$ossh_varname"`
14489 if test -n "`echo $ossh_varname`"; then
14490 echo "$as_me:$LINENO: result: $ossh_result" >&5
14491echo "${ECHO_T}$ossh_result" >&6
14492 if test "x$ossh_result" = "xyes"; then
14493 cat >>confdefs.h <<\_ACEOF
14494@%:@define HAVE_TYPE_IN_UTMPX 1
14495_ACEOF
14496
14497 fi
14498 else
14499 echo "$as_me:$LINENO: result: no" >&5
14500echo "${ECHO_T}no" >&6
14501 fi
14502
14503
14504# look for field 'ut_tv' in header 'utmp.h'
14505 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14506 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
14507 echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5
14508echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6
14509 if eval "test \"\${$ossh_varname+set}\" = set"; then
14510 echo $ECHO_N "(cached) $ECHO_C" >&6
14511else
14512
14513 cat >conftest.$ac_ext <<_ACEOF
14514#line $LINENO "configure"
14515/* confdefs.h. */
14516_ACEOF
14517cat confdefs.h >>conftest.$ac_ext
14518cat >>conftest.$ac_ext <<_ACEOF
14519/* end confdefs.h. */
14520#include <utmp.h>
14521
14522_ACEOF
14523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14524 $EGREP "ut_tv" >/dev/null 2>&1; then
14525 eval "$ossh_varname=yes"
14526else
14527 eval "$ossh_varname=no"
14528fi
14529rm -f conftest*
14530
14531fi
14532
14533 ossh_result=`eval 'echo $'"$ossh_varname"`
14534 if test -n "`echo $ossh_varname`"; then
14535 echo "$as_me:$LINENO: result: $ossh_result" >&5
14536echo "${ECHO_T}$ossh_result" >&6
14537 if test "x$ossh_result" = "xyes"; then
14538 cat >>confdefs.h <<\_ACEOF
14539@%:@define HAVE_TV_IN_UTMP 1
14540_ACEOF
14541
14542 fi
14543 else
14544 echo "$as_me:$LINENO: result: no" >&5
14545echo "${ECHO_T}no" >&6
14546 fi
14547
14548
14549# look for field 'ut_id' in header 'utmp.h'
14550 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14551 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
14552 echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5
14553echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6
14554 if eval "test \"\${$ossh_varname+set}\" = set"; then
14555 echo $ECHO_N "(cached) $ECHO_C" >&6
14556else
14557
14558 cat >conftest.$ac_ext <<_ACEOF
14559#line $LINENO "configure"
14560/* confdefs.h. */
14561_ACEOF
14562cat confdefs.h >>conftest.$ac_ext
14563cat >>conftest.$ac_ext <<_ACEOF
14564/* end confdefs.h. */
14565#include <utmp.h>
14566
14567_ACEOF
14568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14569 $EGREP "ut_id" >/dev/null 2>&1; then
14570 eval "$ossh_varname=yes"
14571else
14572 eval "$ossh_varname=no"
14573fi
14574rm -f conftest*
14575
14576fi
14577
14578 ossh_result=`eval 'echo $'"$ossh_varname"`
14579 if test -n "`echo $ossh_varname`"; then
14580 echo "$as_me:$LINENO: result: $ossh_result" >&5
14581echo "${ECHO_T}$ossh_result" >&6
14582 if test "x$ossh_result" = "xyes"; then
14583 cat >>confdefs.h <<\_ACEOF
14584@%:@define HAVE_ID_IN_UTMP 1
14585_ACEOF
14586
14587 fi
14588 else
14589 echo "$as_me:$LINENO: result: no" >&5
14590echo "${ECHO_T}no" >&6
14591 fi
14592
14593
14594# look for field 'ut_id' in header 'utmpx.h'
14595 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14596 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
14597 echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5
14598echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6
14599 if eval "test \"\${$ossh_varname+set}\" = set"; then
14600 echo $ECHO_N "(cached) $ECHO_C" >&6
14601else
14602
14603 cat >conftest.$ac_ext <<_ACEOF
14604#line $LINENO "configure"
14605/* confdefs.h. */
14606_ACEOF
14607cat confdefs.h >>conftest.$ac_ext
14608cat >>conftest.$ac_ext <<_ACEOF
14609/* end confdefs.h. */
14610#include <utmpx.h>
14611
14612_ACEOF
14613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14614 $EGREP "ut_id" >/dev/null 2>&1; then
14615 eval "$ossh_varname=yes"
14616else
14617 eval "$ossh_varname=no"
14618fi
14619rm -f conftest*
14620
14621fi
14622
14623 ossh_result=`eval 'echo $'"$ossh_varname"`
14624 if test -n "`echo $ossh_varname`"; then
14625 echo "$as_me:$LINENO: result: $ossh_result" >&5
14626echo "${ECHO_T}$ossh_result" >&6
14627 if test "x$ossh_result" = "xyes"; then
14628 cat >>confdefs.h <<\_ACEOF
14629@%:@define HAVE_ID_IN_UTMPX 1
14630_ACEOF
14631
14632 fi
14633 else
14634 echo "$as_me:$LINENO: result: no" >&5
14635echo "${ECHO_T}no" >&6
14636 fi
14637
14638
14639# look for field 'ut_addr' in header 'utmp.h'
14640 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14641 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
14642 echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5
14643echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6
14644 if eval "test \"\${$ossh_varname+set}\" = set"; then
14645 echo $ECHO_N "(cached) $ECHO_C" >&6
14646else
14647
14648 cat >conftest.$ac_ext <<_ACEOF
14649#line $LINENO "configure"
14650/* confdefs.h. */
14651_ACEOF
14652cat confdefs.h >>conftest.$ac_ext
14653cat >>conftest.$ac_ext <<_ACEOF
14654/* end confdefs.h. */
14655#include <utmp.h>
14656
14657_ACEOF
14658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14659 $EGREP "ut_addr" >/dev/null 2>&1; then
14660 eval "$ossh_varname=yes"
14661else
14662 eval "$ossh_varname=no"
14663fi
14664rm -f conftest*
14665
14666fi
14667
14668 ossh_result=`eval 'echo $'"$ossh_varname"`
14669 if test -n "`echo $ossh_varname`"; then
14670 echo "$as_me:$LINENO: result: $ossh_result" >&5
14671echo "${ECHO_T}$ossh_result" >&6
14672 if test "x$ossh_result" = "xyes"; then
14673 cat >>confdefs.h <<\_ACEOF
14674@%:@define HAVE_ADDR_IN_UTMP 1
14675_ACEOF
14676
14677 fi
14678 else
14679 echo "$as_me:$LINENO: result: no" >&5
14680echo "${ECHO_T}no" >&6
14681 fi
14682
14683
14684# look for field 'ut_addr' in header 'utmpx.h'
14685 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14686 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
14687 echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5
14688echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6
14689 if eval "test \"\${$ossh_varname+set}\" = set"; then
14690 echo $ECHO_N "(cached) $ECHO_C" >&6
14691else
14692
14693 cat >conftest.$ac_ext <<_ACEOF
14694#line $LINENO "configure"
14695/* confdefs.h. */
14696_ACEOF
14697cat confdefs.h >>conftest.$ac_ext
14698cat >>conftest.$ac_ext <<_ACEOF
14699/* end confdefs.h. */
14700#include <utmpx.h>
14701
14702_ACEOF
14703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14704 $EGREP "ut_addr" >/dev/null 2>&1; then
14705 eval "$ossh_varname=yes"
14706else
14707 eval "$ossh_varname=no"
14708fi
14709rm -f conftest*
14710
14711fi
14712
14713 ossh_result=`eval 'echo $'"$ossh_varname"`
14714 if test -n "`echo $ossh_varname`"; then
14715 echo "$as_me:$LINENO: result: $ossh_result" >&5
14716echo "${ECHO_T}$ossh_result" >&6
14717 if test "x$ossh_result" = "xyes"; then
14718 cat >>confdefs.h <<\_ACEOF
14719@%:@define HAVE_ADDR_IN_UTMPX 1
14720_ACEOF
14721
14722 fi
14723 else
14724 echo "$as_me:$LINENO: result: no" >&5
14725echo "${ECHO_T}no" >&6
14726 fi
14727
14728
14729# look for field 'ut_addr_v6' in header 'utmp.h'
14730 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14731 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
14732 echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5
14733echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6
14734 if eval "test \"\${$ossh_varname+set}\" = set"; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
14736else
14737
14738 cat >conftest.$ac_ext <<_ACEOF
14739#line $LINENO "configure"
14740/* confdefs.h. */
14741_ACEOF
14742cat confdefs.h >>conftest.$ac_ext
14743cat >>conftest.$ac_ext <<_ACEOF
14744/* end confdefs.h. */
14745#include <utmp.h>
14746
14747_ACEOF
14748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14749 $EGREP "ut_addr_v6" >/dev/null 2>&1; then
14750 eval "$ossh_varname=yes"
14751else
14752 eval "$ossh_varname=no"
14753fi
14754rm -f conftest*
14755
14756fi
14757
14758 ossh_result=`eval 'echo $'"$ossh_varname"`
14759 if test -n "`echo $ossh_varname`"; then
14760 echo "$as_me:$LINENO: result: $ossh_result" >&5
14761echo "${ECHO_T}$ossh_result" >&6
14762 if test "x$ossh_result" = "xyes"; then
14763 cat >>confdefs.h <<\_ACEOF
14764@%:@define HAVE_ADDR_V6_IN_UTMP 1
14765_ACEOF
14766
14767 fi
14768 else
14769 echo "$as_me:$LINENO: result: no" >&5
14770echo "${ECHO_T}no" >&6
14771 fi
14772
14773
14774# look for field 'ut_addr_v6' in header 'utmpx.h'
14775 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14776 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
14777 echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5
14778echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6
14779 if eval "test \"\${$ossh_varname+set}\" = set"; then
14780 echo $ECHO_N "(cached) $ECHO_C" >&6
14781else
14782
14783 cat >conftest.$ac_ext <<_ACEOF
14784#line $LINENO "configure"
14785/* confdefs.h. */
14786_ACEOF
14787cat confdefs.h >>conftest.$ac_ext
14788cat >>conftest.$ac_ext <<_ACEOF
14789/* end confdefs.h. */
14790#include <utmpx.h>
14791
14792_ACEOF
14793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14794 $EGREP "ut_addr_v6" >/dev/null 2>&1; then
14795 eval "$ossh_varname=yes"
14796else
14797 eval "$ossh_varname=no"
14798fi
14799rm -f conftest*
14800
14801fi
14802
14803 ossh_result=`eval 'echo $'"$ossh_varname"`
14804 if test -n "`echo $ossh_varname`"; then
14805 echo "$as_me:$LINENO: result: $ossh_result" >&5
14806echo "${ECHO_T}$ossh_result" >&6
14807 if test "x$ossh_result" = "xyes"; then
14808 cat >>confdefs.h <<\_ACEOF
14809@%:@define HAVE_ADDR_V6_IN_UTMPX 1
14810_ACEOF
14811
14812 fi
14813 else
14814 echo "$as_me:$LINENO: result: no" >&5
14815echo "${ECHO_T}no" >&6
14816 fi
14817
14818
14819# look for field 'ut_exit' in header 'utmp.h'
14820 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14821 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
14822 echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5
14823echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6
14824 if eval "test \"\${$ossh_varname+set}\" = set"; then
14825 echo $ECHO_N "(cached) $ECHO_C" >&6
14826else
14827
14828 cat >conftest.$ac_ext <<_ACEOF
14829#line $LINENO "configure"
14830/* confdefs.h. */
14831_ACEOF
14832cat confdefs.h >>conftest.$ac_ext
14833cat >>conftest.$ac_ext <<_ACEOF
14834/* end confdefs.h. */
14835#include <utmp.h>
14836
14837_ACEOF
14838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14839 $EGREP "ut_exit" >/dev/null 2>&1; then
14840 eval "$ossh_varname=yes"
14841else
14842 eval "$ossh_varname=no"
14843fi
14844rm -f conftest*
14845
14846fi
14847
14848 ossh_result=`eval 'echo $'"$ossh_varname"`
14849 if test -n "`echo $ossh_varname`"; then
14850 echo "$as_me:$LINENO: result: $ossh_result" >&5
14851echo "${ECHO_T}$ossh_result" >&6
14852 if test "x$ossh_result" = "xyes"; then
14853 cat >>confdefs.h <<\_ACEOF
14854@%:@define HAVE_EXIT_IN_UTMP 1
14855_ACEOF
14856
14857 fi
14858 else
14859 echo "$as_me:$LINENO: result: no" >&5
14860echo "${ECHO_T}no" >&6
14861 fi
14862
14863
14864# look for field 'ut_time' in header 'utmp.h'
14865 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14866 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
14867 echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5
14868echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6
14869 if eval "test \"\${$ossh_varname+set}\" = set"; then
14870 echo $ECHO_N "(cached) $ECHO_C" >&6
14871else
14872
14873 cat >conftest.$ac_ext <<_ACEOF
14874#line $LINENO "configure"
14875/* confdefs.h. */
14876_ACEOF
14877cat confdefs.h >>conftest.$ac_ext
14878cat >>conftest.$ac_ext <<_ACEOF
14879/* end confdefs.h. */
14880#include <utmp.h>
14881
14882_ACEOF
14883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14884 $EGREP "ut_time" >/dev/null 2>&1; then
14885 eval "$ossh_varname=yes"
14886else
14887 eval "$ossh_varname=no"
14888fi
14889rm -f conftest*
14890
14891fi
14892
14893 ossh_result=`eval 'echo $'"$ossh_varname"`
14894 if test -n "`echo $ossh_varname`"; then
14895 echo "$as_me:$LINENO: result: $ossh_result" >&5
14896echo "${ECHO_T}$ossh_result" >&6
14897 if test "x$ossh_result" = "xyes"; then
14898 cat >>confdefs.h <<\_ACEOF
14899@%:@define HAVE_TIME_IN_UTMP 1
14900_ACEOF
14901
14902 fi
14903 else
14904 echo "$as_me:$LINENO: result: no" >&5
14905echo "${ECHO_T}no" >&6
14906 fi
14907
14908
14909# look for field 'ut_time' in header 'utmpx.h'
14910 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14911 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
14912 echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5
14913echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6
14914 if eval "test \"\${$ossh_varname+set}\" = set"; then
14915 echo $ECHO_N "(cached) $ECHO_C" >&6
14916else
14917
14918 cat >conftest.$ac_ext <<_ACEOF
14919#line $LINENO "configure"
14920/* confdefs.h. */
14921_ACEOF
14922cat confdefs.h >>conftest.$ac_ext
14923cat >>conftest.$ac_ext <<_ACEOF
14924/* end confdefs.h. */
14925#include <utmpx.h>
14926
14927_ACEOF
14928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14929 $EGREP "ut_time" >/dev/null 2>&1; then
14930 eval "$ossh_varname=yes"
14931else
14932 eval "$ossh_varname=no"
14933fi
14934rm -f conftest*
14935
14936fi
14937
14938 ossh_result=`eval 'echo $'"$ossh_varname"`
14939 if test -n "`echo $ossh_varname`"; then
14940 echo "$as_me:$LINENO: result: $ossh_result" >&5
14941echo "${ECHO_T}$ossh_result" >&6
14942 if test "x$ossh_result" = "xyes"; then
14943 cat >>confdefs.h <<\_ACEOF
14944@%:@define HAVE_TIME_IN_UTMPX 1
14945_ACEOF
14946
14947 fi
14948 else
14949 echo "$as_me:$LINENO: result: no" >&5
14950echo "${ECHO_T}no" >&6
14951 fi
14952
14953
14954# look for field 'ut_tv' in header 'utmpx.h'
14955 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14956 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
14957 echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5
14958echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6
14959 if eval "test \"\${$ossh_varname+set}\" = set"; then
14960 echo $ECHO_N "(cached) $ECHO_C" >&6
14961else
14962
14963 cat >conftest.$ac_ext <<_ACEOF
14964#line $LINENO "configure"
14965/* confdefs.h. */
14966_ACEOF
14967cat confdefs.h >>conftest.$ac_ext
14968cat >>conftest.$ac_ext <<_ACEOF
14969/* end confdefs.h. */
14970#include <utmpx.h>
14971
14972_ACEOF
14973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14974 $EGREP "ut_tv" >/dev/null 2>&1; then
14975 eval "$ossh_varname=yes"
14976else
14977 eval "$ossh_varname=no"
14978fi
14979rm -f conftest*
14980
14981fi
14982
14983 ossh_result=`eval 'echo $'"$ossh_varname"`
14984 if test -n "`echo $ossh_varname`"; then
14985 echo "$as_me:$LINENO: result: $ossh_result" >&5
14986echo "${ECHO_T}$ossh_result" >&6
14987 if test "x$ossh_result" = "xyes"; then
14988 cat >>confdefs.h <<\_ACEOF
14989@%:@define HAVE_TV_IN_UTMPX 1
14990_ACEOF
14991
14992 fi
14993 else
14994 echo "$as_me:$LINENO: result: no" >&5
14995echo "${ECHO_T}no" >&6
14996 fi
14997
14998
14999echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
15000echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
15001if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
15002 echo $ECHO_N "(cached) $ECHO_C" >&6
15003else
15004 cat >conftest.$ac_ext <<_ACEOF
15005#line $LINENO "configure"
15006/* confdefs.h. */
15007_ACEOF
15008cat confdefs.h >>conftest.$ac_ext
15009cat >>conftest.$ac_ext <<_ACEOF
15010/* end confdefs.h. */
15011$ac_includes_default
15012int
15013main ()
15014{
15015static struct stat ac_aggr;
15016if (ac_aggr.st_blksize)
15017return 0;
15018 ;
15019 return 0;
15020}
15021_ACEOF
15022rm -f conftest.$ac_objext
15023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15024 (eval $ac_compile) 2>&5
15025 ac_status=$?
15026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15027 (exit $ac_status); } &&
15028 { ac_try='test -s conftest.$ac_objext'
15029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15030 (eval $ac_try) 2>&5
15031 ac_status=$?
15032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); }; }; then
15034 ac_cv_member_struct_stat_st_blksize=yes
15035else
15036 echo "$as_me: failed program was:" >&5
15037sed 's/^/| /' conftest.$ac_ext >&5
15038
15039cat >conftest.$ac_ext <<_ACEOF
15040#line $LINENO "configure"
15041/* confdefs.h. */
15042_ACEOF
15043cat confdefs.h >>conftest.$ac_ext
15044cat >>conftest.$ac_ext <<_ACEOF
15045/* end confdefs.h. */
15046$ac_includes_default
15047int
15048main ()
15049{
15050static struct stat ac_aggr;
15051if (sizeof ac_aggr.st_blksize)
15052return 0;
15053 ;
15054 return 0;
15055}
15056_ACEOF
15057rm -f conftest.$ac_objext
15058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15059 (eval $ac_compile) 2>&5
15060 ac_status=$?
15061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15062 (exit $ac_status); } &&
15063 { ac_try='test -s conftest.$ac_objext'
15064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15065 (eval $ac_try) 2>&5
15066 ac_status=$?
15067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15068 (exit $ac_status); }; }; then
15069 ac_cv_member_struct_stat_st_blksize=yes
15070else
15071 echo "$as_me: failed program was:" >&5
15072sed 's/^/| /' conftest.$ac_ext >&5
15073
15074ac_cv_member_struct_stat_st_blksize=no
15075fi
15076rm -f conftest.$ac_objext conftest.$ac_ext
15077fi
15078rm -f conftest.$ac_objext conftest.$ac_ext
15079fi
15080echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
15081echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
15082if test $ac_cv_member_struct_stat_st_blksize = yes; then
15083
15084cat >>confdefs.h <<_ACEOF
15085@%:@define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15086_ACEOF
15087
15088
15089fi
15090
15091
15092echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
15093echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6
15094if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
15095 echo $ECHO_N "(cached) $ECHO_C" >&6
15096else
15097
15098 cat >conftest.$ac_ext <<_ACEOF
15099#line $LINENO "configure"
15100/* confdefs.h. */
15101_ACEOF
15102cat confdefs.h >>conftest.$ac_ext
15103cat >>conftest.$ac_ext <<_ACEOF
15104/* end confdefs.h. */
15105
15106#include <sys/types.h>
15107#include <sys/socket.h>
15108
15109int
15110main ()
15111{
15112 struct sockaddr_storage s; s.ss_family = 1;
15113 ;
15114 return 0;
15115}
15116_ACEOF
15117rm -f conftest.$ac_objext
15118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15119 (eval $ac_compile) 2>&5
15120 ac_status=$?
15121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15122 (exit $ac_status); } &&
15123 { ac_try='test -s conftest.$ac_objext'
15124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15125 (eval $ac_try) 2>&5
15126 ac_status=$?
15127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15128 (exit $ac_status); }; }; then
15129 ac_cv_have_ss_family_in_struct_ss="yes"
15130else
15131 echo "$as_me: failed program was:" >&5
15132sed 's/^/| /' conftest.$ac_ext >&5
15133
15134 ac_cv_have_ss_family_in_struct_ss="no"
15135fi
15136rm -f conftest.$ac_objext conftest.$ac_ext
15137
15138fi
15139echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
15140echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6
15141if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
15142 cat >>confdefs.h <<\_ACEOF
15143@%:@define HAVE_SS_FAMILY_IN_SS 1
15144_ACEOF
15145
15146fi
15147
15148echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
15149echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6
15150if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
15151 echo $ECHO_N "(cached) $ECHO_C" >&6
15152else
15153
15154 cat >conftest.$ac_ext <<_ACEOF
15155#line $LINENO "configure"
15156/* confdefs.h. */
15157_ACEOF
15158cat confdefs.h >>conftest.$ac_ext
15159cat >>conftest.$ac_ext <<_ACEOF
15160/* end confdefs.h. */
15161
15162#include <sys/types.h>
15163#include <sys/socket.h>
15164
15165int
15166main ()
15167{
15168 struct sockaddr_storage s; s.__ss_family = 1;
15169 ;
15170 return 0;
15171}
15172_ACEOF
15173rm -f conftest.$ac_objext
15174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15175 (eval $ac_compile) 2>&5
15176 ac_status=$?
15177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15178 (exit $ac_status); } &&
15179 { ac_try='test -s conftest.$ac_objext'
15180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15181 (eval $ac_try) 2>&5
15182 ac_status=$?
15183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15184 (exit $ac_status); }; }; then
15185 ac_cv_have___ss_family_in_struct_ss="yes"
15186else
15187 echo "$as_me: failed program was:" >&5
15188sed 's/^/| /' conftest.$ac_ext >&5
15189
15190 ac_cv_have___ss_family_in_struct_ss="no"
15191
15192fi
15193rm -f conftest.$ac_objext conftest.$ac_ext
15194
15195fi
15196echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
15197echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6
15198if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
15199 cat >>confdefs.h <<\_ACEOF
15200@%:@define HAVE___SS_FAMILY_IN_SS 1
15201_ACEOF
15202
15203fi
15204
15205echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5
15206echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6
15207if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then
15208 echo $ECHO_N "(cached) $ECHO_C" >&6
15209else
15210
15211 cat >conftest.$ac_ext <<_ACEOF
15212#line $LINENO "configure"
15213/* confdefs.h. */
15214_ACEOF
15215cat confdefs.h >>conftest.$ac_ext
15216cat >>conftest.$ac_ext <<_ACEOF
15217/* end confdefs.h. */
15218
15219#include <pwd.h>
15220
15221int
15222main ()
15223{
15224 struct passwd p; p.pw_class = 0;
15225 ;
15226 return 0;
15227}
15228_ACEOF
15229rm -f conftest.$ac_objext
15230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15231 (eval $ac_compile) 2>&5
15232 ac_status=$?
15233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15234 (exit $ac_status); } &&
15235 { ac_try='test -s conftest.$ac_objext'
15236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15237 (eval $ac_try) 2>&5
15238 ac_status=$?
15239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240 (exit $ac_status); }; }; then
15241 ac_cv_have_pw_class_in_struct_passwd="yes"
15242else
15243 echo "$as_me: failed program was:" >&5
15244sed 's/^/| /' conftest.$ac_ext >&5
15245
15246 ac_cv_have_pw_class_in_struct_passwd="no"
15247
15248fi
15249rm -f conftest.$ac_objext conftest.$ac_ext
15250
15251fi
15252echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
15253echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6
15254if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
15255 cat >>confdefs.h <<\_ACEOF
15256@%:@define HAVE_PW_CLASS_IN_PASSWD 1
15257_ACEOF
15258
15259fi
15260
15261echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5
15262echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6
15263if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then
15264 echo $ECHO_N "(cached) $ECHO_C" >&6
15265else
15266
15267 cat >conftest.$ac_ext <<_ACEOF
15268#line $LINENO "configure"
15269/* confdefs.h. */
15270_ACEOF
15271cat confdefs.h >>conftest.$ac_ext
15272cat >>conftest.$ac_ext <<_ACEOF
15273/* end confdefs.h. */
15274
15275#include <pwd.h>
15276
15277int
15278main ()
15279{
15280 struct passwd p; p.pw_expire = 0;
15281 ;
15282 return 0;
15283}
15284_ACEOF
15285rm -f conftest.$ac_objext
15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15287 (eval $ac_compile) 2>&5
15288 ac_status=$?
15289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15290 (exit $ac_status); } &&
15291 { ac_try='test -s conftest.$ac_objext'
15292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15293 (eval $ac_try) 2>&5
15294 ac_status=$?
15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15296 (exit $ac_status); }; }; then
15297 ac_cv_have_pw_expire_in_struct_passwd="yes"
15298else
15299 echo "$as_me: failed program was:" >&5
15300sed 's/^/| /' conftest.$ac_ext >&5
15301
15302 ac_cv_have_pw_expire_in_struct_passwd="no"
15303
15304fi
15305rm -f conftest.$ac_objext conftest.$ac_ext
15306
15307fi
15308echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
15309echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6
15310if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
15311 cat >>confdefs.h <<\_ACEOF
15312@%:@define HAVE_PW_EXPIRE_IN_PASSWD 1
15313_ACEOF
15314
15315fi
15316
15317echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5
15318echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6
15319if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then
15320 echo $ECHO_N "(cached) $ECHO_C" >&6
15321else
15322
15323 cat >conftest.$ac_ext <<_ACEOF
15324#line $LINENO "configure"
15325/* confdefs.h. */
15326_ACEOF
15327cat confdefs.h >>conftest.$ac_ext
15328cat >>conftest.$ac_ext <<_ACEOF
15329/* end confdefs.h. */
15330
15331#include <pwd.h>
15332
15333int
15334main ()
15335{
15336 struct passwd p; p.pw_change = 0;
15337 ;
15338 return 0;
15339}
15340_ACEOF
15341rm -f conftest.$ac_objext
15342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15343 (eval $ac_compile) 2>&5
15344 ac_status=$?
15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15346 (exit $ac_status); } &&
15347 { ac_try='test -s conftest.$ac_objext'
15348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15349 (eval $ac_try) 2>&5
15350 ac_status=$?
15351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15352 (exit $ac_status); }; }; then
15353 ac_cv_have_pw_change_in_struct_passwd="yes"
15354else
15355 echo "$as_me: failed program was:" >&5
15356sed 's/^/| /' conftest.$ac_ext >&5
15357
15358 ac_cv_have_pw_change_in_struct_passwd="no"
15359
15360fi
15361rm -f conftest.$ac_objext conftest.$ac_ext
15362
15363fi
15364echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
15365echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6
15366if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
15367 cat >>confdefs.h <<\_ACEOF
15368@%:@define HAVE_PW_CHANGE_IN_PASSWD 1
15369_ACEOF
15370
15371fi
15372
15373echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
15374echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6
15375if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
15376 echo $ECHO_N "(cached) $ECHO_C" >&6
15377else
15378
15379 if test "$cross_compiling" = yes; then
15380 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
15381See \`config.log' for more details." >&5
15382echo "$as_me: error: cannot run test program while cross compiling
15383See \`config.log' for more details." >&2;}
15384 { (exit 1); exit 1; }; }
15385else
15386 cat >conftest.$ac_ext <<_ACEOF
15387#line $LINENO "configure"
15388/* confdefs.h. */
15389_ACEOF
15390cat confdefs.h >>conftest.$ac_ext
15391cat >>conftest.$ac_ext <<_ACEOF
15392/* end confdefs.h. */
15393
15394#include <sys/types.h>
15395#include <sys/socket.h>
15396#include <sys/uio.h>
15397int main() {
15398#ifdef msg_accrights
15399exit(1);
15400#endif
15401struct msghdr m;
15402m.msg_accrights = 0;
15403exit(0);
15404}
15405
15406_ACEOF
15407rm -f conftest$ac_exeext
15408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15409 (eval $ac_link) 2>&5
15410 ac_status=$?
15411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15414 (eval $ac_try) 2>&5
15415 ac_status=$?
15416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15417 (exit $ac_status); }; }; then
15418 ac_cv_have_accrights_in_msghdr="yes"
15419else
15420 echo "$as_me: program exited with status $ac_status" >&5
15421echo "$as_me: failed program was:" >&5
15422sed 's/^/| /' conftest.$ac_ext >&5
15423
15424( exit $ac_status )
15425 ac_cv_have_accrights_in_msghdr="no"
15426
15427fi
15428rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15429fi
15430
15431fi
15432echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
15433echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6
15434if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
15435 cat >>confdefs.h <<\_ACEOF
15436@%:@define HAVE_ACCRIGHTS_IN_MSGHDR 1
15437_ACEOF
15438
15439fi
15440
15441echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
15442echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6
15443if test "${ac_cv_have_control_in_msghdr+set}" = set; then
15444 echo $ECHO_N "(cached) $ECHO_C" >&6
15445else
15446
15447 if test "$cross_compiling" = yes; then
15448 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
15449See \`config.log' for more details." >&5
15450echo "$as_me: error: cannot run test program while cross compiling
15451See \`config.log' for more details." >&2;}
15452 { (exit 1); exit 1; }; }
15453else
15454 cat >conftest.$ac_ext <<_ACEOF
15455#line $LINENO "configure"
15456/* confdefs.h. */
15457_ACEOF
15458cat confdefs.h >>conftest.$ac_ext
15459cat >>conftest.$ac_ext <<_ACEOF
15460/* end confdefs.h. */
15461
15462#include <sys/types.h>
15463#include <sys/socket.h>
15464#include <sys/uio.h>
15465int main() {
15466#ifdef msg_control
15467exit(1);
15468#endif
15469struct msghdr m;
15470m.msg_control = 0;
15471exit(0);
15472}
15473
15474_ACEOF
15475rm -f conftest$ac_exeext
15476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15477 (eval $ac_link) 2>&5
15478 ac_status=$?
15479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15482 (eval $ac_try) 2>&5
15483 ac_status=$?
15484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15485 (exit $ac_status); }; }; then
15486 ac_cv_have_control_in_msghdr="yes"
15487else
15488 echo "$as_me: program exited with status $ac_status" >&5
15489echo "$as_me: failed program was:" >&5
15490sed 's/^/| /' conftest.$ac_ext >&5
15491
15492( exit $ac_status )
15493 ac_cv_have_control_in_msghdr="no"
15494
15495fi
15496rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15497fi
15498
15499fi
15500echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
15501echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6
15502if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
15503 cat >>confdefs.h <<\_ACEOF
15504@%:@define HAVE_CONTROL_IN_MSGHDR 1
15505_ACEOF
15506
15507fi
15508
15509echo "$as_me:$LINENO: checking if libc defines __progname" >&5
15510echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6
15511if test "${ac_cv_libc_defines___progname+set}" = set; then
15512 echo $ECHO_N "(cached) $ECHO_C" >&6
15513else
15514
15515 cat >conftest.$ac_ext <<_ACEOF
15516#line $LINENO "configure"
15517/* confdefs.h. */
15518_ACEOF
15519cat confdefs.h >>conftest.$ac_ext
15520cat >>conftest.$ac_ext <<_ACEOF
15521/* end confdefs.h. */
15522
15523int
15524main ()
15525{
15526 extern char *__progname; printf("%s", __progname);
15527 ;
15528 return 0;
15529}
15530_ACEOF
15531rm -f conftest.$ac_objext conftest$ac_exeext
15532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15533 (eval $ac_link) 2>&5
15534 ac_status=$?
15535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15536 (exit $ac_status); } &&
15537 { ac_try='test -s conftest$ac_exeext'
15538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15539 (eval $ac_try) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); }; }; then
15543 ac_cv_libc_defines___progname="yes"
15544else
15545 echo "$as_me: failed program was:" >&5
15546sed 's/^/| /' conftest.$ac_ext >&5
15547
15548 ac_cv_libc_defines___progname="no"
15549
15550fi
15551rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15552
15553fi
15554echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
15555echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6
15556if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
15557 cat >>confdefs.h <<\_ACEOF
15558@%:@define HAVE___PROGNAME 1
15559_ACEOF
15560
15561fi
15562
15563echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
15564echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6
15565if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then
15566 echo $ECHO_N "(cached) $ECHO_C" >&6
15567else
15568
15569 cat >conftest.$ac_ext <<_ACEOF
15570#line $LINENO "configure"
15571/* confdefs.h. */
15572_ACEOF
15573cat confdefs.h >>conftest.$ac_ext
15574cat >>conftest.$ac_ext <<_ACEOF
15575/* end confdefs.h. */
15576
15577#include <stdio.h>
15578
15579int
15580main ()
15581{
15582 printf("%s", __FUNCTION__);
15583 ;
15584 return 0;
15585}
15586_ACEOF
15587rm -f conftest.$ac_objext conftest$ac_exeext
15588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15589 (eval $ac_link) 2>&5
15590 ac_status=$?
15591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15592 (exit $ac_status); } &&
15593 { ac_try='test -s conftest$ac_exeext'
15594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15595 (eval $ac_try) 2>&5
15596 ac_status=$?
15597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15598 (exit $ac_status); }; }; then
15599 ac_cv_cc_implements___FUNCTION__="yes"
15600else
15601 echo "$as_me: failed program was:" >&5
15602sed 's/^/| /' conftest.$ac_ext >&5
15603
15604 ac_cv_cc_implements___FUNCTION__="no"
15605
15606fi
15607rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15608
15609fi
15610echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5
15611echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6
15612if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
15613 cat >>confdefs.h <<\_ACEOF
15614@%:@define HAVE___FUNCTION__ 1
15615_ACEOF
15616
15617fi
15618
15619echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
15620echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6
15621if test "${ac_cv_cc_implements___func__+set}" = set; then
15622 echo $ECHO_N "(cached) $ECHO_C" >&6
15623else
15624
15625 cat >conftest.$ac_ext <<_ACEOF
15626#line $LINENO "configure"
15627/* confdefs.h. */
15628_ACEOF
15629cat confdefs.h >>conftest.$ac_ext
15630cat >>conftest.$ac_ext <<_ACEOF
15631/* end confdefs.h. */
15632
15633#include <stdio.h>
15634
15635int
15636main ()
15637{
15638 printf("%s", __func__);
15639 ;
15640 return 0;
15641}
15642_ACEOF
15643rm -f conftest.$ac_objext conftest$ac_exeext
15644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15645 (eval $ac_link) 2>&5
15646 ac_status=$?
15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648 (exit $ac_status); } &&
15649 { ac_try='test -s conftest$ac_exeext'
15650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15651 (eval $ac_try) 2>&5
15652 ac_status=$?
15653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654 (exit $ac_status); }; }; then
15655 ac_cv_cc_implements___func__="yes"
15656else
15657 echo "$as_me: failed program was:" >&5
15658sed 's/^/| /' conftest.$ac_ext >&5
15659
15660 ac_cv_cc_implements___func__="no"
15661
15662fi
15663rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15664
15665fi
15666echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5
15667echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6
15668if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
15669 cat >>confdefs.h <<\_ACEOF
15670@%:@define HAVE___func__ 1
15671_ACEOF
15672
15673fi
15674
15675echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5
15676echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6
15677if test "${ac_cv_have_getopt_optreset+set}" = set; then
15678 echo $ECHO_N "(cached) $ECHO_C" >&6
15679else
15680
15681 cat >conftest.$ac_ext <<_ACEOF
15682#line $LINENO "configure"
15683/* confdefs.h. */
15684_ACEOF
15685cat confdefs.h >>conftest.$ac_ext
15686cat >>conftest.$ac_ext <<_ACEOF
15687/* end confdefs.h. */
15688
15689#include <getopt.h>
15690
15691int
15692main ()
15693{
15694 extern int optreset; optreset = 0;
15695 ;
15696 return 0;
15697}
15698_ACEOF
15699rm -f conftest.$ac_objext conftest$ac_exeext
15700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15701 (eval $ac_link) 2>&5
15702 ac_status=$?
15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704 (exit $ac_status); } &&
15705 { ac_try='test -s conftest$ac_exeext'
15706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15707 (eval $ac_try) 2>&5
15708 ac_status=$?
15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15710 (exit $ac_status); }; }; then
15711 ac_cv_have_getopt_optreset="yes"
15712else
15713 echo "$as_me: failed program was:" >&5
15714sed 's/^/| /' conftest.$ac_ext >&5
15715
15716 ac_cv_have_getopt_optreset="no"
15717
15718fi
15719rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15720
15721fi
15722echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5
15723echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6
15724if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
15725 cat >>confdefs.h <<\_ACEOF
15726@%:@define HAVE_GETOPT_OPTRESET 1
15727_ACEOF
15728
15729fi
15730
15731echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5
15732echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6
15733if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
15734 echo $ECHO_N "(cached) $ECHO_C" >&6
15735else
15736
15737 cat >conftest.$ac_ext <<_ACEOF
15738#line $LINENO "configure"
15739/* confdefs.h. */
15740_ACEOF
15741cat confdefs.h >>conftest.$ac_ext
15742cat >>conftest.$ac_ext <<_ACEOF
15743/* end confdefs.h. */
15744
15745int
15746main ()
15747{
15748 extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
15749 ;
15750 return 0;
15751}
15752_ACEOF
15753rm -f conftest.$ac_objext conftest$ac_exeext
15754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15755 (eval $ac_link) 2>&5
15756 ac_status=$?
15757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758 (exit $ac_status); } &&
15759 { ac_try='test -s conftest$ac_exeext'
15760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761 (eval $ac_try) 2>&5
15762 ac_status=$?
15763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764 (exit $ac_status); }; }; then
15765 ac_cv_libc_defines_sys_errlist="yes"
15766else
15767 echo "$as_me: failed program was:" >&5
15768sed 's/^/| /' conftest.$ac_ext >&5
15769
15770 ac_cv_libc_defines_sys_errlist="no"
15771
15772fi
15773rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15774
15775fi
15776echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5
15777echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6
15778if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
15779 cat >>confdefs.h <<\_ACEOF
15780@%:@define HAVE_SYS_ERRLIST 1
15781_ACEOF
15782
15783fi
15784
15785
15786echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5
15787echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6
15788if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
15789 echo $ECHO_N "(cached) $ECHO_C" >&6
15790else
15791
15792 cat >conftest.$ac_ext <<_ACEOF
15793#line $LINENO "configure"
15794/* confdefs.h. */
15795_ACEOF
15796cat confdefs.h >>conftest.$ac_ext
15797cat >>conftest.$ac_ext <<_ACEOF
15798/* end confdefs.h. */
15799
15800int
15801main ()
15802{
15803 extern int sys_nerr; printf("%i", sys_nerr);
15804 ;
15805 return 0;
15806}
15807_ACEOF
15808rm -f conftest.$ac_objext conftest$ac_exeext
15809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15810 (eval $ac_link) 2>&5
15811 ac_status=$?
15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); } &&
15814 { ac_try='test -s conftest$ac_exeext'
15815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15816 (eval $ac_try) 2>&5
15817 ac_status=$?
15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819 (exit $ac_status); }; }; then
15820 ac_cv_libc_defines_sys_nerr="yes"
15821else
15822 echo "$as_me: failed program was:" >&5
15823sed 's/^/| /' conftest.$ac_ext >&5
15824
15825 ac_cv_libc_defines_sys_nerr="no"
15826
15827fi
15828rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15829
15830fi
15831echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5
15832echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6
15833if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
15834 cat >>confdefs.h <<\_ACEOF
15835@%:@define HAVE_SYS_NERR 1
15836_ACEOF
15837
15838fi
15839
15840SCARD_MSG="no"
15841
15842# Check whether user wants sectok support
15843
15844# Check whether --with-sectok or --without-sectok was given.
15845if test "${with_sectok+set}" = set; then
15846 withval="$with_sectok"
15847
15848 if test "x$withval" != "xno" ; then
15849 if test "x$withval" != "xyes" ; then
15850 CPPFLAGS="$CPPFLAGS -I${withval}"
15851 LDFLAGS="$LDFLAGS -L${withval}"
15852 if test ! -z "$need_dash_r" ; then
15853 LDFLAGS="$LDFLAGS -R${withval}"
15854 fi
15855 if test ! -z "$blibpath" ; then
15856 blibpath="$blibpath:${withval}"
15857 fi
15858 fi
15859
15860for ac_header in sectok.h
15861do
15862as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15863if eval "test \"\${$as_ac_Header+set}\" = set"; then
15864 echo "$as_me:$LINENO: checking for $ac_header" >&5
15865echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15866if eval "test \"\${$as_ac_Header+set}\" = set"; then
15867 echo $ECHO_N "(cached) $ECHO_C" >&6
15868fi
15869echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15870echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15871else
15872 # Is the header compilable?
15873echo "$as_me:$LINENO: checking $ac_header usability" >&5
15874echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15875cat >conftest.$ac_ext <<_ACEOF
15876#line $LINENO "configure"
15877/* confdefs.h. */
15878_ACEOF
15879cat confdefs.h >>conftest.$ac_ext
15880cat >>conftest.$ac_ext <<_ACEOF
15881/* end confdefs.h. */
15882$ac_includes_default
15883@%:@include <$ac_header>
15884_ACEOF
15885rm -f conftest.$ac_objext
15886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15887 (eval $ac_compile) 2>&5
15888 ac_status=$?
15889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890 (exit $ac_status); } &&
15891 { ac_try='test -s conftest.$ac_objext'
15892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15893 (eval $ac_try) 2>&5
15894 ac_status=$?
15895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15896 (exit $ac_status); }; }; then
15897 ac_header_compiler=yes
15898else
15899 echo "$as_me: failed program was:" >&5
15900sed 's/^/| /' conftest.$ac_ext >&5
15901
15902ac_header_compiler=no
15903fi
15904rm -f conftest.$ac_objext conftest.$ac_ext
15905echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15906echo "${ECHO_T}$ac_header_compiler" >&6
15907
15908# Is the header present?
15909echo "$as_me:$LINENO: checking $ac_header presence" >&5
15910echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15911cat >conftest.$ac_ext <<_ACEOF
15912#line $LINENO "configure"
15913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
15918@%:@include <$ac_header>
15919_ACEOF
15920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15922 ac_status=$?
15923 grep -v '^ *+' conftest.er1 >conftest.err
15924 rm -f conftest.er1
15925 cat conftest.err >&5
15926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15927 (exit $ac_status); } >/dev/null; then
15928 if test -s conftest.err; then
15929 ac_cpp_err=$ac_c_preproc_warn_flag
15930 else
15931 ac_cpp_err=
15932 fi
15933else
15934 ac_cpp_err=yes
15935fi
15936if test -z "$ac_cpp_err"; then
15937 ac_header_preproc=yes
15938else
15939 echo "$as_me: failed program was:" >&5
15940sed 's/^/| /' conftest.$ac_ext >&5
15941
15942 ac_header_preproc=no
15943fi
15944rm -f conftest.err conftest.$ac_ext
15945echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15946echo "${ECHO_T}$ac_header_preproc" >&6
15947
15948# So? What about this header?
15949case $ac_header_compiler:$ac_header_preproc in
15950 yes:no )
15951 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15952echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15953 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15954echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15955 (
15956 cat <<\_ASBOX
15957@%:@@%:@ ------------------------------------ @%:@@%:@
15958@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
15959@%:@@%:@ ------------------------------------ @%:@@%:@
15960_ASBOX
15961 ) |
15962 sed "s/^/$as_me: WARNING: /" >&2
15963 ;;
15964 no:yes )
15965 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15966echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15967 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15968echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15969 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15970echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15971 (
15972 cat <<\_ASBOX
15973@%:@@%:@ ------------------------------------ @%:@@%:@
15974@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
15975@%:@@%:@ ------------------------------------ @%:@@%:@
15976_ASBOX
15977 ) |
15978 sed "s/^/$as_me: WARNING: /" >&2
15979 ;;
15980esac
15981echo "$as_me:$LINENO: checking for $ac_header" >&5
15982echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15983if eval "test \"\${$as_ac_Header+set}\" = set"; then
15984 echo $ECHO_N "(cached) $ECHO_C" >&6
15985else
15986 eval "$as_ac_Header=$ac_header_preproc"
15987fi
15988echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15989echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15990
15991fi
15992if test `eval echo '${'$as_ac_Header'}'` = yes; then
15993 cat >>confdefs.h <<_ACEOF
15994@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15995_ACEOF
15996
15997fi
15998
15999done
16000
16001 if test "$ac_cv_header_sectok_h" != yes; then
16002 { { echo "$as_me:$LINENO: error: Can't find sectok.h" >&5
16003echo "$as_me: error: Can't find sectok.h" >&2;}
16004 { (exit 1); exit 1; }; }
16005 fi
16006
16007echo "$as_me:$LINENO: checking for sectok_open in -lsectok" >&5
16008echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6
16009if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
16010 echo $ECHO_N "(cached) $ECHO_C" >&6
16011else
16012 ac_check_lib_save_LIBS=$LIBS
16013LIBS="-lsectok $LIBS"
16014cat >conftest.$ac_ext <<_ACEOF
16015#line $LINENO "configure"
16016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
16021
16022/* Override any gcc2 internal prototype to avoid an error. */
16023#ifdef __cplusplus
16024extern "C"
16025#endif
16026/* We use char because int might match the return type of a gcc2
16027 builtin and then its argument prototype would still apply. */
16028char sectok_open ();
16029int
16030main ()
16031{
16032sectok_open ();
16033 ;
16034 return 0;
16035}
16036_ACEOF
16037rm -f conftest.$ac_objext conftest$ac_exeext
16038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16039 (eval $ac_link) 2>&5
16040 ac_status=$?
16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042 (exit $ac_status); } &&
16043 { ac_try='test -s conftest$ac_exeext'
16044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16045 (eval $ac_try) 2>&5
16046 ac_status=$?
16047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16048 (exit $ac_status); }; }; then
16049 ac_cv_lib_sectok_sectok_open=yes
16050else
16051 echo "$as_me: failed program was:" >&5
16052sed 's/^/| /' conftest.$ac_ext >&5
16053
16054ac_cv_lib_sectok_sectok_open=no
16055fi
16056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16057LIBS=$ac_check_lib_save_LIBS
16058fi
16059echo "$as_me:$LINENO: result: $ac_cv_lib_sectok_sectok_open" >&5
16060echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6
16061if test $ac_cv_lib_sectok_sectok_open = yes; then
16062 cat >>confdefs.h <<_ACEOF
16063@%:@define HAVE_LIBSECTOK 1
16064_ACEOF
16065
16066 LIBS="-lsectok $LIBS"
16067
16068fi
16069
16070 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
16071 { { echo "$as_me:$LINENO: error: Can't find libsectok" >&5
16072echo "$as_me: error: Can't find libsectok" >&2;}
16073 { (exit 1); exit 1; }; }
16074 fi
16075 cat >>confdefs.h <<\_ACEOF
16076@%:@define SMARTCARD 1
16077_ACEOF
16078
16079 cat >>confdefs.h <<\_ACEOF
16080@%:@define USE_SECTOK 1
16081_ACEOF
16082
16083 SCARD_MSG="yes, using sectok"
16084 fi
16085
16086
16087fi;
16088
16089# Check whether user wants OpenSC support
16090
16091# Check whether --with-opensc or --without-opensc was given.
16092if test "${with_opensc+set}" = set; then
16093 withval="$with_opensc"
16094 opensc_config_prefix="$withval"
16095else
16096 opensc_config_prefix=""
16097fi;
16098if test x$opensc_config_prefix != x ; then
16099 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
16100 # Extract the first word of "opensc-config", so it can be a program name with args.
16101set dummy opensc-config; ac_word=$2
16102echo "$as_me:$LINENO: checking for $ac_word" >&5
16103echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16104if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then
16105 echo $ECHO_N "(cached) $ECHO_C" >&6
16106else
16107 case $OPENSC_CONFIG in
16108 [\\/]* | ?:[\\/]*)
16109 ac_cv_path_OPENSC_CONFIG="$OPENSC_CONFIG" # Let the user override the test with a path.
16110 ;;
16111 *)
16112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16113for as_dir in $PATH
16114do
16115 IFS=$as_save_IFS
16116 test -z "$as_dir" && as_dir=.
16117 for ac_exec_ext in '' $ac_executable_extensions; do
16118 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16119 ac_cv_path_OPENSC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
16120 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16121 break 2
16122 fi
16123done
16124done
16125
16126 test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no"
16127 ;;
16128esac
16129fi
16130OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG
16131
16132if test -n "$OPENSC_CONFIG"; then
16133 echo "$as_me:$LINENO: result: $OPENSC_CONFIG" >&5
16134echo "${ECHO_T}$OPENSC_CONFIG" >&6
16135else
16136 echo "$as_me:$LINENO: result: no" >&5
16137echo "${ECHO_T}no" >&6
16138fi
16139
16140 if test "$OPENSC_CONFIG" != "no"; then
16141 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
16142 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
16143 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
16144 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
16145 cat >>confdefs.h <<\_ACEOF
16146@%:@define SMARTCARD 1
16147_ACEOF
16148
16149 cat >>confdefs.h <<\_ACEOF
16150@%:@define USE_OPENSC 1
16151_ACEOF
16152
16153 SCARD_MSG="yes, using OpenSC"
16154 fi
16155fi
16156
16157# Check whether user wants Kerberos 5 support
16158KRB5_MSG="no"
16159
16160# Check whether --with-kerberos5 or --without-kerberos5 was given.
16161if test "${with_kerberos5+set}" = set; then
16162 withval="$with_kerberos5"
16163
16164 if test "x$withval" != "xno" ; then
16165 if test "x$withval" = "xyes" ; then
16166 KRB5ROOT="/usr/local"
16167 else
16168 KRB5ROOT=${withval}
16169 fi
16170 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
16171 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
16172 cat >>confdefs.h <<\_ACEOF
16173@%:@define KRB5 1
16174_ACEOF
16175
16176 KRB5_MSG="yes"
16177 echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
16178echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6
16179 cat >conftest.$ac_ext <<_ACEOF
16180#line $LINENO "configure"
16181/* confdefs.h. */
16182_ACEOF
16183cat confdefs.h >>conftest.$ac_ext
16184cat >>conftest.$ac_ext <<_ACEOF
16185/* end confdefs.h. */
16186 #include <krb5.h>
16187int
16188main ()
16189{
16190 char *tmp = heimdal_version;
16191 ;
16192 return 0;
16193}
16194_ACEOF
16195rm -f conftest.$ac_objext
16196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16197 (eval $ac_compile) 2>&5
16198 ac_status=$?
16199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16200 (exit $ac_status); } &&
16201 { ac_try='test -s conftest.$ac_objext'
16202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16203 (eval $ac_try) 2>&5
16204 ac_status=$?
16205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16206 (exit $ac_status); }; }; then
16207 echo "$as_me:$LINENO: result: yes" >&5
16208echo "${ECHO_T}yes" >&6
16209 cat >>confdefs.h <<\_ACEOF
16210@%:@define HEIMDAL 1
16211_ACEOF
16212
16213 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
16214
16215else
16216 echo "$as_me: failed program was:" >&5
16217sed 's/^/| /' conftest.$ac_ext >&5
16218
16219 echo "$as_me:$LINENO: result: no" >&5
16220echo "${ECHO_T}no" >&6
16221 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
16222
16223
16224fi
16225rm -f conftest.$ac_objext conftest.$ac_ext
16226 if test ! -z "$need_dash_r" ; then
16227 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
16228 fi
16229 if test ! -z "$blibpath" ; then
16230 blibpath="$blibpath:${KRB5ROOT}/lib"
16231 fi
16232
16233echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
16234echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
16235if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
16236 echo $ECHO_N "(cached) $ECHO_C" >&6
16237else
16238 ac_check_lib_save_LIBS=$LIBS
16239LIBS="-lresolv $LIBS"
16240cat >conftest.$ac_ext <<_ACEOF
16241#line $LINENO "configure"
16242/* confdefs.h. */
16243_ACEOF
16244cat confdefs.h >>conftest.$ac_ext
16245cat >>conftest.$ac_ext <<_ACEOF
16246/* end confdefs.h. */
16247
16248/* Override any gcc2 internal prototype to avoid an error. */
16249#ifdef __cplusplus
16250extern "C"
16251#endif
16252/* We use char because int might match the return type of a gcc2
16253 builtin and then its argument prototype would still apply. */
16254char dn_expand ();
16255int
16256main ()
16257{
16258dn_expand ();
16259 ;
16260 return 0;
16261}
16262_ACEOF
16263rm -f conftest.$ac_objext conftest$ac_exeext
16264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16265 (eval $ac_link) 2>&5
16266 ac_status=$?
16267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16268 (exit $ac_status); } &&
16269 { ac_try='test -s conftest$ac_exeext'
16270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16271 (eval $ac_try) 2>&5
16272 ac_status=$?
16273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274 (exit $ac_status); }; }; then
16275 ac_cv_lib_resolv_dn_expand=yes
16276else
16277 echo "$as_me: failed program was:" >&5
16278sed 's/^/| /' conftest.$ac_ext >&5
16279
16280ac_cv_lib_resolv_dn_expand=no
16281fi
16282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16283LIBS=$ac_check_lib_save_LIBS
16284fi
16285echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
16286echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
16287if test $ac_cv_lib_resolv_dn_expand = yes; then
16288 cat >>confdefs.h <<_ACEOF
16289@%:@define HAVE_LIBRESOLV 1
16290_ACEOF
16291
16292 LIBS="-lresolv $LIBS"
16293
16294fi
16295
16296
16297 KRB5=yes
16298 fi
16299
16300
16301fi;
16302# Check whether user wants Kerberos 4 support
16303KRB4_MSG="no"
16304
16305# Check whether --with-kerberos4 or --without-kerberos4 was given.
16306if test "${with_kerberos4+set}" = set; then
16307 withval="$with_kerberos4"
16308
16309 if test "x$withval" != "xno" ; then
16310 if test "x$withval" != "xyes" ; then
16311 CPPFLAGS="$CPPFLAGS -I${withval}/include"
16312 LDFLAGS="$LDFLAGS -L${withval}/lib"
16313 if test ! -z "$need_dash_r" ; then
16314 LDFLAGS="$LDFLAGS -R${withval}/lib"
16315 fi
16316 if test ! -z "$blibpath" ; then
16317 blibpath="$blibpath:${withval}/lib"
16318 fi
16319 else
16320 if test -d /usr/include/kerberosIV ; then
16321 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
16322 fi
16323 fi
16324
16325
16326for ac_header in krb.h
16327do
16328as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16329if eval "test \"\${$as_ac_Header+set}\" = set"; then
16330 echo "$as_me:$LINENO: checking for $ac_header" >&5
16331echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16332if eval "test \"\${$as_ac_Header+set}\" = set"; then
16333 echo $ECHO_N "(cached) $ECHO_C" >&6
16334fi
16335echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16336echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16337else
16338 # Is the header compilable?
16339echo "$as_me:$LINENO: checking $ac_header usability" >&5
16340echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16341cat >conftest.$ac_ext <<_ACEOF
16342#line $LINENO "configure"
16343/* confdefs.h. */
16344_ACEOF
16345cat confdefs.h >>conftest.$ac_ext
16346cat >>conftest.$ac_ext <<_ACEOF
16347/* end confdefs.h. */
16348$ac_includes_default
16349@%:@include <$ac_header>
16350_ACEOF
16351rm -f conftest.$ac_objext
16352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16353 (eval $ac_compile) 2>&5
16354 ac_status=$?
16355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16356 (exit $ac_status); } &&
16357 { ac_try='test -s conftest.$ac_objext'
16358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16359 (eval $ac_try) 2>&5
16360 ac_status=$?
16361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16362 (exit $ac_status); }; }; then
16363 ac_header_compiler=yes
16364else
16365 echo "$as_me: failed program was:" >&5
16366sed 's/^/| /' conftest.$ac_ext >&5
16367
16368ac_header_compiler=no
16369fi
16370rm -f conftest.$ac_objext conftest.$ac_ext
16371echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16372echo "${ECHO_T}$ac_header_compiler" >&6
16373
16374# Is the header present?
16375echo "$as_me:$LINENO: checking $ac_header presence" >&5
16376echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16377cat >conftest.$ac_ext <<_ACEOF
16378#line $LINENO "configure"
16379/* confdefs.h. */
16380_ACEOF
16381cat confdefs.h >>conftest.$ac_ext
16382cat >>conftest.$ac_ext <<_ACEOF
16383/* end confdefs.h. */
16384@%:@include <$ac_header>
16385_ACEOF
16386if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16387 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16388 ac_status=$?
16389 grep -v '^ *+' conftest.er1 >conftest.err
16390 rm -f conftest.er1
16391 cat conftest.err >&5
16392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16393 (exit $ac_status); } >/dev/null; then
16394 if test -s conftest.err; then
16395 ac_cpp_err=$ac_c_preproc_warn_flag
16396 else
16397 ac_cpp_err=
16398 fi
16399else
16400 ac_cpp_err=yes
16401fi
16402if test -z "$ac_cpp_err"; then
16403 ac_header_preproc=yes
16404else
16405 echo "$as_me: failed program was:" >&5
16406sed 's/^/| /' conftest.$ac_ext >&5
16407
16408 ac_header_preproc=no
16409fi
16410rm -f conftest.err conftest.$ac_ext
16411echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16412echo "${ECHO_T}$ac_header_preproc" >&6
16413
16414# So? What about this header?
16415case $ac_header_compiler:$ac_header_preproc in
16416 yes:no )
16417 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16418echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16419 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16420echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16421 (
16422 cat <<\_ASBOX
16423@%:@@%:@ ------------------------------------ @%:@@%:@
16424@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
16425@%:@@%:@ ------------------------------------ @%:@@%:@
16426_ASBOX
16427 ) |
16428 sed "s/^/$as_me: WARNING: /" >&2
16429 ;;
16430 no:yes )
16431 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16432echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16433 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16434echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16435 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16436echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16437 (
16438 cat <<\_ASBOX
16439@%:@@%:@ ------------------------------------ @%:@@%:@
16440@%:@@%:@ Report this to bug-autoconf@gnu.org. @%:@@%:@
16441@%:@@%:@ ------------------------------------ @%:@@%:@
16442_ASBOX
16443 ) |
16444 sed "s/^/$as_me: WARNING: /" >&2
16445 ;;
16446esac
16447echo "$as_me:$LINENO: checking for $ac_header" >&5
16448echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16449if eval "test \"\${$as_ac_Header+set}\" = set"; then
16450 echo $ECHO_N "(cached) $ECHO_C" >&6
16451else
16452 eval "$as_ac_Header=$ac_header_preproc"
16453fi
16454echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16455echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16456
16457fi
16458if test `eval echo '${'$as_ac_Header'}'` = yes; then
16459 cat >>confdefs.h <<_ACEOF
16460@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16461_ACEOF
16462
16463fi
16464
16465done
16466
16467 if test "$ac_cv_header_krb_h" != yes; then
16468 { echo "$as_me:$LINENO: WARNING: Cannot find krb.h, build may fail" >&5
16469echo "$as_me: WARNING: Cannot find krb.h, build may fail" >&2;}
16470 fi
16471
16472echo "$as_me:$LINENO: checking for main in -lkrb" >&5
16473echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
16474if test "${ac_cv_lib_krb_main+set}" = set; then
16475 echo $ECHO_N "(cached) $ECHO_C" >&6
16476else
16477 ac_check_lib_save_LIBS=$LIBS
16478LIBS="-lkrb $LIBS"
16479cat >conftest.$ac_ext <<_ACEOF
16480#line $LINENO "configure"
16481/* confdefs.h. */
16482_ACEOF
16483cat confdefs.h >>conftest.$ac_ext
16484cat >>conftest.$ac_ext <<_ACEOF
16485/* end confdefs.h. */
16486
16487
16488int
16489main ()
16490{
16491main ();
16492 ;
16493 return 0;
16494}
16495_ACEOF
16496rm -f conftest.$ac_objext conftest$ac_exeext
16497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16498 (eval $ac_link) 2>&5
16499 ac_status=$?
16500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16501 (exit $ac_status); } &&
16502 { ac_try='test -s conftest$ac_exeext'
16503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16504 (eval $ac_try) 2>&5
16505 ac_status=$?
16506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16507 (exit $ac_status); }; }; then
16508 ac_cv_lib_krb_main=yes
16509else
16510 echo "$as_me: failed program was:" >&5
16511sed 's/^/| /' conftest.$ac_ext >&5
16512
16513ac_cv_lib_krb_main=no
16514fi
16515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16516LIBS=$ac_check_lib_save_LIBS
16517fi
16518echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
16519echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
16520if test $ac_cv_lib_krb_main = yes; then
16521 cat >>confdefs.h <<_ACEOF
16522@%:@define HAVE_LIBKRB 1
16523_ACEOF
16524
16525 LIBS="-lkrb $LIBS"
16526
16527fi
16528
16529 if test "$ac_cv_lib_krb_main" != yes; then
16530
16531echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
16532echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
16533if test "${ac_cv_lib_krb4_main+set}" = set; then
16534 echo $ECHO_N "(cached) $ECHO_C" >&6
16535else
16536 ac_check_lib_save_LIBS=$LIBS
16537LIBS="-lkrb4 $LIBS"
16538cat >conftest.$ac_ext <<_ACEOF
16539#line $LINENO "configure"
16540/* confdefs.h. */
16541_ACEOF
16542cat confdefs.h >>conftest.$ac_ext
16543cat >>conftest.$ac_ext <<_ACEOF
16544/* end confdefs.h. */
16545
16546
16547int
16548main ()
16549{
16550main ();
16551 ;
16552 return 0;
16553}
16554_ACEOF
16555rm -f conftest.$ac_objext conftest$ac_exeext
16556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16557 (eval $ac_link) 2>&5
16558 ac_status=$?
16559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16560 (exit $ac_status); } &&
16561 { ac_try='test -s conftest$ac_exeext'
16562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16563 (eval $ac_try) 2>&5
16564 ac_status=$?
16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16566 (exit $ac_status); }; }; then
16567 ac_cv_lib_krb4_main=yes
16568else
16569 echo "$as_me: failed program was:" >&5
16570sed 's/^/| /' conftest.$ac_ext >&5
16571
16572ac_cv_lib_krb4_main=no
16573fi
16574rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16575LIBS=$ac_check_lib_save_LIBS
16576fi
16577echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
16578echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
16579if test $ac_cv_lib_krb4_main = yes; then
16580 cat >>confdefs.h <<_ACEOF
16581@%:@define HAVE_LIBKRB4 1
16582_ACEOF
16583
16584 LIBS="-lkrb4 $LIBS"
16585
16586fi
16587
16588 if test "$ac_cv_lib_krb4_main" != yes; then
16589 { echo "$as_me:$LINENO: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&5
16590echo "$as_me: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&2;}
16591 else
16592 KLIBS="-lkrb4"
16593 fi
16594 else
16595 KLIBS="-lkrb"
16596 fi
16597
16598echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
16599echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
16600if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
16601 echo $ECHO_N "(cached) $ECHO_C" >&6
16602else
16603 ac_check_lib_save_LIBS=$LIBS
16604LIBS="-ldes $LIBS"
16605cat >conftest.$ac_ext <<_ACEOF
16606#line $LINENO "configure"
16607/* confdefs.h. */
16608_ACEOF
16609cat confdefs.h >>conftest.$ac_ext
16610cat >>conftest.$ac_ext <<_ACEOF
16611/* end confdefs.h. */
16612
16613/* Override any gcc2 internal prototype to avoid an error. */
16614#ifdef __cplusplus
16615extern "C"
16616#endif
16617/* We use char because int might match the return type of a gcc2
16618 builtin and then its argument prototype would still apply. */
16619char des_cbc_encrypt ();
16620int
16621main ()
16622{
16623des_cbc_encrypt ();
16624 ;
16625 return 0;
16626}
16627_ACEOF
16628rm -f conftest.$ac_objext conftest$ac_exeext
16629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16630 (eval $ac_link) 2>&5
16631 ac_status=$?
16632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633 (exit $ac_status); } &&
16634 { ac_try='test -s conftest$ac_exeext'
16635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16636 (eval $ac_try) 2>&5
16637 ac_status=$?
16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639 (exit $ac_status); }; }; then
16640 ac_cv_lib_des_des_cbc_encrypt=yes
16641else
16642 echo "$as_me: failed program was:" >&5
16643sed 's/^/| /' conftest.$ac_ext >&5
16644
16645ac_cv_lib_des_des_cbc_encrypt=no
16646fi
16647rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16648LIBS=$ac_check_lib_save_LIBS
16649fi
16650echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
16651echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
16652if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
16653 cat >>confdefs.h <<_ACEOF
16654@%:@define HAVE_LIBDES 1
16655_ACEOF
16656
16657 LIBS="-ldes $LIBS"
16658
16659fi
16660
16661 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
16662
16663echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
16664echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
16665if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
16666 echo $ECHO_N "(cached) $ECHO_C" >&6
16667else
16668 ac_check_lib_save_LIBS=$LIBS
16669LIBS="-ldes425 $LIBS"
16670cat >conftest.$ac_ext <<_ACEOF
16671#line $LINENO "configure"
16672/* confdefs.h. */
16673_ACEOF
16674cat confdefs.h >>conftest.$ac_ext
16675cat >>conftest.$ac_ext <<_ACEOF
16676/* end confdefs.h. */
16677
16678/* Override any gcc2 internal prototype to avoid an error. */
16679#ifdef __cplusplus
16680extern "C"
16681#endif
16682/* We use char because int might match the return type of a gcc2
16683 builtin and then its argument prototype would still apply. */
16684char des_cbc_encrypt ();
16685int
16686main ()
16687{
16688des_cbc_encrypt ();
16689 ;
16690 return 0;
16691}
16692_ACEOF
16693rm -f conftest.$ac_objext conftest$ac_exeext
16694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16695 (eval $ac_link) 2>&5
16696 ac_status=$?
16697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698 (exit $ac_status); } &&
16699 { ac_try='test -s conftest$ac_exeext'
16700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16701 (eval $ac_try) 2>&5
16702 ac_status=$?
16703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16704 (exit $ac_status); }; }; then
16705 ac_cv_lib_des425_des_cbc_encrypt=yes
16706else
16707 echo "$as_me: failed program was:" >&5
16708sed 's/^/| /' conftest.$ac_ext >&5
16709
16710ac_cv_lib_des425_des_cbc_encrypt=no
16711fi
16712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16713LIBS=$ac_check_lib_save_LIBS
16714fi
16715echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
16716echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
16717if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
16718 cat >>confdefs.h <<_ACEOF
16719@%:@define HAVE_LIBDES425 1
16720_ACEOF
16721
16722 LIBS="-ldes425 $LIBS"
16723
16724fi
16725
16726 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
16727 { echo "$as_me:$LINENO: WARNING: Cannot find libdes nor libdes425, build may fail" >&5
16728echo "$as_me: WARNING: Cannot find libdes nor libdes425, build may fail" >&2;}
16729 else
16730 KLIBS="-ldes425"
16731 fi
16732 else
16733 KLIBS="-ldes"
16734 fi
16735
16736echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
16737echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
16738if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
16739 echo $ECHO_N "(cached) $ECHO_C" >&6
16740else
16741 ac_check_lib_save_LIBS=$LIBS
16742LIBS="-lresolv $LIBS"
16743cat >conftest.$ac_ext <<_ACEOF
16744#line $LINENO "configure"
16745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
16750
16751/* Override any gcc2 internal prototype to avoid an error. */
16752#ifdef __cplusplus
16753extern "C"
16754#endif
16755/* We use char because int might match the return type of a gcc2
16756 builtin and then its argument prototype would still apply. */
16757char dn_expand ();
16758int
16759main ()
16760{
16761dn_expand ();
16762 ;
16763 return 0;
16764}
16765_ACEOF
16766rm -f conftest.$ac_objext conftest$ac_exeext
16767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16768 (eval $ac_link) 2>&5
16769 ac_status=$?
16770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771 (exit $ac_status); } &&
16772 { ac_try='test -s conftest$ac_exeext'
16773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16774 (eval $ac_try) 2>&5
16775 ac_status=$?
16776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16777 (exit $ac_status); }; }; then
16778 ac_cv_lib_resolv_dn_expand=yes
16779else
16780 echo "$as_me: failed program was:" >&5
16781sed 's/^/| /' conftest.$ac_ext >&5
16782
16783ac_cv_lib_resolv_dn_expand=no
16784fi
16785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16786LIBS=$ac_check_lib_save_LIBS
16787fi
16788echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
16789echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
16790if test $ac_cv_lib_resolv_dn_expand = yes; then
16791 cat >>confdefs.h <<_ACEOF
16792@%:@define HAVE_LIBRESOLV 1
16793_ACEOF
16794
16795 LIBS="-lresolv $LIBS"
16796
16797fi
16798
16799 KRB4=yes
16800 KRB4_MSG="yes"
16801 cat >>confdefs.h <<\_ACEOF
16802@%:@define KRB4 1
16803_ACEOF
16804
16805 fi
16806
16807
16808fi;
16809
16810# Check whether user wants AFS support
16811AFS_MSG="no"
16812
16813# Check whether --with-afs or --without-afs was given.
16814if test "${with_afs+set}" = set; then
16815 withval="$with_afs"
16816
16817 if test "x$withval" != "xno" ; then
16818
16819 if test "x$withval" != "xyes" ; then
16820 CPPFLAGS="$CPPFLAGS -I${withval}/include"
16821 LDFLAGS="$LDFLAGS -L${withval}/lib"
16822 fi
16823
16824 if test -z "$KRB4" ; then
16825 { echo "$as_me:$LINENO: WARNING: AFS requires Kerberos IV support, build may fail" >&5
16826echo "$as_me: WARNING: AFS requires Kerberos IV support, build may fail" >&2;}
16827 fi
16828
16829 LIBS="-lkafs $LIBS"
16830 if test ! -z "$AFS_LIBS" ; then
16831 LIBS="$LIBS $AFS_LIBS"
16832 fi
16833 cat >>confdefs.h <<\_ACEOF
16834@%:@define AFS 1
16835_ACEOF
16836
16837 AFS_MSG="yes"
16838 fi
16839
16840
16841fi;
16842LIBS="$LIBS $KLIBS $K5LIBS"
16843
16844# Looking for programs, paths and files
16845
16846PRIVSEP_PATH=/var/empty
16847
16848# Check whether --with-privsep-path or --without-privsep-path was given.
16849if test "${with_privsep_path+set}" = set; then
16850 withval="$with_privsep_path"
16851
16852 if test "x$withval" != "$no" ; then
16853 PRIVSEP_PATH=$withval
16854 fi
16855
16856
16857fi;
16858
16859
16860
16861# Check whether --with-xauth or --without-xauth was given.
16862if test "${with_xauth+set}" = set; then
16863 withval="$with_xauth"
16864
16865 if test "x$withval" != "xno" ; then
16866 xauth_path=$withval
16867 fi
16868
16869else
16870
16871 TestPath="$PATH"
16872 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
16873 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
16874 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
16875 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
16876 # Extract the first word of "xauth", so it can be a program name with args.
16877set dummy xauth; ac_word=$2
16878echo "$as_me:$LINENO: checking for $ac_word" >&5
16879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16880if test "${ac_cv_path_xauth_path+set}" = set; then
16881 echo $ECHO_N "(cached) $ECHO_C" >&6
16882else
16883 case $xauth_path in
16884 [\\/]* | ?:[\\/]*)
16885 ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
16886 ;;
16887 *)
16888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16889for as_dir in $TestPath
16890do
16891 IFS=$as_save_IFS
16892 test -z "$as_dir" && as_dir=.
16893 for ac_exec_ext in '' $ac_executable_extensions; do
16894 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16895 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
16896 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16897 break 2
16898 fi
16899done
16900done
16901
16902 ;;
16903esac
16904fi
16905xauth_path=$ac_cv_path_xauth_path
16906
16907if test -n "$xauth_path"; then
16908 echo "$as_me:$LINENO: result: $xauth_path" >&5
16909echo "${ECHO_T}$xauth_path" >&6
16910else
16911 echo "$as_me:$LINENO: result: no" >&5
16912echo "${ECHO_T}no" >&6
16913fi
16914
16915 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
16916 xauth_path="/usr/openwin/bin/xauth"
16917 fi
16918
16919
16920fi;
16921
16922STRIP_OPT=-s
16923# Check whether --enable-strip or --disable-strip was given.
16924if test "${enable_strip+set}" = set; then
16925 enableval="$enable_strip"
16926
16927 if test "x$enableval" = "xno" ; then
16928 STRIP_OPT=
16929 fi
16930
16931
16932fi;
16933
16934
16935if test -z "$xauth_path" ; then
16936 XAUTH_PATH="undefined"
16937
16938else
16939 cat >>confdefs.h <<_ACEOF
16940@%:@define XAUTH_PATH "$xauth_path"
16941_ACEOF
16942
16943 XAUTH_PATH=$xauth_path
16944
16945fi
16946
16947# Check for mail directory (last resort if we cannot get it from headers)
16948if test ! -z "$MAIL" ; then
16949 maildir=`dirname $MAIL`
16950 cat >>confdefs.h <<_ACEOF
16951@%:@define MAIL_DIRECTORY "$maildir"
16952_ACEOF
16953
16954fi
16955
16956if test -z "$no_dev_ptmx" ; then
16957 if test "x$disable_ptmx_check" != "xyes" ; then
16958 echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5
16959echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6
16960if test "${ac_cv_file___dev_ptmx_+set}" = set; then
16961 echo $ECHO_N "(cached) $ECHO_C" >&6
16962else
16963 test "$cross_compiling" = yes &&
16964 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
16965echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
16966 { (exit 1); exit 1; }; }
16967if test -r ""/dev/ptmx""; then
16968 ac_cv_file___dev_ptmx_=yes
16969else
16970 ac_cv_file___dev_ptmx_=no
16971fi
16972fi
16973echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5
16974echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6
16975if test $ac_cv_file___dev_ptmx_ = yes; then
16976
16977 cat >>confdefs.h <<_ACEOF
16978@%:@define HAVE_DEV_PTMX 1
16979_ACEOF
16980
16981 have_dev_ptmx=1
16982
16983
16984fi
16985
16986 fi
16987fi
16988echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5
16989echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6
16990if test "${ac_cv_file___dev_ptc_+set}" = set; then
16991 echo $ECHO_N "(cached) $ECHO_C" >&6
16992else
16993 test "$cross_compiling" = yes &&
16994 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
16995echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
16996 { (exit 1); exit 1; }; }
16997if test -r ""/dev/ptc""; then
16998 ac_cv_file___dev_ptc_=yes
16999else
17000 ac_cv_file___dev_ptc_=no
17001fi
17002fi
17003echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5
17004echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6
17005if test $ac_cv_file___dev_ptc_ = yes; then
17006
17007 cat >>confdefs.h <<_ACEOF
17008@%:@define HAVE_DEV_PTS_AND_PTC 1
17009_ACEOF
17010
17011 have_dev_ptc=1
17012
17013
17014fi
17015
17016
17017# Options from here on. Some of these are preset by platform above
17018
17019# Check whether --with-mantype or --without-mantype was given.
17020if test "${with_mantype+set}" = set; then
17021 withval="$with_mantype"
17022
17023 case "$withval" in
17024 man|cat|doc)
17025 MANTYPE=$withval
17026 ;;
17027 *)
17028 { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5
17029echo "$as_me: error: invalid man type: $withval" >&2;}
17030 { (exit 1); exit 1; }; }
17031 ;;
17032 esac
17033
17034
17035fi;
17036if test -z "$MANTYPE"; then
17037 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
17038 for ac_prog in nroff awf
17039do
17040 # Extract the first word of "$ac_prog", so it can be a program name with args.
17041set dummy $ac_prog; ac_word=$2
17042echo "$as_me:$LINENO: checking for $ac_word" >&5
17043echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17044if test "${ac_cv_path_NROFF+set}" = set; then
17045 echo $ECHO_N "(cached) $ECHO_C" >&6
17046else
17047 case $NROFF in
17048 [\\/]* | ?:[\\/]*)
17049 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
17050 ;;
17051 *)
17052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17053for as_dir in $TestPath
17054do
17055 IFS=$as_save_IFS
17056 test -z "$as_dir" && as_dir=.
17057 for ac_exec_ext in '' $ac_executable_extensions; do
17058 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17059 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
17060 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17061 break 2
17062 fi
17063done
17064done
17065
17066 ;;
17067esac
17068fi
17069NROFF=$ac_cv_path_NROFF
17070
17071if test -n "$NROFF"; then
17072 echo "$as_me:$LINENO: result: $NROFF" >&5
17073echo "${ECHO_T}$NROFF" >&6
17074else
17075 echo "$as_me:$LINENO: result: no" >&5
17076echo "${ECHO_T}no" >&6
17077fi
17078
17079 test -n "$NROFF" && break
17080done
17081test -n "$NROFF" || NROFF="/bin/false"
17082
17083 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
17084 MANTYPE=doc
17085 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
17086 MANTYPE=man
17087 else
17088 MANTYPE=cat
17089 fi
17090fi
17091
17092if test "$MANTYPE" = "doc"; then
17093 mansubdir=man;
17094else
17095 mansubdir=$MANTYPE;
17096fi
17097
17098
17099# Check whether to enable MD5 passwords
17100MD5_MSG="no"
17101
17102# Check whether --with-md5-passwords or --without-md5-passwords was given.
17103if test "${with_md5_passwords+set}" = set; then
17104 withval="$with_md5_passwords"
17105
17106 if test "x$withval" != "xno" ; then
17107 cat >>confdefs.h <<\_ACEOF
17108@%:@define HAVE_MD5_PASSWORDS 1
17109_ACEOF
17110
17111 MD5_MSG="yes"
17112 fi
17113
17114
17115fi;
17116
17117# Whether to disable shadow password support
17118
17119# Check whether --with-shadow or --without-shadow was given.
17120if test "${with_shadow+set}" = set; then
17121 withval="$with_shadow"
17122
17123 if test "x$withval" = "xno" ; then
17124 cat >>confdefs.h <<\_ACEOF
17125@%:@define DISABLE_SHADOW 1
17126_ACEOF
17127
17128 disable_shadow=yes
17129 fi
17130
17131
17132fi;
17133
17134if test -z "$disable_shadow" ; then
17135 echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5
17136echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6
17137 cat >conftest.$ac_ext <<_ACEOF
17138#line $LINENO "configure"
17139/* confdefs.h. */
17140_ACEOF
17141cat confdefs.h >>conftest.$ac_ext
17142cat >>conftest.$ac_ext <<_ACEOF
17143/* end confdefs.h. */
17144
17145#include <sys/types.h>
17146#include <shadow.h>
17147 struct spwd sp;
17148
17149int
17150main ()
17151{
17152 sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
17153 ;
17154 return 0;
17155}
17156_ACEOF
17157rm -f conftest.$ac_objext
17158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17159 (eval $ac_compile) 2>&5
17160 ac_status=$?
17161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17162 (exit $ac_status); } &&
17163 { ac_try='test -s conftest.$ac_objext'
17164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17165 (eval $ac_try) 2>&5
17166 ac_status=$?
17167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17168 (exit $ac_status); }; }; then
17169 sp_expire_available=yes
17170else
17171 echo "$as_me: failed program was:" >&5
17172sed 's/^/| /' conftest.$ac_ext >&5
17173
17174
17175
17176fi
17177rm -f conftest.$ac_objext conftest.$ac_ext
17178
17179 if test "x$sp_expire_available" = "xyes" ; then
17180 echo "$as_me:$LINENO: result: yes" >&5
17181echo "${ECHO_T}yes" >&6
17182 cat >>confdefs.h <<\_ACEOF
17183@%:@define HAS_SHADOW_EXPIRE 1
17184_ACEOF
17185
17186 else
17187 echo "$as_me:$LINENO: result: no" >&5
17188echo "${ECHO_T}no" >&6
17189 fi
17190fi
17191
17192# Use ip address instead of hostname in $DISPLAY
17193if test ! -z "$IPADDR_IN_DISPLAY" ; then
17194 DISPLAY_HACK_MSG="yes"
17195 cat >>confdefs.h <<\_ACEOF
17196@%:@define IPADDR_IN_DISPLAY 1
17197_ACEOF
17198
17199else
17200 DISPLAY_HACK_MSG="no"
17201
17202# Check whether --with-ipaddr-display or --without-ipaddr-display was given.
17203if test "${with_ipaddr_display+set}" = set; then
17204 withval="$with_ipaddr_display"
17205
17206 if test "x$withval" != "xno" ; then
17207 cat >>confdefs.h <<\_ACEOF
17208@%:@define IPADDR_IN_DISPLAY 1
17209_ACEOF
17210
17211 DISPLAY_HACK_MSG="yes"
17212 fi
17213
17214
17215fi;
17216fi
17217
17218if test $ac_cv_func_login_getcapbool = "yes" -a \
17219 $ac_cv_header_login_cap_h = "yes" ; then
17220 USES_LOGIN_CONF=yes
17221fi
17222# Whether to mess with the default path
17223SERVER_PATH_MSG="(default)"
17224
17225# Check whether --with-default-path or --without-default-path was given.
17226if test "${with_default_path+set}" = set; then
17227 withval="$with_default_path"
17228
17229 if test "$USES_LOGIN_CONF" = "yes" ; then
17230 { echo "$as_me:$LINENO: WARNING:
17231--with-default-path=PATH has no effect on this system.
17232Edit /etc/login.conf instead." >&5
17233echo "$as_me: WARNING:
17234--with-default-path=PATH has no effect on this system.
17235Edit /etc/login.conf instead." >&2;}
17236 elif test "x$withval" != "xno" ; then
17237 user_path="$withval"
17238 SERVER_PATH_MSG="$withval"
17239 fi
17240
17241else
17242 if test "$USES_LOGIN_CONF" = "yes" ; then
17243 { echo "$as_me:$LINENO: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
17244echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
17245 else
17246 if test "$cross_compiling" = yes; then
17247 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
17248
17249else
17250 cat >conftest.$ac_ext <<_ACEOF
17251#line $LINENO "configure"
17252/* confdefs.h. */
17253_ACEOF
17254cat confdefs.h >>conftest.$ac_ext
17255cat >>conftest.$ac_ext <<_ACEOF
17256/* end confdefs.h. */
17257
17258/* find out what STDPATH is */
17259#include <stdio.h>
17260#ifdef HAVE_PATHS_H
17261# include <paths.h>
17262#endif
17263#ifndef _PATH_STDPATH
17264# ifdef _PATH_USERPATH /* Irix */
17265# define _PATH_STDPATH _PATH_USERPATH
17266# else
17267# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
17268# endif
17269#endif
17270#include <sys/types.h>
17271#include <sys/stat.h>
17272#include <fcntl.h>
17273#define DATA "conftest.stdpath"
17274
17275main()
17276{
17277 FILE *fd;
17278 int rc;
17279
17280 fd = fopen(DATA,"w");
17281 if(fd == NULL)
17282 exit(1);
17283
17284 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
17285 exit(1);
17286
17287 exit(0);
17288}
17289
17290_ACEOF
17291rm -f conftest$ac_exeext
17292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17293 (eval $ac_link) 2>&5
17294 ac_status=$?
17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17298 (eval $ac_try) 2>&5
17299 ac_status=$?
17300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17301 (exit $ac_status); }; }; then
17302 user_path=`cat conftest.stdpath`
17303else
17304 echo "$as_me: program exited with status $ac_status" >&5
17305echo "$as_me: failed program was:" >&5
17306sed 's/^/| /' conftest.$ac_ext >&5
17307
17308( exit $ac_status )
17309 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
17310fi
17311rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17312fi
17313# make sure $bindir is in USER_PATH so scp will work
17314 t_bindir=`eval echo ${bindir}`
17315 case $t_bindir in
17316 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
17317 esac
17318 case $t_bindir in
17319 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
17320 esac
17321 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
17322 if test $? -ne 0 ; then
17323 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
17324 if test $? -ne 0 ; then
17325 user_path=$user_path:$t_bindir
17326 echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5
17327echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6
17328 fi
17329 fi
17330 fi
17331
17332fi;
17333if test "$USES_LOGIN_CONF" != "yes" ; then
17334 cat >>confdefs.h <<_ACEOF
17335@%:@define USER_PATH "$user_path"
17336_ACEOF
17337
17338
17339fi
17340
17341# Set superuser path separately to user path
17342
17343# Check whether --with-superuser-path or --without-superuser-path was given.
17344if test "${with_superuser_path+set}" = set; then
17345 withval="$with_superuser_path"
17346
17347 if test "x$withval" != "xno" ; then
17348 cat >>confdefs.h <<_ACEOF
17349@%:@define SUPERUSER_PATH "$withval"
17350_ACEOF
17351
17352 superuser_path=$withval
17353 fi
17354
17355
17356fi;
17357
17358
17359# Whether to force IPv4 by default (needed on broken glibc Linux)
17360IPV4_HACK_MSG="no"
17361
17362# Check whether --with-ipv4-default or --without-ipv4-default was given.
17363if test "${with_ipv4_default+set}" = set; then
17364 withval="$with_ipv4_default"
17365
17366 if test "x$withval" != "xno" ; then
17367 cat >>confdefs.h <<\_ACEOF
17368@%:@define IPV4_DEFAULT 1
17369_ACEOF
17370
17371 IPV4_HACK_MSG="yes"
17372 fi
17373
17374
17375fi;
17376
17377echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
17378echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6
17379IPV4_IN6_HACK_MSG="no"
17380
17381# Check whether --with-4in6 or --without-4in6 was given.
17382if test "${with_4in6+set}" = set; then
17383 withval="$with_4in6"
17384
17385 if test "x$withval" != "xno" ; then
17386 echo "$as_me:$LINENO: result: yes" >&5
17387echo "${ECHO_T}yes" >&6
17388 cat >>confdefs.h <<\_ACEOF
17389@%:@define IPV4_IN_IPV6 1
17390_ACEOF
17391
17392 IPV4_IN6_HACK_MSG="yes"
17393 else
17394 echo "$as_me:$LINENO: result: no" >&5
17395echo "${ECHO_T}no" >&6
17396 fi
17397
17398else
17399
17400 if test "x$inet6_default_4in6" = "xyes"; then
17401 echo "$as_me:$LINENO: result: yes (default)" >&5
17402echo "${ECHO_T}yes (default)" >&6
17403 cat >>confdefs.h <<\_ACEOF
17404@%:@define IPV4_IN_IPV6 1
17405_ACEOF
17406
17407 IPV4_IN6_HACK_MSG="yes"
17408 else
17409 echo "$as_me:$LINENO: result: no (default)" >&5
17410echo "${ECHO_T}no (default)" >&6
17411 fi
17412
17413
17414fi;
17415
17416# Whether to enable BSD auth support
17417BSD_AUTH_MSG=no
17418
17419# Check whether --with-bsd-auth or --without-bsd-auth was given.
17420if test "${with_bsd_auth+set}" = set; then
17421 withval="$with_bsd_auth"
17422
17423 if test "x$withval" != "xno" ; then
17424 cat >>confdefs.h <<\_ACEOF
17425@%:@define BSD_AUTH 1
17426_ACEOF
17427
17428 BSD_AUTH_MSG=yes
17429 fi
17430
17431
17432fi;
17433
17434# Where to place sshd.pid
17435piddir=/var/run
17436# make sure the directory exists
17437if test ! -d $piddir ; then
17438 piddir=`eval echo ${sysconfdir}`
17439 case $piddir in
17440 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
17441 esac
17442fi
17443
17444
17445# Check whether --with-pid-dir or --without-pid-dir was given.
17446if test "${with_pid_dir+set}" = set; then
17447 withval="$with_pid_dir"
17448
17449 if test "x$withval" != "xno" ; then
17450 piddir=$withval
17451 if test ! -d $piddir ; then
17452 { echo "$as_me:$LINENO: WARNING: ** no $piddir directory on this system **" >&5
17453echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
17454 fi
17455 fi
17456
17457
17458fi;
17459
17460cat >>confdefs.h <<_ACEOF
17461@%:@define _PATH_SSH_PIDDIR "$piddir"
17462_ACEOF
17463
17464
17465
17466# Check whether --enable-lastlog or --disable-lastlog was given.
17467if test "${enable_lastlog+set}" = set; then
17468 enableval="$enable_lastlog"
17469 cat >>confdefs.h <<\_ACEOF
17470@%:@define DISABLE_LASTLOG 1
17471_ACEOF
17472
17473
17474fi;
17475# Check whether --enable-utmp or --disable-utmp was given.
17476if test "${enable_utmp+set}" = set; then
17477 enableval="$enable_utmp"
17478 cat >>confdefs.h <<\_ACEOF
17479@%:@define DISABLE_UTMP 1
17480_ACEOF
17481
17482
17483fi;
17484# Check whether --enable-utmpx or --disable-utmpx was given.
17485if test "${enable_utmpx+set}" = set; then
17486 enableval="$enable_utmpx"
17487 cat >>confdefs.h <<\_ACEOF
17488@%:@define DISABLE_UTMPX 1
17489_ACEOF
17490
17491
17492fi;
17493# Check whether --enable-wtmp or --disable-wtmp was given.
17494if test "${enable_wtmp+set}" = set; then
17495 enableval="$enable_wtmp"
17496 cat >>confdefs.h <<\_ACEOF
17497@%:@define DISABLE_WTMP 1
17498_ACEOF
17499
17500
17501fi;
17502# Check whether --enable-wtmpx or --disable-wtmpx was given.
17503if test "${enable_wtmpx+set}" = set; then
17504 enableval="$enable_wtmpx"
17505 cat >>confdefs.h <<\_ACEOF
17506@%:@define DISABLE_WTMPX 1
17507_ACEOF
17508
17509
17510fi;
17511# Check whether --enable-libutil or --disable-libutil was given.
17512if test "${enable_libutil+set}" = set; then
17513 enableval="$enable_libutil"
17514 cat >>confdefs.h <<\_ACEOF
17515@%:@define DISABLE_LOGIN 1
17516_ACEOF
17517
17518
17519fi;
17520# Check whether --enable-pututline or --disable-pututline was given.
17521if test "${enable_pututline+set}" = set; then
17522 enableval="$enable_pututline"
17523 cat >>confdefs.h <<\_ACEOF
17524@%:@define DISABLE_PUTUTLINE 1
17525_ACEOF
17526
17527
17528fi;
17529# Check whether --enable-pututxline or --disable-pututxline was given.
17530if test "${enable_pututxline+set}" = set; then
17531 enableval="$enable_pututxline"
17532 cat >>confdefs.h <<\_ACEOF
17533@%:@define DISABLE_PUTUTXLINE 1
17534_ACEOF
17535
17536
17537fi;
17538
17539# Check whether --with-lastlog or --without-lastlog was given.
17540if test "${with_lastlog+set}" = set; then
17541 withval="$with_lastlog"
17542
17543 if test "x$withval" = "xno" ; then
17544 cat >>confdefs.h <<\_ACEOF
17545@%:@define DISABLE_LASTLOG 1
17546_ACEOF
17547
17548 else
17549 conf_lastlog_location=$withval
17550 fi
17551
17552
17553fi;
17554
17555
17556echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5
17557echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6
17558cat >conftest.$ac_ext <<_ACEOF
17559#line $LINENO "configure"
17560/* confdefs.h. */
17561_ACEOF
17562cat confdefs.h >>conftest.$ac_ext
17563cat >>conftest.$ac_ext <<_ACEOF
17564/* end confdefs.h. */
17565
17566#include <sys/types.h>
17567#include <utmp.h>
17568#ifdef HAVE_LASTLOG_H
17569# include <lastlog.h>
17570#endif
17571#ifdef HAVE_PATHS_H
17572# include <paths.h>
17573#endif
17574#ifdef HAVE_LOGIN_H
17575# include <login.h>
17576#endif
17577
17578int
17579main ()
17580{
17581 char *lastlog = LASTLOG_FILE;
17582 ;
17583 return 0;
17584}
17585_ACEOF
17586rm -f conftest.$ac_objext
17587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17588 (eval $ac_compile) 2>&5
17589 ac_status=$?
17590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591 (exit $ac_status); } &&
17592 { ac_try='test -s conftest.$ac_objext'
17593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17594 (eval $ac_try) 2>&5
17595 ac_status=$?
17596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17597 (exit $ac_status); }; }; then
17598 echo "$as_me:$LINENO: result: yes" >&5
17599echo "${ECHO_T}yes" >&6
17600else
17601 echo "$as_me: failed program was:" >&5
17602sed 's/^/| /' conftest.$ac_ext >&5
17603
17604
17605 echo "$as_me:$LINENO: result: no" >&5
17606echo "${ECHO_T}no" >&6
17607 echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5
17608echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6
17609 cat >conftest.$ac_ext <<_ACEOF
17610#line $LINENO "configure"
17611/* confdefs.h. */
17612_ACEOF
17613cat confdefs.h >>conftest.$ac_ext
17614cat >>conftest.$ac_ext <<_ACEOF
17615/* end confdefs.h. */
17616
17617#include <sys/types.h>
17618#include <utmp.h>
17619#ifdef HAVE_LASTLOG_H
17620# include <lastlog.h>
17621#endif
17622#ifdef HAVE_PATHS_H
17623# include <paths.h>
17624#endif
17625
17626int
17627main ()
17628{
17629 char *lastlog = _PATH_LASTLOG;
17630 ;
17631 return 0;
17632}
17633_ACEOF
17634rm -f conftest.$ac_objext
17635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17636 (eval $ac_compile) 2>&5
17637 ac_status=$?
17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17639 (exit $ac_status); } &&
17640 { ac_try='test -s conftest.$ac_objext'
17641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17642 (eval $ac_try) 2>&5
17643 ac_status=$?
17644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17645 (exit $ac_status); }; }; then
17646 echo "$as_me:$LINENO: result: yes" >&5
17647echo "${ECHO_T}yes" >&6
17648else
17649 echo "$as_me: failed program was:" >&5
17650sed 's/^/| /' conftest.$ac_ext >&5
17651
17652
17653 echo "$as_me:$LINENO: result: no" >&5
17654echo "${ECHO_T}no" >&6
17655 system_lastlog_path=no
17656
17657fi
17658rm -f conftest.$ac_objext conftest.$ac_ext
17659
17660
17661fi
17662rm -f conftest.$ac_objext conftest.$ac_ext
17663
17664if test -z "$conf_lastlog_location"; then
17665 if test x"$system_lastlog_path" = x"no" ; then
17666 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
17667 if (test -d "$f" || test -f "$f") ; then
17668 conf_lastlog_location=$f
17669 fi
17670 done
17671 if test -z "$conf_lastlog_location"; then
17672 { echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5
17673echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
17674 fi
17675 fi
17676fi
17677
17678if test -n "$conf_lastlog_location"; then
17679 cat >>confdefs.h <<_ACEOF
17680@%:@define CONF_LASTLOG_FILE "$conf_lastlog_location"
17681_ACEOF
17682
17683fi
17684
17685echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5
17686echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6
17687cat >conftest.$ac_ext <<_ACEOF
17688#line $LINENO "configure"
17689/* confdefs.h. */
17690_ACEOF
17691cat confdefs.h >>conftest.$ac_ext
17692cat >>conftest.$ac_ext <<_ACEOF
17693/* end confdefs.h. */
17694
17695#include <sys/types.h>
17696#include <utmp.h>
17697#ifdef HAVE_PATHS_H
17698# include <paths.h>
17699#endif
17700
17701int
17702main ()
17703{
17704 char *utmp = UTMP_FILE;
17705 ;
17706 return 0;
17707}
17708_ACEOF
17709rm -f conftest.$ac_objext
17710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17711 (eval $ac_compile) 2>&5
17712 ac_status=$?
17713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17714 (exit $ac_status); } &&
17715 { ac_try='test -s conftest.$ac_objext'
17716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17717 (eval $ac_try) 2>&5
17718 ac_status=$?
17719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17720 (exit $ac_status); }; }; then
17721 echo "$as_me:$LINENO: result: yes" >&5
17722echo "${ECHO_T}yes" >&6
17723else
17724 echo "$as_me: failed program was:" >&5
17725sed 's/^/| /' conftest.$ac_ext >&5
17726
17727 echo "$as_me:$LINENO: result: no" >&5
17728echo "${ECHO_T}no" >&6
17729 system_utmp_path=no
17730
17731fi
17732rm -f conftest.$ac_objext conftest.$ac_ext
17733if test -z "$conf_utmp_location"; then
17734 if test x"$system_utmp_path" = x"no" ; then
17735 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
17736 if test -f $f ; then
17737 conf_utmp_location=$f
17738 fi
17739 done
17740 if test -z "$conf_utmp_location"; then
17741 cat >>confdefs.h <<\_ACEOF
17742@%:@define DISABLE_UTMP 1
17743_ACEOF
17744
17745 fi
17746 fi
17747fi
17748if test -n "$conf_utmp_location"; then
17749 cat >>confdefs.h <<_ACEOF
17750@%:@define CONF_UTMP_FILE "$conf_utmp_location"
17751_ACEOF
17752
17753fi
17754
17755echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5
17756echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6
17757cat >conftest.$ac_ext <<_ACEOF
17758#line $LINENO "configure"
17759/* confdefs.h. */
17760_ACEOF
17761cat confdefs.h >>conftest.$ac_ext
17762cat >>conftest.$ac_ext <<_ACEOF
17763/* end confdefs.h. */
17764
17765#include <sys/types.h>
17766#include <utmp.h>
17767#ifdef HAVE_PATHS_H
17768# include <paths.h>
17769#endif
17770
17771int
17772main ()
17773{
17774 char *wtmp = WTMP_FILE;
17775 ;
17776 return 0;
17777}
17778_ACEOF
17779rm -f conftest.$ac_objext
17780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17781 (eval $ac_compile) 2>&5
17782 ac_status=$?
17783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17784 (exit $ac_status); } &&
17785 { ac_try='test -s conftest.$ac_objext'
17786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17787 (eval $ac_try) 2>&5
17788 ac_status=$?
17789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17790 (exit $ac_status); }; }; then
17791 echo "$as_me:$LINENO: result: yes" >&5
17792echo "${ECHO_T}yes" >&6
17793else
17794 echo "$as_me: failed program was:" >&5
17795sed 's/^/| /' conftest.$ac_ext >&5
17796
17797 echo "$as_me:$LINENO: result: no" >&5
17798echo "${ECHO_T}no" >&6
17799 system_wtmp_path=no
17800
17801fi
17802rm -f conftest.$ac_objext conftest.$ac_ext
17803if test -z "$conf_wtmp_location"; then
17804 if test x"$system_wtmp_path" = x"no" ; then
17805 for f in /usr/adm/wtmp /var/log/wtmp; do
17806 if test -f $f ; then
17807 conf_wtmp_location=$f
17808 fi
17809 done
17810 if test -z "$conf_wtmp_location"; then
17811 cat >>confdefs.h <<\_ACEOF
17812@%:@define DISABLE_WTMP 1
17813_ACEOF
17814
17815 fi
17816 fi
17817fi
17818if test -n "$conf_wtmp_location"; then
17819 cat >>confdefs.h <<_ACEOF
17820@%:@define CONF_WTMP_FILE "$conf_wtmp_location"
17821_ACEOF
17822
17823fi
17824
17825
17826echo "$as_me:$LINENO: checking if your system defines UTMPX_FILE" >&5
17827echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6
17828cat >conftest.$ac_ext <<_ACEOF
17829#line $LINENO "configure"
17830/* confdefs.h. */
17831_ACEOF
17832cat confdefs.h >>conftest.$ac_ext
17833cat >>conftest.$ac_ext <<_ACEOF
17834/* end confdefs.h. */
17835
17836#include <sys/types.h>
17837#include <utmp.h>
17838#ifdef HAVE_UTMPX_H
17839#include <utmpx.h>
17840#endif
17841#ifdef HAVE_PATHS_H
17842# include <paths.h>
17843#endif
17844
17845int
17846main ()
17847{
17848 char *utmpx = UTMPX_FILE;
17849 ;
17850 return 0;
17851}
17852_ACEOF
17853rm -f conftest.$ac_objext
17854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17855 (eval $ac_compile) 2>&5
17856 ac_status=$?
17857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17858 (exit $ac_status); } &&
17859 { ac_try='test -s conftest.$ac_objext'
17860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17861 (eval $ac_try) 2>&5
17862 ac_status=$?
17863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17864 (exit $ac_status); }; }; then
17865 echo "$as_me:$LINENO: result: yes" >&5
17866echo "${ECHO_T}yes" >&6
17867else
17868 echo "$as_me: failed program was:" >&5
17869sed 's/^/| /' conftest.$ac_ext >&5
17870
17871 echo "$as_me:$LINENO: result: no" >&5
17872echo "${ECHO_T}no" >&6
17873 system_utmpx_path=no
17874
17875fi
17876rm -f conftest.$ac_objext conftest.$ac_ext
17877if test -z "$conf_utmpx_location"; then
17878 if test x"$system_utmpx_path" = x"no" ; then
17879 cat >>confdefs.h <<\_ACEOF
17880@%:@define DISABLE_UTMPX 1
17881_ACEOF
17882
17883 fi
17884else
17885 cat >>confdefs.h <<_ACEOF
17886@%:@define CONF_UTMPX_FILE "$conf_utmpx_location"
17887_ACEOF
17888
17889fi
17890
17891echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5
17892echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6
17893cat >conftest.$ac_ext <<_ACEOF
17894#line $LINENO "configure"
17895/* confdefs.h. */
17896_ACEOF
17897cat confdefs.h >>conftest.$ac_ext
17898cat >>conftest.$ac_ext <<_ACEOF
17899/* end confdefs.h. */
17900
17901#include <sys/types.h>
17902#include <utmp.h>
17903#ifdef HAVE_UTMPX_H
17904#include <utmpx.h>
17905#endif
17906#ifdef HAVE_PATHS_H
17907# include <paths.h>
17908#endif
17909
17910int
17911main ()
17912{
17913 char *wtmpx = WTMPX_FILE;
17914 ;
17915 return 0;
17916}
17917_ACEOF
17918rm -f conftest.$ac_objext
17919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17920 (eval $ac_compile) 2>&5
17921 ac_status=$?
17922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17923 (exit $ac_status); } &&
17924 { ac_try='test -s conftest.$ac_objext'
17925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17926 (eval $ac_try) 2>&5
17927 ac_status=$?
17928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17929 (exit $ac_status); }; }; then
17930 echo "$as_me:$LINENO: result: yes" >&5
17931echo "${ECHO_T}yes" >&6
17932else
17933 echo "$as_me: failed program was:" >&5
17934sed 's/^/| /' conftest.$ac_ext >&5
17935
17936 echo "$as_me:$LINENO: result: no" >&5
17937echo "${ECHO_T}no" >&6
17938 system_wtmpx_path=no
17939
17940fi
17941rm -f conftest.$ac_objext conftest.$ac_ext
17942if test -z "$conf_wtmpx_location"; then
17943 if test x"$system_wtmpx_path" = x"no" ; then
17944 cat >>confdefs.h <<\_ACEOF
17945@%:@define DISABLE_WTMPX 1
17946_ACEOF
17947
17948 fi
17949else
17950 cat >>confdefs.h <<_ACEOF
17951@%:@define CONF_WTMPX_FILE "$conf_wtmpx_location"
17952_ACEOF
17953
17954fi
17955
17956
17957if test ! -z "$blibpath" ; then
17958 LDFLAGS="$LDFLAGS $blibflags$blibpath"
17959 { echo "$as_me:$LINENO: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
17960echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
17961fi
17962
17963if test "$PAM_MSG" = yes ; then
17964 LIBS=`echo $LIBS | sed 's/-lpam //'`
17965fi
17966if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
17967 LIBS=`echo $LIBS | sed 's/-ldl //'`
17968fi
17969
17970
17971 ac_config_files="$ac_config_files Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds"
17972
17973cat >confcache <<\_ACEOF
17974# This file is a shell script that caches the results of configure
17975# tests run on this system so they can be shared between configure
17976# scripts and configure runs, see configure's option --config-cache.
17977# It is not useful on other systems. If it contains results you don't
17978# want to keep, you may remove or edit it.
17979#
17980# config.status only pays attention to the cache file if you give it
17981# the --recheck option to rerun configure.
17982#
17983# `ac_cv_env_foo' variables (set or unset) will be overridden when
17984# loading this file, other *unset* `ac_cv_foo' will be assigned the
17985# following values.
17986
17987_ACEOF
17988
17989# The following way of writing the cache mishandles newlines in values,
17990# but we know of no workaround that is simple, portable, and efficient.
17991# So, don't put newlines in cache variables' values.
17992# Ultrix sh set writes to stderr and can't be redirected directly,
17993# and sets the high bit in the cache file unless we assign to the vars.
17994{
17995 (set) 2>&1 |
17996 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17997 *ac_space=\ *)
17998 # `set' does not quote correctly, so add quotes (double-quote
17999 # substitution turns \\\\ into \\, and sed turns \\ into \).
18000 sed -n \
18001 "s/'/'\\\\''/g;
18002 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18003 ;;
18004 *)
18005 # `set' quotes correctly as required by POSIX, so do not add quotes.
18006 sed -n \
18007 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18008 ;;
18009 esac;
18010} |
18011 sed '
18012 t clear
18013 : clear
18014 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18015 t end
18016 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18017 : end' >>confcache
18018if diff $cache_file confcache >/dev/null 2>&1; then :; else
18019 if test -w $cache_file; then
18020 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18021 cat confcache >$cache_file
18022 else
18023 echo "not updating unwritable cache $cache_file"
18024 fi
18025fi
18026rm -f confcache
18027
18028test "x$prefix" = xNONE && prefix=$ac_default_prefix
18029# Let make expand exec_prefix.
18030test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18031
18032# VPATH may cause trouble with some makes, so we remove $(srcdir),
18033# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18034# trailing colons and then remove the whole line if VPATH becomes empty
18035# (actually we leave an empty line to preserve line numbers).
18036if test "x$srcdir" = x.; then
18037 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18038s/:*\$(srcdir):*/:/;
18039s/:*\${srcdir}:*/:/;
18040s/:*@srcdir@:*/:/;
18041s/^\([^=]*=[ ]*\):*/\1/;
18042s/:*$//;
18043s/^[^=]*=[ ]*$//;
18044}'
18045fi
18046
18047DEFS=-DHAVE_CONFIG_H
18048
18049ac_libobjs=
18050ac_ltlibobjs=
18051for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
18052 # 1. Remove the extension, and $U if already installed.
18053 ac_i=`echo "$ac_i" |
18054 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18055 # 2. Add them.
18056 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18057 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18058done
18059LIB@&t@OBJS=$ac_libobjs
18060
18061LTLIBOBJS=$ac_ltlibobjs
18062
18063
18064
18065: ${CONFIG_STATUS=./config.status}
18066ac_clean_files_save=$ac_clean_files
18067ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18068{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18069echo "$as_me: creating $CONFIG_STATUS" >&6;}
18070cat >$CONFIG_STATUS <<_ACEOF
18071#! $SHELL
18072# Generated by $as_me.
18073# Run this file to recreate the current configuration.
18074# Compiler output produced by configure, useful for debugging
18075# configure, is in config.log if it exists.
18076
18077debug=false
18078ac_cs_recheck=false
18079ac_cs_silent=false
18080SHELL=\${CONFIG_SHELL-$SHELL}
18081_ACEOF
18082
18083cat >>$CONFIG_STATUS <<\_ACEOF
18084## --------------------- ##
18085## M4sh Initialization. ##
18086## --------------------- ##
18087
18088# Be Bourne compatible
18089if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18090 emulate sh
18091 NULLCMD=:
18092 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18093 # is contrary to our usage. Disable this feature.
18094 alias -g '${1+"$@"}'='"$@"'
18095elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18096 set -o posix
18097fi
18098
18099# Support unset when possible.
18100if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18101 as_unset=unset
18102else
18103 as_unset=false
18104fi
18105
18106
18107# Work around bugs in pre-3.0 UWIN ksh.
18108$as_unset ENV MAIL MAILPATH
18109PS1='$ '
18110PS2='> '
18111PS4='+ '
18112
18113# NLS nuisances.
18114for as_var in \
18115 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18116 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18117 LC_TELEPHONE LC_TIME
18118do
18119 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18120 eval $as_var=C; export $as_var
18121 else
18122 $as_unset $as_var
18123 fi
18124done
18125
18126# Required to use basename.
18127if expr a : '\(a\)' >/dev/null 2>&1; then
18128 as_expr=expr
18129else
18130 as_expr=false
18131fi
18132
18133if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18134 as_basename=basename
18135else
18136 as_basename=false
18137fi
18138
18139
18140# Name of the executable.
18141as_me=`$as_basename "$0" ||
18142$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18143 X"$0" : 'X\(//\)$' \| \
18144 X"$0" : 'X\(/\)$' \| \
18145 . : '\(.\)' 2>/dev/null ||
18146echo X/"$0" |
18147 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18148 /^X\/\(\/\/\)$/{ s//\1/; q; }
18149 /^X\/\(\/\).*/{ s//\1/; q; }
18150 s/.*/./; q'`
18151
18152
18153# PATH needs CR, and LINENO needs CR and PATH.
18154# Avoid depending upon Character Ranges.
18155as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18156as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18157as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18158as_cr_digits='0123456789'
18159as_cr_alnum=$as_cr_Letters$as_cr_digits
18160
18161# The user is always right.
18162if test "${PATH_SEPARATOR+set}" != set; then
18163 echo "#! /bin/sh" >conf$$.sh
18164 echo "exit 0" >>conf$$.sh
18165 chmod +x conf$$.sh
18166 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18167 PATH_SEPARATOR=';'
18168 else
18169 PATH_SEPARATOR=:
18170 fi
18171 rm -f conf$$.sh
18172fi
18173
18174
18175 as_lineno_1=$LINENO
18176 as_lineno_2=$LINENO
18177 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18178 test "x$as_lineno_1" != "x$as_lineno_2" &&
18179 test "x$as_lineno_3" = "x$as_lineno_2" || {
18180 # Find who we are. Look in the path if we contain no path at all
18181 # relative or not.
18182 case $0 in
18183 *[\\/]* ) as_myself=$0 ;;
18184 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18185for as_dir in $PATH
18186do
18187 IFS=$as_save_IFS
18188 test -z "$as_dir" && as_dir=.
18189 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18190done
18191
18192 ;;
18193 esac
18194 # We did not find ourselves, most probably we were run as `sh COMMAND'
18195 # in which case we are not to be found in the path.
18196 if test "x$as_myself" = x; then
18197 as_myself=$0
18198 fi
18199 if test ! -f "$as_myself"; then
18200 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18201echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18202 { (exit 1); exit 1; }; }
18203 fi
18204 case $CONFIG_SHELL in
18205 '')
18206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18207for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18208do
18209 IFS=$as_save_IFS
18210 test -z "$as_dir" && as_dir=.
18211 for as_base in sh bash ksh sh5; do
18212 case $as_dir in
18213 /*)
18214 if ("$as_dir/$as_base" -c '
18215 as_lineno_1=$LINENO
18216 as_lineno_2=$LINENO
18217 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18218 test "x$as_lineno_1" != "x$as_lineno_2" &&
18219 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
18220 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18221 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
18222 CONFIG_SHELL=$as_dir/$as_base
18223 export CONFIG_SHELL
18224 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18225 fi;;
18226 esac
18227 done
18228done
18229;;
18230 esac
18231
18232 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18233 # uniformly replaced by the line number. The first 'sed' inserts a
18234 # line-number line before each line; the second 'sed' does the real
18235 # work. The second script uses 'N' to pair each line-number line
18236 # with the numbered line, and appends trailing '-' during
18237 # substitution so that $LINENO is not a special case at line end.
18238 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18239 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18240 sed '=' <$as_myself |
18241 sed '
18242 N
18243 s,$,-,
18244 : loop
18245 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18246 t loop
18247 s,-$,,
18248 s,^['$as_cr_digits']*\n,,
18249 ' >$as_me.lineno &&
18250 chmod +x $as_me.lineno ||
18251 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18252echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18253 { (exit 1); exit 1; }; }
18254
18255 # Don't try to exec as it changes $[0], causing all sort of problems
18256 # (the dirname of $[0] is not the place where we might find the
18257 # original and so on. Autoconf is especially sensible to this).
18258 . ./$as_me.lineno
18259 # Exit status is that of the last command.
18260 exit
18261}
18262
18263
18264case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18265 *c*,-n*) ECHO_N= ECHO_C='
18266' ECHO_T=' ' ;;
18267 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18268 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18269esac
18270
18271if expr a : '\(a\)' >/dev/null 2>&1; then
18272 as_expr=expr
18273else
18274 as_expr=false
18275fi
18276
18277rm -f conf$$ conf$$.exe conf$$.file
18278echo >conf$$.file
18279if ln -s conf$$.file conf$$ 2>/dev/null; then
18280 # We could just check for DJGPP; but this test a) works b) is more generic
18281 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18282 if test -f conf$$.exe; then
18283 # Don't use ln at all; we don't have any links
18284 as_ln_s='cp -p'
18285 else
18286 as_ln_s='ln -s'
18287 fi
18288elif ln conf$$.file conf$$ 2>/dev/null; then
18289 as_ln_s=ln
18290else
18291 as_ln_s='cp -p'
18292fi
18293rm -f conf$$ conf$$.exe conf$$.file
18294
18295if mkdir -p . 2>/dev/null; then
18296 as_mkdir_p=:
18297else
18298 as_mkdir_p=false
18299fi
18300
18301as_executable_p="test -f"
18302
18303# Sed expression to map a string onto a valid CPP name.
18304as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18305
18306# Sed expression to map a string onto a valid variable name.
18307as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18308
18309
18310# IFS
18311# We need space, tab and new line, in precisely that order.
18312as_nl='
18313'
18314IFS=" $as_nl"
18315
18316# CDPATH.
18317$as_unset CDPATH
18318
18319exec 6>&1
18320
18321# Open the log real soon, to keep \$[0] and so on meaningful, and to
18322# report actual input values of CONFIG_FILES etc. instead of their
18323# values after options handling. Logging --version etc. is OK.
18324exec 5>>config.log
18325{
18326 echo
18327 sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
18328@%:@@%:@ Running $as_me. @%:@@%:@
18329_ASBOX
18330} >&5
18331cat >&5 <<_CSEOF
18332
18333This file was extended by $as_me, which was
18334generated by GNU Autoconf 2.57. Invocation command line was
18335
18336 CONFIG_FILES = $CONFIG_FILES
18337 CONFIG_HEADERS = $CONFIG_HEADERS
18338 CONFIG_LINKS = $CONFIG_LINKS
18339 CONFIG_COMMANDS = $CONFIG_COMMANDS
18340 $ $0 $@
18341
18342_CSEOF
18343echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18344echo >&5
18345_ACEOF
18346
18347# Files that config.status was made for.
18348if test -n "$ac_config_files"; then
18349 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18350fi
18351
18352if test -n "$ac_config_headers"; then
18353 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18354fi
18355
18356if test -n "$ac_config_links"; then
18357 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18358fi
18359
18360if test -n "$ac_config_commands"; then
18361 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18362fi
18363
18364cat >>$CONFIG_STATUS <<\_ACEOF
18365
18366ac_cs_usage="\
18367\`$as_me' instantiates files from templates according to the
18368current configuration.
18369
18370Usage: $0 [OPTIONS] [FILE]...
18371
18372 -h, --help print this help, then exit
18373 -V, --version print version number, then exit
18374 -q, --quiet do not print progress messages
18375 -d, --debug don't remove temporary files
18376 --recheck update $as_me by reconfiguring in the same conditions
18377 --file=FILE[:TEMPLATE]
18378 instantiate the configuration file FILE
18379 --header=FILE[:TEMPLATE]
18380 instantiate the configuration header FILE
18381
18382Configuration files:
18383$config_files
18384
18385Configuration headers:
18386$config_headers
18387
18388Report bugs to <bug-autoconf@gnu.org>."
18389_ACEOF
18390
18391cat >>$CONFIG_STATUS <<_ACEOF
18392ac_cs_version="\\
18393config.status
18394configured by $0, generated by GNU Autoconf 2.57,
18395 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18396
18397Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18398Free Software Foundation, Inc.
18399This config.status script is free software; the Free Software Foundation
18400gives unlimited permission to copy, distribute and modify it."
18401srcdir=$srcdir
18402INSTALL="$INSTALL"
18403_ACEOF
18404
18405cat >>$CONFIG_STATUS <<\_ACEOF
18406# If no file are specified by the user, then we need to provide default
18407# value. By we need to know if files were specified by the user.
18408ac_need_defaults=:
18409while test $# != 0
18410do
18411 case $1 in
18412 --*=*)
18413 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18414 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18415 ac_shift=:
18416 ;;
18417 -*)
18418 ac_option=$1
18419 ac_optarg=$2
18420 ac_shift=shift
18421 ;;
18422 *) # This is not an option, so the user has probably given explicit
18423 # arguments.
18424 ac_option=$1
18425 ac_need_defaults=false;;
18426 esac
18427
18428 case $ac_option in
18429 # Handling of the options.
18430_ACEOF
18431cat >>$CONFIG_STATUS <<\_ACEOF
18432 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18433 ac_cs_recheck=: ;;
18434 --version | --vers* | -V )
18435 echo "$ac_cs_version"; exit 0 ;;
18436 --he | --h)
18437 # Conflict between --help and --header
18438 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18439Try \`$0 --help' for more information." >&5
18440echo "$as_me: error: ambiguous option: $1
18441Try \`$0 --help' for more information." >&2;}
18442 { (exit 1); exit 1; }; };;
18443 --help | --hel | -h )
18444 echo "$ac_cs_usage"; exit 0 ;;
18445 --debug | --d* | -d )
18446 debug=: ;;
18447 --file | --fil | --fi | --f )
18448 $ac_shift
18449 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
18450 ac_need_defaults=false;;
18451 --header | --heade | --head | --hea )
18452 $ac_shift
18453 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
18454 ac_need_defaults=false;;
18455 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18456 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18457 ac_cs_silent=: ;;
18458
18459 # This is an error.
18460 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18461Try \`$0 --help' for more information." >&5
18462echo "$as_me: error: unrecognized option: $1
18463Try \`$0 --help' for more information." >&2;}
18464 { (exit 1); exit 1; }; } ;;
18465
18466 *) ac_config_targets="$ac_config_targets $1" ;;
18467
18468 esac
18469 shift
18470done
18471
18472ac_configure_extra_args=
18473
18474if $ac_cs_silent; then
18475 exec 6>/dev/null
18476 ac_configure_extra_args="$ac_configure_extra_args --silent"
18477fi
18478
18479_ACEOF
18480cat >>$CONFIG_STATUS <<_ACEOF
18481if \$ac_cs_recheck; then
18482 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18483 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18484fi
18485
18486_ACEOF
18487
18488
18489
18490
18491
18492cat >>$CONFIG_STATUS <<\_ACEOF
18493for ac_config_target in $ac_config_targets
18494do
18495 case "$ac_config_target" in
18496 # Handling of arguments.
18497 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18498 "openbsd-compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
18499 "scard/Makefile" ) CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;;
18500 "ssh_prng_cmds" ) CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
18501 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18502 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18503echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18504 { (exit 1); exit 1; }; };;
18505 esac
18506done
18507
18508# If the user did not use the arguments to specify the items to instantiate,
18509# then the envvar interface is used. Set only those that are not.
18510# We use the long form for the default assignment because of an extremely
18511# bizarre bug on SunOS 4.1.3.
18512if $ac_need_defaults; then
18513 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18514 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18515fi
18516
18517# Have a temporary directory for convenience. Make it in the build tree
18518# simply because there is no reason to put it here, and in addition,
18519# creating and moving files from /tmp can sometimes cause problems.
18520# Create a temporary directory, and hook for its removal unless debugging.
18521$debug ||
18522{
18523 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18524 trap '{ (exit 1); exit 1; }' 1 2 13 15
18525}
18526
18527# Create a (secure) tmp directory for tmp files.
18528
18529{
18530 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
18531 test -n "$tmp" && test -d "$tmp"
18532} ||
18533{
18534 tmp=./confstat$$-$RANDOM
18535 (umask 077 && mkdir $tmp)
18536} ||
18537{
18538 echo "$me: cannot create a temporary directory in ." >&2
18539 { (exit 1); exit 1; }
18540}
18541
18542_ACEOF
18543
18544cat >>$CONFIG_STATUS <<_ACEOF
18545
18546#
18547# CONFIG_FILES section.
18548#
18549
18550# No need to generate the scripts if there are no CONFIG_FILES.
18551# This happens for instance when ./config.status config.h
18552if test -n "\$CONFIG_FILES"; then
18553 # Protect against being on the right side of a sed subst in config.status.
18554 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18555 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18556s,@SHELL@,$SHELL,;t t
18557s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18558s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18559s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18560s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18561s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18562s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18563s,@exec_prefix@,$exec_prefix,;t t
18564s,@prefix@,$prefix,;t t
18565s,@program_transform_name@,$program_transform_name,;t t
18566s,@bindir@,$bindir,;t t
18567s,@sbindir@,$sbindir,;t t
18568s,@libexecdir@,$libexecdir,;t t
18569s,@datadir@,$datadir,;t t
18570s,@sysconfdir@,$sysconfdir,;t t
18571s,@sharedstatedir@,$sharedstatedir,;t t
18572s,@localstatedir@,$localstatedir,;t t
18573s,@libdir@,$libdir,;t t
18574s,@includedir@,$includedir,;t t
18575s,@oldincludedir@,$oldincludedir,;t t
18576s,@infodir@,$infodir,;t t
18577s,@mandir@,$mandir,;t t
18578s,@build_alias@,$build_alias,;t t
18579s,@host_alias@,$host_alias,;t t
18580s,@target_alias@,$target_alias,;t t
18581s,@DEFS@,$DEFS,;t t
18582s,@ECHO_C@,$ECHO_C,;t t
18583s,@ECHO_N@,$ECHO_N,;t t
18584s,@ECHO_T@,$ECHO_T,;t t
18585s,@LIBS@,$LIBS,;t t
18586s,@CC@,$CC,;t t
18587s,@CFLAGS@,$CFLAGS,;t t
18588s,@LDFLAGS@,$LDFLAGS,;t t
18589s,@CPPFLAGS@,$CPPFLAGS,;t t
18590s,@ac_ct_CC@,$ac_ct_CC,;t t
18591s,@EXEEXT@,$EXEEXT,;t t
18592s,@OBJEXT@,$OBJEXT,;t t
18593s,@build@,$build,;t t
18594s,@build_cpu@,$build_cpu,;t t
18595s,@build_vendor@,$build_vendor,;t t
18596s,@build_os@,$build_os,;t t
18597s,@host@,$host,;t t
18598s,@host_cpu@,$host_cpu,;t t
18599s,@host_vendor@,$host_vendor,;t t
18600s,@host_os@,$host_os,;t t
18601s,@CPP@,$CPP,;t t
18602s,@RANLIB@,$RANLIB,;t t
18603s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18604s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18605s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18606s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18607s,@AR@,$AR,;t t
18608s,@PERL@,$PERL,;t t
18609s,@SED@,$SED,;t t
18610s,@ENT@,$ENT,;t t
18611s,@TEST_MINUS_S_SH@,$TEST_MINUS_S_SH,;t t
18612s,@SH@,$SH,;t t
18613s,@LOGIN_PROGRAM_FALLBACK@,$LOGIN_PROGRAM_FALLBACK,;t t
18614s,@LD@,$LD,;t t
18615s,@EGREP@,$EGREP,;t t
18616s,@LIBWRAP@,$LIBWRAP,;t t
18617s,@LIBPAM@,$LIBPAM,;t t
18618s,@INSTALL_SSH_RAND_HELPER@,$INSTALL_SSH_RAND_HELPER,;t t
18619s,@SSH_PRIVSEP_USER@,$SSH_PRIVSEP_USER,;t t
18620s,@PROG_LS@,$PROG_LS,;t t
18621s,@PROG_NETSTAT@,$PROG_NETSTAT,;t t
18622s,@PROG_ARP@,$PROG_ARP,;t t
18623s,@PROG_IFCONFIG@,$PROG_IFCONFIG,;t t
18624s,@PROG_JSTAT@,$PROG_JSTAT,;t t
18625s,@PROG_PS@,$PROG_PS,;t t
18626s,@PROG_SAR@,$PROG_SAR,;t t
18627s,@PROG_W@,$PROG_W,;t t
18628s,@PROG_WHO@,$PROG_WHO,;t t
18629s,@PROG_LAST@,$PROG_LAST,;t t
18630s,@PROG_LASTLOG@,$PROG_LASTLOG,;t t
18631s,@PROG_DF@,$PROG_DF,;t t
18632s,@PROG_VMSTAT@,$PROG_VMSTAT,;t t
18633s,@PROG_UPTIME@,$PROG_UPTIME,;t t
18634s,@PROG_IPCS@,$PROG_IPCS,;t t
18635s,@PROG_TAIL@,$PROG_TAIL,;t t
18636s,@INSTALL_SSH_PRNG_CMDS@,$INSTALL_SSH_PRNG_CMDS,;t t
18637s,@OPENSC_CONFIG@,$OPENSC_CONFIG,;t t
18638s,@PRIVSEP_PATH@,$PRIVSEP_PATH,;t t
18639s,@xauth_path@,$xauth_path,;t t
18640s,@STRIP_OPT@,$STRIP_OPT,;t t
18641s,@XAUTH_PATH@,$XAUTH_PATH,;t t
18642s,@NROFF@,$NROFF,;t t
18643s,@MANTYPE@,$MANTYPE,;t t
18644s,@mansubdir@,$mansubdir,;t t
18645s,@user_path@,$user_path,;t t
18646s,@piddir@,$piddir,;t t
18647s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;t t
18648s,@LTLIBOBJS@,$LTLIBOBJS,;t t
18649CEOF
18650
18651_ACEOF
18652
18653 cat >>$CONFIG_STATUS <<\_ACEOF
18654 # Split the substitutions into bite-sized pieces for seds with
18655 # small command number limits, like on Digital OSF/1 and HP-UX.
18656 ac_max_sed_lines=48
18657 ac_sed_frag=1 # Number of current file.
18658 ac_beg=1 # First line for current file.
18659 ac_end=$ac_max_sed_lines # Line after last line for current file.
18660 ac_more_lines=:
18661 ac_sed_cmds=
18662 while $ac_more_lines; do
18663 if test $ac_beg -gt 1; then
18664 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18665 else
18666 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18667 fi
18668 if test ! -s $tmp/subs.frag; then
18669 ac_more_lines=false
18670 else
18671 # The purpose of the label and of the branching condition is to
18672 # speed up the sed processing (if there are no `@' at all, there
18673 # is no need to browse any of the substitutions).
18674 # These are the two extra sed commands mentioned above.
18675 (echo ':t
18676 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18677 if test -z "$ac_sed_cmds"; then
18678 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18679 else
18680 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18681 fi
18682 ac_sed_frag=`expr $ac_sed_frag + 1`
18683 ac_beg=$ac_end
18684 ac_end=`expr $ac_end + $ac_max_sed_lines`
18685 fi
18686 done
18687 if test -z "$ac_sed_cmds"; then
18688 ac_sed_cmds=cat
18689 fi
18690fi # test -n "$CONFIG_FILES"
18691
18692_ACEOF
18693cat >>$CONFIG_STATUS <<\_ACEOF
18694for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18695 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18696 case $ac_file in
18697 - | *:- | *:-:* ) # input from stdin
18698 cat >$tmp/stdin
18699 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18700 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18701 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18702 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18703 * ) ac_file_in=$ac_file.in ;;
18704 esac
18705
18706 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18707 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18708$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18709 X"$ac_file" : 'X\(//\)[^/]' \| \
18710 X"$ac_file" : 'X\(//\)$' \| \
18711 X"$ac_file" : 'X\(/\)' \| \
18712 . : '\(.\)' 2>/dev/null ||
18713echo X"$ac_file" |
18714 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18715 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18716 /^X\(\/\/\)$/{ s//\1/; q; }
18717 /^X\(\/\).*/{ s//\1/; q; }
18718 s/.*/./; q'`
18719 { if $as_mkdir_p; then
18720 mkdir -p "$ac_dir"
18721 else
18722 as_dir="$ac_dir"
18723 as_dirs=
18724 while test ! -d "$as_dir"; do
18725 as_dirs="$as_dir $as_dirs"
18726 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18727$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18728 X"$as_dir" : 'X\(//\)[^/]' \| \
18729 X"$as_dir" : 'X\(//\)$' \| \
18730 X"$as_dir" : 'X\(/\)' \| \
18731 . : '\(.\)' 2>/dev/null ||
18732echo X"$as_dir" |
18733 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18734 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18735 /^X\(\/\/\)$/{ s//\1/; q; }
18736 /^X\(\/\).*/{ s//\1/; q; }
18737 s/.*/./; q'`
18738 done
18739 test ! -n "$as_dirs" || mkdir $as_dirs
18740 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18741echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18742 { (exit 1); exit 1; }; }; }
18743
18744 ac_builddir=.
18745
18746if test "$ac_dir" != .; then
18747 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18748 # A "../" for each directory in $ac_dir_suffix.
18749 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18750else
18751 ac_dir_suffix= ac_top_builddir=
18752fi
18753
18754case $srcdir in
18755 .) # No --srcdir option. We are building in place.
18756 ac_srcdir=.
18757 if test -z "$ac_top_builddir"; then
18758 ac_top_srcdir=.
18759 else
18760 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18761 fi ;;
18762 [\\/]* | ?:[\\/]* ) # Absolute path.
18763 ac_srcdir=$srcdir$ac_dir_suffix;
18764 ac_top_srcdir=$srcdir ;;
18765 *) # Relative path.
18766 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18767 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18768esac
18769# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18770# absolute.
18771ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18772ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
18773ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18774ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18775
18776
18777 case $INSTALL in
18778 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18779 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18780 esac
18781
18782 if test x"$ac_file" != x-; then
18783 { echo "$as_me:$LINENO: creating $ac_file" >&5
18784echo "$as_me: creating $ac_file" >&6;}
18785 rm -f "$ac_file"
18786 fi
18787 # Let's still pretend it is `configure' which instantiates (i.e., don't
18788 # use $as_me), people would be surprised to read:
18789 # /* config.h. Generated by config.status. */
18790 if test x"$ac_file" = x-; then
18791 configure_input=
18792 else
18793 configure_input="$ac_file. "
18794 fi
18795 configure_input=$configure_input"Generated from `echo $ac_file_in |
18796 sed 's,.*/,,'` by configure."
18797
18798 # First look for the input files in the build tree, otherwise in the
18799 # src tree.
18800 ac_file_inputs=`IFS=:
18801 for f in $ac_file_in; do
18802 case $f in
18803 -) echo $tmp/stdin ;;
18804 [\\/$]*)
18805 # Absolute (can't be DOS-style, as IFS=:)
18806 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18807echo "$as_me: error: cannot find input file: $f" >&2;}
18808 { (exit 1); exit 1; }; }
18809 echo $f;;
18810 *) # Relative
18811 if test -f "$f"; then
18812 # Build tree
18813 echo $f
18814 elif test -f "$srcdir/$f"; then
18815 # Source tree
18816 echo $srcdir/$f
18817 else
18818 # /dev/null tree
18819 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18820echo "$as_me: error: cannot find input file: $f" >&2;}
18821 { (exit 1); exit 1; }; }
18822 fi;;
18823 esac
18824 done` || { (exit 1); exit 1; }
18825_ACEOF
18826cat >>$CONFIG_STATUS <<_ACEOF
18827 sed "$ac_vpsub
18828$extrasub
18829_ACEOF
18830cat >>$CONFIG_STATUS <<\_ACEOF
18831:t
18832/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18833s,@configure_input@,$configure_input,;t t
18834s,@srcdir@,$ac_srcdir,;t t
18835s,@abs_srcdir@,$ac_abs_srcdir,;t t
18836s,@top_srcdir@,$ac_top_srcdir,;t t
18837s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18838s,@builddir@,$ac_builddir,;t t
18839s,@abs_builddir@,$ac_abs_builddir,;t t
18840s,@top_builddir@,$ac_top_builddir,;t t
18841s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18842s,@INSTALL@,$ac_INSTALL,;t t
18843" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18844 rm -f $tmp/stdin
18845 if test x"$ac_file" != x-; then
18846 mv $tmp/out $ac_file
18847 else
18848 cat $tmp/out
18849 rm -f $tmp/out
18850 fi
18851
18852done
18853_ACEOF
18854cat >>$CONFIG_STATUS <<\_ACEOF
18855
18856#
18857# CONFIG_HEADER section.
18858#
18859
18860# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18861# NAME is the cpp macro being defined and VALUE is the value it is being given.
18862#
18863# ac_d sets the value in "#define NAME VALUE" lines.
18864ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18865ac_dB='[ ].*$,\1#\2'
18866ac_dC=' '
18867ac_dD=',;t'
18868# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18869ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18870ac_uB='$,\1#\2define\3'
18871ac_uC=' '
18872ac_uD=',;t'
18873
18874for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18875 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18876 case $ac_file in
18877 - | *:- | *:-:* ) # input from stdin
18878 cat >$tmp/stdin
18879 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18880 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18881 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18882 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18883 * ) ac_file_in=$ac_file.in ;;
18884 esac
18885
18886 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18887echo "$as_me: creating $ac_file" >&6;}
18888
18889 # First look for the input files in the build tree, otherwise in the
18890 # src tree.
18891 ac_file_inputs=`IFS=:
18892 for f in $ac_file_in; do
18893 case $f in
18894 -) echo $tmp/stdin ;;
18895 [\\/$]*)
18896 # Absolute (can't be DOS-style, as IFS=:)
18897 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18898echo "$as_me: error: cannot find input file: $f" >&2;}
18899 { (exit 1); exit 1; }; }
18900 echo $f;;
18901 *) # Relative
18902 if test -f "$f"; then
18903 # Build tree
18904 echo $f
18905 elif test -f "$srcdir/$f"; then
18906 # Source tree
18907 echo $srcdir/$f
18908 else
18909 # /dev/null tree
18910 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18911echo "$as_me: error: cannot find input file: $f" >&2;}
18912 { (exit 1); exit 1; }; }
18913 fi;;
18914 esac
18915 done` || { (exit 1); exit 1; }
18916 # Remove the trailing spaces.
18917 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18918
18919_ACEOF
18920
18921# Transform confdefs.h into two sed scripts, `conftest.defines' and
18922# `conftest.undefs', that substitutes the proper values into
18923# config.h.in to produce config.h. The first handles `#define'
18924# templates, and the second `#undef' templates.
18925# And first: Protect against being on the right side of a sed subst in
18926# config.status. Protect against being in an unquoted here document
18927# in config.status.
18928rm -f conftest.defines conftest.undefs
18929# Using a here document instead of a string reduces the quoting nightmare.
18930# Putting comments in sed scripts is not portable.
18931#
18932# `end' is used to avoid that the second main sed command (meant for
18933# 0-ary CPP macros) applies to n-ary macro definitions.
18934# See the Autoconf documentation for `clear'.
18935cat >confdef2sed.sed <<\_ACEOF
18936s/[\\&,]/\\&/g
18937s,[\\$`],\\&,g
18938t clear
18939: clear
18940s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18941t end
18942s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18943: end
18944_ACEOF
18945# If some macros were called several times there might be several times
18946# the same #defines, which is useless. Nevertheless, we may not want to
18947# sort them, since we want the *last* AC-DEFINE to be honored.
18948uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18949sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18950rm -f confdef2sed.sed
18951
18952# This sed command replaces #undef with comments. This is necessary, for
18953# example, in the case of _POSIX_SOURCE, which is predefined and required
18954# on some systems where configure will not decide to define it.
18955cat >>conftest.undefs <<\_ACEOF
18956s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18957_ACEOF
18958
18959# Break up conftest.defines because some shells have a limit on the size
18960# of here documents, and old seds have small limits too (100 cmds).
18961echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18962echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18963echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18964echo ' :' >>$CONFIG_STATUS
18965rm -f conftest.tail
18966while grep . conftest.defines >/dev/null
18967do
18968 # Write a limited-size here document to $tmp/defines.sed.
18969 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18970 # Speed up: don't consider the non `#define' lines.
18971 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18972 # Work around the forget-to-reset-the-flag bug.
18973 echo 't clr' >>$CONFIG_STATUS
18974 echo ': clr' >>$CONFIG_STATUS
18975 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18976 echo 'CEOF
18977 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18978 rm -f $tmp/in
18979 mv $tmp/out $tmp/in
18980' >>$CONFIG_STATUS
18981 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18982 rm -f conftest.defines
18983 mv conftest.tail conftest.defines
18984done
18985rm -f conftest.defines
18986echo ' fi # grep' >>$CONFIG_STATUS
18987echo >>$CONFIG_STATUS
18988
18989# Break up conftest.undefs because some shells have a limit on the size
18990# of here documents, and old seds have small limits too (100 cmds).
18991echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18992rm -f conftest.tail
18993while grep . conftest.undefs >/dev/null
18994do
18995 # Write a limited-size here document to $tmp/undefs.sed.
18996 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18997 # Speed up: don't consider the non `#undef'
18998 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18999 # Work around the forget-to-reset-the-flag bug.
19000 echo 't clr' >>$CONFIG_STATUS
19001 echo ': clr' >>$CONFIG_STATUS
19002 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19003 echo 'CEOF
19004 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19005 rm -f $tmp/in
19006 mv $tmp/out $tmp/in
19007' >>$CONFIG_STATUS
19008 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19009 rm -f conftest.undefs
19010 mv conftest.tail conftest.undefs
19011done
19012rm -f conftest.undefs
19013
19014cat >>$CONFIG_STATUS <<\_ACEOF
19015 # Let's still pretend it is `configure' which instantiates (i.e., don't
19016 # use $as_me), people would be surprised to read:
19017 # /* config.h. Generated by config.status. */
19018 if test x"$ac_file" = x-; then
19019 echo "/* Generated by configure. */" >$tmp/config.h
19020 else
19021 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
19022 fi
19023 cat $tmp/in >>$tmp/config.h
19024 rm -f $tmp/in
19025 if test x"$ac_file" != x-; then
19026 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
19027 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19028echo "$as_me: $ac_file is unchanged" >&6;}
19029 else
19030 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19031$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19032 X"$ac_file" : 'X\(//\)[^/]' \| \
19033 X"$ac_file" : 'X\(//\)$' \| \
19034 X"$ac_file" : 'X\(/\)' \| \
19035 . : '\(.\)' 2>/dev/null ||
19036echo X"$ac_file" |
19037 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19038 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19039 /^X\(\/\/\)$/{ s//\1/; q; }
19040 /^X\(\/\).*/{ s//\1/; q; }
19041 s/.*/./; q'`
19042 { if $as_mkdir_p; then
19043 mkdir -p "$ac_dir"
19044 else
19045 as_dir="$ac_dir"
19046 as_dirs=
19047 while test ! -d "$as_dir"; do
19048 as_dirs="$as_dir $as_dirs"
19049 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19050$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19051 X"$as_dir" : 'X\(//\)[^/]' \| \
19052 X"$as_dir" : 'X\(//\)$' \| \
19053 X"$as_dir" : 'X\(/\)' \| \
19054 . : '\(.\)' 2>/dev/null ||
19055echo X"$as_dir" |
19056 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19057 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19058 /^X\(\/\/\)$/{ s//\1/; q; }
19059 /^X\(\/\).*/{ s//\1/; q; }
19060 s/.*/./; q'`
19061 done
19062 test ! -n "$as_dirs" || mkdir $as_dirs
19063 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19064echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19065 { (exit 1); exit 1; }; }; }
19066
19067 rm -f $ac_file
19068 mv $tmp/config.h $ac_file
19069 fi
19070 else
19071 cat $tmp/config.h
19072 rm -f $tmp/config.h
19073 fi
19074done
19075_ACEOF
19076
19077cat >>$CONFIG_STATUS <<\_ACEOF
19078
19079{ (exit 0); exit 0; }
19080_ACEOF
19081chmod +x $CONFIG_STATUS
19082ac_clean_files=$ac_clean_files_save
19083
19084
19085# configure is writing to config.log, and then calls config.status.
19086# config.status does its own redirection, appending to config.log.
19087# Unfortunately, on DOS this fails, as config.log is still kept open
19088# by configure, so config.status won't be able to write to it; its
19089# output is simply discarded. So we exec the FD to /dev/null,
19090# effectively closing config.log, so it can be properly (re)opened and
19091# appended to by config.status. When coming back to configure, we
19092# need to make the FD available again.
19093if test "$no_create" != yes; then
19094 ac_cs_success=:
19095 ac_config_status_args=
19096 test "$silent" = yes &&
19097 ac_config_status_args="$ac_config_status_args --quiet"
19098 exec 5>/dev/null
19099 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19100 exec 5>>config.log
19101 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19102 # would make configure fail if this is the last instruction.
19103 $ac_cs_success || { (exit 1); exit 1; }
19104fi
19105
19106
19107# Print summary of options
19108
19109# Someone please show me a better way :)
19110A=`eval echo ${prefix}` ; A=`eval echo ${A}`
19111B=`eval echo ${bindir}` ; B=`eval echo ${B}`
19112C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
19113D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
19114E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
19115F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
19116G=`eval echo ${piddir}` ; G=`eval echo ${G}`
19117H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
19118I=`eval echo ${user_path}` ; I=`eval echo ${I}`
19119J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
19120
19121echo ""
19122echo "OpenSSH has been configured with the following options:"
19123echo " User binaries: $B"
19124echo " System binaries: $C"
19125echo " Configuration files: $D"
19126echo " Askpass program: $E"
19127echo " Manual pages: $F"
19128echo " PID file: $G"
19129echo " Privilege separation chroot path: $H"
19130if test "$USES_LOGIN_CONF" = "yes" ; then
19131echo " At runtime, sshd will use the path defined in /etc/login.conf"
19132else
19133echo " sshd default user PATH: $I"
19134fi
19135if test ! -z "$superuser_path" ; then
19136echo " sshd superuser user PATH: $J"
19137fi
19138echo " Manpage format: $MANTYPE"
19139echo " PAM support: ${PAM_MSG}"
19140echo " KerberosIV support: $KRB4_MSG"
19141echo " KerberosV support: $KRB5_MSG"
19142echo " Smartcard support: $SCARD_MSG"
19143echo " AFS support: $AFS_MSG"
19144echo " S/KEY support: $SKEY_MSG"
19145echo " TCP Wrappers support: $TCPW_MSG"
19146echo " MD5 password support: $MD5_MSG"
19147echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
19148echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
19149echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
19150echo " BSD Auth support: $BSD_AUTH_MSG"
19151echo " Random number source: $RAND_MSG"
19152if test ! -z "$USE_RAND_HELPER" ; then
19153echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
19154fi
19155
19156echo ""
19157
19158echo " Host: ${host}"
19159echo " Compiler: ${CC}"
19160echo " Compiler flags: ${CFLAGS}"
19161echo "Preprocessor flags: ${CPPFLAGS}"
19162echo " Linker flags: ${LDFLAGS}"
19163echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
19164
19165echo ""
19166
19167if test "x$PAM_MSG" = "xyes" ; then
19168 echo "PAM is enabled. You may need to install a PAM control file "
19169 echo "for sshd, otherwise password authentication may fail. "
19170 echo "Example PAM control files can be found in the contrib/ "
19171 echo "subdirectory"
19172 echo ""
19173fi
19174
19175if test ! -z "$RAND_HELPER_CMDHASH" ; then
19176 echo "WARNING: you are using the builtin random number collection "
19177 echo "service. Please read WARNING.RNG and request that your OS "
19178 echo "vendor includes kernel-based random number collection in "
19179 echo "future versions of your OS."
19180 echo ""
19181fi
19182
diff --git a/autom4te.cache/requests b/autom4te.cache/requests
new file mode 100644
index 000000000..72598fb0c
--- /dev/null
+++ b/autom4te.cache/requests
@@ -0,0 +1,111 @@
1# This file was created by autom4te.
2# It contains the lists of macros which have been traced.
3# It can be safely removed.
4
5@request = (
6 bless( [
7 '0',
8 1,
9 [
10 '/usr/share/autoconf'
11 ],
12 [
13 '/usr/share/autoconf/autoconf/autoconf.m4f',
14 'aclocal.m4',
15 'configure.ac'
16 ],
17 {
18 'm4_pattern_forbid' => 1,
19 'AC_TYPE_OFF_T' => 1,
20 'AC_C_VOLATILE' => 1,
21 'AC_FUNC_CLOSEDIR_VOID' => 1,
22 'AC_REPLACE_FNMATCH' => 1,
23 'AC_PROG_LIBTOOL' => 1,
24 'AC_FUNC_STAT' => 1,
25 'AC_HEADER_TIME' => 1,
26 'AC_FUNC_WAIT3' => 1,
27 'AM_AUTOMAKE_VERSION' => 1,
28 'AC_STRUCT_TM' => 1,
29 'AC_FUNC_LSTAT' => 1,
30 'AC_TYPE_MODE_T' => 1,
31 'AC_FUNC_GETMNTENT' => 1,
32 'AC_FUNC_STRTOD' => 1,
33 'AC_CHECK_HEADERS' => 1,
34 'AC_FUNC_STRNLEN' => 1,
35 'AC_PROG_CXX' => 1,
36 'AC_PATH_X' => 1,
37 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
38 'AC_PROG_AWK' => 1,
39 'AC_HEADER_STDC' => 1,
40 'AC_HEADER_MAJOR' => 1,
41 'AC_FUNC_ERROR_AT_LINE' => 1,
42 'AC_PROG_GCC_TRADITIONAL' => 1,
43 'AC_LIBSOURCE' => 1,
44 'AC_FUNC_MBRTOWC' => 1,
45 'AC_STRUCT_ST_BLOCKS' => 1,
46 'AC_TYPE_SIGNAL' => 1,
47 'AC_TYPE_UID_T' => 1,
48 'AC_CONFIG_AUX_DIR' => 1,
49 'AC_PROG_MAKE_SET' => 1,
50 'm4_pattern_allow' => 1,
51 'AC_DEFINE_TRACE_LITERAL' => 1,
52 'AC_FUNC_STRERROR_R' => 1,
53 'AC_PROG_CC' => 1,
54 'AC_DECL_SYS_SIGLIST' => 1,
55 'AC_FUNC_FORK' => 1,
56 'AC_FUNC_VPRINTF' => 1,
57 'AC_FUNC_STRCOLL' => 1,
58 'AC_PROG_YACC' => 1,
59 'AC_INIT' => 1,
60 'AC_STRUCT_TIMEZONE' => 1,
61 'AC_FUNC_CHOWN' => 1,
62 'AC_SUBST' => 1,
63 'AC_FUNC_ALLOCA' => 1,
64 'AC_CANONICAL_HOST' => 1,
65 'AC_FUNC_GETPGRP' => 1,
66 'AC_PROG_RANLIB' => 1,
67 'AM_INIT_AUTOMAKE' => 1,
68 'AC_FUNC_SETPGRP' => 1,
69 'AC_CONFIG_SUBDIRS' => 1,
70 'AC_FUNC_MMAP' => 1,
71 'AC_FUNC_REALLOC' => 1,
72 'AC_TYPE_SIZE_T' => 1,
73 'AC_CHECK_TYPES' => 1,
74 'AC_CHECK_MEMBERS' => 1,
75 'AM_MAINTAINER_MODE' => 1,
76 'AC_FUNC_UTIME_NULL' => 1,
77 'AC_FUNC_SELECT_ARGTYPES' => 1,
78 'AC_FUNC_STRFTIME' => 1,
79 'AC_HEADER_STAT' => 1,
80 'AC_C_INLINE' => 1,
81 'AC_PROG_CPP' => 1,
82 'AC_TYPE_PID_T' => 1,
83 'AC_C_CONST' => 1,
84 'AC_PROG_LEX' => 1,
85 'AC_CONFIG_FILES' => 1,
86 'include' => 1,
87 'AC_FUNC_SETVBUF_REVERSED' => 1,
88 'AC_PROG_INSTALL' => 1,
89 'AM_GNU_GETTEXT' => 1,
90 'AC_FUNC_OBSTACK' => 1,
91 'AC_CHECK_LIB' => 1,
92 'AC_FUNC_MALLOC' => 1,
93 'AC_FUNC_GETGROUPS' => 1,
94 'AC_FUNC_GETLOADAVG' => 1,
95 'AH_OUTPUT' => 1,
96 'AC_FUNC_FSEEKO' => 1,
97 'AM_PROG_CC_C_O' => 1,
98 'AM_CONDITIONAL' => 1,
99 'AC_CANONICAL_SYSTEM' => 1,
100 'AC_FUNC_MKTIME' => 1,
101 'AC_CONFIG_HEADERS' => 1,
102 'AC_HEADER_SYS_WAIT' => 1,
103 'AC_FUNC_MEMCMP' => 1,
104 'AC_PROG_LN_S' => 1,
105 'm4_include' => 1,
106 'AC_HEADER_DIRENT' => 1,
107 'AC_CHECK_FUNCS' => 1
108 }
109 ], 'Request' )
110 );
111
diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0
new file mode 100644
index 000000000..8c9b72476
--- /dev/null
+++ b/autom4te.cache/traces.0
@@ -0,0 +1,947 @@
1m4trace:configure.ac:3: -1- AC_INIT
2m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?A[CHUM]_])
3m4trace:configure.ac:3: -1- m4_pattern_forbid([_AC_])
4m4trace:configure.ac:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
5m4trace:configure.ac:3: -1- m4_pattern_allow([^AS_FLAGS$])
6m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?m4_])
7m4trace:configure.ac:3: -1- m4_pattern_forbid([^dnl$])
8m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?AS_])
9m4trace:configure.ac:3: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
10m4trace:configure.ac:3: -1- AC_SUBST([PATH_SEPARATOR])
11m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
12m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
13m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
14m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
15m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
16m4trace:configure.ac:3: -1- AC_SUBST([exec_prefix], [NONE])
17m4trace:configure.ac:3: -1- AC_SUBST([prefix], [NONE])
18m4trace:configure.ac:3: -1- AC_SUBST([program_transform_name], [s,x,x,])
19m4trace:configure.ac:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
20m4trace:configure.ac:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
21m4trace:configure.ac:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
22m4trace:configure.ac:3: -1- AC_SUBST([datadir], ['${prefix}/share'])
23m4trace:configure.ac:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
24m4trace:configure.ac:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
25m4trace:configure.ac:3: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
26m4trace:configure.ac:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
27m4trace:configure.ac:3: -1- AC_SUBST([includedir], ['${prefix}/include'])
28m4trace:configure.ac:3: -1- AC_SUBST([oldincludedir], ['/usr/include'])
29m4trace:configure.ac:3: -1- AC_SUBST([infodir], ['${prefix}/info'])
30m4trace:configure.ac:3: -1- AC_SUBST([mandir], ['${prefix}/man'])
31m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
32m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
33#undef PACKAGE_NAME])
34m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
35m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
36#undef PACKAGE_TARNAME])
37m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
38m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
39#undef PACKAGE_VERSION])
40m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
41m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
42#undef PACKAGE_STRING])
43m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
44m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
45#undef PACKAGE_BUGREPORT])
46m4trace:configure.ac:3: -1- AC_SUBST([build_alias])
47m4trace:configure.ac:3: -1- AC_SUBST([host_alias])
48m4trace:configure.ac:3: -1- AC_SUBST([target_alias])
49m4trace:configure.ac:3: -1- AC_SUBST([DEFS])
50m4trace:configure.ac:3: -1- AC_SUBST([ECHO_C])
51m4trace:configure.ac:3: -1- AC_SUBST([ECHO_N])
52m4trace:configure.ac:3: -1- AC_SUBST([ECHO_T])
53m4trace:configure.ac:3: -1- AC_SUBST([LIBS])
54m4trace:configure.ac:6: -1- AC_CONFIG_HEADERS([config.h])
55m4trace:configure.ac:7: -1- AC_PROG_CC
56m4trace:configure.ac:7: -1- AC_SUBST([CC])
57m4trace:configure.ac:7: -1- AC_SUBST([CFLAGS])
58m4trace:configure.ac:7: -1- AC_SUBST([LDFLAGS])
59m4trace:configure.ac:7: -1- AC_SUBST([CPPFLAGS])
60m4trace:configure.ac:7: -1- AC_SUBST([CC])
61m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_CC])
62m4trace:configure.ac:7: -1- AC_SUBST([CC])
63m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_CC])
64m4trace:configure.ac:7: -1- AC_SUBST([CC])
65m4trace:configure.ac:7: -1- AC_SUBST([CC])
66m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_CC])
67m4trace:configure.ac:7: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
68m4trace:configure.ac:7: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
69m4trace:configure.ac:8: -1- AC_CANONICAL_HOST
70m4trace:configure.ac:8: -1- AC_SUBST([build], [$ac_cv_build])
71m4trace:configure.ac:8: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
72m4trace:configure.ac:8: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
73m4trace:configure.ac:8: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
74m4trace:configure.ac:8: -1- AC_SUBST([host], [$ac_cv_host])
75m4trace:configure.ac:8: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
76m4trace:configure.ac:8: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
77m4trace:configure.ac:8: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
78m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
79m4trace:configure.ac:9: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte
80 first (like Motorola and SPARC, unlike Intel and VAX). */
81#undef WORDS_BIGENDIAN])
82m4trace:configure.ac:12: -1- AC_PROG_CPP
83m4trace:configure.ac:12: -1- AC_SUBST([CPP])
84m4trace:configure.ac:12: -1- AC_SUBST([CPPFLAGS])
85m4trace:configure.ac:12: -1- AC_SUBST([CPP])
86m4trace:configure.ac:13: -1- AC_PROG_RANLIB
87m4trace:configure.ac:13: -1- AC_SUBST([RANLIB])
88m4trace:configure.ac:13: -1- AC_SUBST([ac_ct_RANLIB])
89m4trace:configure.ac:14: -1- AC_PROG_INSTALL
90m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_PROGRAM])
91m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_SCRIPT])
92m4trace:configure.ac:14: -1- AC_SUBST([INSTALL_DATA])
93m4trace:configure.ac:15: -1- AC_SUBST([AR], [$ac_cv_path_AR])
94m4trace:configure.ac:16: -1- AC_SUBST([PERL], [$ac_cv_path_PERL])
95m4trace:configure.ac:17: -1- AC_SUBST([SED], [$ac_cv_path_SED])
96m4trace:configure.ac:18: -1- AC_SUBST([PERL])
97m4trace:configure.ac:19: -1- AC_SUBST([ENT], [$ac_cv_path_ENT])
98m4trace:configure.ac:20: -1- AC_SUBST([ENT])
99m4trace:configure.ac:21: -1- AC_SUBST([TEST_MINUS_S_SH], [$ac_cv_path_TEST_MINUS_S_SH])
100m4trace:configure.ac:22: -1- AC_SUBST([TEST_MINUS_S_SH], [$ac_cv_path_TEST_MINUS_S_SH])
101m4trace:configure.ac:23: -1- AC_SUBST([TEST_MINUS_S_SH], [$ac_cv_path_TEST_MINUS_S_SH])
102m4trace:configure.ac:24: -1- AC_SUBST([SH], [$ac_cv_path_SH])
103m4trace:configure.ac:27: -1- AC_DEFINE_TRACE_LITERAL([_FILE_OFFSET_BITS])
104m4trace:configure.ac:27: -1- AH_OUTPUT([_FILE_OFFSET_BITS], [/* Number of bits in a file offset, on hosts where this is settable. */
105#undef _FILE_OFFSET_BITS])
106m4trace:configure.ac:27: -1- AC_DEFINE_TRACE_LITERAL([_LARGE_FILES])
107m4trace:configure.ac:27: -1- AH_OUTPUT([_LARGE_FILES], [/* Define for large files, on AIX-style hosts. */
108#undef _LARGE_FILES])
109m4trace:configure.ac:35: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_PROGRAM_FALLBACK])
110m4trace:configure.ac:38: -1- AC_SUBST([LOGIN_PROGRAM_FALLBACK], [$ac_cv_path_LOGIN_PROGRAM_FALLBACK])
111m4trace:configure.ac:40: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_PROGRAM_FALLBACK])
112m4trace:configure.ac:47: -1- AC_SUBST([LD])
113m4trace:configure.ac:49: -1- AC_C_INLINE
114m4trace:configure.ac:49: -1- AC_DEFINE_TRACE_LITERAL([inline])
115m4trace:configure.ac:49: -1- AH_OUTPUT([inline], [/* Define as `__inline\' if that\'s what the C compiler calls it, or to nothing
116 if it is not supported. */
117#undef inline])
118m4trace:configure.ac:49: -1- AC_DEFINE_TRACE_LITERAL([inline])
119m4trace:configure.ac:83: -1- AC_DEFINE_TRACE_LITERAL([WITH_AIXAUTHENTICATE])
120m4trace:configure.ac:83: -1- AC_CHECK_LIB([s], [authenticate], [ AC_DEFINE(WITH_AIXAUTHENTICATE)
121 LIBS="$LIBS -ls"
122 ])
123m4trace:configure.ac:83: -1- AC_DEFINE_TRACE_LITERAL([WITH_AIXAUTHENTICATE])
124m4trace:configure.ac:84: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_GETADDRINFO])
125m4trace:configure.ac:85: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_REALPATH])
126m4trace:configure.ac:87: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LASTLOG])
127m4trace:configure.ac:88: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
128m4trace:configure.ac:89: -1- AC_DEFINE_TRACE_LITERAL([SETPROCTITLE_STRATEGY])
129m4trace:configure.ac:90: -1- AC_DEFINE_TRACE_LITERAL([SETPROCTITLE_PS_PADDING])
130m4trace:configure.ac:95: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CYGWIN])
131m4trace:configure.ac:96: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
132m4trace:configure.ac:97: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
133m4trace:configure.ac:98: -1- AC_DEFINE_TRACE_LITERAL([IPV4_DEFAULT])
134m4trace:configure.ac:99: -1- AC_DEFINE_TRACE_LITERAL([IP_TOS_IS_BROKEN])
135m4trace:configure.ac:100: -1- AC_DEFINE_TRACE_LITERAL([NO_X11_UNIX_SOCKETS])
136m4trace:configure.ac:101: -1- AC_DEFINE_TRACE_LITERAL([NO_IPPORT_RESERVED_CONCEPT])
137m4trace:configure.ac:102: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_FD_PASSING])
138m4trace:configure.ac:103: -1- AC_DEFINE_TRACE_LITERAL([SETGROUPS_NOOP])
139m4trace:configure.ac:106: -1- AC_DEFINE_TRACE_LITERAL([IP_TOS_IS_BROKEN])
140m4trace:configure.ac:118: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_GETADDRINFO])
141m4trace:configure.ac:126: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SECUREWARE])
142m4trace:configure.ac:127: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
143m4trace:configure.ac:128: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NO_ENDOPT])
144m4trace:configure.ac:129: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
145m4trace:configure.ac:130: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
146m4trace:configure.ac:131: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
147m4trace:configure.ac:132: -1- AC_DEFINE_TRACE_LITERAL([SETPROCTITLE_STRATEGY])
148m4trace:configure.ac:134: -1- AC_CHECK_LIB([xnet], [t_error], [], [{ { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
149echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
150 { (exit 1); exit 1; }; }])
151m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_LIBXNET], [/* Define to 1 if you have the `xnet\' library (-lxnet). */
152#undef HAVE_LIBXNET])
153m4trace:configure.ac:134: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXNET])
154m4trace:configure.ac:143: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
155m4trace:configure.ac:144: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NO_ENDOPT])
156m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
157m4trace:configure.ac:146: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
158m4trace:configure.ac:147: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
159m4trace:configure.ac:148: -1- AC_DEFINE_TRACE_LITERAL([SETPROCTITLE_STRATEGY])
160m4trace:configure.ac:150: -1- AC_CHECK_LIB([xnet], [t_error], [], [{ { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
161echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
162 { (exit 1); exit 1; }; }])
163m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_LIBXNET], [/* Define to 1 if you have the `xnet\' library (-lxnet). */
164#undef HAVE_LIBXNET])
165m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXNET])
166m4trace:configure.ac:155: -1- AC_DEFINE_TRACE_LITERAL([PAM_SUN_CODEBASE])
167m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
168m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NO_ENDOPT])
169m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
170m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
171m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
172m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([SETPROCTITLE_STRATEGY])
173m4trace:configure.ac:163: -1- AC_CHECK_LIB([xnet], [t_error], [], [{ { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
174echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
175 { (exit 1); exit 1; }; }])
176m4trace:configure.ac:163: -1- AH_OUTPUT([HAVE_LIBXNET], [/* Define to 1 if you have the `xnet\' library (-lxnet). */
177#undef HAVE_LIBXNET])
178m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXNET])
179m4trace:configure.ac:169: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_INET_NTOA])
180m4trace:configure.ac:170: -1- AC_DEFINE_TRACE_LITERAL([WITH_ABBREV_NO_TTY])
181m4trace:configure.ac:176: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_ARRAY])
182m4trace:configure.ac:177: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_PROJECT])
183m4trace:configure.ac:178: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_AUDIT])
184m4trace:configure.ac:179: -1- AC_DEFINE_TRACE_LITERAL([WITH_IRIX_JOBS])
185m4trace:configure.ac:180: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_INET_NTOA])
186m4trace:configure.ac:181: -1- AC_DEFINE_TRACE_LITERAL([WITH_ABBREV_NO_TTY])
187m4trace:configure.ac:186: -1- AC_DEFINE_TRACE_LITERAL([DONT_TRY_OTHER_AF])
188m4trace:configure.ac:187: -1- AC_DEFINE_TRACE_LITERAL([PAM_TTY_KLUDGE])
189m4trace:configure.ac:188: -1- AC_DEFINE_TRACE_LITERAL([SETPROCTITLE_STRATEGY])
190m4trace:configure.ac:189: -1- AC_DEFINE_TRACE_LITERAL([SETPROCTITLE_PS_PADDING])
191m4trace:configure.ac:193: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NEWS4])
192m4trace:configure.ac:208: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NEXT])
193m4trace:configure.ac:209: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_REALPATH])
194m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
195m4trace:configure.ac:211: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SAVED_UIDS])
196m4trace:configure.ac:219: -1- AC_DEFINE_TRACE_LITERAL([PAM_SUN_CODEBASE])
197m4trace:configure.ac:220: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_UTMPX])
198m4trace:configure.ac:221: -1- AC_DEFINE_TRACE_LITERAL([LOGIN_NEEDS_TERM])
199m4trace:configure.ac:222: -1- AC_DEFINE_TRACE_LITERAL([PAM_TTY_KLUDGE])
200m4trace:configure.ac:223: -1- AC_DEFINE_TRACE_LITERAL([STREAMS_PUSH_ACQUIRES_CTTY])
201m4trace:configure.ac:230: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
202m4trace:configure.ac:231: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMP])
203m4trace:configure.ac:238: -1- AC_CHECK_FUNCS([getpwanam])
204m4trace:configure.ac:238: -1- AH_OUTPUT([HAVE_GETPWANAM], [/* Define to 1 if you have the `getpwanam\' function. */
205#undef HAVE_GETPWANAM])
206m4trace:configure.ac:239: -1- AC_DEFINE_TRACE_LITERAL([PAM_SUN_CODEBASE])
207m4trace:configure.ac:243: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
208m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
209m4trace:configure.ac:256: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
210m4trace:configure.ac:257: -1- AC_DEFINE_TRACE_LITERAL([IP_TOS_IS_BROKEN])
211m4trace:configure.ac:265: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
212m4trace:configure.ac:270: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
213m4trace:configure.ac:282: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SYS_TERMIO_H])
214m4trace:configure.ac:283: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
215m4trace:configure.ac:284: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SECUREWARE])
216m4trace:configure.ac:285: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
217m4trace:configure.ac:286: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SAVED_UIDS])
218m4trace:configure.ac:287: -1- AC_CHECK_FUNCS([getluid setluid])
219m4trace:configure.ac:287: -1- AH_OUTPUT([HAVE_GETLUID], [/* Define to 1 if you have the `getluid\' function. */
220#undef HAVE_GETLUID])
221m4trace:configure.ac:287: -1- AH_OUTPUT([HAVE_SETLUID], [/* Define to 1 if you have the `setluid\' function. */
222#undef HAVE_SETLUID])
223m4trace:configure.ac:299: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
224m4trace:configure.ac:300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SECUREWARE])
225m4trace:configure.ac:301: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
226m4trace:configure.ac:302: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_FD_PASSING])
227m4trace:configure.ac:303: -1- AC_CHECK_FUNCS([getluid setluid])
228m4trace:configure.ac:303: -1- AH_OUTPUT([HAVE_GETLUID], [/* Define to 1 if you have the `getluid\' function. */
229#undef HAVE_GETLUID])
230m4trace:configure.ac:303: -1- AH_OUTPUT([HAVE_SETLUID], [/* Define to 1 if you have the `setluid\' function. */
231#undef HAVE_SETLUID])
232m4trace:configure.ac:307: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
233m4trace:configure.ac:308: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_FD_PASSING])
234m4trace:configure.ac:314: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
235m4trace:configure.ac:315: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_FD_PASSING])
236m4trace:configure.ac:316: -1- AC_DEFINE_TRACE_LITERAL([NO_SSH_LASTLOG])
237m4trace:configure.ac:336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OSF_SIA])
238m4trace:configure.ac:337: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LOGIN])
239m4trace:configure.ac:338: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_FD_PASSING])
240m4trace:configure.ac:344: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_FD_PASSING])
241m4trace:configure.ac:348: -1- AC_DEFINE_TRACE_LITERAL([USE_PIPES])
242m4trace:configure.ac:349: -1- AC_DEFINE_TRACE_LITERAL([NO_X11_UNIX_SOCKETS])
243m4trace:configure.ac:350: -1- AC_DEFINE_TRACE_LITERAL([MISSING_NFDBITS])
244m4trace:configure.ac:351: -1- AC_DEFINE_TRACE_LITERAL([MISSING_HOWMANY])
245m4trace:configure.ac:352: -1- AC_DEFINE_TRACE_LITERAL([MISSING_FD_MASK])
246m4trace:configure.ac:400: -1- AC_CHECK_HEADERS([bstring.h crypt.h endian.h floatingpoint.h \
247 getopt.h glob.h ia.h lastlog.h libgen.h limits.h login.h \
248 login_cap.h maillock.h netdb.h netgroup.h \
249 netinet/in_systm.h paths.h pty.h readpassphrase.h \
250 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
251 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
252 sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
253 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
254 sys/un.h time.h tmpdir.h ttyent.h usersec.h \
255 util.h utime.h utmp.h utmpx.h])
256m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_BSTRING_H], [/* Define to 1 if you have the <bstring.h> header file. */
257#undef HAVE_BSTRING_H])
258m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_CRYPT_H], [/* Define to 1 if you have the <crypt.h> header file. */
259#undef HAVE_CRYPT_H])
260m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_ENDIAN_H], [/* Define to 1 if you have the <endian.h> header file. */
261#undef HAVE_ENDIAN_H])
262m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_FLOATINGPOINT_H], [/* Define to 1 if you have the <floatingpoint.h> header file. */
263#undef HAVE_FLOATINGPOINT_H])
264m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
265#undef HAVE_GETOPT_H])
266m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_GLOB_H], [/* Define to 1 if you have the <glob.h> header file. */
267#undef HAVE_GLOB_H])
268m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_IA_H], [/* Define to 1 if you have the <ia.h> header file. */
269#undef HAVE_IA_H])
270m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_LASTLOG_H], [/* Define to 1 if you have the <lastlog.h> header file. */
271#undef HAVE_LASTLOG_H])
272m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_LIBGEN_H], [/* Define to 1 if you have the <libgen.h> header file. */
273#undef HAVE_LIBGEN_H])
274m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the <limits.h> header file. */
275#undef HAVE_LIMITS_H])
276m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_LOGIN_H], [/* Define to 1 if you have the <login.h> header file. */
277#undef HAVE_LOGIN_H])
278m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_LOGIN_CAP_H], [/* Define to 1 if you have the <login_cap.h> header file. */
279#undef HAVE_LOGIN_CAP_H])
280m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_MAILLOCK_H], [/* Define to 1 if you have the <maillock.h> header file. */
281#undef HAVE_MAILLOCK_H])
282m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the <netdb.h> header file. */
283#undef HAVE_NETDB_H])
284m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_NETGROUP_H], [/* Define to 1 if you have the <netgroup.h> header file. */
285#undef HAVE_NETGROUP_H])
286m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_NETINET_IN_SYSTM_H], [/* Define to 1 if you have the <netinet/in_systm.h> header file. */
287#undef HAVE_NETINET_IN_SYSTM_H])
288m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_PATHS_H], [/* Define to 1 if you have the <paths.h> header file. */
289#undef HAVE_PATHS_H])
290m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_PTY_H], [/* Define to 1 if you have the <pty.h> header file. */
291#undef HAVE_PTY_H])
292m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_READPASSPHRASE_H], [/* Define to 1 if you have the <readpassphrase.h> header file. */
293#undef HAVE_READPASSPHRASE_H])
294m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_RPC_TYPES_H], [/* Define to 1 if you have the <rpc/types.h> header file. */
295#undef HAVE_RPC_TYPES_H])
296m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SECURITY_PAM_APPL_H], [/* Define to 1 if you have the <security/pam_appl.h> header file. */
297#undef HAVE_SECURITY_PAM_APPL_H])
298m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SHADOW_H], [/* Define to 1 if you have the <shadow.h> header file. */
299#undef HAVE_SHADOW_H])
300m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the <stddef.h> header file. */
301#undef HAVE_STDDEF_H])
302m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
303#undef HAVE_STDINT_H])
304m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
305#undef HAVE_STRINGS_H])
306m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_BITYPES_H], [/* Define to 1 if you have the <sys/bitypes.h> header file. */
307#undef HAVE_SYS_BITYPES_H])
308m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_BSDTTY_H], [/* Define to 1 if you have the <sys/bsdtty.h> header file. */
309#undef HAVE_SYS_BSDTTY_H])
310m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_CDEFS_H], [/* Define to 1 if you have the <sys/cdefs.h> header file. */
311#undef HAVE_SYS_CDEFS_H])
312m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the <sys/mman.h> header file. */
313#undef HAVE_SYS_MMAN_H])
314m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_PSTAT_H], [/* Define to 1 if you have the <sys/pstat.h> header file. */
315#undef HAVE_SYS_PSTAT_H])
316m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the <sys/select.h> header file. */
317#undef HAVE_SYS_SELECT_H])
318m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
319#undef HAVE_SYS_STAT_H])
320m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_STROPTS_H], [/* Define to 1 if you have the <sys/stropts.h> header file. */
321#undef HAVE_SYS_STROPTS_H])
322m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_SYSMACROS_H], [/* Define to 1 if you have the <sys/sysmacros.h> header file. */
323#undef HAVE_SYS_SYSMACROS_H])
324m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
325#undef HAVE_SYS_TIME_H])
326m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_TIMERS_H], [/* Define to 1 if you have the <sys/timers.h> header file. */
327#undef HAVE_SYS_TIMERS_H])
328m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_UN_H], [/* Define to 1 if you have the <sys/un.h> header file. */
329#undef HAVE_SYS_UN_H])
330m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_TIME_H], [/* Define to 1 if you have the <time.h> header file. */
331#undef HAVE_TIME_H])
332m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_TMPDIR_H], [/* Define to 1 if you have the <tmpdir.h> header file. */
333#undef HAVE_TMPDIR_H])
334m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_TTYENT_H], [/* Define to 1 if you have the <ttyent.h> header file. */
335#undef HAVE_TTYENT_H])
336m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_USERSEC_H], [/* Define to 1 if you have the <usersec.h> header file. */
337#undef HAVE_USERSEC_H])
338m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_UTIL_H], [/* Define to 1 if you have the <util.h> header file. */
339#undef HAVE_UTIL_H])
340m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_UTIME_H], [/* Define to 1 if you have the <utime.h> header file. */
341#undef HAVE_UTIME_H])
342m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_UTMP_H], [/* Define to 1 if you have the <utmp.h> header file. */
343#undef HAVE_UTMP_H])
344m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_UTMPX_H], [/* Define to 1 if you have the <utmpx.h> header file. */
345#undef HAVE_UTMPX_H])
346m4trace:configure.ac:400: -1- AC_HEADER_STDC
347m4trace:configure.ac:400: -1- AC_SUBST([EGREP])
348m4trace:configure.ac:400: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
349m4trace:configure.ac:400: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
350#undef STDC_HEADERS])
351m4trace:configure.ac:400: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
352 inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
353m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
354#undef HAVE_SYS_TYPES_H])
355m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
356#undef HAVE_SYS_STAT_H])
357m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
358#undef HAVE_STDLIB_H])
359m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
360#undef HAVE_STRING_H])
361m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
362#undef HAVE_MEMORY_H])
363m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
364#undef HAVE_STRINGS_H])
365m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
366#undef HAVE_INTTYPES_H])
367m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
368#undef HAVE_STDINT_H])
369m4trace:configure.ac:400: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
370#undef HAVE_UNISTD_H])
371m4trace:configure.ac:403: -2- AC_CHECK_LIB([nsl], [yp_match])
372m4trace:configure.ac:403: -2- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the `nsl\' library (-lnsl). */
373#undef HAVE_LIBNSL])
374m4trace:configure.ac:403: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL])
375m4trace:configure.ac:404: -2- AC_CHECK_LIB([socket], [setsockopt])
376m4trace:configure.ac:404: -2- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */
377#undef HAVE_LIBSOCKET])
378m4trace:configure.ac:404: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
379m4trace:configure.ac:409: -1- AC_CHECK_LIB([rpc], [innetgr], [LIBS="-lrpc -lyp -lrpc $LIBS" ], [], [-lyp -lrpc])
380m4trace:configure.ac:414: -2- AC_CHECK_LIB([gen], [getspnam], [LIBS="$LIBS -lgen"])
381m4trace:configure.ac:456: -1- AC_CHECK_LIB([z], [deflate], [], [{ { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5
382echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
383 { (exit 1); exit 1; }; }])
384m4trace:configure.ac:456: -1- AH_OUTPUT([HAVE_LIBZ], [/* Define to 1 if you have the `z\' library (-lz). */
385#undef HAVE_LIBZ])
386m4trace:configure.ac:456: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBZ])
387m4trace:configure.ac:461: -1- AC_CHECK_LIB([resolv], [strcasecmp], [LIBS="$LIBS -lresolv"])
388m4trace:configure.ac:465: -1- AC_CHECK_LIB([c89], [utimes], [AC_DEFINE(HAVE_UTIMES)
389 LIBS="$LIBS -lc89"])
390m4trace:configure.ac:465: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UTIMES])
391m4trace:configure.ac:468: -1- AC_CHECK_HEADERS([libutil.h])
392m4trace:configure.ac:468: -1- AH_OUTPUT([HAVE_LIBUTIL_H], [/* Define to 1 if you have the <libutil.h> header file. */
393#undef HAVE_LIBUTIL_H])
394m4trace:configure.ac:469: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LOGIN])
395m4trace:configure.ac:470: -1- AC_CHECK_FUNCS([logout updwtmp logwtmp])
396m4trace:configure.ac:470: -1- AH_OUTPUT([HAVE_LOGOUT], [/* Define to 1 if you have the `logout\' function. */
397#undef HAVE_LOGOUT])
398m4trace:configure.ac:470: -1- AH_OUTPUT([HAVE_UPDWTMP], [/* Define to 1 if you have the `updwtmp\' function. */
399#undef HAVE_UPDWTMP])
400m4trace:configure.ac:470: -1- AH_OUTPUT([HAVE_LOGWTMP], [/* Define to 1 if you have the `logwtmp\' function. */
401#undef HAVE_LOGWTMP])
402m4trace:configure.ac:472: -1- AC_FUNC_STRFTIME
403m4trace:configure.ac:472: -1- AC_CHECK_FUNCS([strftime], [], [# strftime is in -lintl on SCO UNIX.
404AC_CHECK_LIB(intl, strftime,
405 [AC_DEFINE(HAVE_STRFTIME)
406LIBS="-lintl $LIBS"])])
407m4trace:configure.ac:472: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the `strftime\' function. */
408#undef HAVE_STRFTIME])
409m4trace:configure.ac:472: -1- AC_CHECK_LIB([intl], [strftime], [AC_DEFINE(HAVE_STRFTIME)
410LIBS="-lintl $LIBS"])
411m4trace:configure.ac:472: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
412m4trace:configure.ac:490: -1- AC_DEFINE_TRACE_LITERAL([GLOB_HAS_ALTDIRFUNC])
413m4trace:configure.ac:506: -1- AC_DEFINE_TRACE_LITERAL([GLOB_HAS_GL_MATCHC])
414m4trace:configure.ac:520: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_ONE_BYTE_DIRENT_D_NAME])
415m4trace:configure.ac:553: -1- AC_DEFINE_TRACE_LITERAL([SKEY])
416m4trace:configure.ac:607: -1- AC_DEFINE_TRACE_LITERAL([LIBWRAP])
417m4trace:configure.ac:607: -1- AC_SUBST([LIBWRAP])
418m4trace:configure.ac:622: -1- AC_CHECK_FUNCS([\
419 arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename bcopy \
420 bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
421 gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
422 getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \
423 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
424 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openpty pstat \
425 readpassphrase realpath recvmsg rresvport_af sendmsg setdtablesize \
426 setegid setenv seteuid setgroups setlogin setpcred setproctitle \
427 setresgid setreuid setrlimit setsid setvbuf sigaction sigvec \
428 snprintf socketpair strerror strlcat strlcpy strmode strnvis \
429 sysconf tcgetpgrp truncate utimes vhangup vsnprintf waitpid \
430])
431m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_ARC4RANDOM], [/* Define to 1 if you have the `arc4random\' function. */
432#undef HAVE_ARC4RANDOM])
433m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE___B64_NTOP], [/* Define to 1 if you have the `__b64_ntop\' function. */
434#undef HAVE___B64_NTOP])
435m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_B64_NTOP], [/* Define to 1 if you have the `b64_ntop\' function. */
436#undef HAVE_B64_NTOP])
437m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE___B64_PTON], [/* Define to 1 if you have the `__b64_pton\' function. */
438#undef HAVE___B64_PTON])
439m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_B64_PTON], [/* Define to 1 if you have the `b64_pton\' function. */
440#undef HAVE_B64_PTON])
441m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_BASENAME], [/* Define to 1 if you have the `basename\' function. */
442#undef HAVE_BASENAME])
443m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_BCOPY], [/* Define to 1 if you have the `bcopy\' function. */
444#undef HAVE_BCOPY])
445m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_BINDRESVPORT_SA], [/* Define to 1 if you have the `bindresvport_sa\' function. */
446#undef HAVE_BINDRESVPORT_SA])
447m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_CLOCK], [/* Define to 1 if you have the `clock\' function. */
448#undef HAVE_CLOCK])
449m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_FCHMOD], [/* Define to 1 if you have the `fchmod\' function. */
450#undef HAVE_FCHMOD])
451m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_FCHOWN], [/* Define to 1 if you have the `fchown\' function. */
452#undef HAVE_FCHOWN])
453m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_FREEADDRINFO], [/* Define to 1 if you have the `freeaddrinfo\' function. */
454#undef HAVE_FREEADDRINFO])
455m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_FUTIMES], [/* Define to 1 if you have the `futimes\' function. */
456#undef HAVE_FUTIMES])
457m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GAI_STRERROR], [/* Define to 1 if you have the `gai_strerror\' function. */
458#undef HAVE_GAI_STRERROR])
459m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Define to 1 if you have the `getaddrinfo\' function. */
460#undef HAVE_GETADDRINFO])
461m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETCWD], [/* Define to 1 if you have the `getcwd\' function. */
462#undef HAVE_GETCWD])
463m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETGROUPLIST], [/* Define to 1 if you have the `getgrouplist\' function. */
464#undef HAVE_GETGROUPLIST])
465m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETNAMEINFO], [/* Define to 1 if you have the `getnameinfo\' function. */
466#undef HAVE_GETNAMEINFO])
467m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETOPT], [/* Define to 1 if you have the `getopt\' function. */
468#undef HAVE_GETOPT])
469m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETPEEREID], [/* Define to 1 if you have the `getpeereid\' function. */
470#undef HAVE_GETPEEREID])
471m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE__GETPTY], [/* Define to 1 if you have the `_getpty\' function. */
472#undef HAVE__GETPTY])
473m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETRLIMIT], [/* Define to 1 if you have the `getrlimit\' function. */
474#undef HAVE_GETRLIMIT])
475m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETRUSAGE], [/* Define to 1 if you have the `getrusage\' function. */
476#undef HAVE_GETRUSAGE])
477m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GETTTYENT], [/* Define to 1 if you have the `getttyent\' function. */
478#undef HAVE_GETTTYENT])
479m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_GLOB], [/* Define to 1 if you have the `glob\' function. */
480#undef HAVE_GLOB])
481m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_INET_ATON], [/* Define to 1 if you have the `inet_aton\' function. */
482#undef HAVE_INET_ATON])
483m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */
484#undef HAVE_INET_NTOA])
485m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_INET_NTOP], [/* Define to 1 if you have the `inet_ntop\' function. */
486#undef HAVE_INET_NTOP])
487m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_INNETGR], [/* Define to 1 if you have the `innetgr\' function. */
488#undef HAVE_INNETGR])
489m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_LOGIN_GETCAPBOOL], [/* Define to 1 if you have the `login_getcapbool\' function. */
490#undef HAVE_LOGIN_GETCAPBOOL])
491m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_MD5_CRYPT], [/* Define to 1 if you have the `md5_crypt\' function. */
492#undef HAVE_MD5_CRYPT])
493m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */
494#undef HAVE_MEMMOVE])
495m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_MKDTEMP], [/* Define to 1 if you have the `mkdtemp\' function. */
496#undef HAVE_MKDTEMP])
497m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the `mmap\' function. */
498#undef HAVE_MMAP])
499m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_NGETADDRINFO], [/* Define to 1 if you have the `ngetaddrinfo\' function. */
500#undef HAVE_NGETADDRINFO])
501m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_NSLEEP], [/* Define to 1 if you have the `nsleep\' function. */
502#undef HAVE_NSLEEP])
503m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_OGETADDRINFO], [/* Define to 1 if you have the `ogetaddrinfo\' function. */
504#undef HAVE_OGETADDRINFO])
505m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_OPENPTY], [/* Define to 1 if you have the `openpty\' function. */
506#undef HAVE_OPENPTY])
507m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_PSTAT], [/* Define to 1 if you have the `pstat\' function. */
508#undef HAVE_PSTAT])
509m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_READPASSPHRASE], [/* Define to 1 if you have the `readpassphrase\' function. */
510#undef HAVE_READPASSPHRASE])
511m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_REALPATH], [/* Define to 1 if you have the `realpath\' function. */
512#undef HAVE_REALPATH])
513m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_RECVMSG], [/* Define to 1 if you have the `recvmsg\' function. */
514#undef HAVE_RECVMSG])
515m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_RRESVPORT_AF], [/* Define to 1 if you have the `rresvport_af\' function. */
516#undef HAVE_RRESVPORT_AF])
517m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SENDMSG], [/* Define to 1 if you have the `sendmsg\' function. */
518#undef HAVE_SENDMSG])
519m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETDTABLESIZE], [/* Define to 1 if you have the `setdtablesize\' function. */
520#undef HAVE_SETDTABLESIZE])
521m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETEGID], [/* Define to 1 if you have the `setegid\' function. */
522#undef HAVE_SETEGID])
523m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETENV], [/* Define to 1 if you have the `setenv\' function. */
524#undef HAVE_SETENV])
525m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETEUID], [/* Define to 1 if you have the `seteuid\' function. */
526#undef HAVE_SETEUID])
527m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETGROUPS], [/* Define to 1 if you have the `setgroups\' function. */
528#undef HAVE_SETGROUPS])
529m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETLOGIN], [/* Define to 1 if you have the `setlogin\' function. */
530#undef HAVE_SETLOGIN])
531m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETPCRED], [/* Define to 1 if you have the `setpcred\' function. */
532#undef HAVE_SETPCRED])
533m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETPROCTITLE], [/* Define to 1 if you have the `setproctitle\' function. */
534#undef HAVE_SETPROCTITLE])
535m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETRESGID], [/* Define to 1 if you have the `setresgid\' function. */
536#undef HAVE_SETRESGID])
537m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETREUID], [/* Define to 1 if you have the `setreuid\' function. */
538#undef HAVE_SETREUID])
539m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the `setrlimit\' function. */
540#undef HAVE_SETRLIMIT])
541m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETSID], [/* Define to 1 if you have the `setsid\' function. */
542#undef HAVE_SETSID])
543m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SETVBUF], [/* Define to 1 if you have the `setvbuf\' function. */
544#undef HAVE_SETVBUF])
545m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */
546#undef HAVE_SIGACTION])
547m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SIGVEC], [/* Define to 1 if you have the `sigvec\' function. */
548#undef HAVE_SIGVEC])
549m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the `snprintf\' function. */
550#undef HAVE_SNPRINTF])
551m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SOCKETPAIR], [/* Define to 1 if you have the `socketpair\' function. */
552#undef HAVE_SOCKETPAIR])
553m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
554#undef HAVE_STRERROR])
555m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */
556#undef HAVE_STRLCAT])
557m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */
558#undef HAVE_STRLCPY])
559m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_STRMODE], [/* Define to 1 if you have the `strmode\' function. */
560#undef HAVE_STRMODE])
561m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_STRNVIS], [/* Define to 1 if you have the `strnvis\' function. */
562#undef HAVE_STRNVIS])
563m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_SYSCONF], [/* Define to 1 if you have the `sysconf\' function. */
564#undef HAVE_SYSCONF])
565m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_TCGETPGRP], [/* Define to 1 if you have the `tcgetpgrp\' function. */
566#undef HAVE_TCGETPGRP])
567m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_TRUNCATE], [/* Define to 1 if you have the `truncate\' function. */
568#undef HAVE_TRUNCATE])
569m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_UTIMES], [/* Define to 1 if you have the `utimes\' function. */
570#undef HAVE_UTIMES])
571m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_VHANGUP], [/* Define to 1 if you have the `vhangup\' function. */
572#undef HAVE_VHANGUP])
573m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the `vsnprintf\' function. */
574#undef HAVE_VSNPRINTF])
575m4trace:configure.ac:622: -1- AH_OUTPUT([HAVE_WAITPID], [/* Define to 1 if you have the `waitpid\' function. */
576#undef HAVE_WAITPID])
577m4trace:configure.ac:624: -2- AC_DEFINE_TRACE_LITERAL([HAVE_NANOSLEEP])
578m4trace:configure.ac:625: -2- AC_DEFINE_TRACE_LITERAL([HAVE_BASENAME])
579m4trace:configure.ac:628: -1- AC_CHECK_FUNCS([strsep])
580m4trace:configure.ac:628: -1- AH_OUTPUT([HAVE_STRSEP], [/* Define to 1 if you have the `strsep\' function. */
581#undef HAVE_STRSEP])
582m4trace:configure.ac:665: -1- AC_CHECK_FUNCS([dirname], [AC_CHECK_HEADERS(libgen.h) ], [
583 AC_CHECK_LIB(gen, dirname,[
584 AC_CACHE_CHECK([for broken dirname],
585 ac_cv_have_broken_dirname, [
586 save_LIBS="$LIBS"
587 LIBS="$LIBS -lgen"
588 AC_TRY_RUN(
589 [
590#include <libgen.h>
591#include <string.h>
592
593int main(int argc, char **argv) {
594 char *s, buf[32];
595
596 strncpy(buf,"/etc", 32);
597 s = dirname(buf);
598 if (!s || strncmp(s, "/", 32) != 0) {
599 exit(1);
600 } else {
601 exit(0);
602 }
603}
604 ],
605 [ ac_cv_have_broken_dirname="no" ],
606 [ ac_cv_have_broken_dirname="yes" ]
607 )
608 LIBS="$save_LIBS"
609 ])
610 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
611 LIBS="$LIBS -lgen"
612 AC_DEFINE(HAVE_DIRNAME)
613 AC_CHECK_HEADERS(libgen.h)
614 fi
615 ])
616])
617m4trace:configure.ac:665: -1- AH_OUTPUT([HAVE_DIRNAME], [/* Define to 1 if you have the `dirname\' function. */
618#undef HAVE_DIRNAME])
619m4trace:configure.ac:665: -1- AC_CHECK_HEADERS([libgen.h])
620m4trace:configure.ac:665: -1- AH_OUTPUT([HAVE_LIBGEN_H], [/* Define to 1 if you have the <libgen.h> header file. */
621#undef HAVE_LIBGEN_H])
622m4trace:configure.ac:665: -1- AC_CHECK_LIB([gen], [dirname], [
623 AC_CACHE_CHECK([for broken dirname],
624 ac_cv_have_broken_dirname, [
625 save_LIBS="$LIBS"
626 LIBS="$LIBS -lgen"
627 AC_TRY_RUN(
628 [
629#include <libgen.h>
630#include <string.h>
631
632int main(int argc, char **argv) {
633 char *s, buf[32];
634
635 strncpy(buf,"/etc", 32);
636 s = dirname(buf);
637 if (!s || strncmp(s, "/", 32) != 0) {
638 exit(1);
639 } else {
640 exit(0);
641 }
642}
643 ],
644 [ ac_cv_have_broken_dirname="no" ],
645 [ ac_cv_have_broken_dirname="yes" ]
646 )
647 LIBS="$save_LIBS"
648 ])
649 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
650 LIBS="$LIBS -lgen"
651 AC_DEFINE(HAVE_DIRNAME)
652 AC_CHECK_HEADERS(libgen.h)
653 fi
654 ])
655m4trace:configure.ac:665: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DIRNAME])
656m4trace:configure.ac:665: -1- AC_CHECK_HEADERS([libgen.h])
657m4trace:configure.ac:665: -1- AH_OUTPUT([HAVE_LIBGEN_H], [/* Define to 1 if you have the <libgen.h> header file. */
658#undef HAVE_LIBGEN_H])
659m4trace:configure.ac:668: -1- AC_CHECK_FUNCS([gettimeofday time])
660m4trace:configure.ac:668: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */
661#undef HAVE_GETTIMEOFDAY])
662m4trace:configure.ac:668: -1- AH_OUTPUT([HAVE_TIME], [/* Define to 1 if you have the `time\' function. */
663#undef HAVE_TIME])
664m4trace:configure.ac:670: -1- AC_CHECK_FUNCS([endutent getutent getutid getutline pututline setutent])
665m4trace:configure.ac:670: -1- AH_OUTPUT([HAVE_ENDUTENT], [/* Define to 1 if you have the `endutent\' function. */
666#undef HAVE_ENDUTENT])
667m4trace:configure.ac:670: -1- AH_OUTPUT([HAVE_GETUTENT], [/* Define to 1 if you have the `getutent\' function. */
668#undef HAVE_GETUTENT])
669m4trace:configure.ac:670: -1- AH_OUTPUT([HAVE_GETUTID], [/* Define to 1 if you have the `getutid\' function. */
670#undef HAVE_GETUTID])
671m4trace:configure.ac:670: -1- AH_OUTPUT([HAVE_GETUTLINE], [/* Define to 1 if you have the `getutline\' function. */
672#undef HAVE_GETUTLINE])
673m4trace:configure.ac:670: -1- AH_OUTPUT([HAVE_PUTUTLINE], [/* Define to 1 if you have the `pututline\' function. */
674#undef HAVE_PUTUTLINE])
675m4trace:configure.ac:670: -1- AH_OUTPUT([HAVE_SETUTENT], [/* Define to 1 if you have the `setutent\' function. */
676#undef HAVE_SETUTENT])
677m4trace:configure.ac:671: -1- AC_CHECK_FUNCS([utmpname])
678m4trace:configure.ac:671: -1- AH_OUTPUT([HAVE_UTMPNAME], [/* Define to 1 if you have the `utmpname\' function. */
679#undef HAVE_UTMPNAME])
680m4trace:configure.ac:673: -1- AC_CHECK_FUNCS([endutxent getutxent getutxid getutxline pututxline ])
681m4trace:configure.ac:673: -1- AH_OUTPUT([HAVE_ENDUTXENT], [/* Define to 1 if you have the `endutxent\' function. */
682#undef HAVE_ENDUTXENT])
683m4trace:configure.ac:673: -1- AH_OUTPUT([HAVE_GETUTXENT], [/* Define to 1 if you have the `getutxent\' function. */
684#undef HAVE_GETUTXENT])
685m4trace:configure.ac:673: -1- AH_OUTPUT([HAVE_GETUTXID], [/* Define to 1 if you have the `getutxid\' function. */
686#undef HAVE_GETUTXID])
687m4trace:configure.ac:673: -1- AH_OUTPUT([HAVE_GETUTXLINE], [/* Define to 1 if you have the `getutxline\' function. */
688#undef HAVE_GETUTXLINE])
689m4trace:configure.ac:673: -1- AH_OUTPUT([HAVE_PUTUTXLINE], [/* Define to 1 if you have the `pututxline\' function. */
690#undef HAVE_PUTUTXLINE])
691m4trace:configure.ac:674: -1- AC_CHECK_FUNCS([setutxent utmpxname])
692m4trace:configure.ac:674: -1- AH_OUTPUT([HAVE_SETUTXENT], [/* Define to 1 if you have the `setutxent\' function. */
693#undef HAVE_SETUTXENT])
694m4trace:configure.ac:674: -1- AH_OUTPUT([HAVE_UTMPXNAME], [/* Define to 1 if you have the `utmpxname\' function. */
695#undef HAVE_UTMPXNAME])
696m4trace:configure.ac:679: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DAEMON])
697m4trace:configure.ac:679: -1- AC_CHECK_LIB([bsd], [daemon], [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])
698m4trace:configure.ac:679: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DAEMON])
699m4trace:configure.ac:684: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPAGESIZE])
700m4trace:configure.ac:684: -1- AC_CHECK_LIB([ucb], [getpagesize], [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])
701m4trace:configure.ac:684: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPAGESIZE])
702m4trace:configure.ac:700: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SNPRINTF])
703m4trace:configure.ac:726: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRICT_MKSTEMP])
704m4trace:configure.ac:726: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRICT_MKSTEMP])
705m4trace:configure.ac:729: -1- AC_FUNC_GETPGRP
706m4trace:configure.ac:729: -1- AC_DEFINE_TRACE_LITERAL([GETPGRP_VOID])
707m4trace:configure.ac:729: -1- AH_OUTPUT([GETPGRP_VOID], [/* Define to 1 if the `getpgrp\' function requires zero arguments. */
708#undef GETPGRP_VOID])
709m4trace:configure.ac:757: -1- AC_CHECK_LIB([dl], [dlopen], [], [])
710m4trace:configure.ac:757: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the `dl\' library (-ldl). */
711#undef HAVE_LIBDL])
712m4trace:configure.ac:757: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
713m4trace:configure.ac:757: -1- AC_CHECK_LIB([pam], [pam_set_item], [], [{ { echo "$as_me:$LINENO: error: *** libpam missing" >&5
714echo "$as_me: error: *** libpam missing" >&2;}
715 { (exit 1); exit 1; }; }])
716m4trace:configure.ac:757: -1- AH_OUTPUT([HAVE_LIBPAM], [/* Define to 1 if you have the `pam\' library (-lpam). */
717#undef HAVE_LIBPAM])
718m4trace:configure.ac:757: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPAM])
719m4trace:configure.ac:757: -1- AC_CHECK_FUNCS([pam_getenvlist])
720m4trace:configure.ac:757: -1- AH_OUTPUT([HAVE_PAM_GETENVLIST], [/* Define to 1 if you have the `pam_getenvlist\' function. */
721#undef HAVE_PAM_GETENVLIST])
722m4trace:configure.ac:757: -1- AC_DEFINE_TRACE_LITERAL([USE_PAM])
723m4trace:configure.ac:757: -1- AC_SUBST([LIBPAM])
724m4trace:configure.ac:775: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OLD_PAM])
725m4trace:configure.ac:781: -1- AC_CHECK_LIB([crypt], [crypt])
726m4trace:configure.ac:781: -1- AH_OUTPUT([HAVE_LIBCRYPT], [/* Define to 1 if you have the `crypt\' library (-lcrypt). */
727#undef HAVE_LIBCRYPT])
728m4trace:configure.ac:781: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCRYPT])
729m4trace:configure.ac:813: -2- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL])
730m4trace:configure.ac:828: -2- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL])
731m4trace:configure.ac:915: -1- AC_CHECK_LIB([crypt], [crypt], [LIBS="$LIBS -lcrypt"])
732m4trace:configure.ac:963: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_PRNG_ONLY])
733m4trace:configure.ac:971: -1- AC_SUBST([INSTALL_SSH_RAND_HELPER])
734m4trace:configure.ac:994: -1- AC_DEFINE_TRACE_LITERAL([PRNGD_PORT])
735m4trace:configure.ac:1044: -1- AC_DEFINE_TRACE_LITERAL([PRNGD_SOCKET])
736m4trace:configure.ac:1044: -1- AC_DEFINE_TRACE_LITERAL([PRNGD_SOCKET])
737m4trace:configure.ac:1056: -1- AC_DEFINE_TRACE_LITERAL([ENTROPY_TIMEOUT_MSEC])
738m4trace:configure.ac:1067: -1- AC_DEFINE_TRACE_LITERAL([SSH_PRIVSEP_USER])
739m4trace:configure.ac:1068: -1- AC_SUBST([SSH_PRIVSEP_USER])
740m4trace:configure.ac:1085: -1- AC_SUBST([PROG_LS], [$ac_cv_path_PROG_LS])
741m4trace:configure.ac:1085: -1- AC_SUBST([PROG_LS])
742m4trace:configure.ac:1086: -1- AC_SUBST([PROG_NETSTAT], [$ac_cv_path_PROG_NETSTAT])
743m4trace:configure.ac:1086: -1- AC_SUBST([PROG_NETSTAT])
744m4trace:configure.ac:1087: -1- AC_SUBST([PROG_ARP], [$ac_cv_path_PROG_ARP])
745m4trace:configure.ac:1087: -1- AC_SUBST([PROG_ARP])
746m4trace:configure.ac:1088: -1- AC_SUBST([PROG_IFCONFIG], [$ac_cv_path_PROG_IFCONFIG])
747m4trace:configure.ac:1088: -1- AC_SUBST([PROG_IFCONFIG])
748m4trace:configure.ac:1089: -1- AC_SUBST([PROG_JSTAT], [$ac_cv_path_PROG_JSTAT])
749m4trace:configure.ac:1089: -1- AC_SUBST([PROG_JSTAT])
750m4trace:configure.ac:1090: -1- AC_SUBST([PROG_PS], [$ac_cv_path_PROG_PS])
751m4trace:configure.ac:1090: -1- AC_SUBST([PROG_PS])
752m4trace:configure.ac:1091: -1- AC_SUBST([PROG_SAR], [$ac_cv_path_PROG_SAR])
753m4trace:configure.ac:1091: -1- AC_SUBST([PROG_SAR])
754m4trace:configure.ac:1092: -1- AC_SUBST([PROG_W], [$ac_cv_path_PROG_W])
755m4trace:configure.ac:1092: -1- AC_SUBST([PROG_W])
756m4trace:configure.ac:1093: -1- AC_SUBST([PROG_WHO], [$ac_cv_path_PROG_WHO])
757m4trace:configure.ac:1093: -1- AC_SUBST([PROG_WHO])
758m4trace:configure.ac:1094: -1- AC_SUBST([PROG_LAST], [$ac_cv_path_PROG_LAST])
759m4trace:configure.ac:1094: -1- AC_SUBST([PROG_LAST])
760m4trace:configure.ac:1095: -1- AC_SUBST([PROG_LASTLOG], [$ac_cv_path_PROG_LASTLOG])
761m4trace:configure.ac:1095: -1- AC_SUBST([PROG_LASTLOG])
762m4trace:configure.ac:1096: -1- AC_SUBST([PROG_DF], [$ac_cv_path_PROG_DF])
763m4trace:configure.ac:1096: -1- AC_SUBST([PROG_DF])
764m4trace:configure.ac:1097: -1- AC_SUBST([PROG_VMSTAT], [$ac_cv_path_PROG_VMSTAT])
765m4trace:configure.ac:1097: -1- AC_SUBST([PROG_VMSTAT])
766m4trace:configure.ac:1098: -1- AC_SUBST([PROG_UPTIME], [$ac_cv_path_PROG_UPTIME])
767m4trace:configure.ac:1098: -1- AC_SUBST([PROG_UPTIME])
768m4trace:configure.ac:1099: -1- AC_SUBST([PROG_IPCS], [$ac_cv_path_PROG_IPCS])
769m4trace:configure.ac:1099: -1- AC_SUBST([PROG_IPCS])
770m4trace:configure.ac:1100: -1- AC_SUBST([PROG_TAIL], [$ac_cv_path_PROG_TAIL])
771m4trace:configure.ac:1100: -1- AC_SUBST([PROG_TAIL])
772m4trace:configure.ac:1117: -1- AC_SUBST([INSTALL_SSH_PRNG_CMDS])
773m4trace:configure.ac:1126: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_CHAR])
774m4trace:configure.ac:1126: -1- AH_OUTPUT([SIZEOF_CHAR], [/* The size of a `char\', as computed by sizeof. */
775#undef SIZEOF_CHAR])
776m4trace:configure.ac:1127: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SHORT_INT])
777m4trace:configure.ac:1127: -1- AH_OUTPUT([SIZEOF_SHORT_INT], [/* The size of a `short int\', as computed by sizeof. */
778#undef SIZEOF_SHORT_INT])
779m4trace:configure.ac:1128: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT])
780m4trace:configure.ac:1128: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of a `int\', as computed by sizeof. */
781#undef SIZEOF_INT])
782m4trace:configure.ac:1129: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_INT])
783m4trace:configure.ac:1129: -1- AH_OUTPUT([SIZEOF_LONG_INT], [/* The size of a `long int\', as computed by sizeof. */
784#undef SIZEOF_LONG_INT])
785m4trace:configure.ac:1130: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT])
786m4trace:configure.ac:1130: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of a `long long int\', as computed by sizeof. */
787#undef SIZEOF_LONG_LONG_INT])
788m4trace:configure.ac:1147: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT])
789m4trace:configure.ac:1160: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTXX_T])
790m4trace:configure.ac:1176: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTXX_T])
791m4trace:configure.ac:1197: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT64_T])
792m4trace:configure.ac:1209: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INTXX_T])
793m4trace:configure.ac:1223: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INTXX_T])
794m4trace:configure.ac:1235: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT64_T])
795m4trace:configure.ac:1249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT64_T])
796m4trace:configure.ac:1264: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINTXX_T])
797m4trace:configure.ac:1278: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINTXX_T])
798m4trace:configure.ac:1300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INTXX_T])
799m4trace:configure.ac:1300: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTXX_T])
800m4trace:configure.ac:1315: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_CHAR])
801m4trace:configure.ac:1318: -1- AC_DEFINE_TRACE_LITERAL([socklen_t])
802m4trace:configure.ac:1318: -1- AH_OUTPUT([socklen_t], [/* type to use in place of socklen_t if not defined */
803#undef socklen_t])
804m4trace:configure.ac:1320: -1- AC_CHECK_TYPES([sig_atomic_t], [], [], [#include <signal.h>])
805m4trace:configure.ac:1320: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIG_ATOMIC_T])
806m4trace:configure.ac:1320: -1- AH_OUTPUT([HAVE_SIG_ATOMIC_T], [/* Define to 1 if the system has the type `sig_atomic_t\'. */
807#undef HAVE_SIG_ATOMIC_T])
808m4trace:configure.ac:1333: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIZE_T])
809m4trace:configure.ac:1347: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSIZE_T])
810m4trace:configure.ac:1361: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CLOCK_T])
811m4trace:configure.ac:1386: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SA_FAMILY_T])
812m4trace:configure.ac:1400: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PID_T])
813m4trace:configure.ac:1414: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MODE_T])
814m4trace:configure.ac:1430: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE])
815m4trace:configure.ac:1445: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_IN6])
816m4trace:configure.ac:1460: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_IN6_ADDR])
817m4trace:configure.ac:1476: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_ADDRINFO])
818m4trace:configure.ac:1488: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TIMEVAL])
819m4trace:configure.ac:1492: -1- AC_CHECK_TYPES([struct timespec])
820m4trace:configure.ac:1492: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TIMESPEC])
821m4trace:configure.ac:1492: -1- AH_OUTPUT([HAVE_STRUCT_TIMESPEC], [/* Define to 1 if the system has the type `struct timespec\'. */
822#undef HAVE_STRUCT_TIMESPEC])
823m4trace:configure.ac:1529: -1- AC_DEFINE_TRACE_LITERAL([BROKEN_SNPRINTF])
824m4trace:configure.ac:1533: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_IN_UTMP])
825m4trace:configure.ac:1534: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_IN_UTMPX])
826m4trace:configure.ac:1535: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYSLEN_IN_UTMPX])
827m4trace:configure.ac:1536: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PID_IN_UTMP])
828m4trace:configure.ac:1537: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TYPE_IN_UTMP])
829m4trace:configure.ac:1538: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TYPE_IN_UTMPX])
830m4trace:configure.ac:1539: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TV_IN_UTMP])
831m4trace:configure.ac:1540: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ID_IN_UTMP])
832m4trace:configure.ac:1541: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ID_IN_UTMPX])
833m4trace:configure.ac:1542: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_IN_UTMP])
834m4trace:configure.ac:1543: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_IN_UTMPX])
835m4trace:configure.ac:1544: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_V6_IN_UTMP])
836m4trace:configure.ac:1545: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ADDR_V6_IN_UTMPX])
837m4trace:configure.ac:1546: -1- AC_DEFINE_TRACE_LITERAL([HAVE_EXIT_IN_UTMP])
838m4trace:configure.ac:1547: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TIME_IN_UTMP])
839m4trace:configure.ac:1548: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TIME_IN_UTMPX])
840m4trace:configure.ac:1549: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TV_IN_UTMPX])
841m4trace:configure.ac:1551: -1- AC_CHECK_MEMBERS([struct stat.st_blksize])
842m4trace:configure.ac:1551: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_STAT_ST_BLKSIZE])
843m4trace:configure.ac:1551: -1- AH_OUTPUT([HAVE_STRUCT_STAT_ST_BLKSIZE], [/* Define to 1 if `st_blksize\' is member of `struct stat\'. */
844#undef HAVE_STRUCT_STAT_ST_BLKSIZE])
845m4trace:configure.ac:1566: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SS_FAMILY_IN_SS])
846m4trace:configure.ac:1582: -1- AC_DEFINE_TRACE_LITERAL([HAVE___SS_FAMILY_IN_SS])
847m4trace:configure.ac:1597: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PW_CLASS_IN_PASSWD])
848m4trace:configure.ac:1612: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PW_EXPIRE_IN_PASSWD])
849m4trace:configure.ac:1627: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PW_CHANGE_IN_PASSWD])
850m4trace:configure.ac:1652: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ACCRIGHTS_IN_MSGHDR])
851m4trace:configure.ac:1676: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CONTROL_IN_MSGHDR])
852m4trace:configure.ac:1687: -1- AC_DEFINE_TRACE_LITERAL([HAVE___PROGNAME])
853m4trace:configure.ac:1700: -1- AC_DEFINE_TRACE_LITERAL([HAVE___FUNCTION__])
854m4trace:configure.ac:1713: -1- AC_DEFINE_TRACE_LITERAL([HAVE___func__])
855m4trace:configure.ac:1728: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_OPTRESET])
856m4trace:configure.ac:1739: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_ERRLIST])
857m4trace:configure.ac:1751: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_NERR])
858m4trace:configure.ac:1784: -1- AC_CHECK_HEADERS([sectok.h])
859m4trace:configure.ac:1784: -1- AH_OUTPUT([HAVE_SECTOK_H], [/* Define to 1 if you have the <sectok.h> header file. */
860#undef HAVE_SECTOK_H])
861m4trace:configure.ac:1784: -1- AC_CHECK_LIB([sectok], [sectok_open])
862m4trace:configure.ac:1784: -1- AH_OUTPUT([HAVE_LIBSECTOK], [/* Define to 1 if you have the `sectok\' library (-lsectok). */
863#undef HAVE_LIBSECTOK])
864m4trace:configure.ac:1784: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSECTOK])
865m4trace:configure.ac:1784: -1- AC_DEFINE_TRACE_LITERAL([SMARTCARD])
866m4trace:configure.ac:1784: -1- AC_DEFINE_TRACE_LITERAL([USE_SECTOK])
867m4trace:configure.ac:1793: -1- AC_SUBST([OPENSC_CONFIG], [$ac_cv_path_OPENSC_CONFIG])
868m4trace:configure.ac:1799: -1- AC_DEFINE_TRACE_LITERAL([SMARTCARD])
869m4trace:configure.ac:1800: -1- AC_DEFINE_TRACE_LITERAL([USE_OPENSC])
870m4trace:configure.ac:1842: -1- AC_DEFINE_TRACE_LITERAL([KRB5])
871m4trace:configure.ac:1842: -1- AC_DEFINE_TRACE_LITERAL([HEIMDAL])
872m4trace:configure.ac:1842: -1- AC_CHECK_LIB([resolv], [dn_expand], [], [])
873m4trace:configure.ac:1842: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
874#undef HAVE_LIBRESOLV])
875m4trace:configure.ac:1842: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
876m4trace:configure.ac:1896: -1- AC_CHECK_HEADERS([krb.h])
877m4trace:configure.ac:1896: -1- AH_OUTPUT([HAVE_KRB_H], [/* Define to 1 if you have the <krb.h> header file. */
878#undef HAVE_KRB_H])
879m4trace:configure.ac:1896: -1- AC_CHECK_LIB([krb], [main])
880m4trace:configure.ac:1896: -1- AH_OUTPUT([HAVE_LIBKRB], [/* Define to 1 if you have the `krb\' library (-lkrb). */
881#undef HAVE_LIBKRB])
882m4trace:configure.ac:1896: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBKRB])
883m4trace:configure.ac:1896: -1- AC_CHECK_LIB([krb4], [main])
884m4trace:configure.ac:1896: -1- AH_OUTPUT([HAVE_LIBKRB4], [/* Define to 1 if you have the `krb4\' library (-lkrb4). */
885#undef HAVE_LIBKRB4])
886m4trace:configure.ac:1896: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBKRB4])
887m4trace:configure.ac:1896: -1- AC_CHECK_LIB([des], [des_cbc_encrypt])
888m4trace:configure.ac:1896: -1- AH_OUTPUT([HAVE_LIBDES], [/* Define to 1 if you have the `des\' library (-ldes). */
889#undef HAVE_LIBDES])
890m4trace:configure.ac:1896: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDES])
891m4trace:configure.ac:1896: -1- AC_CHECK_LIB([des425], [des_cbc_encrypt])
892m4trace:configure.ac:1896: -1- AH_OUTPUT([HAVE_LIBDES425], [/* Define to 1 if you have the `des425\' library (-ldes425). */
893#undef HAVE_LIBDES425])
894m4trace:configure.ac:1896: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDES425])
895m4trace:configure.ac:1896: -1- AC_CHECK_LIB([resolv], [dn_expand], [], [])
896m4trace:configure.ac:1896: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
897#undef HAVE_LIBRESOLV])
898m4trace:configure.ac:1896: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
899m4trace:configure.ac:1896: -1- AC_DEFINE_TRACE_LITERAL([KRB4])
900m4trace:configure.ac:1922: -1- AC_DEFINE_TRACE_LITERAL([AFS])
901m4trace:configure.ac:1936: -1- AC_SUBST([PRIVSEP_PATH])
902m4trace:configure.ac:1956: -1- AC_SUBST([xauth_path], [$ac_cv_path_xauth_path])
903m4trace:configure.ac:1967: -1- AC_SUBST([STRIP_OPT])
904m4trace:configure.ac:1971: -1- AC_SUBST([XAUTH_PATH])
905m4trace:configure.ac:1973: -1- AC_DEFINE_TRACE_LITERAL([XAUTH_PATH])
906m4trace:configure.ac:1975: -1- AC_SUBST([XAUTH_PATH])
907m4trace:configure.ac:1981: -1- AC_DEFINE_TRACE_LITERAL([MAIL_DIRECTORY])
908m4trace:configure.ac:1991: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DEV_PTMX])
909m4trace:configure.ac:1999: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DEV_PTS_AND_PTC])
910m4trace:configure.ac:2017: -1- AC_SUBST([NROFF], [$ac_cv_path_NROFF])
911m4trace:configure.ac:2026: -1- AC_SUBST([MANTYPE])
912m4trace:configure.ac:2032: -1- AC_SUBST([mansubdir])
913m4trace:configure.ac:2044: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MD5_PASSWORDS])
914m4trace:configure.ac:2055: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_SHADOW])
915m4trace:configure.ac:2070: -1- AC_DEFINE_TRACE_LITERAL([HAS_SHADOW_EXPIRE])
916m4trace:configure.ac:2079: -1- AC_DEFINE_TRACE_LITERAL([IPADDR_IN_DISPLAY])
917m4trace:configure.ac:2090: -1- AC_DEFINE_TRACE_LITERAL([IPADDR_IN_DISPLAY])
918m4trace:configure.ac:2171: -1- AC_DEFINE_TRACE_LITERAL([USER_PATH])
919m4trace:configure.ac:2172: -1- AC_SUBST([user_path])
920m4trace:configure.ac:2184: -1- AC_DEFINE_TRACE_LITERAL([SUPERUSER_PATH])
921m4trace:configure.ac:2197: -1- AC_DEFINE_TRACE_LITERAL([IPV4_DEFAULT])
922m4trace:configure.ac:2220: -1- AC_DEFINE_TRACE_LITERAL([IPV4_IN_IPV6])
923m4trace:configure.ac:2220: -1- AC_DEFINE_TRACE_LITERAL([IPV4_IN_IPV6])
924m4trace:configure.ac:2232: -1- AC_DEFINE_TRACE_LITERAL([BSD_AUTH])
925m4trace:configure.ac:2256: -1- AC_DEFINE_TRACE_LITERAL([_PATH_SSH_PIDDIR])
926m4trace:configure.ac:2257: -1- AC_SUBST([piddir])
927m4trace:configure.ac:2263: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LASTLOG])
928m4trace:configure.ac:2267: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
929m4trace:configure.ac:2271: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMPX])
930m4trace:configure.ac:2275: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMP])
931m4trace:configure.ac:2279: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMPX])
932m4trace:configure.ac:2283: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LOGIN])
933m4trace:configure.ac:2287: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_PUTUTLINE])
934m4trace:configure.ac:2291: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_PUTUTXLINE])
935m4trace:configure.ac:2301: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_LASTLOG])
936m4trace:configure.ac:2363: -1- AC_DEFINE_TRACE_LITERAL([CONF_LASTLOG_FILE])
937m4trace:configure.ac:2388: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMP])
938m4trace:configure.ac:2393: -1- AC_DEFINE_TRACE_LITERAL([CONF_UTMP_FILE])
939m4trace:configure.ac:2418: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMP])
940m4trace:configure.ac:2423: -1- AC_DEFINE_TRACE_LITERAL([CONF_WTMP_FILE])
941m4trace:configure.ac:2448: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_UTMPX])
942m4trace:configure.ac:2451: -1- AC_DEFINE_TRACE_LITERAL([CONF_UTMPX_FILE])
943m4trace:configure.ac:2473: -1- AC_DEFINE_TRACE_LITERAL([DISABLE_WTMPX])
944m4trace:configure.ac:2476: -1- AC_DEFINE_TRACE_LITERAL([CONF_WTMPX_FILE])
945m4trace:configure.ac:2494: -1- AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
946m4trace:configure.ac:2495: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
947m4trace:configure.ac:2495: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
diff --git a/bufaux.c b/bufaux.c
index 37cc27ff6..3c276b810 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: bufaux.c,v 1.29 2003/04/08 20:21:28 itojun Exp $"); 40RCSID("$OpenBSD: bufaux.c,v 1.28 2002/10/23 10:40:16 markus Exp $");
41 41
42#include <openssl/bn.h> 42#include <openssl/bn.h>
43#include "bufaux.h" 43#include "bufaux.h"
@@ -119,7 +119,7 @@ buffer_put_bignum2(Buffer *buffer, BIGNUM *value)
119 /**XXX should be two's-complement */ 119 /**XXX should be two's-complement */
120 int i, carry; 120 int i, carry;
121 u_char *uc = buf; 121 u_char *uc = buf;
122 logit("negativ!"); 122 log("negativ!");
123 for (i = bytes-1, carry = 1; i>=0; i--) { 123 for (i = bytes-1, carry = 1; i>=0; i--) {
124 uc[i] ^= 0xff; 124 uc[i] ^= 0xff;
125 if (carry) 125 if (carry)
@@ -165,6 +165,7 @@ buffer_get_int(Buffer *buffer)
165 return GET_32BIT(buf); 165 return GET_32BIT(buf);
166} 166}
167 167
168#ifdef HAVE_U_INT64_T
168u_int64_t 169u_int64_t
169buffer_get_int64(Buffer *buffer) 170buffer_get_int64(Buffer *buffer)
170{ 171{
@@ -173,6 +174,7 @@ buffer_get_int64(Buffer *buffer)
173 buffer_get(buffer, (char *) buf, 8); 174 buffer_get(buffer, (char *) buf, 8);
174 return GET_64BIT(buf); 175 return GET_64BIT(buf);
175} 176}
177#endif
176 178
177/* 179/*
178 * Stores integers in the buffer, msb first. 180 * Stores integers in the buffer, msb first.
@@ -195,6 +197,7 @@ buffer_put_int(Buffer *buffer, u_int value)
195 buffer_append(buffer, buf, 4); 197 buffer_append(buffer, buf, 4);
196} 198}
197 199
200#ifdef HAVE_U_INT64_T
198void 201void
199buffer_put_int64(Buffer *buffer, u_int64_t value) 202buffer_put_int64(Buffer *buffer, u_int64_t value)
200{ 203{
@@ -203,6 +206,7 @@ buffer_put_int64(Buffer *buffer, u_int64_t value)
203 PUT_64BIT(buf, value); 206 PUT_64BIT(buf, value);
204 buffer_append(buffer, buf, 8); 207 buffer_append(buffer, buf, 8);
205} 208}
209#endif
206 210
207/* 211/*
208 * Returns an arbitrary binary string from the buffer. The string cannot 212 * Returns an arbitrary binary string from the buffer. The string cannot
diff --git a/bufaux.h b/bufaux.h
index 935553579..80f35c1ec 100644
--- a/bufaux.h
+++ b/bufaux.h
@@ -29,8 +29,10 @@ void buffer_put_short(Buffer *, u_short);
29u_int buffer_get_int(Buffer *); 29u_int buffer_get_int(Buffer *);
30void buffer_put_int(Buffer *, u_int); 30void buffer_put_int(Buffer *, u_int);
31 31
32#ifdef HAVE_U_INT64_T
32u_int64_t buffer_get_int64(Buffer *); 33u_int64_t buffer_get_int64(Buffer *);
33void buffer_put_int64(Buffer *, u_int64_t); 34void buffer_put_int64(Buffer *, u_int64_t);
35#endif
34 36
35int buffer_get_char(Buffer *); 37int buffer_get_char(Buffer *);
36void buffer_put_char(Buffer *, int); 38void buffer_put_char(Buffer *, int);
diff --git a/buffer.c b/buffer.c
index a80880bb9..1627b1343 100644
--- a/buffer.c
+++ b/buffer.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: buffer.c,v 1.19 2003/09/18 07:54:48 markus Exp $"); 15RCSID("$OpenBSD: buffer.c,v 1.18 2003/09/16 21:02:39 markus Exp $");
16 16
17#include "xmalloc.h" 17#include "xmalloc.h"
18#include "buffer.h" 18#include "buffer.h"
@@ -105,7 +105,6 @@ restart:
105 goto restart; 105 goto restart;
106 } 106 }
107 /* Increase the size of the buffer and retry. */ 107 /* Increase the size of the buffer and retry. */
108
109 newlen = buffer->alloc + len + 32768; 108 newlen = buffer->alloc + len + 32768;
110 if (newlen > 0xa00000) 109 if (newlen > 0xa00000)
111 fatal("buffer_append_space: alloc %u not supported", 110 fatal("buffer_append_space: alloc %u not supported",
diff --git a/canohost.c b/canohost.c
index 438175f76..941db23b6 100644
--- a/canohost.c
+++ b/canohost.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: canohost.c,v 1.37 2003/06/02 09:17:34 markus Exp $"); 15RCSID("$OpenBSD: canohost.c,v 1.35 2002/11/26 02:38:54 stevesk Exp $");
16 16
17#include "packet.h" 17#include "packet.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -27,7 +27,7 @@ static void check_ip_options(int, char *);
27 */ 27 */
28 28
29static char * 29static char *
30get_remote_hostname(int socket, int use_dns) 30get_remote_hostname(int socket, int verify_reverse_mapping)
31{ 31{
32 struct sockaddr_storage from; 32 struct sockaddr_storage from;
33 int i; 33 int i;
@@ -72,9 +72,6 @@ get_remote_hostname(int socket, int use_dns)
72 NULL, 0, NI_NUMERICHOST) != 0) 72 NULL, 0, NI_NUMERICHOST) != 0)
73 fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed"); 73 fatal("get_remote_hostname: getnameinfo NI_NUMERICHOST failed");
74 74
75 if (!use_dns)
76 return xstrdup(ntop);
77
78 if (from.ss_family == AF_INET) 75 if (from.ss_family == AF_INET)
79 check_ip_options(socket, ntop); 76 check_ip_options(socket, ntop);
80 77
@@ -83,24 +80,14 @@ get_remote_hostname(int socket, int use_dns)
83 if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name), 80 if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name),
84 NULL, 0, NI_NAMEREQD) != 0) { 81 NULL, 0, NI_NAMEREQD) != 0) {
85 /* Host name not found. Use ip address. */ 82 /* Host name not found. Use ip address. */
83#if 0
84 log("Could not reverse map address %.100s.", ntop);
85#endif
86 return xstrdup(ntop); 86 return xstrdup(ntop);
87 } 87 }
88 88
89 /* 89 /* Got host name. */
90 * if reverse lookup result looks like a numeric hostname, 90 name[sizeof(name) - 1] = '\0';
91 * someone is trying to trick us by PTR record like following:
92 * 1.1.1.10.in-addr.arpa. IN PTR 2.3.4.5
93 */
94 memset(&hints, 0, sizeof(hints));
95 hints.ai_socktype = SOCK_DGRAM; /*dummy*/
96 hints.ai_flags = AI_NUMERICHOST;
97 if (getaddrinfo(name, "0", &hints, &ai) == 0) {
98 logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
99 name, ntop);
100 freeaddrinfo(ai);
101 return xstrdup(ntop);
102 }
103
104 /* 91 /*
105 * Convert it to all lowercase (which is expected by the rest 92 * Convert it to all lowercase (which is expected by the rest
106 * of this software). 93 * of this software).
@@ -108,6 +95,9 @@ get_remote_hostname(int socket, int use_dns)
108 for (i = 0; name[i]; i++) 95 for (i = 0; name[i]; i++)
109 if (isupper(name[i])) 96 if (isupper(name[i]))
110 name[i] = tolower(name[i]); 97 name[i] = tolower(name[i]);
98
99 if (!verify_reverse_mapping)
100 return xstrdup(name);
111 /* 101 /*
112 * Map it back to an IP address and check that the given 102 * Map it back to an IP address and check that the given
113 * address actually is an address of this host. This is 103 * address actually is an address of this host. This is
@@ -121,7 +111,7 @@ get_remote_hostname(int socket, int use_dns)
121 hints.ai_family = from.ss_family; 111 hints.ai_family = from.ss_family;
122 hints.ai_socktype = SOCK_STREAM; 112 hints.ai_socktype = SOCK_STREAM;
123 if (getaddrinfo(name, NULL, &hints, &aitop) != 0) { 113 if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
124 logit("reverse mapping checking getaddrinfo for %.700s " 114 log("reverse mapping checking getaddrinfo for %.700s "
125 "failed - POSSIBLE BREAKIN ATTEMPT!", name); 115 "failed - POSSIBLE BREAKIN ATTEMPT!", name);
126 return xstrdup(ntop); 116 return xstrdup(ntop);
127 } 117 }
@@ -136,7 +126,7 @@ get_remote_hostname(int socket, int use_dns)
136 /* If we reached the end of the list, the address was not there. */ 126 /* If we reached the end of the list, the address was not there. */
137 if (!ai) { 127 if (!ai) {
138 /* Address not found for the host name. */ 128 /* Address not found for the host name. */
139 logit("Address %.100s maps to %.600s, but this does not " 129 log("Address %.100s maps to %.600s, but this does not "
140 "map back to the address - POSSIBLE BREAKIN ATTEMPT!", 130 "map back to the address - POSSIBLE BREAKIN ATTEMPT!",
141 ntop, name); 131 ntop, name);
142 return xstrdup(ntop); 132 return xstrdup(ntop);
@@ -159,7 +149,6 @@ get_remote_hostname(int socket, int use_dns)
159static void 149static void
160check_ip_options(int socket, char *ipaddr) 150check_ip_options(int socket, char *ipaddr)
161{ 151{
162#ifdef IP_OPTIONS
163 u_char options[200]; 152 u_char options[200];
164 char text[sizeof(options) * 3 + 1]; 153 char text[sizeof(options) * 3 + 1];
165 socklen_t option_size; 154 socklen_t option_size;
@@ -177,12 +166,11 @@ check_ip_options(int socket, char *ipaddr)
177 for (i = 0; i < option_size; i++) 166 for (i = 0; i < option_size; i++)
178 snprintf(text + i*3, sizeof(text) - i*3, 167 snprintf(text + i*3, sizeof(text) - i*3,
179 " %2.2x", options[i]); 168 " %2.2x", options[i]);
180 logit("Connection from %.100s with IP options:%.800s", 169 log("Connection from %.100s with IP options:%.800s",
181 ipaddr, text); 170 ipaddr, text);
182 packet_disconnect("Connection from %.100s with IP options:%.800s", 171 packet_disconnect("Connection from %.100s with IP options:%.800s",
183 ipaddr, text); 172 ipaddr, text);
184 } 173 }
185#endif /* IP_OPTIONS */
186} 174}
187 175
188/* 176/*
@@ -192,14 +180,14 @@ check_ip_options(int socket, char *ipaddr)
192 */ 180 */
193 181
194const char * 182const char *
195get_canonical_hostname(int use_dns) 183get_canonical_hostname(int verify_reverse_mapping)
196{ 184{
197 static char *canonical_host_name = NULL; 185 static char *canonical_host_name = NULL;
198 static int use_dns_done = 0; 186 static int verify_reverse_mapping_done = 0;
199 187
200 /* Check if we have previously retrieved name with same option. */ 188 /* Check if we have previously retrieved name with same option. */
201 if (canonical_host_name != NULL) { 189 if (canonical_host_name != NULL) {
202 if (use_dns_done != use_dns) 190 if (verify_reverse_mapping_done != verify_reverse_mapping)
203 xfree(canonical_host_name); 191 xfree(canonical_host_name);
204 else 192 else
205 return canonical_host_name; 193 return canonical_host_name;
@@ -208,11 +196,11 @@ get_canonical_hostname(int use_dns)
208 /* Get the real hostname if socket; otherwise return UNKNOWN. */ 196 /* Get the real hostname if socket; otherwise return UNKNOWN. */
209 if (packet_connection_is_on_socket()) 197 if (packet_connection_is_on_socket())
210 canonical_host_name = get_remote_hostname( 198 canonical_host_name = get_remote_hostname(
211 packet_get_connection_in(), use_dns); 199 packet_get_connection_in(), verify_reverse_mapping);
212 else 200 else
213 canonical_host_name = xstrdup("UNKNOWN"); 201 canonical_host_name = xstrdup("UNKNOWN");
214 202
215 use_dns_done = use_dns; 203 verify_reverse_mapping_done = verify_reverse_mapping;
216 return canonical_host_name; 204 return canonical_host_name;
217} 205}
218 206
@@ -306,11 +294,11 @@ get_remote_ipaddr(void)
306} 294}
307 295
308const char * 296const char *
309get_remote_name_or_ip(u_int utmp_len, int use_dns) 297get_remote_name_or_ip(u_int utmp_len, int verify_reverse_mapping)
310{ 298{
311 static const char *remote = ""; 299 static const char *remote = "";
312 if (utmp_len > 0) 300 if (utmp_len > 0)
313 remote = get_canonical_hostname(use_dns); 301 remote = get_canonical_hostname(verify_reverse_mapping);
314 if (utmp_len == 0 || strlen(remote) > utmp_len) 302 if (utmp_len == 0 || strlen(remote) > utmp_len)
315 remote = get_remote_ipaddr(); 303 remote = get_remote_ipaddr();
316 return remote; 304 return remote;
diff --git a/channels.c b/channels.c
index 65a6a7f00..218744d1a 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.194 2003/08/29 10:04:36 markus Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.187 2003/03/05 22:33:43 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -54,7 +54,7 @@ RCSID("$OpenBSD: channels.c,v 1.194 2003/08/29 10:04:36 markus Exp $");
54#include "key.h" 54#include "key.h"
55#include "authfd.h" 55#include "authfd.h"
56#include "pathnames.h" 56#include "pathnames.h"
57#include "bufaux.h" 57
58 58
59/* -- channel core */ 59/* -- channel core */
60 60
@@ -142,12 +142,12 @@ channel_lookup(int id)
142 Channel *c; 142 Channel *c;
143 143
144 if (id < 0 || id >= channels_alloc) { 144 if (id < 0 || id >= channels_alloc) {
145 logit("channel_lookup: %d: bad id", id); 145 log("channel_lookup: %d: bad id", id);
146 return NULL; 146 return NULL;
147 } 147 }
148 c = channels[id]; 148 c = channels[id];
149 if (c == NULL) { 149 if (c == NULL) {
150 logit("channel_lookup: %d: bad id: channel free", id); 150 log("channel_lookup: %d: bad id: channel free", id);
151 return NULL; 151 return NULL;
152 } 152 }
153 return c; 153 return c;
@@ -177,7 +177,7 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
177 177
178 /* XXX ugly hack: nonblock is only set by the server */ 178 /* XXX ugly hack: nonblock is only set by the server */
179 if (nonblock && isatty(c->rfd)) { 179 if (nonblock && isatty(c->rfd)) {
180 debug2("channel %d: rfd %d isatty", c->self, c->rfd); 180 debug("channel %d: rfd %d isatty", c->self, c->rfd);
181 c->isatty = 1; 181 c->isatty = 1;
182 if (!isatty(c->wfd)) { 182 if (!isatty(c->wfd)) {
183 error("channel %d: wfd %d is not a tty?", 183 error("channel %d: wfd %d is not a tty?",
@@ -229,12 +229,13 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
229 if (found == -1) { 229 if (found == -1) {
230 /* There are no free slots. Take last+1 slot and expand the array. */ 230 /* There are no free slots. Take last+1 slot and expand the array. */
231 found = channels_alloc; 231 found = channels_alloc;
232 channels_alloc += 10;
233 if (channels_alloc > 10000) 232 if (channels_alloc > 10000)
234 fatal("channel_new: internal error: channels_alloc %d " 233 fatal("channel_new: internal error: channels_alloc %d "
235 "too big.", channels_alloc); 234 "too big.", channels_alloc);
235 channels = xrealloc(channels,
236 (channels_alloc + 10) * sizeof(Channel *));
237 channels_alloc += 10;
236 debug2("channel: expanding %d", channels_alloc); 238 debug2("channel: expanding %d", channels_alloc);
237 channels = xrealloc(channels, channels_alloc * sizeof(Channel *));
238 for (i = found; i < channels_alloc; i++) 239 for (i = found; i < channels_alloc; i++)
239 channels[i] = NULL; 240 channels[i] = NULL;
240 } 241 }
@@ -256,7 +257,7 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
256 c->local_consumed = 0; 257 c->local_consumed = 0;
257 c->local_maxpacket = maxpack; 258 c->local_maxpacket = maxpack;
258 c->remote_id = -1; 259 c->remote_id = -1;
259 c->remote_name = xstrdup(remote_name); 260 c->remote_name = remote_name;
260 c->remote_window = 0; 261 c->remote_window = 0;
261 c->remote_maxpacket = 0; 262 c->remote_maxpacket = 0;
262 c->force_drain = 0; 263 c->force_drain = 0;
@@ -304,7 +305,7 @@ channel_close_fd(int *fdp)
304static void 305static void
305channel_close_fds(Channel *c) 306channel_close_fds(Channel *c)
306{ 307{
307 debug3("channel %d: close_fds r %d w %d e %d", 308 debug3("channel_close_fds: channel %d: r %d w %d e %d",
308 c->self, c->rfd, c->wfd, c->efd); 309 c->self, c->rfd, c->wfd, c->efd);
309 310
310 channel_close_fd(&c->sock); 311 channel_close_fd(&c->sock);
@@ -324,11 +325,11 @@ channel_free(Channel *c)
324 for (n = 0, i = 0; i < channels_alloc; i++) 325 for (n = 0, i = 0; i < channels_alloc; i++)
325 if (channels[i]) 326 if (channels[i])
326 n++; 327 n++;
327 debug("channel %d: free: %s, nchannels %d", c->self, 328 debug("channel_free: channel %d: %s, nchannels %d", c->self,
328 c->remote_name ? c->remote_name : "???", n); 329 c->remote_name ? c->remote_name : "???", n);
329 330
330 s = channel_open_message(); 331 s = channel_open_message();
331 debug3("channel %d: status: %s", c->self, s); 332 debug3("channel_free: status: %s", s);
332 xfree(s); 333 xfree(s);
333 334
334 if (c->sock != -1) 335 if (c->sock != -1)
@@ -419,7 +420,7 @@ channel_not_very_much_buffered_data(void)
419 } 420 }
420#endif 421#endif
421 if (buffer_len(&c->output) > packet_get_maxsize()) { 422 if (buffer_len(&c->output) > packet_get_maxsize()) {
422 debug2("channel %d: big output buffer %u > %u", 423 debug2("channel %d: big output buffer %d > %d",
423 c->self, buffer_len(&c->output), 424 c->self, buffer_len(&c->output),
424 packet_get_maxsize()); 425 packet_get_maxsize());
425 return 0; 426 return 0;
@@ -575,7 +576,7 @@ channel_send_open(int id)
575 Channel *c = channel_lookup(id); 576 Channel *c = channel_lookup(id);
576 577
577 if (c == NULL) { 578 if (c == NULL) {
578 logit("channel_send_open: %d: bad id", id); 579 log("channel_send_open: %d: bad id", id);
579 return; 580 return;
580 } 581 }
581 debug2("channel %d: send open", id); 582 debug2("channel %d: send open", id);
@@ -593,10 +594,10 @@ channel_request_start(int id, char *service, int wantconfirm)
593 Channel *c = channel_lookup(id); 594 Channel *c = channel_lookup(id);
594 595
595 if (c == NULL) { 596 if (c == NULL) {
596 logit("channel_request_start: %d: unknown channel id", id); 597 log("channel_request_start: %d: unknown channel id", id);
597 return; 598 return;
598 } 599 }
599 debug2("channel %d: request %s", id, service) ; 600 debug("channel %d: request %s", id, service) ;
600 packet_start(SSH2_MSG_CHANNEL_REQUEST); 601 packet_start(SSH2_MSG_CHANNEL_REQUEST);
601 packet_put_int(c->remote_id); 602 packet_put_int(c->remote_id);
602 packet_put_cstring(service); 603 packet_put_cstring(service);
@@ -608,7 +609,7 @@ channel_register_confirm(int id, channel_callback_fn *fn)
608 Channel *c = channel_lookup(id); 609 Channel *c = channel_lookup(id);
609 610
610 if (c == NULL) { 611 if (c == NULL) {
611 logit("channel_register_comfirm: %d: bad id", id); 612 log("channel_register_comfirm: %d: bad id", id);
612 return; 613 return;
613 } 614 }
614 c->confirm = fn; 615 c->confirm = fn;
@@ -619,7 +620,7 @@ channel_register_cleanup(int id, channel_callback_fn *fn)
619 Channel *c = channel_lookup(id); 620 Channel *c = channel_lookup(id);
620 621
621 if (c == NULL) { 622 if (c == NULL) {
622 logit("channel_register_cleanup: %d: bad id", id); 623 log("channel_register_cleanup: %d: bad id", id);
623 return; 624 return;
624 } 625 }
625 c->detach_user = fn; 626 c->detach_user = fn;
@@ -630,7 +631,7 @@ channel_cancel_cleanup(int id)
630 Channel *c = channel_lookup(id); 631 Channel *c = channel_lookup(id);
631 632
632 if (c == NULL) { 633 if (c == NULL) {
633 logit("channel_cancel_cleanup: %d: bad id", id); 634 log("channel_cancel_cleanup: %d: bad id", id);
634 return; 635 return;
635 } 636 }
636 c->detach_user = NULL; 637 c->detach_user = NULL;
@@ -641,7 +642,7 @@ channel_register_filter(int id, channel_filter_fn *fn)
641 Channel *c = channel_lookup(id); 642 Channel *c = channel_lookup(id);
642 643
643 if (c == NULL) { 644 if (c == NULL) {
644 logit("channel_register_filter: %d: bad id", id); 645 log("channel_register_filter: %d: bad id", id);
645 return; 646 return;
646 } 647 }
647 c->input_filter = fn; 648 c->input_filter = fn;
@@ -739,7 +740,7 @@ channel_pre_input_draining(Channel *c, fd_set * readset, fd_set * writeset)
739 packet_put_int(c->remote_id); 740 packet_put_int(c->remote_id);
740 packet_send(); 741 packet_send();
741 c->type = SSH_CHANNEL_CLOSED; 742 c->type = SSH_CHANNEL_CLOSED;
742 debug2("channel %d: closing after input drain.", c->self); 743 debug("channel %d: closing after input drain.", c->self);
743 } 744 }
744} 745}
745 746
@@ -780,7 +781,7 @@ x11_open_helper(Buffer *b)
780 proto_len = ucp[6] + 256 * ucp[7]; 781 proto_len = ucp[6] + 256 * ucp[7];
781 data_len = ucp[8] + 256 * ucp[9]; 782 data_len = ucp[8] + 256 * ucp[9];
782 } else { 783 } else {
783 debug2("Initial X11 packet contains bad byte order byte: 0x%x", 784 debug("Initial X11 packet contains bad byte order byte: 0x%x",
784 ucp[0]); 785 ucp[0]);
785 return -1; 786 return -1;
786 } 787 }
@@ -793,14 +794,14 @@ x11_open_helper(Buffer *b)
793 /* Check if authentication protocol matches. */ 794 /* Check if authentication protocol matches. */
794 if (proto_len != strlen(x11_saved_proto) || 795 if (proto_len != strlen(x11_saved_proto) ||
795 memcmp(ucp + 12, x11_saved_proto, proto_len) != 0) { 796 memcmp(ucp + 12, x11_saved_proto, proto_len) != 0) {
796 debug2("X11 connection uses different authentication protocol."); 797 debug("X11 connection uses different authentication protocol.");
797 return -1; 798 return -1;
798 } 799 }
799 /* Check if authentication data matches our fake data. */ 800 /* Check if authentication data matches our fake data. */
800 if (data_len != x11_fake_data_len || 801 if (data_len != x11_fake_data_len ||
801 memcmp(ucp + 12 + ((proto_len + 3) & ~3), 802 memcmp(ucp + 12 + ((proto_len + 3) & ~3),
802 x11_fake_data, x11_fake_data_len) != 0) { 803 x11_fake_data, x11_fake_data_len) != 0) {
803 debug2("X11 auth data does not match fake data."); 804 debug("X11 auth data does not match fake data.");
804 return -1; 805 return -1;
805 } 806 }
806 /* Check fake data length */ 807 /* Check fake data length */
@@ -833,7 +834,7 @@ channel_pre_x11_open_13(Channel *c, fd_set * readset, fd_set * writeset)
833 * We have received an X11 connection that has bad 834 * We have received an X11 connection that has bad
834 * authentication information. 835 * authentication information.
835 */ 836 */
836 logit("X11 connection rejected because of wrong authentication."); 837 log("X11 connection rejected because of wrong authentication.");
837 buffer_clear(&c->input); 838 buffer_clear(&c->input);
838 buffer_clear(&c->output); 839 buffer_clear(&c->output);
839 channel_close_fd(&c->sock); 840 channel_close_fd(&c->sock);
@@ -856,8 +857,8 @@ channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset)
856 c->type = SSH_CHANNEL_OPEN; 857 c->type = SSH_CHANNEL_OPEN;
857 channel_pre_open(c, readset, writeset); 858 channel_pre_open(c, readset, writeset);
858 } else if (ret == -1) { 859 } else if (ret == -1) {
859 logit("X11 connection rejected because of wrong authentication."); 860 log("X11 connection rejected because of wrong authentication.");
860 debug2("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate); 861 debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate);
861 chan_read_failed(c); 862 chan_read_failed(c);
862 buffer_clear(&c->input); 863 buffer_clear(&c->input);
863 chan_ibuf_empty(c); 864 chan_ibuf_empty(c);
@@ -867,7 +868,7 @@ channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset)
867 chan_write_failed(c); 868 chan_write_failed(c);
868 else 869 else
869 c->type = SSH_CHANNEL_OPEN; 870 c->type = SSH_CHANNEL_OPEN;
870 debug2("X11 closed %d i%d/o%d", c->self, c->istate, c->ostate); 871 debug("X11 closed %d i%d/o%d", c->self, c->istate, c->ostate);
871 } 872 }
872} 873}
873 874
@@ -925,7 +926,7 @@ channel_decode_socks4(Channel *c, fd_set * readset, fd_set * writeset)
925 strlcpy(c->path, host, sizeof(c->path)); 926 strlcpy(c->path, host, sizeof(c->path));
926 c->host_port = ntohs(s4_req.dest_port); 927 c->host_port = ntohs(s4_req.dest_port);
927 928
928 debug2("channel %d: dynamic request: socks4 host %s port %u command %u", 929 debug("channel %d: dynamic request: socks4 host %s port %u command %u",
929 c->self, host, c->host_port, s4_req.command); 930 c->self, host, c->host_port, s4_req.command);
930 931
931 if (s4_req.command != 1) { 932 if (s4_req.command != 1) {
@@ -941,117 +942,6 @@ channel_decode_socks4(Channel *c, fd_set * readset, fd_set * writeset)
941 return 1; 942 return 1;
942} 943}
943 944
944/* try to decode a socks5 header */
945#define SSH_SOCKS5_AUTHDONE 0x1000
946#define SSH_SOCKS5_NOAUTH 0x00
947#define SSH_SOCKS5_IPV4 0x01
948#define SSH_SOCKS5_DOMAIN 0x03
949#define SSH_SOCKS5_IPV6 0x04
950#define SSH_SOCKS5_CONNECT 0x01
951#define SSH_SOCKS5_SUCCESS 0x00
952
953static int
954channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset)
955{
956 struct {
957 u_int8_t version;
958 u_int8_t command;
959 u_int8_t reserved;
960 u_int8_t atyp;
961 } s5_req, s5_rsp;
962 u_int16_t dest_port;
963 u_char *p, dest_addr[255+1];
964 int i, have, found, nmethods, addrlen, af;
965
966 debug2("channel %d: decode socks5", c->self);
967 p = buffer_ptr(&c->input);
968 if (p[0] != 0x05)
969 return -1;
970 have = buffer_len(&c->input);
971 if (!(c->flags & SSH_SOCKS5_AUTHDONE)) {
972 /* format: ver | nmethods | methods */
973 if (have < 2)
974 return 0;
975 nmethods = p[1];
976 if (have < nmethods + 2)
977 return 0;
978 /* look for method: "NO AUTHENTICATION REQUIRED" */
979 for (found = 0, i = 2 ; i < nmethods + 2; i++) {
980 if (p[i] == SSH_SOCKS5_NOAUTH ) {
981 found = 1;
982 break;
983 }
984 }
985 if (!found) {
986 debug("channel %d: method SSH_SOCKS5_NOAUTH not found",
987 c->self);
988 return -1;
989 }
990 buffer_consume(&c->input, nmethods + 2);
991 buffer_put_char(&c->output, 0x05); /* version */
992 buffer_put_char(&c->output, SSH_SOCKS5_NOAUTH); /* method */
993 FD_SET(c->sock, writeset);
994 c->flags |= SSH_SOCKS5_AUTHDONE;
995 debug2("channel %d: socks5 auth done", c->self);
996 return 0; /* need more */
997 }
998 debug2("channel %d: socks5 post auth", c->self);
999 if (have < sizeof(s5_req)+1)
1000 return 0; /* need more */
1001 memcpy((char *)&s5_req, p, sizeof(s5_req));
1002 if (s5_req.version != 0x05 ||
1003 s5_req.command != SSH_SOCKS5_CONNECT ||
1004 s5_req.reserved != 0x00) {
1005 debug2("channel %d: only socks5 connect supported", c->self);
1006 return -1;
1007 }
1008 switch(s5_req.atyp){
1009 case SSH_SOCKS5_IPV4:
1010 addrlen = 4;
1011 af = AF_INET;
1012 break;
1013 case SSH_SOCKS5_DOMAIN:
1014 addrlen = p[sizeof(s5_req)];
1015 af = -1;
1016 break;
1017 case SSH_SOCKS5_IPV6:
1018 addrlen = 16;
1019 af = AF_INET6;
1020 break;
1021 default:
1022 debug2("channel %d: bad socks5 atyp %d", c->self, s5_req.atyp);
1023 return -1;
1024 }
1025 if (have < 4 + addrlen + 2)
1026 return 0;
1027 buffer_consume(&c->input, sizeof(s5_req));
1028 if (s5_req.atyp == SSH_SOCKS5_DOMAIN)
1029 buffer_consume(&c->input, 1); /* host string length */
1030 buffer_get(&c->input, (char *)&dest_addr, addrlen);
1031 buffer_get(&c->input, (char *)&dest_port, 2);
1032 dest_addr[addrlen] = '\0';
1033 if (s5_req.atyp == SSH_SOCKS5_DOMAIN)
1034 strlcpy(c->path, dest_addr, sizeof(c->path));
1035 else if (inet_ntop(af, dest_addr, c->path, sizeof(c->path)) == NULL)
1036 return -1;
1037 c->host_port = ntohs(dest_port);
1038
1039 debug2("channel %d: dynamic request: socks5 host %s port %u command %u",
1040 c->self, c->path, c->host_port, s5_req.command);
1041
1042 s5_rsp.version = 0x05;
1043 s5_rsp.command = SSH_SOCKS5_SUCCESS;
1044 s5_rsp.reserved = 0; /* ignored */
1045 s5_rsp.atyp = SSH_SOCKS5_IPV4;
1046 ((struct in_addr *)&dest_addr)->s_addr = INADDR_ANY;
1047 dest_port = 0; /* ignored */
1048
1049 buffer_append(&c->output, (char *)&s5_rsp, sizeof(s5_rsp));
1050 buffer_append(&c->output, (char *)&dest_addr, sizeof(struct in_addr));
1051 buffer_append(&c->output, (char *)&dest_port, sizeof(dest_port));
1052 return 1;
1053}
1054
1055/* dynamic port forwarding */ 945/* dynamic port forwarding */
1056static void 946static void
1057channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset) 947channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset)
@@ -1064,7 +954,7 @@ channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset)
1064 debug2("channel %d: pre_dynamic: have %d", c->self, have); 954 debug2("channel %d: pre_dynamic: have %d", c->self, have);
1065 /* buffer_dump(&c->input); */ 955 /* buffer_dump(&c->input); */
1066 /* check if the fixed size part of the packet is in buffer. */ 956 /* check if the fixed size part of the packet is in buffer. */
1067 if (have < 3) { 957 if (have < 4) {
1068 /* need more */ 958 /* need more */
1069 FD_SET(c->sock, readset); 959 FD_SET(c->sock, readset);
1070 return; 960 return;
@@ -1075,9 +965,6 @@ channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset)
1075 case 0x04: 965 case 0x04:
1076 ret = channel_decode_socks4(c, readset, writeset); 966 ret = channel_decode_socks4(c, readset, writeset);
1077 break; 967 break;
1078 case 0x05:
1079 ret = channel_decode_socks5(c, readset, writeset);
1080 break;
1081 default: 968 default:
1082 ret = -1; 969 ret = -1;
1083 break; 970 break;
@@ -1111,7 +998,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
1111 addrlen = sizeof(addr); 998 addrlen = sizeof(addr);
1112 newsock = accept(c->sock, &addr, &addrlen); 999 newsock = accept(c->sock, &addr, &addrlen);
1113 if (c->single_connection) { 1000 if (c->single_connection) {
1114 debug2("single_connection: closing X11 listener."); 1001 debug("single_connection: closing X11 listener.");
1115 channel_close_fd(&c->sock); 1002 channel_close_fd(&c->sock);
1116 chan_mark_dead(c); 1003 chan_mark_dead(c);
1117 } 1004 }
@@ -1127,7 +1014,8 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
1127 1014
1128 nc = channel_new("accepted x11 socket", 1015 nc = channel_new("accepted x11 socket",
1129 SSH_CHANNEL_OPENING, newsock, newsock, -1, 1016 SSH_CHANNEL_OPENING, newsock, newsock, -1,
1130 c->local_window_max, c->local_maxpacket, 0, buf, 1); 1017 c->local_window_max, c->local_maxpacket,
1018 0, xstrdup(buf), 1);
1131 if (compat20) { 1019 if (compat20) {
1132 packet_start(SSH2_MSG_CHANNEL_OPEN); 1020 packet_start(SSH2_MSG_CHANNEL_OPEN);
1133 packet_put_cstring("x11"); 1021 packet_put_cstring("x11");
@@ -1137,7 +1025,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
1137 /* originator ipaddr and port */ 1025 /* originator ipaddr and port */
1138 packet_put_cstring(remote_ipaddr); 1026 packet_put_cstring(remote_ipaddr);
1139 if (datafellows & SSH_BUG_X11FWD) { 1027 if (datafellows & SSH_BUG_X11FWD) {
1140 debug2("ssh2 x11 bug compat mode"); 1028 debug("ssh2 x11 bug compat mode");
1141 } else { 1029 } else {
1142 packet_put_int(remote_port); 1030 packet_put_int(remote_port);
1143 } 1031 }
@@ -1242,8 +1130,10 @@ channel_post_port_listener(Channel *c, fd_set * readset, fd_set * writeset)
1242 return; 1130 return;
1243 } 1131 }
1244 set_nodelay(newsock); 1132 set_nodelay(newsock);
1245 nc = channel_new(rtype, nextstate, newsock, newsock, -1, 1133 nc = channel_new(rtype,
1246 c->local_window_max, c->local_maxpacket, 0, rtype, 1); 1134 nextstate, newsock, newsock, -1,
1135 c->local_window_max, c->local_maxpacket,
1136 0, xstrdup(rtype), 1);
1247 nc->listening_port = c->listening_port; 1137 nc->listening_port = c->listening_port;
1248 nc->host_port = c->host_port; 1138 nc->host_port = c->host_port;
1249 strlcpy(nc->path, c->path, sizeof(nc->path)); 1139 strlcpy(nc->path, c->path, sizeof(nc->path));
@@ -1269,6 +1159,7 @@ static void
1269channel_post_auth_listener(Channel *c, fd_set * readset, fd_set * writeset) 1159channel_post_auth_listener(Channel *c, fd_set * readset, fd_set * writeset)
1270{ 1160{
1271 Channel *nc; 1161 Channel *nc;
1162 char *name;
1272 int newsock; 1163 int newsock;
1273 struct sockaddr addr; 1164 struct sockaddr addr;
1274 socklen_t addrlen; 1165 socklen_t addrlen;
@@ -1280,10 +1171,11 @@ channel_post_auth_listener(Channel *c, fd_set * readset, fd_set * writeset)
1280 error("accept from auth socket: %.100s", strerror(errno)); 1171 error("accept from auth socket: %.100s", strerror(errno));
1281 return; 1172 return;
1282 } 1173 }
1174 name = xstrdup("accepted auth socket");
1283 nc = channel_new("accepted auth socket", 1175 nc = channel_new("accepted auth socket",
1284 SSH_CHANNEL_OPENING, newsock, newsock, -1, 1176 SSH_CHANNEL_OPENING, newsock, newsock, -1,
1285 c->local_window_max, c->local_maxpacket, 1177 c->local_window_max, c->local_maxpacket,
1286 0, "accepted auth socket", 1); 1178 0, name, 1);
1287 if (compat20) { 1179 if (compat20) {
1288 packet_start(SSH2_MSG_CHANNEL_OPEN); 1180 packet_start(SSH2_MSG_CHANNEL_OPEN);
1289 packet_put_cstring("auth-agent@openssh.com"); 1181 packet_put_cstring("auth-agent@openssh.com");
@@ -1356,16 +1248,16 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset)
1356 if (len < 0 && (errno == EINTR || errno == EAGAIN)) 1248 if (len < 0 && (errno == EINTR || errno == EAGAIN))
1357 return 1; 1249 return 1;
1358 if (len <= 0) { 1250 if (len <= 0) {
1359 debug2("channel %d: read<=0 rfd %d len %d", 1251 debug("channel %d: read<=0 rfd %d len %d",
1360 c->self, c->rfd, len); 1252 c->self, c->rfd, len);
1361 if (c->type != SSH_CHANNEL_OPEN) { 1253 if (c->type != SSH_CHANNEL_OPEN) {
1362 debug2("channel %d: not open", c->self); 1254 debug("channel %d: not open", c->self);
1363 chan_mark_dead(c); 1255 chan_mark_dead(c);
1364 return -1; 1256 return -1;
1365 } else if (compat13) { 1257 } else if (compat13) {
1366 buffer_clear(&c->output); 1258 buffer_clear(&c->output);
1367 c->type = SSH_CHANNEL_INPUT_DRAINING; 1259 c->type = SSH_CHANNEL_INPUT_DRAINING;
1368 debug2("channel %d: input draining.", c->self); 1260 debug("channel %d: input draining.", c->self);
1369 } else { 1261 } else {
1370 chan_read_failed(c); 1262 chan_read_failed(c);
1371 } 1263 }
@@ -1373,7 +1265,7 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset)
1373 } 1265 }
1374 if (c->input_filter != NULL) { 1266 if (c->input_filter != NULL) {
1375 if (c->input_filter(c, buf, len) == -1) { 1267 if (c->input_filter(c, buf, len) == -1) {
1376 debug2("channel %d: filter stops", c->self); 1268 debug("channel %d: filter stops", c->self);
1377 chan_read_failed(c); 1269 chan_read_failed(c);
1378 } 1270 }
1379 } else { 1271 } else {
@@ -1406,12 +1298,12 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset)
1406 return 1; 1298 return 1;
1407 if (len <= 0) { 1299 if (len <= 0) {
1408 if (c->type != SSH_CHANNEL_OPEN) { 1300 if (c->type != SSH_CHANNEL_OPEN) {
1409 debug2("channel %d: not open", c->self); 1301 debug("channel %d: not open", c->self);
1410 chan_mark_dead(c); 1302 chan_mark_dead(c);
1411 return -1; 1303 return -1;
1412 } else if (compat13) { 1304 } else if (compat13) {
1413 buffer_clear(&c->output); 1305 buffer_clear(&c->output);
1414 debug2("channel %d: input draining.", c->self); 1306 debug("channel %d: input draining.", c->self);
1415 c->type = SSH_CHANNEL_INPUT_DRAINING; 1307 c->type = SSH_CHANNEL_INPUT_DRAINING;
1416 } else { 1308 } else {
1417 chan_write_failed(c); 1309 chan_write_failed(c);
@@ -1618,16 +1510,16 @@ channel_garbage_collect(Channel *c)
1618 if (c->detach_user != NULL) { 1510 if (c->detach_user != NULL) {
1619 if (!chan_is_dead(c, 0)) 1511 if (!chan_is_dead(c, 0))
1620 return; 1512 return;
1621 debug2("channel %d: gc: notify user", c->self); 1513 debug("channel %d: gc: notify user", c->self);
1622 c->detach_user(c->self, NULL); 1514 c->detach_user(c->self, NULL);
1623 /* if we still have a callback */ 1515 /* if we still have a callback */
1624 if (c->detach_user != NULL) 1516 if (c->detach_user != NULL)
1625 return; 1517 return;
1626 debug2("channel %d: gc: user detached", c->self); 1518 debug("channel %d: gc: user detached", c->self);
1627 } 1519 }
1628 if (!chan_is_dead(c, 1)) 1520 if (!chan_is_dead(c, 1))
1629 return; 1521 return;
1630 debug2("channel %d: garbage collecting", c->self); 1522 debug("channel %d: garbage collecting", c->self);
1631 channel_free(c); 1523 channel_free(c);
1632} 1524}
1633 1525
@@ -1826,11 +1718,11 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
1826 1718
1827 if (compat20) { 1719 if (compat20) {
1828 if (data_len > c->local_maxpacket) { 1720 if (data_len > c->local_maxpacket) {
1829 logit("channel %d: rcvd big packet %d, maxpack %d", 1721 log("channel %d: rcvd big packet %d, maxpack %d",
1830 c->self, data_len, c->local_maxpacket); 1722 c->self, data_len, c->local_maxpacket);
1831 } 1723 }
1832 if (data_len > c->local_window) { 1724 if (data_len > c->local_window) {
1833 logit("channel %d: rcvd too much data %d, win %d", 1725 log("channel %d: rcvd too much data %d, win %d",
1834 c->self, data_len, c->local_window); 1726 c->self, data_len, c->local_window);
1835 xfree(data); 1727 xfree(data);
1836 return; 1728 return;
@@ -1857,7 +1749,7 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
1857 if (c == NULL) 1749 if (c == NULL)
1858 packet_disconnect("Received extended_data for bad channel %d.", id); 1750 packet_disconnect("Received extended_data for bad channel %d.", id);
1859 if (c->type != SSH_CHANNEL_OPEN) { 1751 if (c->type != SSH_CHANNEL_OPEN) {
1860 logit("channel %d: ext data for non open", id); 1752 log("channel %d: ext data for non open", id);
1861 return; 1753 return;
1862 } 1754 }
1863 if (c->flags & CHAN_EOF_RCVD) { 1755 if (c->flags & CHAN_EOF_RCVD) {
@@ -1871,13 +1763,13 @@ channel_input_extended_data(int type, u_int32_t seq, void *ctxt)
1871 if (c->efd == -1 || 1763 if (c->efd == -1 ||
1872 c->extended_usage != CHAN_EXTENDED_WRITE || 1764 c->extended_usage != CHAN_EXTENDED_WRITE ||
1873 tcode != SSH2_EXTENDED_DATA_STDERR) { 1765 tcode != SSH2_EXTENDED_DATA_STDERR) {
1874 logit("channel %d: bad ext data", c->self); 1766 log("channel %d: bad ext data", c->self);
1875 return; 1767 return;
1876 } 1768 }
1877 data = packet_get_string(&data_len); 1769 data = packet_get_string(&data_len);
1878 packet_check_eom(); 1770 packet_check_eom();
1879 if (data_len > c->local_window) { 1771 if (data_len > c->local_window) {
1880 logit("channel %d: rcvd too much extended_data %d, win %d", 1772 log("channel %d: rcvd too much extended_data %d, win %d",
1881 c->self, data_len, c->local_window); 1773 c->self, data_len, c->local_window);
1882 xfree(data); 1774 xfree(data);
1883 return; 1775 return;
@@ -2002,7 +1894,7 @@ channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt)
2002 c->confirm(c->self, NULL); 1894 c->confirm(c->self, NULL);
2003 debug2("callback done"); 1895 debug2("callback done");
2004 } 1896 }
2005 debug2("channel %d: open confirm rwindow %u rmax %u", c->self, 1897 debug("channel %d: open confirm rwindow %u rmax %u", c->self,
2006 c->remote_window, c->remote_maxpacket); 1898 c->remote_window, c->remote_maxpacket);
2007 } 1899 }
2008 packet_check_eom(); 1900 packet_check_eom();
@@ -2043,7 +1935,7 @@ channel_input_open_failure(int type, u_int32_t seq, void *ctxt)
2043 msg = packet_get_string(NULL); 1935 msg = packet_get_string(NULL);
2044 lang = packet_get_string(NULL); 1936 lang = packet_get_string(NULL);
2045 } 1937 }
2046 logit("channel %d: open failed: %s%s%s", id, 1938 log("channel %d: open failed: %s%s%s", id,
2047 reason2txt(reason), msg ? ": ": "", msg ? msg : ""); 1939 reason2txt(reason), msg ? ": ": "", msg ? msg : "");
2048 if (msg != NULL) 1940 if (msg != NULL)
2049 xfree(msg); 1941 xfree(msg);
@@ -2070,7 +1962,7 @@ channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
2070 c = channel_lookup(id); 1962 c = channel_lookup(id);
2071 1963
2072 if (c == NULL || c->type != SSH_CHANNEL_OPEN) { 1964 if (c == NULL || c->type != SSH_CHANNEL_OPEN) {
2073 logit("Received window adjust for " 1965 log("Received window adjust for "
2074 "non-open channel %d.", id); 1966 "non-open channel %d.", id);
2075 return; 1967 return;
2076 } 1968 }
@@ -2105,8 +1997,8 @@ channel_input_port_open(int type, u_int32_t seq, void *ctxt)
2105 originator_string, 1); 1997 originator_string, 1);
2106 c->remote_id = remote_id; 1998 c->remote_id = remote_id;
2107 } 1999 }
2108 xfree(originator_string);
2109 if (c == NULL) { 2000 if (c == NULL) {
2001 xfree(originator_string);
2110 packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); 2002 packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE);
2111 packet_put_int(remote_id); 2003 packet_put_int(remote_id);
2112 packet_send(); 2004 packet_send();
@@ -2167,7 +2059,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
2167 continue; 2059 continue;
2168 } 2060 }
2169 /* Create a port to listen for the host. */ 2061 /* Create a port to listen for the host. */
2170 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 2062 sock = socket(ai->ai_family, SOCK_STREAM, 0);
2171 if (sock < 0) { 2063 if (sock < 0) {
2172 /* this is no error since kernel may not support ipv6 */ 2064 /* this is no error since kernel may not support ipv6 */
2173 verbose("socket: %.100s", strerror(errno)); 2065 verbose("socket: %.100s", strerror(errno));
@@ -2203,7 +2095,7 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por
2203 /* Allocate a channel number for the socket. */ 2095 /* Allocate a channel number for the socket. */
2204 c = channel_new("port listener", type, sock, sock, -1, 2096 c = channel_new("port listener", type, sock, sock, -1,
2205 CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 2097 CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
2206 0, "port listener", 1); 2098 0, xstrdup("port listener"), 1);
2207 strlcpy(c->path, host, sizeof(c->path)); 2099 strlcpy(c->path, host, sizeof(c->path));
2208 c->host_port = port_to_connect; 2100 c->host_port = port_to_connect;
2209 c->listening_port = listen_port; 2101 c->listening_port = listen_port;
@@ -2276,7 +2168,7 @@ channel_request_remote_forwarding(u_short listen_port,
2276 success = 1; 2168 success = 1;
2277 break; 2169 break;
2278 case SSH_SMSG_FAILURE: 2170 case SSH_SMSG_FAILURE:
2279 logit("Warning: Server denied remote port forwarding."); 2171 log("Warning: Server denied remote port forwarding.");
2280 break; 2172 break;
2281 default: 2173 default:
2282 /* Unknown packet */ 2174 /* Unknown packet */
@@ -2315,13 +2207,9 @@ channel_input_port_forward_request(int is_root, int gateway_ports)
2315 * privileged port. 2207 * privileged port.
2316 */ 2208 */
2317 if (port < IPPORT_RESERVED && !is_root) 2209 if (port < IPPORT_RESERVED && !is_root)
2318 packet_disconnect( 2210 packet_disconnect("Requested forwarding of port %d but user is not root.",
2319 "Requested forwarding of port %d but user is not root.", 2211 port);
2320 port);
2321 if (host_port == 0)
2322 packet_disconnect("Dynamic forwarding denied.");
2323#endif 2212#endif
2324
2325 /* Initiate forwarding */ 2213 /* Initiate forwarding */
2326 channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports); 2214 channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports);
2327 2215
@@ -2393,7 +2281,7 @@ connect_to(const char *host, u_short port)
2393 error("connect_to: getnameinfo failed"); 2281 error("connect_to: getnameinfo failed");
2394 continue; 2282 continue;
2395 } 2283 }
2396 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 2284 sock = socket(ai->ai_family, SOCK_STREAM, 0);
2397 if (sock < 0) { 2285 if (sock < 0) {
2398 if (ai->ai_next == NULL) 2286 if (ai->ai_next == NULL)
2399 error("socket: %.100s", strerror(errno)); 2287 error("socket: %.100s", strerror(errno));
@@ -2453,7 +2341,7 @@ channel_connect_to(const char *host, u_short port)
2453 2341
2454 } 2342 }
2455 if (!permit) { 2343 if (!permit) {
2456 logit("Received request to connect to host %.100s port %d, " 2344 log("Received request to connect to host %.100s port %d, "
2457 "but the request was denied.", host, port); 2345 "but the request was denied.", host, port);
2458 return -1; 2346 return -1;
2459 } 2347 }
@@ -2494,8 +2382,7 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
2494 for (ai = aitop; ai; ai = ai->ai_next) { 2382 for (ai = aitop; ai; ai = ai->ai_next) {
2495 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) 2383 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
2496 continue; 2384 continue;
2497 sock = socket(ai->ai_family, ai->ai_socktype, 2385 sock = socket(ai->ai_family, SOCK_STREAM, 0);
2498 ai->ai_protocol);
2499 if (sock < 0) { 2386 if (sock < 0) {
2500 if ((errno != EINVAL) && (errno != EAFNOSUPPORT)) { 2387 if ((errno != EINVAL) && (errno != EAFNOSUPPORT)) {
2501 error("socket: %.100s", strerror(errno)); 2388 error("socket: %.100s", strerror(errno));
@@ -2514,7 +2401,7 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
2514 } 2401 }
2515#endif 2402#endif
2516 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { 2403 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
2517 debug2("bind port %d: %.100s", port, strerror(errno)); 2404 debug("bind port %d: %.100s", port, strerror(errno));
2518 close(sock); 2405 close(sock);
2519 2406
2520 if (ai->ai_next) 2407 if (ai->ai_next)
@@ -2563,7 +2450,7 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
2563 nc = channel_new("x11 listener", 2450 nc = channel_new("x11 listener",
2564 SSH_CHANNEL_X11_LISTENER, sock, sock, -1, 2451 SSH_CHANNEL_X11_LISTENER, sock, sock, -1,
2565 CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 2452 CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
2566 0, "X11 inet listener", 1); 2453 0, xstrdup("X11 inet listener"), 1);
2567 nc->single_connection = single_connection; 2454 nc->single_connection = single_connection;
2568 } 2455 }
2569 2456
@@ -2661,14 +2548,14 @@ x11_connect_display(void)
2661 } 2548 }
2662 for (ai = aitop; ai; ai = ai->ai_next) { 2549 for (ai = aitop; ai; ai = ai->ai_next) {
2663 /* Create a socket. */ 2550 /* Create a socket. */
2664 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 2551 sock = socket(ai->ai_family, SOCK_STREAM, 0);
2665 if (sock < 0) { 2552 if (sock < 0) {
2666 debug2("socket: %.100s", strerror(errno)); 2553 debug("socket: %.100s", strerror(errno));
2667 continue; 2554 continue;
2668 } 2555 }
2669 /* Connect it to the display. */ 2556 /* Connect it to the display. */
2670 if (connect(sock, ai->ai_addr, ai->ai_addrlen) < 0) { 2557 if (connect(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
2671 debug2("connect %.100s port %d: %.100s", buf, 2558 debug("connect %.100s port %d: %.100s", buf,
2672 6000 + display_number, strerror(errno)); 2559 6000 + display_number, strerror(errno));
2673 close(sock); 2560 close(sock);
2674 continue; 2561 continue;
@@ -2720,11 +2607,11 @@ x11_input_open(int type, u_int32_t seq, void *ctxt)
2720 c->remote_id = remote_id; 2607 c->remote_id = remote_id;
2721 c->force_drain = 1; 2608 c->force_drain = 1;
2722 } 2609 }
2723 xfree(remote_host);
2724 if (c == NULL) { 2610 if (c == NULL) {
2725 /* Send refusal to the remote host. */ 2611 /* Send refusal to the remote host. */
2726 packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); 2612 packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE);
2727 packet_put_int(remote_id); 2613 packet_put_int(remote_id);
2614 xfree(remote_host);
2728 } else { 2615 } else {
2729 /* Send a confirmation to the remote host. */ 2616 /* Send a confirmation to the remote host. */
2730 packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION); 2617 packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION);
@@ -2846,6 +2733,7 @@ auth_input_open_request(int type, u_int32_t seq, void *ctxt)
2846{ 2733{
2847 Channel *c = NULL; 2734 Channel *c = NULL;
2848 int remote_id, sock; 2735 int remote_id, sock;
2736 char *name;
2849 2737
2850 /* Read the remote channel number from the message. */ 2738 /* Read the remote channel number from the message. */
2851 remote_id = packet_get_int(); 2739 remote_id = packet_get_int();
@@ -2864,8 +2752,9 @@ auth_input_open_request(int type, u_int32_t seq, void *ctxt)
2864 * agent. 2752 * agent.
2865 */ 2753 */
2866 if (sock >= 0) { 2754 if (sock >= 0) {
2755 name = xstrdup("authentication agent connection");
2867 c = channel_new("", SSH_CHANNEL_OPEN, sock, sock, 2756 c = channel_new("", SSH_CHANNEL_OPEN, sock, sock,
2868 -1, 0, 0, 0, "authentication agent connection", 1); 2757 -1, 0, 0, 0, name, 1);
2869 c->remote_id = remote_id; 2758 c->remote_id = remote_id;
2870 c->force_drain = 1; 2759 c->force_drain = 1;
2871 } 2760 }
diff --git a/cipher-3des1.c b/cipher-3des1.c
deleted file mode 100644
index f9a352397..000000000
--- a/cipher-3des1.c
+++ /dev/null
@@ -1,171 +0,0 @@
1/*
2 * Copyright (c) 2003 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26RCSID("$OpenBSD: cipher-3des1.c,v 1.1 2003/05/15 03:08:29 markus Exp $");
27
28#include <openssl/evp.h>
29#include "xmalloc.h"
30#include "log.h"
31
32/*
33 * This is used by SSH1:
34 *
35 * What kind of triple DES are these 2 routines?
36 *
37 * Why is there a redundant initialization vector?
38 *
39 * If only iv3 was used, then, this would till effect have been
40 * outer-cbc. However, there is also a private iv1 == iv2 which
41 * perhaps makes differential analysis easier. On the other hand, the
42 * private iv1 probably makes the CRC-32 attack ineffective. This is a
43 * result of that there is no longer any known iv1 to use when
44 * choosing the X block.
45 */
46struct ssh1_3des_ctx
47{
48 EVP_CIPHER_CTX k1, k2, k3;
49};
50
51const EVP_CIPHER * evp_ssh1_3des(void);
52void ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
53
54static int
55ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
56 int enc)
57{
58 struct ssh1_3des_ctx *c;
59 u_char *k1, *k2, *k3;
60
61 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
62 c = xmalloc(sizeof(*c));
63 EVP_CIPHER_CTX_set_app_data(ctx, c);
64 }
65 if (key == NULL)
66 return (1);
67 if (enc == -1)
68 enc = ctx->encrypt;
69 k1 = k2 = k3 = (u_char *) key;
70 k2 += 8;
71 if (EVP_CIPHER_CTX_key_length(ctx) >= 16+8) {
72 if (enc)
73 k3 += 16;
74 else
75 k1 += 16;
76 }
77 EVP_CIPHER_CTX_init(&c->k1);
78 EVP_CIPHER_CTX_init(&c->k2);
79 EVP_CIPHER_CTX_init(&c->k3);
80#ifdef SSH_OLD_EVP
81 EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc);
82 EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc);
83 EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc);
84#else
85 if (EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc) == 0 ||
86 EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc) == 0 ||
87 EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc) == 0) {
88 memset(c, 0, sizeof(*c));
89 xfree(c);
90 EVP_CIPHER_CTX_set_app_data(ctx, NULL);
91 return (0);
92 }
93#endif
94 return (1);
95}
96
97static int
98ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len)
99{
100 struct ssh1_3des_ctx *c;
101
102 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
103 error("ssh1_3des_cbc: no context");
104 return (0);
105 }
106#ifdef SSH_OLD_EVP
107 EVP_Cipher(&c->k1, dest, (u_char *)src, len);
108 EVP_Cipher(&c->k2, dest, dest, len);
109 EVP_Cipher(&c->k3, dest, dest, len);
110#else
111 if (EVP_Cipher(&c->k1, dest, (u_char *)src, len) == 0 ||
112 EVP_Cipher(&c->k2, dest, dest, len) == 0 ||
113 EVP_Cipher(&c->k3, dest, dest, len) == 0)
114 return (0);
115#endif
116 return (1);
117}
118
119static int
120ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx)
121{
122 struct ssh1_3des_ctx *c;
123
124 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) != NULL) {
125 memset(c, 0, sizeof(*c));
126 xfree(c);
127 EVP_CIPHER_CTX_set_app_data(ctx, NULL);
128 }
129 return (1);
130}
131
132void
133ssh1_3des_iv(EVP_CIPHER_CTX *evp, int doset, u_char *iv, int len)
134{
135 struct ssh1_3des_ctx *c;
136
137 if (len != 24)
138 fatal("%s: bad 3des iv length: %d", __func__, len);
139 if ((c = EVP_CIPHER_CTX_get_app_data(evp)) == NULL)
140 fatal("%s: no 3des context", __func__);
141 if (doset) {
142 debug3("%s: Installed 3DES IV", __func__);
143 memcpy(c->k1.iv, iv, 8);
144 memcpy(c->k2.iv, iv + 8, 8);
145 memcpy(c->k3.iv, iv + 16, 8);
146 } else {
147 debug3("%s: Copying 3DES IV", __func__);
148 memcpy(iv, c->k1.iv, 8);
149 memcpy(iv + 8, c->k2.iv, 8);
150 memcpy(iv + 16, c->k3.iv, 8);
151 }
152}
153
154const EVP_CIPHER *
155evp_ssh1_3des(void)
156{
157 static EVP_CIPHER ssh1_3des;
158
159 memset(&ssh1_3des, 0, sizeof(EVP_CIPHER));
160 ssh1_3des.nid = NID_undef;
161 ssh1_3des.block_size = 8;
162 ssh1_3des.iv_len = 0;
163 ssh1_3des.key_len = 16;
164 ssh1_3des.init = ssh1_3des_init;
165 ssh1_3des.cleanup = ssh1_3des_cleanup;
166 ssh1_3des.do_cipher = ssh1_3des_cbc;
167#ifndef SSH_OLD_EVP
168 ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH;
169#endif
170 return (&ssh1_3des);
171}
diff --git a/cipher-aes.c b/cipher-aes.c
deleted file mode 100644
index c41def600..000000000
--- a/cipher-aes.c
+++ /dev/null
@@ -1,156 +0,0 @@
1/*
2 * Copyright (c) 2003 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26#if OPENSSL_VERSION_NUMBER < 0x00907000L
27RCSID("$OpenBSD: cipher-aes.c,v 1.1 2003/05/15 03:08:29 markus Exp $");
28
29#include <openssl/evp.h>
30#include "rijndael.h"
31#include "xmalloc.h"
32#include "log.h"
33
34#define RIJNDAEL_BLOCKSIZE 16
35struct ssh_rijndael_ctx
36{
37 rijndael_ctx r_ctx;
38 u_char r_iv[RIJNDAEL_BLOCKSIZE];
39};
40
41const EVP_CIPHER * evp_rijndael(void);
42void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
43
44static int
45ssh_rijndael_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
46 int enc)
47{
48 struct ssh_rijndael_ctx *c;
49
50 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
51 c = xmalloc(sizeof(*c));
52 EVP_CIPHER_CTX_set_app_data(ctx, c);
53 }
54 if (key != NULL) {
55 if (enc == -1)
56 enc = ctx->encrypt;
57 rijndael_set_key(&c->r_ctx, (u_char *)key,
58 8*EVP_CIPHER_CTX_key_length(ctx), enc);
59 }
60 if (iv != NULL)
61 memcpy(c->r_iv, iv, RIJNDAEL_BLOCKSIZE);
62 return (1);
63}
64
65static int
66ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
67 u_int len)
68{
69 struct ssh_rijndael_ctx *c;
70 u_char buf[RIJNDAEL_BLOCKSIZE];
71 u_char *cprev, *cnow, *plain, *ivp;
72 int i, j, blocks = len / RIJNDAEL_BLOCKSIZE;
73
74 if (len == 0)
75 return (1);
76 if (len % RIJNDAEL_BLOCKSIZE)
77 fatal("ssh_rijndael_cbc: bad len %d", len);
78 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
79 error("ssh_rijndael_cbc: no context");
80 return (0);
81 }
82 if (ctx->encrypt) {
83 cnow = dest;
84 plain = (u_char *)src;
85 cprev = c->r_iv;
86 for (i = 0; i < blocks; i++, plain+=RIJNDAEL_BLOCKSIZE,
87 cnow+=RIJNDAEL_BLOCKSIZE) {
88 for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++)
89 buf[j] = plain[j] ^ cprev[j];
90 rijndael_encrypt(&c->r_ctx, buf, cnow);
91 cprev = cnow;
92 }
93 memcpy(c->r_iv, cprev, RIJNDAEL_BLOCKSIZE);
94 } else {
95 cnow = (u_char *) (src+len-RIJNDAEL_BLOCKSIZE);
96 plain = dest+len-RIJNDAEL_BLOCKSIZE;
97
98 memcpy(buf, cnow, RIJNDAEL_BLOCKSIZE);
99 for (i = blocks; i > 0; i--, cnow-=RIJNDAEL_BLOCKSIZE,
100 plain-=RIJNDAEL_BLOCKSIZE) {
101 rijndael_decrypt(&c->r_ctx, cnow, plain);
102 ivp = (i == 1) ? c->r_iv : cnow-RIJNDAEL_BLOCKSIZE;
103 for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++)
104 plain[j] ^= ivp[j];
105 }
106 memcpy(c->r_iv, buf, RIJNDAEL_BLOCKSIZE);
107 }
108 return (1);
109}
110
111static int
112ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx)
113{
114 struct ssh_rijndael_ctx *c;
115
116 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) != NULL) {
117 memset(c, 0, sizeof(*c));
118 xfree(c);
119 EVP_CIPHER_CTX_set_app_data(ctx, NULL);
120 }
121 return (1);
122}
123
124void
125ssh_rijndael_iv(EVP_CIPHER_CTX *evp, int doset, u_char * iv, u_int len)
126{
127 struct ssh_rijndael_ctx *c;
128
129 if ((c = EVP_CIPHER_CTX_get_app_data(evp)) == NULL)
130 fatal("ssh_rijndael_iv: no context");
131 if (doset)
132 memcpy(c->r_iv, iv, len);
133 else
134 memcpy(iv, c->r_iv, len);
135}
136
137const EVP_CIPHER *
138evp_rijndael(void)
139{
140 static EVP_CIPHER rijndal_cbc;
141
142 memset(&rijndal_cbc, 0, sizeof(EVP_CIPHER));
143 rijndal_cbc.nid = NID_undef;
144 rijndal_cbc.block_size = RIJNDAEL_BLOCKSIZE;
145 rijndal_cbc.iv_len = RIJNDAEL_BLOCKSIZE;
146 rijndal_cbc.key_len = 16;
147 rijndal_cbc.init = ssh_rijndael_init;
148 rijndal_cbc.cleanup = ssh_rijndael_cleanup;
149 rijndal_cbc.do_cipher = ssh_rijndael_cbc;
150#ifndef SSH_OLD_EVP
151 rijndal_cbc.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
152 EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
153#endif
154 return (&rijndal_cbc);
155}
156#endif /* OPENSSL_VERSION_NUMBER */
diff --git a/cipher-bf1.c b/cipher-bf1.c
deleted file mode 100644
index 64578bae8..000000000
--- a/cipher-bf1.c
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * Copyright (c) 2003 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26RCSID("$OpenBSD: cipher-bf1.c,v 1.1 2003/05/15 03:08:29 markus Exp $");
27
28#include <openssl/evp.h>
29#include "xmalloc.h"
30#include "log.h"
31/*
32 * SSH1 uses a variation on Blowfish, all bytes must be swapped before
33 * and after encryption/decryption. Thus the swap_bytes stuff (yuk).
34 */
35
36const EVP_CIPHER * evp_ssh1_bf(void);
37
38static void
39swap_bytes(const u_char *src, u_char *dst, int n)
40{
41 u_char c[4];
42
43 /* Process 4 bytes every lap. */
44 for (n = n / 4; n > 0; n--) {
45 c[3] = *src++;
46 c[2] = *src++;
47 c[1] = *src++;
48 c[0] = *src++;
49
50 *dst++ = c[0];
51 *dst++ = c[1];
52 *dst++ = c[2];
53 *dst++ = c[3];
54 }
55}
56
57#ifdef SSH_OLD_EVP
58static void bf_ssh1_init (EVP_CIPHER_CTX * ctx, const unsigned char *key,
59 const unsigned char *iv, int enc)
60{
61 if (iv != NULL)
62 memcpy (&(ctx->oiv[0]), iv, 8);
63 memcpy (&(ctx->iv[0]), &(ctx->oiv[0]), 8);
64 if (key != NULL)
65 BF_set_key (&(ctx->c.bf_ks), EVP_CIPHER_CTX_key_length (ctx),
66 key);
67}
68#endif
69
70static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL;
71
72static int
73bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len)
74{
75 int ret;
76
77 swap_bytes(in, out, len);
78 ret = (*orig_bf)(ctx, out, out, len);
79 swap_bytes(out, out, len);
80 return (ret);
81}
82
83const EVP_CIPHER *
84evp_ssh1_bf(void)
85{
86 static EVP_CIPHER ssh1_bf;
87
88 memcpy(&ssh1_bf, EVP_bf_cbc(), sizeof(EVP_CIPHER));
89 orig_bf = ssh1_bf.do_cipher;
90 ssh1_bf.nid = NID_undef;
91#ifdef SSH_OLD_EVP
92 ssh1_bf.init = bf_ssh1_init;
93#endif
94 ssh1_bf.do_cipher = bf_ssh1_cipher;
95 ssh1_bf.key_len = 32;
96 return (&ssh1_bf);
97}
diff --git a/cipher-ctr.c b/cipher-ctr.c
deleted file mode 100644
index a2bab5c14..000000000
--- a/cipher-ctr.c
+++ /dev/null
@@ -1,141 +0,0 @@
1/*
2 * Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16#include "includes.h"
17RCSID("$OpenBSD: cipher-ctr.c,v 1.2 2003/06/17 18:14:23 markus Exp $");
18
19#include <openssl/evp.h>
20
21#include "log.h"
22#include "xmalloc.h"
23
24#if OPENSSL_VERSION_NUMBER < 0x00907000L
25#include "rijndael.h"
26#define AES_KEY rijndael_ctx
27#define AES_BLOCK_SIZE 16
28#define AES_encrypt(a, b, c) rijndael_encrypt(c, a, b)
29#define AES_set_encrypt_key(a, b, c) rijndael_set_key(c, (char *)a, b, 1)
30#else
31#include <openssl/aes.h>
32#endif
33
34const EVP_CIPHER *evp_aes_128_ctr(void);
35void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
36
37struct ssh_aes_ctr_ctx
38{
39 AES_KEY aes_ctx;
40 u_char aes_counter[AES_BLOCK_SIZE];
41};
42
43/*
44 * increment counter 'ctr',
45 * the counter is of size 'len' bytes and stored in network-byte-order.
46 * (LSB at ctr[len-1], MSB at ctr[0])
47 */
48static void
49ssh_ctr_inc(u_char *ctr, u_int len)
50{
51 int i;
52
53 for (i = len - 1; i >= 0; i--)
54 if (++ctr[i]) /* continue on overflow */
55 return;
56}
57
58static int
59ssh_aes_ctr(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
60 u_int len)
61{
62 struct ssh_aes_ctr_ctx *c;
63 u_int n = 0;
64 u_char buf[AES_BLOCK_SIZE];
65
66 if (len == 0)
67 return (1);
68 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL)
69 return (0);
70
71 while ((len--) > 0) {
72 if (n == 0) {
73 AES_encrypt(c->aes_counter, buf, &c->aes_ctx);
74 ssh_ctr_inc(c->aes_counter, AES_BLOCK_SIZE);
75 }
76 *(dest++) = *(src++) ^ buf[n];
77 n = (n + 1) % AES_BLOCK_SIZE;
78 }
79 return (1);
80}
81
82static int
83ssh_aes_ctr_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
84 int enc)
85{
86 struct ssh_aes_ctr_ctx *c;
87
88 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
89 c = xmalloc(sizeof(*c));
90 EVP_CIPHER_CTX_set_app_data(ctx, c);
91 }
92 if (key != NULL)
93 AES_set_encrypt_key(key, ctx->key_len * 8, &c->aes_ctx);
94 if (iv != NULL)
95 memcpy(c->aes_counter, iv, AES_BLOCK_SIZE);
96 return (1);
97}
98
99static int
100ssh_aes_ctr_cleanup(EVP_CIPHER_CTX *ctx)
101{
102 struct ssh_aes_ctr_ctx *c;
103
104 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) != NULL) {
105 memset(c, 0, sizeof(*c));
106 xfree(c);
107 EVP_CIPHER_CTX_set_app_data(ctx, NULL);
108 }
109 return (1);
110}
111
112void
113ssh_aes_ctr_iv(EVP_CIPHER_CTX *evp, int doset, u_char * iv, u_int len)
114{
115 struct ssh_aes_ctr_ctx *c;
116
117 if ((c = EVP_CIPHER_CTX_get_app_data(evp)) == NULL)
118 fatal("ssh_aes_ctr_iv: no context");
119 if (doset)
120 memcpy(c->aes_counter, iv, len);
121 else
122 memcpy(iv, c->aes_counter, len);
123}
124
125const EVP_CIPHER *
126evp_aes_128_ctr(void)
127{
128 static EVP_CIPHER aes_ctr;
129
130 memset(&aes_ctr, 0, sizeof(EVP_CIPHER));
131 aes_ctr.nid = NID_undef;
132 aes_ctr.block_size = AES_BLOCK_SIZE;
133 aes_ctr.iv_len = AES_BLOCK_SIZE;
134 aes_ctr.key_len = 16;
135 aes_ctr.init = ssh_aes_ctr_init;
136 aes_ctr.cleanup = ssh_aes_ctr_cleanup;
137 aes_ctr.do_cipher = ssh_aes_ctr;
138 aes_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
139 EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
140 return (&aes_ctr);
141}
diff --git a/cipher.c b/cipher.c
index e7c3c5411..b5d38747e 100644
--- a/cipher.c
+++ b/cipher.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: cipher.c,v 1.65 2003/05/17 04:27:52 markus Exp $"); 38RCSID("$OpenBSD: cipher.c,v 1.62 2002/11/21 22:45:31 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "log.h" 41#include "log.h"
@@ -49,14 +49,11 @@ RCSID("$OpenBSD: cipher.c,v 1.65 2003/05/17 04:27:52 markus Exp $");
49#endif 49#endif
50 50
51#if OPENSSL_VERSION_NUMBER < 0x00907000L 51#if OPENSSL_VERSION_NUMBER < 0x00907000L
52extern const EVP_CIPHER *evp_rijndael(void); 52#include "rijndael.h"
53extern void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); 53static const EVP_CIPHER *evp_rijndael(void);
54#endif 54#endif
55extern const EVP_CIPHER *evp_ssh1_bf(void); 55static const EVP_CIPHER *evp_ssh1_3des(void);
56extern const EVP_CIPHER *evp_ssh1_3des(void); 56static const EVP_CIPHER *evp_ssh1_bf(void);
57extern void ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
58extern const EVP_CIPHER *evp_aes_128_ctr(void);
59extern void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
60 57
61struct Cipher { 58struct Cipher {
62 char *name; 59 char *name;
@@ -87,9 +84,6 @@ struct Cipher {
87 { "rijndael-cbc@lysator.liu.se", 84 { "rijndael-cbc@lysator.liu.se",
88 SSH_CIPHER_SSH2, 16, 32, EVP_aes_256_cbc }, 85 SSH_CIPHER_SSH2, 16, 32, EVP_aes_256_cbc },
89#endif 86#endif
90 { "aes128-ctr", SSH_CIPHER_SSH2, 16, 16, evp_aes_128_ctr },
91 { "aes192-ctr", SSH_CIPHER_SSH2, 16, 24, evp_aes_128_ctr },
92 { "aes256-ctr", SSH_CIPHER_SSH2, 16, 32, evp_aes_128_ctr },
93 87
94 { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL } 88 { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL }
95}; 89};
@@ -302,6 +296,298 @@ cipher_set_key_string(CipherContext *cc, Cipher *cipher,
302 memset(&md, 0, sizeof(md)); 296 memset(&md, 0, sizeof(md));
303} 297}
304 298
299/* Implementations for other non-EVP ciphers */
300
301/*
302 * This is used by SSH1:
303 *
304 * What kind of triple DES are these 2 routines?
305 *
306 * Why is there a redundant initialization vector?
307 *
308 * If only iv3 was used, then, this would till effect have been
309 * outer-cbc. However, there is also a private iv1 == iv2 which
310 * perhaps makes differential analysis easier. On the other hand, the
311 * private iv1 probably makes the CRC-32 attack ineffective. This is a
312 * result of that there is no longer any known iv1 to use when
313 * choosing the X block.
314 */
315struct ssh1_3des_ctx
316{
317 EVP_CIPHER_CTX k1, k2, k3;
318};
319
320static int
321ssh1_3des_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
322 int enc)
323{
324 struct ssh1_3des_ctx *c;
325 u_char *k1, *k2, *k3;
326
327 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
328 c = xmalloc(sizeof(*c));
329 EVP_CIPHER_CTX_set_app_data(ctx, c);
330 }
331 if (key == NULL)
332 return (1);
333 if (enc == -1)
334 enc = ctx->encrypt;
335 k1 = k2 = k3 = (u_char *) key;
336 k2 += 8;
337 if (EVP_CIPHER_CTX_key_length(ctx) >= 16+8) {
338 if (enc)
339 k3 += 16;
340 else
341 k1 += 16;
342 }
343 EVP_CIPHER_CTX_init(&c->k1);
344 EVP_CIPHER_CTX_init(&c->k2);
345 EVP_CIPHER_CTX_init(&c->k3);
346#ifdef SSH_OLD_EVP
347 EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc);
348 EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc);
349 EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc);
350#else
351 if (EVP_CipherInit(&c->k1, EVP_des_cbc(), k1, NULL, enc) == 0 ||
352 EVP_CipherInit(&c->k2, EVP_des_cbc(), k2, NULL, !enc) == 0 ||
353 EVP_CipherInit(&c->k3, EVP_des_cbc(), k3, NULL, enc) == 0) {
354 memset(c, 0, sizeof(*c));
355 xfree(c);
356 EVP_CIPHER_CTX_set_app_data(ctx, NULL);
357 return (0);
358 }
359#endif
360 return (1);
361}
362
363static int
364ssh1_3des_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src, u_int len)
365{
366 struct ssh1_3des_ctx *c;
367
368 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
369 error("ssh1_3des_cbc: no context");
370 return (0);
371 }
372#ifdef SSH_OLD_EVP
373 EVP_Cipher(&c->k1, dest, (u_char *)src, len);
374 EVP_Cipher(&c->k2, dest, dest, len);
375 EVP_Cipher(&c->k3, dest, dest, len);
376#else
377 if (EVP_Cipher(&c->k1, dest, (u_char *)src, len) == 0 ||
378 EVP_Cipher(&c->k2, dest, dest, len) == 0 ||
379 EVP_Cipher(&c->k3, dest, dest, len) == 0)
380 return (0);
381#endif
382 return (1);
383}
384
385static int
386ssh1_3des_cleanup(EVP_CIPHER_CTX *ctx)
387{
388 struct ssh1_3des_ctx *c;
389
390 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) != NULL) {
391 memset(c, 0, sizeof(*c));
392 xfree(c);
393 EVP_CIPHER_CTX_set_app_data(ctx, NULL);
394 }
395 return (1);
396}
397
398static const EVP_CIPHER *
399evp_ssh1_3des(void)
400{
401 static EVP_CIPHER ssh1_3des;
402
403 memset(&ssh1_3des, 0, sizeof(EVP_CIPHER));
404 ssh1_3des.nid = NID_undef;
405 ssh1_3des.block_size = 8;
406 ssh1_3des.iv_len = 0;
407 ssh1_3des.key_len = 16;
408 ssh1_3des.init = ssh1_3des_init;
409 ssh1_3des.cleanup = ssh1_3des_cleanup;
410 ssh1_3des.do_cipher = ssh1_3des_cbc;
411#ifndef SSH_OLD_EVP
412 ssh1_3des.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH;
413#endif
414 return (&ssh1_3des);
415}
416
417/*
418 * SSH1 uses a variation on Blowfish, all bytes must be swapped before
419 * and after encryption/decryption. Thus the swap_bytes stuff (yuk).
420 */
421static void
422swap_bytes(const u_char *src, u_char *dst, int n)
423{
424 u_char c[4];
425
426 /* Process 4 bytes every lap. */
427 for (n = n / 4; n > 0; n--) {
428 c[3] = *src++;
429 c[2] = *src++;
430 c[1] = *src++;
431 c[0] = *src++;
432
433 *dst++ = c[0];
434 *dst++ = c[1];
435 *dst++ = c[2];
436 *dst++ = c[3];
437 }
438}
439
440#ifdef SSH_OLD_EVP
441static void bf_ssh1_init (EVP_CIPHER_CTX * ctx, const unsigned char *key,
442 const unsigned char *iv, int enc)
443{
444 if (iv != NULL)
445 memcpy (&(ctx->oiv[0]), iv, 8);
446 memcpy (&(ctx->iv[0]), &(ctx->oiv[0]), 8);
447 if (key != NULL)
448 BF_set_key (&(ctx->c.bf_ks), EVP_CIPHER_CTX_key_length (ctx),
449 key);
450}
451#endif
452static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL;
453
454static int
455bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len)
456{
457 int ret;
458
459 swap_bytes(in, out, len);
460 ret = (*orig_bf)(ctx, out, out, len);
461 swap_bytes(out, out, len);
462 return (ret);
463}
464
465static const EVP_CIPHER *
466evp_ssh1_bf(void)
467{
468 static EVP_CIPHER ssh1_bf;
469
470 memcpy(&ssh1_bf, EVP_bf_cbc(), sizeof(EVP_CIPHER));
471 orig_bf = ssh1_bf.do_cipher;
472 ssh1_bf.nid = NID_undef;
473#ifdef SSH_OLD_EVP
474 ssh1_bf.init = bf_ssh1_init;
475#endif
476 ssh1_bf.do_cipher = bf_ssh1_cipher;
477 ssh1_bf.key_len = 32;
478 return (&ssh1_bf);
479}
480
481#if OPENSSL_VERSION_NUMBER < 0x00907000L
482/* RIJNDAEL */
483#define RIJNDAEL_BLOCKSIZE 16
484struct ssh_rijndael_ctx
485{
486 rijndael_ctx r_ctx;
487 u_char r_iv[RIJNDAEL_BLOCKSIZE];
488};
489
490static int
491ssh_rijndael_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
492 int enc)
493{
494 struct ssh_rijndael_ctx *c;
495
496 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
497 c = xmalloc(sizeof(*c));
498 EVP_CIPHER_CTX_set_app_data(ctx, c);
499 }
500 if (key != NULL) {
501 if (enc == -1)
502 enc = ctx->encrypt;
503 rijndael_set_key(&c->r_ctx, (u_char *)key,
504 8*EVP_CIPHER_CTX_key_length(ctx), enc);
505 }
506 if (iv != NULL)
507 memcpy(c->r_iv, iv, RIJNDAEL_BLOCKSIZE);
508 return (1);
509}
510
511static int
512ssh_rijndael_cbc(EVP_CIPHER_CTX *ctx, u_char *dest, const u_char *src,
513 u_int len)
514{
515 struct ssh_rijndael_ctx *c;
516 u_char buf[RIJNDAEL_BLOCKSIZE];
517 u_char *cprev, *cnow, *plain, *ivp;
518 int i, j, blocks = len / RIJNDAEL_BLOCKSIZE;
519
520 if (len == 0)
521 return (1);
522 if (len % RIJNDAEL_BLOCKSIZE)
523 fatal("ssh_rijndael_cbc: bad len %d", len);
524 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) {
525 error("ssh_rijndael_cbc: no context");
526 return (0);
527 }
528 if (ctx->encrypt) {
529 cnow = dest;
530 plain = (u_char *)src;
531 cprev = c->r_iv;
532 for (i = 0; i < blocks; i++, plain+=RIJNDAEL_BLOCKSIZE,
533 cnow+=RIJNDAEL_BLOCKSIZE) {
534 for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++)
535 buf[j] = plain[j] ^ cprev[j];
536 rijndael_encrypt(&c->r_ctx, buf, cnow);
537 cprev = cnow;
538 }
539 memcpy(c->r_iv, cprev, RIJNDAEL_BLOCKSIZE);
540 } else {
541 cnow = (u_char *) (src+len-RIJNDAEL_BLOCKSIZE);
542 plain = dest+len-RIJNDAEL_BLOCKSIZE;
543
544 memcpy(buf, cnow, RIJNDAEL_BLOCKSIZE);
545 for (i = blocks; i > 0; i--, cnow-=RIJNDAEL_BLOCKSIZE,
546 plain-=RIJNDAEL_BLOCKSIZE) {
547 rijndael_decrypt(&c->r_ctx, cnow, plain);
548 ivp = (i == 1) ? c->r_iv : cnow-RIJNDAEL_BLOCKSIZE;
549 for (j = 0; j < RIJNDAEL_BLOCKSIZE; j++)
550 plain[j] ^= ivp[j];
551 }
552 memcpy(c->r_iv, buf, RIJNDAEL_BLOCKSIZE);
553 }
554 return (1);
555}
556
557static int
558ssh_rijndael_cleanup(EVP_CIPHER_CTX *ctx)
559{
560 struct ssh_rijndael_ctx *c;
561
562 if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) != NULL) {
563 memset(c, 0, sizeof(*c));
564 xfree(c);
565 EVP_CIPHER_CTX_set_app_data(ctx, NULL);
566 }
567 return (1);
568}
569
570static const EVP_CIPHER *
571evp_rijndael(void)
572{
573 static EVP_CIPHER rijndal_cbc;
574
575 memset(&rijndal_cbc, 0, sizeof(EVP_CIPHER));
576 rijndal_cbc.nid = NID_undef;
577 rijndal_cbc.block_size = RIJNDAEL_BLOCKSIZE;
578 rijndal_cbc.iv_len = RIJNDAEL_BLOCKSIZE;
579 rijndal_cbc.key_len = 16;
580 rijndal_cbc.init = ssh_rijndael_init;
581 rijndal_cbc.cleanup = ssh_rijndael_cleanup;
582 rijndal_cbc.do_cipher = ssh_rijndael_cbc;
583#ifndef SSH_OLD_EVP
584 rijndal_cbc.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH |
585 EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV;
586#endif
587 return (&rijndal_cbc);
588}
589#endif
590
305/* 591/*
306 * Exports an IV from the CipherContext required to export the key 592 * Exports an IV from the CipherContext required to export the key
307 * state back from the unprivileged child to the privileged parent 593 * state back from the unprivileged child to the privileged parent
@@ -325,6 +611,7 @@ void
325cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len) 611cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len)
326{ 612{
327 Cipher *c = cc->cipher; 613 Cipher *c = cc->cipher;
614 u_char *civ = NULL;
328 int evplen; 615 int evplen;
329 616
330 switch (c->number) { 617 switch (c->number) {
@@ -337,28 +624,45 @@ cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len)
337 if (evplen != len) 624 if (evplen != len)
338 fatal("%s: wrong iv length %d != %d", __func__, 625 fatal("%s: wrong iv length %d != %d", __func__,
339 evplen, len); 626 evplen, len);
627
340#if OPENSSL_VERSION_NUMBER < 0x00907000L 628#if OPENSSL_VERSION_NUMBER < 0x00907000L
341 if (c->evptype == evp_rijndael) 629 if (c->evptype == evp_rijndael) {
342 ssh_rijndael_iv(&cc->evp, 0, iv, len); 630 struct ssh_rijndael_ctx *aesc;
343 else 631
632 aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
633 if (aesc == NULL)
634 fatal("%s: no rijndael context", __func__);
635 civ = aesc->r_iv;
636 } else
344#endif 637#endif
345 if (c->evptype == evp_aes_128_ctr) 638 {
346 ssh_aes_ctr_iv(&cc->evp, 0, iv, len); 639 civ = cc->evp.iv;
347 else 640 }
348 memcpy(iv, cc->evp.iv, len);
349 break;
350 case SSH_CIPHER_3DES:
351 ssh1_3des_iv(&cc->evp, 0, iv, 24);
352 break; 641 break;
642 case SSH_CIPHER_3DES: {
643 struct ssh1_3des_ctx *desc;
644 if (len != 24)
645 fatal("%s: bad 3des iv length: %d", __func__, len);
646 desc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
647 if (desc == NULL)
648 fatal("%s: no 3des context", __func__);
649 debug3("%s: Copying 3DES IV", __func__);
650 memcpy(iv, desc->k1.iv, 8);
651 memcpy(iv + 8, desc->k2.iv, 8);
652 memcpy(iv + 16, desc->k3.iv, 8);
653 return;
654 }
353 default: 655 default:
354 fatal("%s: bad cipher %d", __func__, c->number); 656 fatal("%s: bad cipher %d", __func__, c->number);
355 } 657 }
658 memcpy(iv, civ, len);
356} 659}
357 660
358void 661void
359cipher_set_keyiv(CipherContext *cc, u_char *iv) 662cipher_set_keyiv(CipherContext *cc, u_char *iv)
360{ 663{
361 Cipher *c = cc->cipher; 664 Cipher *c = cc->cipher;
665 u_char *div = NULL;
362 int evplen = 0; 666 int evplen = 0;
363 667
364 switch (c->number) { 668 switch (c->number) {
@@ -368,22 +672,36 @@ cipher_set_keyiv(CipherContext *cc, u_char *iv)
368 evplen = EVP_CIPHER_CTX_iv_length(&cc->evp); 672 evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
369 if (evplen == 0) 673 if (evplen == 0)
370 return; 674 return;
675
371#if OPENSSL_VERSION_NUMBER < 0x00907000L 676#if OPENSSL_VERSION_NUMBER < 0x00907000L
372 if (c->evptype == evp_rijndael) 677 if (c->evptype == evp_rijndael) {
373 ssh_rijndael_iv(&cc->evp, 1, iv, evplen); 678 struct ssh_rijndael_ctx *aesc;
374 else 679
680 aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
681 if (aesc == NULL)
682 fatal("%s: no rijndael context", __func__);
683 div = aesc->r_iv;
684 } else
375#endif 685#endif
376 if (c->evptype == evp_aes_128_ctr) 686 {
377 ssh_aes_ctr_iv(&cc->evp, 1, iv, evplen); 687 div = cc->evp.iv;
378 else 688 }
379 memcpy(cc->evp.iv, iv, evplen);
380 break;
381 case SSH_CIPHER_3DES:
382 ssh1_3des_iv(&cc->evp, 1, iv, 24);
383 break; 689 break;
690 case SSH_CIPHER_3DES: {
691 struct ssh1_3des_ctx *desc;
692 desc = EVP_CIPHER_CTX_get_app_data(&cc->evp);
693 if (desc == NULL)
694 fatal("%s: no 3des context", __func__);
695 debug3("%s: Installed 3DES IV", __func__);
696 memcpy(desc->k1.iv, iv, 8);
697 memcpy(desc->k2.iv, iv + 8, 8);
698 memcpy(desc->k3.iv, iv + 16, 8);
699 return;
700 }
384 default: 701 default:
385 fatal("%s: bad cipher %d", __func__, c->number); 702 fatal("%s: bad cipher %d", __func__, c->number);
386 } 703 }
704 memcpy(div, iv, evplen);
387} 705}
388 706
389#if OPENSSL_VERSION_NUMBER < 0x00907000L 707#if OPENSSL_VERSION_NUMBER < 0x00907000L
diff --git a/clientloop.c b/clientloop.c
index d445230e5..9549dadd4 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.112 2003/06/28 16:23:06 deraadt Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.107 2003/04/01 10:22:21 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -414,9 +414,9 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
414 414
415 /* Flush stdout and stderr buffers. */ 415 /* Flush stdout and stderr buffers. */
416 if (buffer_len(bout) > 0) 416 if (buffer_len(bout) > 0)
417 atomicio(vwrite, fileno(stdout), buffer_ptr(bout), buffer_len(bout)); 417 atomicio(write, fileno(stdout), buffer_ptr(bout), buffer_len(bout));
418 if (buffer_len(berr) > 0) 418 if (buffer_len(berr) > 0)
419 atomicio(vwrite, fileno(stderr), buffer_ptr(berr), buffer_len(berr)); 419 atomicio(write, fileno(stderr), buffer_ptr(berr), buffer_len(berr));
420 420
421 leave_raw_mode(); 421 leave_raw_mode();
422 422
@@ -509,13 +509,13 @@ process_cmdline(void)
509 if (*s == 0) 509 if (*s == 0)
510 goto out; 510 goto out;
511 if (strlen(s) < 2 || s[0] != '-' || !(s[1] == 'L' || s[1] == 'R')) { 511 if (strlen(s) < 2 || s[0] != '-' || !(s[1] == 'L' || s[1] == 'R')) {
512 logit("Invalid command."); 512 log("Invalid command.");
513 goto out; 513 goto out;
514 } 514 }
515 if (s[1] == 'L') 515 if (s[1] == 'L')
516 local = 1; 516 local = 1;
517 if (!local && !compat20) { 517 if (!local && !compat20) {
518 logit("Not supported for SSH protocol version 1."); 518 log("Not supported for SSH protocol version 1.");
519 goto out; 519 goto out;
520 } 520 }
521 s += 2; 521 s += 2;
@@ -526,24 +526,24 @@ process_cmdline(void)
526 sfwd_port, buf, sfwd_host_port) != 3 && 526 sfwd_port, buf, sfwd_host_port) != 3 &&
527 sscanf(s, "%5[0-9]/%255[^/]/%5[0-9]", 527 sscanf(s, "%5[0-9]/%255[^/]/%5[0-9]",
528 sfwd_port, buf, sfwd_host_port) != 3) { 528 sfwd_port, buf, sfwd_host_port) != 3) {
529 logit("Bad forwarding specification."); 529 log("Bad forwarding specification.");
530 goto out; 530 goto out;
531 } 531 }
532 if ((fwd_port = a2port(sfwd_port)) == 0 || 532 if ((fwd_port = a2port(sfwd_port)) == 0 ||
533 (fwd_host_port = a2port(sfwd_host_port)) == 0) { 533 (fwd_host_port = a2port(sfwd_host_port)) == 0) {
534 logit("Bad forwarding port(s)."); 534 log("Bad forwarding port(s).");
535 goto out; 535 goto out;
536 } 536 }
537 if (local) { 537 if (local) {
538 if (channel_setup_local_fwd_listener(fwd_port, buf, 538 if (channel_setup_local_fwd_listener(fwd_port, buf,
539 fwd_host_port, options.gateway_ports) < 0) { 539 fwd_host_port, options.gateway_ports) < 0) {
540 logit("Port forwarding failed."); 540 log("Port forwarding failed.");
541 goto out; 541 goto out;
542 } 542 }
543 } else 543 } else
544 channel_request_remote_forwarding(fwd_port, buf, 544 channel_request_remote_forwarding(fwd_port, buf,
545 fwd_host_port); 545 fwd_host_port);
546 logit("Forwarding port."); 546 log("Forwarding port.");
547out: 547out:
548 signal(SIGINT, handler); 548 signal(SIGINT, handler);
549 enter_raw_mode(); 549 enter_raw_mode();
@@ -593,23 +593,10 @@ process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
593 /* We have been continued. */ 593 /* We have been continued. */
594 continue; 594 continue;
595 595
596 case 'B':
597 if (compat20) {
598 snprintf(string, sizeof string,
599 "%cB\r\n", escape_char);
600 buffer_append(berr, string,
601 strlen(string));
602 channel_request_start(session_ident,
603 "break", 0);
604 packet_put_int(1000);
605 packet_send();
606 }
607 continue;
608
609 case 'R': 596 case 'R':
610 if (compat20) { 597 if (compat20) {
611 if (datafellows & SSH_BUG_NOREKEY) 598 if (datafellows & SSH_BUG_NOREKEY)
612 logit("Server does not support re-keying"); 599 log("Server does not support re-keying");
613 else 600 else
614 need_rekeying = 1; 601 need_rekeying = 1;
615 } 602 }
@@ -668,7 +655,6 @@ process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len)
668"%c?\r\n\ 655"%c?\r\n\
669Supported escape sequences:\r\n\ 656Supported escape sequences:\r\n\
670%c. - terminate connection\r\n\ 657%c. - terminate connection\r\n\
671%cB - send a BREAK to the remote system\r\n\
672%cC - open a command line\r\n\ 658%cC - open a command line\r\n\
673%cR - Request rekey (SSH protocol 2 only)\r\n\ 659%cR - Request rekey (SSH protocol 2 only)\r\n\
674%c^Z - suspend ssh\r\n\ 660%c^Z - suspend ssh\r\n\
@@ -679,7 +665,7 @@ Supported escape sequences:\r\n\
679(Note that escapes are only recognized immediately after newline.)\r\n", 665(Note that escapes are only recognized immediately after newline.)\r\n",
680 escape_char, escape_char, escape_char, escape_char, 666 escape_char, escape_char, escape_char, escape_char,
681 escape_char, escape_char, escape_char, escape_char, 667 escape_char, escape_char, escape_char, escape_char,
682 escape_char, escape_char, escape_char); 668 escape_char, escape_char);
683 buffer_append(berr, string, strlen(string)); 669 buffer_append(berr, string, strlen(string));
684 continue; 670 continue;
685 671
@@ -1002,8 +988,9 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1002 /* Do channel operations unless rekeying in progress. */ 988 /* Do channel operations unless rekeying in progress. */
1003 if (!rekeying) { 989 if (!rekeying) {
1004 channel_after_select(readset, writeset); 990 channel_after_select(readset, writeset);
1005 if (need_rekeying || packet_need_rekeying()) { 991
1006 debug("need rekeying"); 992 if (need_rekeying) {
993 debug("user requests rekeying");
1007 xxx_kex->done = 0; 994 xxx_kex->done = 0;
1008 kex_send_kexinit(xxx_kex); 995 kex_send_kexinit(xxx_kex);
1009 need_rekeying = 0; 996 need_rekeying = 0;
@@ -1194,7 +1181,7 @@ client_request_forwarded_tcpip(const char *request_type, int rchan)
1194 c = channel_new("forwarded-tcpip", 1181 c = channel_new("forwarded-tcpip",
1195 SSH_CHANNEL_CONNECTING, sock, sock, -1, 1182 SSH_CHANNEL_CONNECTING, sock, sock, -1,
1196 CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, 1183 CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0,
1197 originator_address, 1); 1184 xstrdup(originator_address), 1);
1198 xfree(originator_address); 1185 xfree(originator_address);
1199 xfree(listen_address); 1186 xfree(listen_address);
1200 return c; 1187 return c;
@@ -1230,7 +1217,8 @@ client_request_x11(const char *request_type, int rchan)
1230 return NULL; 1217 return NULL;
1231 c = channel_new("x11", 1218 c = channel_new("x11",
1232 SSH_CHANNEL_X11_OPEN, sock, sock, -1, 1219 SSH_CHANNEL_X11_OPEN, sock, sock, -1,
1233 CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0, "x11", 1); 1220 CHAN_TCP_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 0,
1221 xstrdup("x11"), 1);
1234 c->force_drain = 1; 1222 c->force_drain = 1;
1235 return c; 1223 return c;
1236} 1224}
@@ -1252,7 +1240,7 @@ client_request_agent(const char *request_type, int rchan)
1252 c = channel_new("authentication agent connection", 1240 c = channel_new("authentication agent connection",
1253 SSH_CHANNEL_OPEN, sock, sock, -1, 1241 SSH_CHANNEL_OPEN, sock, sock, -1,
1254 CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, 1242 CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0,
1255 "authentication agent connection", 1); 1243 xstrdup("authentication agent connection"), 1);
1256 c->force_drain = 1; 1244 c->force_drain = 1;
1257 return c; 1245 return c;
1258} 1246}
diff --git a/compat.c b/compat.c
index af1d14321..5e1774ab6 100644
--- a/compat.c
+++ b/compat.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: compat.c,v 1.69 2003/08/29 10:03:15 markus Exp $"); 26RCSID("$OpenBSD: compat.c,v 1.66 2003/04/01 10:31:26 markus Exp $");
27 27
28#include "buffer.h" 28#include "buffer.h"
29#include "packet.h" 29#include "packet.h"
@@ -79,11 +79,7 @@ compat_datafellows(const char *version)
79 { "OpenSSH_2.5.3*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF}, 79 { "OpenSSH_2.5.3*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
80 { "OpenSSH_2.*," 80 { "OpenSSH_2.*,"
81 "OpenSSH_3.0*," 81 "OpenSSH_3.0*,"
82 "OpenSSH_3.1*", SSH_BUG_EXTEOF|SSH_BUG_GSSAPI_BER}, 82 "OpenSSH_3.1*", SSH_BUG_EXTEOF},
83 { "OpenSSH_3.2*,"
84 "OpenSSH_3.3*,"
85 "OpenSSH_3.4*,"
86 "OpenSSH_3.5*", SSH_BUG_GSSAPI_BER},
87 { "Sun_SSH_1.0*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF}, 83 { "Sun_SSH_1.0*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
88 { "OpenSSH*", 0 }, 84 { "OpenSSH*", 0 },
89 { "*MindTerm*", 0 }, 85 { "*MindTerm*", 0 },
@@ -135,9 +131,12 @@ compat_datafellows(const char *version)
135 "1.2.19*," 131 "1.2.19*,"
136 "1.2.20*," 132 "1.2.20*,"
137 "1.2.21*," 133 "1.2.21*,"
138 "1.2.22*", SSH_BUG_IGNOREMSG }, 134 "1.2.22*", SSH_BUG_IGNOREMSG|SSH_BUG_K5USER },
139 { "1.3.2*", /* F-Secure */ 135 { "1.3.2*", /* F-Secure */
140 SSH_BUG_IGNOREMSG }, 136 SSH_BUG_IGNOREMSG|SSH_BUG_K5USER },
137 { "1.2.1*,"
138 "1.2.2*,"
139 "1.2.3*", SSH_BUG_K5USER },
141 { "*SSH Compatible Server*", /* Netscreen */ 140 { "*SSH Compatible Server*", /* Netscreen */
142 SSH_BUG_PASSWORDPAD }, 141 SSH_BUG_PASSWORDPAD },
143 { "*OSU_0*," 142 { "*OSU_0*,"
@@ -189,7 +188,7 @@ proto_spec(const char *spec)
189 ret |= SSH_PROTO_2; 188 ret |= SSH_PROTO_2;
190 break; 189 break;
191 default: 190 default:
192 logit("ignoring bad proto spec: '%s'.", p); 191 log("ignoring bad proto spec: '%s'.", p);
193 break; 192 break;
194 } 193 }
195 } 194 }
diff --git a/compat.h b/compat.h
index 7a5004455..881e450d3 100644
--- a/compat.h
+++ b/compat.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: compat.h,v 1.36 2003/08/29 10:03:15 markus Exp $ */ 1/* $OpenBSD: compat.h,v 1.34 2003/04/01 10:31:26 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved.
@@ -53,9 +53,9 @@
53#define SSH_BUG_DERIVEKEY 0x00040000 53#define SSH_BUG_DERIVEKEY 0x00040000
54#define SSH_BUG_DUMMYCHAN 0x00100000 54#define SSH_BUG_DUMMYCHAN 0x00100000
55#define SSH_BUG_EXTEOF 0x00200000 55#define SSH_BUG_EXTEOF 0x00200000
56#define SSH_BUG_PROBE 0x00400000 56#define SSH_BUG_K5USER 0x00400000
57#define SSH_BUG_FIRSTKEX 0x00800000 57#define SSH_BUG_PROBE 0x00800000
58#define SSH_BUG_GSSAPI_BER 0x01000000 58#define SSH_BUG_FIRSTKEX 0x01000000
59 59
60void enable_compat13(void); 60void enable_compat13(void);
61void enable_compat20(void); 61void enable_compat20(void);
diff --git a/config.h.in b/config.h.in
index 41495c4fb..55149792c 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,29 +1,5 @@
1/* config.h.in. Generated automatically from configure.ac by autoheader. */ 1/* config.h.in. Generated from configure.ac by autoheader. */
2/* $Id: acconfig.h,v 1.166 2003/09/16 01:52:19 dtucker Exp $ */ 2/* $Id: acconfig.h,v 1.149 2003/03/10 00:38:10 djm Exp $ */
3
4/*
5 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 3
28#ifndef _CONFIG_H 4#ifndef _CONFIG_H
29#define _CONFIG_H 5#define _CONFIG_H
@@ -32,20 +8,9 @@
32/* Please make your changes there */ 8/* Please make your changes there */
33 9
34 10
35
36/* Define if your platform breaks doing a seteuid before a setuid */
37#undef SETEUID_BREAKS_SETUID
38
39/* Define if your setreuid() is broken */
40#undef BROKEN_SETREUID
41
42/* Define if your setregid() is broken */
43#undef BROKEN_SETREGID
44
45/* Define to a Set Process Title type if your system is */ 11/* Define to a Set Process Title type if your system is */
46/* supported by bsd-setproctitle.c */ 12/* supported by bsd-setproctitle.c */
47#undef SPT_TYPE 13#undef SPT_TYPE
48#undef SPT_PADCHAR
49 14
50/* setgroups() NOOP allowed */ 15/* setgroups() NOOP allowed */
51#undef SETGROUPS_NOOP 16#undef SETGROUPS_NOOP
@@ -117,9 +82,6 @@
117/* Define if you want to enable AIX4's authenticate function */ 82/* Define if you want to enable AIX4's authenticate function */
118#undef WITH_AIXAUTHENTICATE 83#undef WITH_AIXAUTHENTICATE
119 84
120/* Define if your AIX loginfailed() function takes 4 arguments (AIX >= 5.2) */
121#undef AIX_LOGINFAILED_4ARG
122
123/* Define if you have/want arrays (cluster-wide session managment, not C arrays) */ 85/* Define if you have/want arrays (cluster-wide session managment, not C arrays) */
124#undef WITH_IRIX_ARRAY 86#undef WITH_IRIX_ARRAY
125 87
@@ -239,15 +201,18 @@
239/* Define if compiler implements __func__ */ 201/* Define if compiler implements __func__ */
240#undef HAVE___func__ 202#undef HAVE___func__
241 203
242/* Define this is you want GSSAPI support in the version 2 protocol */
243#undef GSSAPI
244
245/* Define if you want Kerberos 5 support */ 204/* Define if you want Kerberos 5 support */
246#undef KRB5 205#undef KRB5
247 206
248/* Define this if you are using the Heimdal version of Kerberos V5 */ 207/* Define this if you are using the Heimdal version of Kerberos V5 */
249#undef HEIMDAL 208#undef HEIMDAL
250 209
210/* Define if you want Kerberos 4 support */
211#undef KRB4
212
213/* Define if you want AFS support */
214#undef AFS
215
251/* Define if you want S/Key support */ 216/* Define if you want S/Key support */
252#undef SKEY 217#undef SKEY
253 218
@@ -330,6 +295,9 @@
330/* Specify location of ssh.pid */ 295/* Specify location of ssh.pid */
331#undef _PATH_SSH_PIDDIR 296#undef _PATH_SSH_PIDDIR
332 297
298/* Use IPv4 for connection by default, IPv6 can still if explicity asked */
299#undef IPV4_DEFAULT
300
333/* getaddrinfo is broken (if present) */ 301/* getaddrinfo is broken (if present) */
334#undef BROKEN_GETADDRINFO 302#undef BROKEN_GETADDRINFO
335 303
@@ -360,9 +328,6 @@
360/* Define in your struct dirent expects you to allocate extra space for d_name */ 328/* Define in your struct dirent expects you to allocate extra space for d_name */
361#undef BROKEN_ONE_BYTE_DIRENT_D_NAME 329#undef BROKEN_ONE_BYTE_DIRENT_D_NAME
362 330
363/* Define if your system has /etc/default/login */
364#undef HAVE_ETC_DEFAULT_LOGIN
365
366/* Define if your getopt(3) defines and uses optreset */ 331/* Define if your getopt(3) defines and uses optreset */
367#undef HAVE_GETOPT_OPTRESET 332#undef HAVE_GETOPT_OPTRESET
368 333
@@ -402,558 +367,542 @@
402/* Silly mkstemp() */ 367/* Silly mkstemp() */
403#undef HAVE_STRICT_MKSTEMP 368#undef HAVE_STRICT_MKSTEMP
404 369
370/* Setproctitle emulation */
371#undef SETPROCTITLE_STRATEGY
372#undef SETPROCTITLE_PS_PADDING
373
405/* Some systems put this outside of libc */ 374/* Some systems put this outside of libc */
406#undef HAVE_NANOSLEEP 375#undef HAVE_NANOSLEEP
407 376
408/* Define if sshd somehow reacquires a controlling TTY after setsid() */ 377/* Pushing STREAMS modules incorrectly acquires a controlling TTY */
409#undef SSHD_ACQUIRES_CTTY 378#undef STREAMS_PUSH_ACQUIRES_CTTY
410
411/* Define if cmsg_type is not passed correctly */
412#undef BROKEN_CMSG_TYPE
413
414/* Strings used in /etc/passwd to denote locked account */
415#undef LOCKED_PASSWD_STRING
416#undef LOCKED_PASSWD_PREFIX
417#undef LOCKED_PASSWD_SUBSTR
418
419/* Define if DNS support is to be activated */
420#undef DNS
421
422/* Define if getrrsetbyname() exists */
423#undef HAVE_GETRRSETBYNAME
424 379
425/* Define if HEADER.ad exists in arpa/nameser.h */
426#undef HAVE_HEADER_AD
427 380
428 381/* Define to 1 if the `getpgrp' function requires zero arguments. */
429/* Define if the `getpgrp' function takes no argument. */
430#undef GETPGRP_VOID 382#undef GETPGRP_VOID
431 383
432/* Define if you have the `arc4random' function. */ 384/* Define to 1 if you have the `arc4random' function. */
433#undef HAVE_ARC4RANDOM 385#undef HAVE_ARC4RANDOM
434 386
435/* Define if you have the `b64_ntop' function. */ 387/* Define to 1 if you have the `b64_ntop' function. */
436#undef HAVE_B64_NTOP 388#undef HAVE_B64_NTOP
437 389
438/* Define if you have the `b64_pton' function. */ 390/* Define to 1 if you have the `b64_pton' function. */
439#undef HAVE_B64_PTON 391#undef HAVE_B64_PTON
440 392
441/* Define if you have the `basename' function. */ 393/* Define to 1 if you have the `basename' function. */
442#undef HAVE_BASENAME 394#undef HAVE_BASENAME
443 395
444/* Define if you have the `bcopy' function. */ 396/* Define to 1 if you have the `bcopy' function. */
445#undef HAVE_BCOPY 397#undef HAVE_BCOPY
446 398
447/* Define if you have the `bindresvport_sa' function. */ 399/* Define to 1 if you have the `bindresvport_sa' function. */
448#undef HAVE_BINDRESVPORT_SA 400#undef HAVE_BINDRESVPORT_SA
449 401
450/* Define if you have the <bstring.h> header file. */ 402/* Define to 1 if you have the <bstring.h> header file. */
451#undef HAVE_BSTRING_H 403#undef HAVE_BSTRING_H
452 404
453/* Define if you have the `clock' function. */ 405/* Define to 1 if you have the `clock' function. */
454#undef HAVE_CLOCK 406#undef HAVE_CLOCK
455 407
456/* Define if you have the <crypt.h> header file. */ 408/* Define to 1 if you have the <crypt.h> header file. */
457#undef HAVE_CRYPT_H 409#undef HAVE_CRYPT_H
458 410
459/* Define if you have the `dirname' function. */ 411/* Define to 1 if you have the `dirname' function. */
460#undef HAVE_DIRNAME 412#undef HAVE_DIRNAME
461 413
462/* Define if you have the <endian.h> header file. */ 414/* Define to 1 if you have the <endian.h> header file. */
463#undef HAVE_ENDIAN_H 415#undef HAVE_ENDIAN_H
464 416
465/* Define if you have the `endutent' function. */ 417/* Define to 1 if you have the `endutent' function. */
466#undef HAVE_ENDUTENT 418#undef HAVE_ENDUTENT
467 419
468/* Define if you have the `endutxent' function. */ 420/* Define to 1 if you have the `endutxent' function. */
469#undef HAVE_ENDUTXENT 421#undef HAVE_ENDUTXENT
470 422
471/* Define if you have the `fchmod' function. */ 423/* Define to 1 if you have the `fchmod' function. */
472#undef HAVE_FCHMOD 424#undef HAVE_FCHMOD
473 425
474/* Define if you have the `fchown' function. */ 426/* Define to 1 if you have the `fchown' function. */
475#undef HAVE_FCHOWN 427#undef HAVE_FCHOWN
476 428
477/* Define if you have the <features.h> header file. */ 429/* Define to 1 if you have the <floatingpoint.h> header file. */
478#undef HAVE_FEATURES_H
479
480/* Define if you have the <floatingpoint.h> header file. */
481#undef HAVE_FLOATINGPOINT_H 430#undef HAVE_FLOATINGPOINT_H
482 431
483/* Define if you have the `freeaddrinfo' function. */ 432/* Define to 1 if you have the `freeaddrinfo' function. */
484#undef HAVE_FREEADDRINFO 433#undef HAVE_FREEADDRINFO
485 434
486/* Define if you have the `futimes' function. */ 435/* Define to 1 if you have the `futimes' function. */
487#undef HAVE_FUTIMES 436#undef HAVE_FUTIMES
488 437
489/* Define if you have the `gai_strerror' function. */ 438/* Define to 1 if you have the `gai_strerror' function. */
490#undef HAVE_GAI_STRERROR 439#undef HAVE_GAI_STRERROR
491 440
492/* Define if you have the `getaddrinfo' function. */ 441/* Define to 1 if you have the `getaddrinfo' function. */
493#undef HAVE_GETADDRINFO 442#undef HAVE_GETADDRINFO
494 443
495/* Define if you have the `getcwd' function. */ 444/* Define to 1 if you have the `getcwd' function. */
496#undef HAVE_GETCWD 445#undef HAVE_GETCWD
497 446
498/* Define if you have the `getgrouplist' function. */ 447/* Define to 1 if you have the `getgrouplist' function. */
499#undef HAVE_GETGROUPLIST 448#undef HAVE_GETGROUPLIST
500 449
501/* Define if you have the `getluid' function. */ 450/* Define to 1 if you have the `getluid' function. */
502#undef HAVE_GETLUID 451#undef HAVE_GETLUID
503 452
504/* Define if you have the `getnameinfo' function. */ 453/* Define to 1 if you have the `getnameinfo' function. */
505#undef HAVE_GETNAMEINFO 454#undef HAVE_GETNAMEINFO
506 455
507/* Define if you have the `getopt' function. */ 456/* Define to 1 if you have the `getopt' function. */
508#undef HAVE_GETOPT 457#undef HAVE_GETOPT
509 458
510/* Define if you have the <getopt.h> header file. */ 459/* Define to 1 if you have the <getopt.h> header file. */
511#undef HAVE_GETOPT_H 460#undef HAVE_GETOPT_H
512 461
513/* Define if you have the `getpeereid' function. */ 462/* Define to 1 if you have the `getpeereid' function. */
514#undef HAVE_GETPEEREID 463#undef HAVE_GETPEEREID
515 464
516/* Define if you have the `getpwanam' function. */ 465/* Define to 1 if you have the `getpwanam' function. */
517#undef HAVE_GETPWANAM 466#undef HAVE_GETPWANAM
518 467
519/* Define if you have the `getrlimit' function. */ 468/* Define to 1 if you have the `getrlimit' function. */
520#undef HAVE_GETRLIMIT 469#undef HAVE_GETRLIMIT
521 470
522/* Define if you have the `getrusage' function. */ 471/* Define to 1 if you have the `getrusage' function. */
523#undef HAVE_GETRUSAGE 472#undef HAVE_GETRUSAGE
524 473
525/* Define if you have the `gettimeofday' function. */ 474/* Define to 1 if you have the `gettimeofday' function. */
526#undef HAVE_GETTIMEOFDAY 475#undef HAVE_GETTIMEOFDAY
527 476
528/* Define if you have the `getttyent' function. */ 477/* Define to 1 if you have the `getttyent' function. */
529#undef HAVE_GETTTYENT 478#undef HAVE_GETTTYENT
530 479
531/* Define if you have the `getutent' function. */ 480/* Define to 1 if you have the `getutent' function. */
532#undef HAVE_GETUTENT 481#undef HAVE_GETUTENT
533 482
534/* Define if you have the `getutid' function. */ 483/* Define to 1 if you have the `getutid' function. */
535#undef HAVE_GETUTID 484#undef HAVE_GETUTID
536 485
537/* Define if you have the `getutline' function. */ 486/* Define to 1 if you have the `getutline' function. */
538#undef HAVE_GETUTLINE 487#undef HAVE_GETUTLINE
539 488
540/* Define if you have the `getutxent' function. */ 489/* Define to 1 if you have the `getutxent' function. */
541#undef HAVE_GETUTXENT 490#undef HAVE_GETUTXENT
542 491
543/* Define if you have the `getutxid' function. */ 492/* Define to 1 if you have the `getutxid' function. */
544#undef HAVE_GETUTXID 493#undef HAVE_GETUTXID
545 494
546/* Define if you have the `getutxline' function. */ 495/* Define to 1 if you have the `getutxline' function. */
547#undef HAVE_GETUTXLINE 496#undef HAVE_GETUTXLINE
548 497
549/* Define if you have the `glob' function. */ 498/* Define to 1 if you have the `glob' function. */
550#undef HAVE_GLOB 499#undef HAVE_GLOB
551 500
552/* Define if you have the <glob.h> header file. */ 501/* Define to 1 if you have the <glob.h> header file. */
553#undef HAVE_GLOB_H 502#undef HAVE_GLOB_H
554 503
555/* Define if you have the <gssapi.h> header file. */ 504/* Define to 1 if you have the <ia.h> header file. */
556#undef HAVE_GSSAPI_H
557
558/* Define if you have the <ia.h> header file. */
559#undef HAVE_IA_H 505#undef HAVE_IA_H
560 506
561/* Define if you have the `inet_aton' function. */ 507/* Define to 1 if you have the `inet_aton' function. */
562#undef HAVE_INET_ATON 508#undef HAVE_INET_ATON
563 509
564/* Define if you have the `inet_ntoa' function. */ 510/* Define to 1 if you have the `inet_ntoa' function. */
565#undef HAVE_INET_NTOA 511#undef HAVE_INET_NTOA
566 512
567/* Define if you have the `inet_ntop' function. */ 513/* Define to 1 if you have the `inet_ntop' function. */
568#undef HAVE_INET_NTOP 514#undef HAVE_INET_NTOP
569 515
570/* Define if you have the `innetgr' function. */ 516/* Define to 1 if you have the `innetgr' function. */
571#undef HAVE_INNETGR 517#undef HAVE_INNETGR
572 518
573/* Define if you have the <inttypes.h> header file. */ 519/* Define to 1 if you have the <inttypes.h> header file. */
574#undef HAVE_INTTYPES_H 520#undef HAVE_INTTYPES_H
575 521
576/* Define if you have the <lastlog.h> header file. */ 522/* Define to 1 if you have the <krb.h> header file. */
523#undef HAVE_KRB_H
524
525/* Define to 1 if you have the <lastlog.h> header file. */
577#undef HAVE_LASTLOG_H 526#undef HAVE_LASTLOG_H
578 527
579/* Define if you have the `crypt' library (-lcrypt). */ 528/* Define to 1 if you have the `crypt' library (-lcrypt). */
580#undef HAVE_LIBCRYPT 529#undef HAVE_LIBCRYPT
581 530
582/* Define if you have the `dl' library (-ldl). */ 531/* Define to 1 if you have the `des' library (-ldes). */
532#undef HAVE_LIBDES
533
534/* Define to 1 if you have the `des425' library (-ldes425). */
535#undef HAVE_LIBDES425
536
537/* Define to 1 if you have the `dl' library (-ldl). */
583#undef HAVE_LIBDL 538#undef HAVE_LIBDL
584 539
585/* Define if you have the <libgen.h> header file. */ 540/* Define to 1 if you have the <libgen.h> header file. */
586#undef HAVE_LIBGEN_H 541#undef HAVE_LIBGEN_H
587 542
588/* Define if you have the `nsl' library (-lnsl). */ 543/* Define to 1 if you have the `krb' library (-lkrb). */
544#undef HAVE_LIBKRB
545
546/* Define to 1 if you have the `krb4' library (-lkrb4). */
547#undef HAVE_LIBKRB4
548
549/* Define to 1 if you have the `nsl' library (-lnsl). */
589#undef HAVE_LIBNSL 550#undef HAVE_LIBNSL
590 551
591/* Define if you have the `pam' library (-lpam). */ 552/* Define to 1 if you have the `pam' library (-lpam). */
592#undef HAVE_LIBPAM 553#undef HAVE_LIBPAM
593 554
594/* Define if you have the `sectok' library (-lsectok). */ 555/* Define to 1 if you have the `resolv' library (-lresolv). */
556#undef HAVE_LIBRESOLV
557
558/* Define to 1 if you have the `sectok' library (-lsectok). */
595#undef HAVE_LIBSECTOK 559#undef HAVE_LIBSECTOK
596 560
597/* Define if you have the `socket' library (-lsocket). */ 561/* Define to 1 if you have the `socket' library (-lsocket). */
598#undef HAVE_LIBSOCKET 562#undef HAVE_LIBSOCKET
599 563
600/* Define if you have the <libutil.h> header file. */ 564/* Define to 1 if you have the <libutil.h> header file. */
601#undef HAVE_LIBUTIL_H 565#undef HAVE_LIBUTIL_H
602 566
603/* Define if you have the `xnet' library (-lxnet). */ 567/* Define to 1 if you have the `xnet' library (-lxnet). */
604#undef HAVE_LIBXNET 568#undef HAVE_LIBXNET
605 569
606/* Define if you have the `z' library (-lz). */ 570/* Define to 1 if you have the `z' library (-lz). */
607#undef HAVE_LIBZ 571#undef HAVE_LIBZ
608 572
609/* Define if you have the <limits.h> header file. */ 573/* Define to 1 if you have the <limits.h> header file. */
610#undef HAVE_LIMITS_H 574#undef HAVE_LIMITS_H
611 575
612/* Define if you have the <login_cap.h> header file. */ 576/* Define to 1 if you have the <login_cap.h> header file. */
613#undef HAVE_LOGIN_CAP_H 577#undef HAVE_LOGIN_CAP_H
614 578
615/* Define if you have the `login_getcapbool' function. */ 579/* Define to 1 if you have the `login_getcapbool' function. */
616#undef HAVE_LOGIN_GETCAPBOOL 580#undef HAVE_LOGIN_GETCAPBOOL
617 581
618/* Define if you have the <login.h> header file. */ 582/* Define to 1 if you have the <login.h> header file. */
619#undef HAVE_LOGIN_H 583#undef HAVE_LOGIN_H
620 584
621/* Define if you have the `logout' function. */ 585/* Define to 1 if you have the `logout' function. */
622#undef HAVE_LOGOUT 586#undef HAVE_LOGOUT
623 587
624/* Define if you have the `logwtmp' function. */ 588/* Define to 1 if you have the `logwtmp' function. */
625#undef HAVE_LOGWTMP 589#undef HAVE_LOGWTMP
626 590
627/* Define if you have the <maillock.h> header file. */ 591/* Define to 1 if you have the <maillock.h> header file. */
628#undef HAVE_MAILLOCK_H 592#undef HAVE_MAILLOCK_H
629 593
630/* Define if you have the `md5_crypt' function. */ 594/* Define to 1 if you have the `md5_crypt' function. */
631#undef HAVE_MD5_CRYPT 595#undef HAVE_MD5_CRYPT
632 596
633/* Define if you have the `memmove' function. */ 597/* Define to 1 if you have the `memmove' function. */
634#undef HAVE_MEMMOVE 598#undef HAVE_MEMMOVE
635 599
636/* Define if you have the <memory.h> header file. */ 600/* Define to 1 if you have the <memory.h> header file. */
637#undef HAVE_MEMORY_H 601#undef HAVE_MEMORY_H
638 602
639/* Define if you have the `mkdtemp' function. */ 603/* Define to 1 if you have the `mkdtemp' function. */
640#undef HAVE_MKDTEMP 604#undef HAVE_MKDTEMP
641 605
642/* Define if you have the `mmap' function. */ 606/* Define to 1 if you have the `mmap' function. */
643#undef HAVE_MMAP 607#undef HAVE_MMAP
644 608
645/* Define if you have the <netdb.h> header file. */ 609/* Define to 1 if you have the <netdb.h> header file. */
646#undef HAVE_NETDB_H 610#undef HAVE_NETDB_H
647 611
648/* Define if you have the <netgroup.h> header file. */ 612/* Define to 1 if you have the <netgroup.h> header file. */
649#undef HAVE_NETGROUP_H 613#undef HAVE_NETGROUP_H
650 614
651/* Define if you have the <netinet/in_systm.h> header file. */ 615/* Define to 1 if you have the <netinet/in_systm.h> header file. */
652#undef HAVE_NETINET_IN_SYSTM_H 616#undef HAVE_NETINET_IN_SYSTM_H
653 617
654/* Define if you have the `ngetaddrinfo' function. */ 618/* Define to 1 if you have the `ngetaddrinfo' function. */
655#undef HAVE_NGETADDRINFO 619#undef HAVE_NGETADDRINFO
656 620
657/* Define if you have the `nsleep' function. */ 621/* Define to 1 if you have the `nsleep' function. */
658#undef HAVE_NSLEEP 622#undef HAVE_NSLEEP
659 623
660/* Define if you have the `ogetaddrinfo' function. */ 624/* Define to 1 if you have the `ogetaddrinfo' function. */
661#undef HAVE_OGETADDRINFO 625#undef HAVE_OGETADDRINFO
662 626
663/* Define if you have the `openlog_r' function. */ 627/* Define to 1 if you have the `openpty' function. */
664#undef HAVE_OPENLOG_R
665
666/* Define if you have the `openpty' function. */
667#undef HAVE_OPENPTY 628#undef HAVE_OPENPTY
668 629
669/* Define if you have the `pam_getenvlist' function. */ 630/* Define to 1 if you have the `pam_getenvlist' function. */
670#undef HAVE_PAM_GETENVLIST 631#undef HAVE_PAM_GETENVLIST
671 632
672/* Define if you have the `pam_putenv' function. */ 633/* Define to 1 if you have the <paths.h> header file. */
673#undef HAVE_PAM_PUTENV
674
675/* Define if you have the <paths.h> header file. */
676#undef HAVE_PATHS_H 634#undef HAVE_PATHS_H
677 635
678/* Define if you have the `pstat' function. */ 636/* Define to 1 if you have the `pstat' function. */
679#undef HAVE_PSTAT 637#undef HAVE_PSTAT
680 638
681/* Define if you have the <pty.h> header file. */ 639/* Define to 1 if you have the <pty.h> header file. */
682#undef HAVE_PTY_H 640#undef HAVE_PTY_H
683 641
684/* Define if you have the `pututline' function. */ 642/* Define to 1 if you have the `pututline' function. */
685#undef HAVE_PUTUTLINE 643#undef HAVE_PUTUTLINE
686 644
687/* Define if you have the `pututxline' function. */ 645/* Define to 1 if you have the `pututxline' function. */
688#undef HAVE_PUTUTXLINE 646#undef HAVE_PUTUTXLINE
689 647
690/* Define if you have the `readpassphrase' function. */ 648/* Define to 1 if you have the `readpassphrase' function. */
691#undef HAVE_READPASSPHRASE 649#undef HAVE_READPASSPHRASE
692 650
693/* Define if you have the <readpassphrase.h> header file. */ 651/* Define to 1 if you have the <readpassphrase.h> header file. */
694#undef HAVE_READPASSPHRASE_H 652#undef HAVE_READPASSPHRASE_H
695 653
696/* Define if you have the `realpath' function. */ 654/* Define to 1 if you have the `realpath' function. */
697#undef HAVE_REALPATH 655#undef HAVE_REALPATH
698 656
699/* Define if you have the `recvmsg' function. */ 657/* Define to 1 if you have the `recvmsg' function. */
700#undef HAVE_RECVMSG 658#undef HAVE_RECVMSG
701 659
702/* Define if you have the <rpc/types.h> header file. */ 660/* Define to 1 if you have the <rpc/types.h> header file. */
703#undef HAVE_RPC_TYPES_H 661#undef HAVE_RPC_TYPES_H
704 662
705/* Define if you have the `rresvport_af' function. */ 663/* Define to 1 if you have the `rresvport_af' function. */
706#undef HAVE_RRESVPORT_AF 664#undef HAVE_RRESVPORT_AF
707 665
708/* Define if you have the <sectok.h> header file. */ 666/* Define to 1 if you have the <sectok.h> header file. */
709#undef HAVE_SECTOK_H 667#undef HAVE_SECTOK_H
710 668
711/* Define if you have the <security/pam_appl.h> header file. */ 669/* Define to 1 if you have the <security/pam_appl.h> header file. */
712#undef HAVE_SECURITY_PAM_APPL_H 670#undef HAVE_SECURITY_PAM_APPL_H
713 671
714/* Define if you have the `sendmsg' function. */ 672/* Define to 1 if you have the `sendmsg' function. */
715#undef HAVE_SENDMSG 673#undef HAVE_SENDMSG
716 674
717/* Define if you have the `setauthdb' function. */ 675/* Define to 1 if you have the `setdtablesize' function. */
718#undef HAVE_SETAUTHDB
719
720/* Define if you have the `setdtablesize' function. */
721#undef HAVE_SETDTABLESIZE 676#undef HAVE_SETDTABLESIZE
722 677
723/* Define if you have the `setegid' function. */ 678/* Define to 1 if you have the `setegid' function. */
724#undef HAVE_SETEGID 679#undef HAVE_SETEGID
725 680
726/* Define if you have the `setenv' function. */ 681/* Define to 1 if you have the `setenv' function. */
727#undef HAVE_SETENV 682#undef HAVE_SETENV
728 683
729/* Define if you have the `seteuid' function. */ 684/* Define to 1 if you have the `seteuid' function. */
730#undef HAVE_SETEUID 685#undef HAVE_SETEUID
731 686
732/* Define if you have the `setgroups' function. */ 687/* Define to 1 if you have the `setgroups' function. */
733#undef HAVE_SETGROUPS 688#undef HAVE_SETGROUPS
734 689
735/* Define if you have the `setlogin' function. */ 690/* Define to 1 if you have the `setlogin' function. */
736#undef HAVE_SETLOGIN 691#undef HAVE_SETLOGIN
737 692
738/* Define if you have the `setluid' function. */ 693/* Define to 1 if you have the `setluid' function. */
739#undef HAVE_SETLUID 694#undef HAVE_SETLUID
740 695
741/* Define if you have the `setpcred' function. */ 696/* Define to 1 if you have the `setpcred' function. */
742#undef HAVE_SETPCRED 697#undef HAVE_SETPCRED
743 698
744/* Define if you have the `setproctitle' function. */ 699/* Define to 1 if you have the `setproctitle' function. */
745#undef HAVE_SETPROCTITLE 700#undef HAVE_SETPROCTITLE
746 701
747/* Define if you have the `setregid' function. */ 702/* Define to 1 if you have the `setresgid' function. */
748#undef HAVE_SETREGID
749
750/* Define if you have the `setresgid' function. */
751#undef HAVE_SETRESGID 703#undef HAVE_SETRESGID
752 704
753/* Define if you have the `setresuid' function. */ 705/* Define to 1 if you have the `setreuid' function. */
754#undef HAVE_SETRESUID
755
756/* Define if you have the `setreuid' function. */
757#undef HAVE_SETREUID 706#undef HAVE_SETREUID
758 707
759/* Define if you have the `setrlimit' function. */ 708/* Define to 1 if you have the `setrlimit' function. */
760#undef HAVE_SETRLIMIT 709#undef HAVE_SETRLIMIT
761 710
762/* Define if you have the `setsid' function. */ 711/* Define to 1 if you have the `setsid' function. */
763#undef HAVE_SETSID 712#undef HAVE_SETSID
764 713
765/* Define if you have the `setutent' function. */ 714/* Define to 1 if you have the `setutent' function. */
766#undef HAVE_SETUTENT 715#undef HAVE_SETUTENT
767 716
768/* Define if you have the `setutxent' function. */ 717/* Define to 1 if you have the `setutxent' function. */
769#undef HAVE_SETUTXENT 718#undef HAVE_SETUTXENT
770 719
771/* Define if you have the `setvbuf' function. */ 720/* Define to 1 if you have the `setvbuf' function. */
772#undef HAVE_SETVBUF 721#undef HAVE_SETVBUF
773 722
774/* Define if you have the <shadow.h> header file. */ 723/* Define to 1 if you have the <shadow.h> header file. */
775#undef HAVE_SHADOW_H 724#undef HAVE_SHADOW_H
776 725
777/* Define if you have the `sigaction' function. */ 726/* Define to 1 if you have the `sigaction' function. */
778#undef HAVE_SIGACTION 727#undef HAVE_SIGACTION
779 728
780/* Define if you have the `sigvec' function. */ 729/* Define to 1 if you have the `sigvec' function. */
781#undef HAVE_SIGVEC 730#undef HAVE_SIGVEC
782 731
783/* Define if the system has the type `sig_atomic_t'. */ 732/* Define to 1 if the system has the type `sig_atomic_t'. */
784#undef HAVE_SIG_ATOMIC_T 733#undef HAVE_SIG_ATOMIC_T
785 734
786/* Define if you have the `snprintf' function. */ 735/* Define to 1 if you have the `snprintf' function. */
787#undef HAVE_SNPRINTF 736#undef HAVE_SNPRINTF
788 737
789/* Define if you have the `socketpair' function. */ 738/* Define to 1 if you have the `socketpair' function. */
790#undef HAVE_SOCKETPAIR 739#undef HAVE_SOCKETPAIR
791 740
792/* Define if you have the <stddef.h> header file. */ 741/* Define to 1 if you have the <stddef.h> header file. */
793#undef HAVE_STDDEF_H 742#undef HAVE_STDDEF_H
794 743
795/* Define if you have the <stdint.h> header file. */ 744/* Define to 1 if you have the <stdint.h> header file. */
796#undef HAVE_STDINT_H 745#undef HAVE_STDINT_H
797 746
798/* Define if you have the <stdlib.h> header file. */ 747/* Define to 1 if you have the <stdlib.h> header file. */
799#undef HAVE_STDLIB_H 748#undef HAVE_STDLIB_H
800 749
801/* Define if you have the `strerror' function. */ 750/* Define to 1 if you have the `strerror' function. */
802#undef HAVE_STRERROR 751#undef HAVE_STRERROR
803 752
804/* Define if you have the `strftime' function. */ 753/* Define to 1 if you have the `strftime' function. */
805#undef HAVE_STRFTIME 754#undef HAVE_STRFTIME
806 755
807/* Define if you have the <strings.h> header file. */ 756/* Define to 1 if you have the <strings.h> header file. */
808#undef HAVE_STRINGS_H 757#undef HAVE_STRINGS_H
809 758
810/* Define if you have the <string.h> header file. */ 759/* Define to 1 if you have the <string.h> header file. */
811#undef HAVE_STRING_H 760#undef HAVE_STRING_H
812 761
813/* Define if you have the `strlcat' function. */ 762/* Define to 1 if you have the `strlcat' function. */
814#undef HAVE_STRLCAT 763#undef HAVE_STRLCAT
815 764
816/* Define if you have the `strlcpy' function. */ 765/* Define to 1 if you have the `strlcpy' function. */
817#undef HAVE_STRLCPY 766#undef HAVE_STRLCPY
818 767
819/* Define if you have the `strmode' function. */ 768/* Define to 1 if you have the `strmode' function. */
820#undef HAVE_STRMODE 769#undef HAVE_STRMODE
821 770
822/* Define if you have the `strnvis' function. */ 771/* Define to 1 if you have the `strnvis' function. */
823#undef HAVE_STRNVIS 772#undef HAVE_STRNVIS
824 773
825/* Define if you have the `strsep' function. */ 774/* Define to 1 if you have the `strsep' function. */
826#undef HAVE_STRSEP 775#undef HAVE_STRSEP
827 776
828/* Define if `st_blksize' is member of `struct stat'. */ 777/* Define to 1 if `st_blksize' is member of `struct stat'. */
829#undef HAVE_STRUCT_STAT_ST_BLKSIZE 778#undef HAVE_STRUCT_STAT_ST_BLKSIZE
830 779
831/* Define if the system has the type `struct timespec'. */ 780/* Define to 1 if the system has the type `struct timespec'. */
832#undef HAVE_STRUCT_TIMESPEC 781#undef HAVE_STRUCT_TIMESPEC
833 782
834/* Define if you have the `sysconf' function. */ 783/* Define to 1 if you have the `sysconf' function. */
835#undef HAVE_SYSCONF 784#undef HAVE_SYSCONF
836 785
837/* Define if you have the <sys/audit.h> header file. */ 786/* Define to 1 if you have the <sys/bitypes.h> header file. */
838#undef HAVE_SYS_AUDIT_H
839
840/* Define if you have the <sys/bitypes.h> header file. */
841#undef HAVE_SYS_BITYPES_H 787#undef HAVE_SYS_BITYPES_H
842 788
843/* Define if you have the <sys/bsdtty.h> header file. */ 789/* Define to 1 if you have the <sys/bsdtty.h> header file. */
844#undef HAVE_SYS_BSDTTY_H 790#undef HAVE_SYS_BSDTTY_H
845 791
846/* Define if you have the <sys/cdefs.h> header file. */ 792/* Define to 1 if you have the <sys/cdefs.h> header file. */
847#undef HAVE_SYS_CDEFS_H 793#undef HAVE_SYS_CDEFS_H
848 794
849/* Define if you have the <sys/mman.h> header file. */ 795/* Define to 1 if you have the <sys/mman.h> header file. */
850#undef HAVE_SYS_MMAN_H 796#undef HAVE_SYS_MMAN_H
851 797
852/* Define if you have the <sys/pstat.h> header file. */ 798/* Define to 1 if you have the <sys/pstat.h> header file. */
853#undef HAVE_SYS_PSTAT_H 799#undef HAVE_SYS_PSTAT_H
854 800
855/* Define if you have the <sys/select.h> header file. */ 801/* Define to 1 if you have the <sys/select.h> header file. */
856#undef HAVE_SYS_SELECT_H 802#undef HAVE_SYS_SELECT_H
857 803
858/* Define if you have the <sys/stat.h> header file. */ 804/* Define to 1 if you have the <sys/stat.h> header file. */
859#undef HAVE_SYS_STAT_H 805#undef HAVE_SYS_STAT_H
860 806
861/* Define if you have the <sys/stropts.h> header file. */ 807/* Define to 1 if you have the <sys/stropts.h> header file. */
862#undef HAVE_SYS_STROPTS_H 808#undef HAVE_SYS_STROPTS_H
863 809
864/* Define if you have the <sys/strtio.h> header file. */ 810/* Define to 1 if you have the <sys/sysmacros.h> header file. */
865#undef HAVE_SYS_STRTIO_H
866
867/* Define if you have the <sys/sysmacros.h> header file. */
868#undef HAVE_SYS_SYSMACROS_H 811#undef HAVE_SYS_SYSMACROS_H
869 812
870/* Define if you have the <sys/timers.h> header file. */ 813/* Define to 1 if you have the <sys/timers.h> header file. */
871#undef HAVE_SYS_TIMERS_H 814#undef HAVE_SYS_TIMERS_H
872 815
873/* Define if you have the <sys/time.h> header file. */ 816/* Define to 1 if you have the <sys/time.h> header file. */
874#undef HAVE_SYS_TIME_H 817#undef HAVE_SYS_TIME_H
875 818
876/* Define if you have the <sys/types.h> header file. */ 819/* Define to 1 if you have the <sys/types.h> header file. */
877#undef HAVE_SYS_TYPES_H 820#undef HAVE_SYS_TYPES_H
878 821
879/* Define if you have the <sys/un.h> header file. */ 822/* Define to 1 if you have the <sys/un.h> header file. */
880#undef HAVE_SYS_UN_H 823#undef HAVE_SYS_UN_H
881 824
882/* Define if you have the `tcgetpgrp' function. */ 825/* Define to 1 if you have the `tcgetpgrp' function. */
883#undef HAVE_TCGETPGRP 826#undef HAVE_TCGETPGRP
884 827
885/* Define if you have the `tcsendbreak' function. */ 828/* Define to 1 if you have the `time' function. */
886#undef HAVE_TCSENDBREAK
887
888/* Define if you have the `time' function. */
889#undef HAVE_TIME 829#undef HAVE_TIME
890 830
891/* Define if you have the <time.h> header file. */ 831/* Define to 1 if you have the <time.h> header file. */
892#undef HAVE_TIME_H 832#undef HAVE_TIME_H
893 833
894/* Define if you have the <tmpdir.h> header file. */ 834/* Define to 1 if you have the <tmpdir.h> header file. */
895#undef HAVE_TMPDIR_H 835#undef HAVE_TMPDIR_H
896 836
897/* Define if you have the `truncate' function. */ 837/* Define to 1 if you have the `truncate' function. */
898#undef HAVE_TRUNCATE 838#undef HAVE_TRUNCATE
899 839
900/* Define if you have the <ttyent.h> header file. */ 840/* Define to 1 if you have the <ttyent.h> header file. */
901#undef HAVE_TTYENT_H 841#undef HAVE_TTYENT_H
902 842
903/* Define if you have the <unistd.h> header file. */ 843/* Define to 1 if you have the <unistd.h> header file. */
904#undef HAVE_UNISTD_H 844#undef HAVE_UNISTD_H
905 845
906/* Define if you have the `updwtmp' function. */ 846/* Define to 1 if you have the `updwtmp' function. */
907#undef HAVE_UPDWTMP 847#undef HAVE_UPDWTMP
908 848
909/* Define if you have the <usersec.h> header file. */ 849/* Define to 1 if you have the <usersec.h> header file. */
910#undef HAVE_USERSEC_H 850#undef HAVE_USERSEC_H
911 851
912/* Define if you have the <util.h> header file. */ 852/* Define to 1 if you have the <util.h> header file. */
913#undef HAVE_UTIL_H 853#undef HAVE_UTIL_H
914 854
915/* Define if you have the `utimes' function. */ 855/* Define to 1 if you have the `utimes' function. */
916#undef HAVE_UTIMES 856#undef HAVE_UTIMES
917 857
918/* Define if you have the <utime.h> header file. */ 858/* Define to 1 if you have the <utime.h> header file. */
919#undef HAVE_UTIME_H 859#undef HAVE_UTIME_H
920 860
921/* Define if you have the `utmpname' function. */ 861/* Define to 1 if you have the `utmpname' function. */
922#undef HAVE_UTMPNAME 862#undef HAVE_UTMPNAME
923 863
924/* Define if you have the `utmpxname' function. */ 864/* Define to 1 if you have the `utmpxname' function. */
925#undef HAVE_UTMPXNAME 865#undef HAVE_UTMPXNAME
926 866
927/* Define if you have the <utmpx.h> header file. */ 867/* Define to 1 if you have the <utmpx.h> header file. */
928#undef HAVE_UTMPX_H 868#undef HAVE_UTMPX_H
929 869
930/* Define if you have the <utmp.h> header file. */ 870/* Define to 1 if you have the <utmp.h> header file. */
931#undef HAVE_UTMP_H 871#undef HAVE_UTMP_H
932 872
933/* Define if you have the `vhangup' function. */ 873/* Define to 1 if you have the `vhangup' function. */
934#undef HAVE_VHANGUP 874#undef HAVE_VHANGUP
935 875
936/* Define if you have the `vsnprintf' function. */ 876/* Define to 1 if you have the `vsnprintf' function. */
937#undef HAVE_VSNPRINTF 877#undef HAVE_VSNPRINTF
938 878
939/* Define if you have the `waitpid' function. */ 879/* Define to 1 if you have the `waitpid' function. */
940#undef HAVE_WAITPID 880#undef HAVE_WAITPID
941 881
942/* Define if you have the `_getlong' function. */ 882/* Define to 1 if you have the `_getpty' function. */
943#undef HAVE__GETLONG
944
945/* Define if you have the `_getpty' function. */
946#undef HAVE__GETPTY 883#undef HAVE__GETPTY
947 884
948/* Define if you have the `_getshort' function. */ 885/* Define to 1 if you have the `__b64_ntop' function. */
949#undef HAVE__GETSHORT
950
951/* Define if you have the `__b64_ntop' function. */
952#undef HAVE___B64_NTOP 886#undef HAVE___B64_NTOP
953 887
954/* Define if you have the `__b64_pton' function. */ 888/* Define to 1 if you have the `__b64_pton' function. */
955#undef HAVE___B64_PTON 889#undef HAVE___B64_PTON
956 890
891/* Define to the address where bug reports for this package should be sent. */
892#undef PACKAGE_BUGREPORT
893
894/* Define to the full name of this package. */
895#undef PACKAGE_NAME
896
897/* Define to the full name and version of this package. */
898#undef PACKAGE_STRING
899
900/* Define to the one symbol short name of this package. */
901#undef PACKAGE_TARNAME
902
903/* Define to the version of this package. */
904#undef PACKAGE_VERSION
905
957/* The size of a `char', as computed by sizeof. */ 906/* The size of a `char', as computed by sizeof. */
958#undef SIZEOF_CHAR 907#undef SIZEOF_CHAR
959 908
@@ -969,11 +918,11 @@
969/* The size of a `short int', as computed by sizeof. */ 918/* The size of a `short int', as computed by sizeof. */
970#undef SIZEOF_SHORT_INT 919#undef SIZEOF_SHORT_INT
971 920
972/* Define if you have the ANSI C header files. */ 921/* Define to 1 if you have the ANSI C header files. */
973#undef STDC_HEADERS 922#undef STDC_HEADERS
974 923
975/* Define if your processor stores words with the most significant byte first 924/* Define to 1 if your processor stores words with the most significant byte
976 (like Motorola and SPARC, unlike Intel and VAX). */ 925 first (like Motorola and SPARC, unlike Intel and VAX). */
977#undef WORDS_BIGENDIAN 926#undef WORDS_BIGENDIAN
978 927
979/* Number of bits in a file offset, on hosts where this is settable. */ 928/* Number of bits in a file offset, on hosts where this is settable. */
diff --git a/configure b/configure
index 096c51af7..ceeb5b013 100755
--- a/configure
+++ b/configure
@@ -1,12 +1,81 @@
1#! /bin/sh 1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles. 2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52. 3# Generated by GNU Autoconf 2.57.
4# 4#
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
6# Free Software Foundation, Inc. 6# Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation 7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it. 8# gives unlimited permission to copy, distribute and modify it.
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
9 12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
20elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
23
24# Support unset when possible.
25if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26 as_unset=unset
27else
28 as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42 LC_TELEPHONE LC_TIME
43do
44 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
45 eval $as_var=C; export $as_var
46 else
47 $as_unset $as_var
48 fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53 as_expr=expr
54else
55 as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59 as_basename=basename
60else
61 as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68 X"$0" : 'X\(//\)$' \| \
69 X"$0" : 'X\(/\)$' \| \
70 . : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73 /^X\/\(\/\/\)$/{ s//\1/; q; }
74 /^X\/\(\/\).*/{ s//\1/; q; }
75 s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
10# Avoid depending upon Character Ranges. 79# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz' 80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -14,22 +83,113 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789' 83as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits 84as_cr_alnum=$as_cr_Letters$as_cr_digits
16 85
17# Sed expression to map a string onto a valid variable name. 86# The user is always right.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" 87if test "${PATH_SEPARATOR+set}" != set; then
88 echo "#! /bin/sh" >conf$$.sh
89 echo "exit 0" >>conf$$.sh
90 chmod +x conf$$.sh
91 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92 PATH_SEPARATOR=';'
93 else
94 PATH_SEPARATOR=:
95 fi
96 rm -f conf$$.sh
97fi
19 98
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22 99
23# Be Bourne compatible 100 as_lineno_1=$LINENO
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 101 as_lineno_2=$LINENO
25 emulate sh 102 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
26 NULLCMD=: 103 test "x$as_lineno_1" != "x$as_lineno_2" &&
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 104 test "x$as_lineno_3" = "x$as_lineno_2" || {
28 set -o posix 105 # Find who we are. Look in the path if we contain no path at all
29fi 106 # relative or not.
107 case $0 in
108 *[\\/]* ) as_myself=$0 ;;
109 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112 IFS=$as_save_IFS
113 test -z "$as_dir" && as_dir=.
114 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
30 116
31# Name of the executable. 117 ;;
32as_me=`echo "$0" |sed 's,.*[\\/],,'` 118 esac
119 # We did not find ourselves, most probably we were run as `sh COMMAND'
120 # in which case we are not to be found in the path.
121 if test "x$as_myself" = x; then
122 as_myself=$0
123 fi
124 if test ! -f "$as_myself"; then
125 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126 { (exit 1); exit 1; }; }
127 fi
128 case $CONFIG_SHELL in
129 '')
130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133 IFS=$as_save_IFS
134 test -z "$as_dir" && as_dir=.
135 for as_base in sh bash ksh sh5; do
136 case $as_dir in
137 /*)
138 if ("$as_dir/$as_base" -c '
139 as_lineno_1=$LINENO
140 as_lineno_2=$LINENO
141 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142 test "x$as_lineno_1" != "x$as_lineno_2" &&
143 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
144 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146 CONFIG_SHELL=$as_dir/$as_base
147 export CONFIG_SHELL
148 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149 fi;;
150 esac
151 done
152done
153;;
154 esac
155
156 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157 # uniformly replaced by the line number. The first 'sed' inserts a
158 # line-number line before each line; the second 'sed' does the real
159 # work. The second script uses 'N' to pair each line-number line
160 # with the numbered line, and appends trailing '-' during
161 # substitution so that $LINENO is not a special case at line end.
162 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
164 sed '=' <$as_myself |
165 sed '
166 N
167 s,$,-,
168 : loop
169 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170 t loop
171 s,-$,,
172 s,^['$as_cr_digits']*\n,,
173 ' >$as_me.lineno &&
174 chmod +x $as_me.lineno ||
175 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176 { (exit 1); exit 1; }; }
177
178 # Don't try to exec as it changes $[0], causing all sort of problems
179 # (the dirname of $[0] is not the place where we might find the
180 # original and so on. Autoconf is especially sensible to this).
181 . ./$as_me.lineno
182 # Exit status is that of the last command.
183 exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188 *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T=' ' ;;
190 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
33 193
34if expr a : '\(a\)' >/dev/null 2>&1; then 194if expr a : '\(a\)' >/dev/null 2>&1; then
35 as_expr=expr 195 as_expr=expr
@@ -55,24 +215,20 @@ else
55fi 215fi
56rm -f conf$$ conf$$.exe conf$$.file 216rm -f conf$$ conf$$.exe conf$$.file
57 217
58as_executable_p="test -f" 218if mkdir -p . 2>/dev/null; then
59 219 as_mkdir_p=:
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62 as_unset=unset
63else 220else
64 as_unset=false 221 as_mkdir_p=false
65fi 222fi
66 223
67# NLS nuisances. 224as_executable_p="test -f"
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } 225
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } 226# Sed expression to map a string onto a valid CPP name.
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } 227as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } 228
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } 229# Sed expression to map a string onto a valid variable name.
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } 230as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } 231
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76 232
77# IFS 233# IFS
78# We need space, tab and new line, in precisely that order. 234# We need space, tab and new line, in precisely that order.
@@ -81,7 +237,8 @@ as_nl='
81IFS=" $as_nl" 237IFS=" $as_nl"
82 238
83# CDPATH. 239# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } 240$as_unset CDPATH
241
85 242
86# Name of the host. 243# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, 244# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -94,9 +251,11 @@ exec 6>&1
94# Initializations. 251# Initializations.
95# 252#
96ac_default_prefix=/usr/local 253ac_default_prefix=/usr/local
254ac_config_libobj_dir=.
97cross_compiling=no 255cross_compiling=no
98subdirs= 256subdirs=
99MFLAGS= MAKEFLAGS= 257MFLAGS=
258MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh} 259SHELL=${CONFIG_SHELL-/bin/sh}
101 260
102# Maximum number of lines to put in a shell here document. 261# Maximum number of lines to put in a shell here document.
@@ -104,6 +263,13 @@ SHELL=${CONFIG_SHELL-/bin/sh}
104# only ac_max_sed_lines should be used. 263# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38} 264: ${ac_max_here_lines=38}
106 265
266# Identity of this package.
267PACKAGE_NAME=
268PACKAGE_TARNAME=
269PACKAGE_VERSION=
270PACKAGE_STRING=
271PACKAGE_BUGREPORT=
272
107ac_unique_file="ssh.c" 273ac_unique_file="ssh.c"
108# Factoring default headers for most tests. 274# Factoring default headers for most tests.
109ac_includes_default="\ 275ac_includes_default="\
@@ -142,6 +308,9 @@ ac_includes_default="\
142# include <unistd.h> 308# include <unistd.h>
143#endif" 309#endif"
144 310
311ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR PERL SED ENT TEST_MINUS_S_SH SH LOGIN_PROGRAM_FALLBACK LD EGREP LIBWRAP LIBPAM INSTALL_SSH_RAND_HELPER SSH_PRIVSEP_USER PROG_LS PROG_NETSTAT PROG_ARP PROG_IFCONFIG PROG_JSTAT PROG_PS PROG_SAR PROG_W PROG_WHO PROG_LAST PROG_LASTLOG PROG_DF PROG_VMSTAT PROG_UPTIME PROG_IPCS PROG_TAIL INSTALL_SSH_PRNG_CMDS OPENSC_CONFIG PRIVSEP_PATH xauth_path STRIP_OPT XAUTH_PATH NROFF MANTYPE mansubdir user_path piddir LIBOBJS LTLIBOBJS'
312ac_subst_files=''
313
145# Initialize some variables set by options. 314# Initialize some variables set by options.
146ac_init_help= 315ac_init_help=
147ac_init_version=false 316ac_init_version=false
@@ -180,13 +349,6 @@ oldincludedir='/usr/include'
180infodir='${prefix}/info' 349infodir='${prefix}/info'
181mandir='${prefix}/man' 350mandir='${prefix}/man'
182 351
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
189
190ac_prev= 352ac_prev=
191for ac_option 353for ac_option
192do 354do
@@ -319,7 +481,7 @@ do
319 with_fp=no ;; 481 with_fp=no ;;
320 482
321 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 483 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322 | --no-cr | --no-c) 484 | --no-cr | --no-c | -n)
323 no_create=yes ;; 485 no_create=yes ;;
324 486
325 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -498,7 +660,7 @@ do
498 eval ac_val=$`echo $ac_var` 660 eval ac_val=$`echo $ac_var`
499 case $ac_val in 661 case $ac_val in
500 [\\/$]* | ?:[\\/]* | NONE | '' ) ;; 662 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 663 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
502 { (exit 1); exit 1; }; };; 664 { (exit 1); exit 1; }; };;
503 esac 665 esac
504done 666done
@@ -510,18 +672,19 @@ do
510 eval ac_val=$`echo $ac_var` 672 eval ac_val=$`echo $ac_var`
511 case $ac_val in 673 case $ac_val in
512 [\\/$]* | ?:[\\/]* ) ;; 674 [\\/$]* | ?:[\\/]* ) ;;
513 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 675 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
514 { (exit 1); exit 1; }; };; 676 { (exit 1); exit 1; }; };;
515 esac 677 esac
516done 678done
517 679
518# There might be people who depend on the old broken behavior: `$host' 680# There might be people who depend on the old broken behavior: `$host'
519# used to hold the argument of --host etc. 681# used to hold the argument of --host etc.
682# FIXME: To remove some day.
520build=$build_alias 683build=$build_alias
521host=$host_alias 684host=$host_alias
522target=$target_alias 685target=$target_alias
523 686
524# FIXME: should be removed in autoconf 3.0. 687# FIXME: To remove some day.
525if test "x$host_alias" != x; then 688if test "x$host_alias" != x; then
526 if test "x$build_alias" = x; then 689 if test "x$build_alias" = x; then
527 cross_compiling=maybe 690 cross_compiling=maybe
@@ -537,13 +700,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
537 700
538test "$silent" = yes && exec 6>/dev/null 701test "$silent" = yes && exec 6>/dev/null
539 702
703
540# Find the source files, if location was not specified. 704# Find the source files, if location was not specified.
541if test -z "$srcdir"; then 705if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes 706 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent. 707 # Try the directory containing this script, then its parent.
544 ac_prog=$0 708 ac_confdir=`(dirname "$0") 2>/dev/null ||
545 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` 709$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 710 X"$0" : 'X\(//\)[^/]' \| \
711 X"$0" : 'X\(//\)$' \| \
712 X"$0" : 'X\(/\)' \| \
713 . : '\(.\)' 2>/dev/null ||
714echo X"$0" |
715 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
716 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
717 /^X\(\/\/\)$/{ s//\1/; q; }
718 /^X\(\/\).*/{ s//\1/; q; }
719 s/.*/./; q'`
547 srcdir=$ac_confdir 720 srcdir=$ac_confdir
548 if test ! -r $srcdir/$ac_unique_file; then 721 if test ! -r $srcdir/$ac_unique_file; then
549 srcdir=.. 722 srcdir=..
@@ -553,13 +726,16 @@ else
553fi 726fi
554if test ! -r $srcdir/$ac_unique_file; then 727if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then 728 if test "$ac_srcdir_defaulted" = yes; then
556 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 729 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
557 { (exit 1); exit 1; }; } 730 { (exit 1); exit 1; }; }
558 else 731 else
559 { echo "$as_me: error: cannot find sources in $srcdir" >&2 732 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
560 { (exit 1); exit 1; }; } 733 { (exit 1); exit 1; }; }
561 fi 734 fi
562fi 735fi
736(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
737 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
738 { (exit 1); exit 1; }; }
563srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` 739srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564ac_env_build_alias_set=${build_alias+set} 740ac_env_build_alias_set=${build_alias+set}
565ac_env_build_alias_value=$build_alias 741ac_env_build_alias_value=$build_alias
@@ -600,7 +776,7 @@ ac_cv_env_CPP_value=$CPP
600if test "$ac_init_help" = "long"; then 776if test "$ac_init_help" = "long"; then
601 # Omit some internal or obsolete options to make the list less imposing. 777 # Omit some internal or obsolete options to make the list less imposing.
602 # This message is too long to be a string in the A/UX 3.1 sh. 778 # This message is too long to be a string in the A/UX 3.1 sh.
603 cat <<EOF 779 cat <<_ACEOF
604\`configure' configures this package to adapt to many kinds of systems. 780\`configure' configures this package to adapt to many kinds of systems.
605 781
606Usage: $0 [OPTION]... [VAR=VALUE]... 782Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -621,9 +797,9 @@ Configuration:
621 -n, --no-create do not create output files 797 -n, --no-create do not create output files
622 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 798 --srcdir=DIR find the sources in DIR [configure dir or \`..']
623 799
624EOF 800_ACEOF
625 801
626 cat <<EOF 802 cat <<_ACEOF
627Installation directories: 803Installation directories:
628 --prefix=PREFIX install architecture-independent files in PREFIX 804 --prefix=PREFIX install architecture-independent files in PREFIX
629 [$ac_default_prefix] 805 [$ac_default_prefix]
@@ -650,19 +826,19 @@ Fine tuning of the installation directories:
650 --oldincludedir=DIR C header files for non-gcc [/usr/include] 826 --oldincludedir=DIR C header files for non-gcc [/usr/include]
651 --infodir=DIR info documentation [PREFIX/info] 827 --infodir=DIR info documentation [PREFIX/info]
652 --mandir=DIR man documentation [PREFIX/man] 828 --mandir=DIR man documentation [PREFIX/man]
653EOF 829_ACEOF
654 830
655 cat <<\EOF 831 cat <<\_ACEOF
656 832
657System types: 833System types:
658 --build=BUILD configure for building on BUILD [guessed] 834 --build=BUILD configure for building on BUILD [guessed]
659 --host=HOST build programs to run on HOST [BUILD] 835 --host=HOST cross-compile to build programs to run on HOST [BUILD]
660EOF 836_ACEOF
661fi 837fi
662 838
663if test -n "$ac_init_help"; then 839if test -n "$ac_init_help"; then
664 840
665 cat <<\EOF 841 cat <<\_ACEOF
666 842
667Optional Features: 843Optional Features:
668 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 844 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
@@ -701,8 +877,9 @@ Optional Packages:
701 --with-privsep-user=user Specify non-privileged user for privilege separation 877 --with-privsep-user=user Specify non-privileged user for privilege separation
702 --with-sectok Enable smartcard support using libsectok 878 --with-sectok Enable smartcard support using libsectok
703 --with-opensc=PFX Enable smartcard support using OpenSC 879 --with-opensc=PFX Enable smartcard support using OpenSC
704 --with-dns Support for fetching keys from DNS (experimental)
705 --with-kerberos5=PATH Enable Kerberos 5 support 880 --with-kerberos5=PATH Enable Kerberos 5 support
881 --with-kerberos4=PATH Enable Kerberos 4 support
882 --with-afs=PATH Enable AFS support
706 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty) 883 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
707 --with-xauth=PATH Specify path to xauth program 884 --with-xauth=PATH Specify path to xauth program
708 --with-mantype=man|cat|doc Set man page type 885 --with-mantype=man|cat|doc Set man page type
@@ -711,6 +888,7 @@ Optional Packages:
711 --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY 888 --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY
712 --with-default-path= Specify default \$PATH environment for server 889 --with-default-path= Specify default \$PATH environment for server
713 --with-superuser-path= Specify different path for super-user 890 --with-superuser-path= Specify different path for super-user
891 --with-ipv4-default Use IPv4 by connections unless '-6' specified
714 --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses 892 --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses
715 --with-bsd-auth Enable BSD auth support 893 --with-bsd-auth Enable BSD auth support
716 --with-pid-dir=PATH Specify location of ssh.pid file 894 --with-pid-dir=PATH Specify location of ssh.pid file
@@ -728,40 +906,60 @@ Some influential environment variables:
728Use these variables to override the choices made by `configure' or to help 906Use these variables to override the choices made by `configure' or to help
729it to find libraries and programs with nonstandard names/locations. 907it to find libraries and programs with nonstandard names/locations.
730 908
731EOF 909_ACEOF
732fi 910fi
733 911
734if test "$ac_init_help" = "recursive"; then 912if test "$ac_init_help" = "recursive"; then
735 # If there are subdirs, report their specific --help. 913 # If there are subdirs, report their specific --help.
736 ac_popdir=`pwd` 914 ac_popdir=`pwd`
737 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue 915 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
738 cd $ac_subdir 916 test -d $ac_dir || continue
739 # A "../" for each directory in /$ac_subdir. 917 ac_builddir=.
740 ac_dots=`echo $ac_subdir | 918
741 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` 919if test "$ac_dir" != .; then
742 920 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
743 case $srcdir in 921 # A "../" for each directory in $ac_dir_suffix.
744 .) # No --srcdir option. We are building in place. 922 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
745 ac_sub_srcdir=$srcdir ;; 923else
746 [\\/]* | ?:[\\/]* ) # Absolute path. 924 ac_dir_suffix= ac_top_builddir=
747 ac_sub_srcdir=$srcdir/$ac_subdir ;; 925fi
748 *) # Relative path.
749 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
750 esac
751 926
927case $srcdir in
928 .) # No --srcdir option. We are building in place.
929 ac_srcdir=.
930 if test -z "$ac_top_builddir"; then
931 ac_top_srcdir=.
932 else
933 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
934 fi ;;
935 [\\/]* | ?:[\\/]* ) # Absolute path.
936 ac_srcdir=$srcdir$ac_dir_suffix;
937 ac_top_srcdir=$srcdir ;;
938 *) # Relative path.
939 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
940 ac_top_srcdir=$ac_top_builddir$srcdir ;;
941esac
942# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
943# absolute.
944ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
945ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
946ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
947ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
948
949 cd $ac_dir
752 # Check for guested configure; otherwise get Cygnus style configure. 950 # Check for guested configure; otherwise get Cygnus style configure.
753 if test -f $ac_sub_srcdir/configure.gnu; then 951 if test -f $ac_srcdir/configure.gnu; then
754 echo 952 echo
755 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive 953 $SHELL $ac_srcdir/configure.gnu --help=recursive
756 elif test -f $ac_sub_srcdir/configure; then 954 elif test -f $ac_srcdir/configure; then
757 echo 955 echo
758 $SHELL $ac_sub_srcdir/configure --help=recursive 956 $SHELL $ac_srcdir/configure --help=recursive
759 elif test -f $ac_sub_srcdir/configure.ac || 957 elif test -f $ac_srcdir/configure.ac ||
760 test -f $ac_sub_srcdir/configure.in; then 958 test -f $ac_srcdir/configure.in; then
761 echo 959 echo
762 $ac_configure --help 960 $ac_configure --help
763 else 961 else
764 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 962 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
765 fi 963 fi
766 cd $ac_popdir 964 cd $ac_popdir
767 done 965 done
@@ -769,31 +967,31 @@ fi
769 967
770test -n "$ac_init_help" && exit 0 968test -n "$ac_init_help" && exit 0
771if $ac_init_version; then 969if $ac_init_version; then
772 cat <<\EOF 970 cat <<\_ACEOF
773 971
774Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 972Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
775Free Software Foundation, Inc. 973Free Software Foundation, Inc.
776This configure script is free software; the Free Software Foundation 974This configure script is free software; the Free Software Foundation
777gives unlimited permission to copy, distribute and modify it. 975gives unlimited permission to copy, distribute and modify it.
778EOF 976_ACEOF
779 exit 0 977 exit 0
780fi 978fi
781exec 5>config.log 979exec 5>config.log
782cat >&5 <<EOF 980cat >&5 <<_ACEOF
783This file contains any messages produced by compilers while 981This file contains any messages produced by compilers while
784running configure, to aid debugging if configure makes a mistake. 982running configure, to aid debugging if configure makes a mistake.
785 983
786It was created by $as_me, which was 984It was created by $as_me, which was
787generated by GNU Autoconf 2.52. Invocation command line was 985generated by GNU Autoconf 2.57. Invocation command line was
788 986
789 $ $0 $@ 987 $ $0 $@
790 988
791EOF 989_ACEOF
792{ 990{
793cat <<_ASUNAME 991cat <<_ASUNAME
794## ---------- ## 992## --------- ##
795## Platform. ## 993## Platform. ##
796## ---------- ## 994## --------- ##
797 995
798hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 996hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
799uname -m = `(uname -m) 2>/dev/null || echo unknown` 997uname -m = `(uname -m) 2>/dev/null || echo unknown`
@@ -812,51 +1010,96 @@ hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
812/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1010/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
813/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1011/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
814 1012
815PATH = $PATH
816
817_ASUNAME 1013_ASUNAME
1014
1015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1016for as_dir in $PATH
1017do
1018 IFS=$as_save_IFS
1019 test -z "$as_dir" && as_dir=.
1020 echo "PATH: $as_dir"
1021done
1022
818} >&5 1023} >&5
819 1024
820cat >&5 <<EOF 1025cat >&5 <<_ACEOF
821## ------------ ## 1026
822## Core tests. ## 1027
823## ------------ ## 1028## ----------- ##
1029## Core tests. ##
1030## ----------- ##
1031
1032_ACEOF
824 1033
825EOF
826 1034
827# Keep a trace of the command line. 1035# Keep a trace of the command line.
828# Strip out --no-create and --no-recursion so they do not pile up. 1036# Strip out --no-create and --no-recursion so they do not pile up.
1037# Strip out --silent because we don't want to record it for future runs.
829# Also quote any args containing shell meta-characters. 1038# Also quote any args containing shell meta-characters.
1039# Make two passes to allow for proper duplicate-argument suppression.
830ac_configure_args= 1040ac_configure_args=
1041ac_configure_args0=
1042ac_configure_args1=
831ac_sep= 1043ac_sep=
832for ac_arg 1044ac_must_keep_next=false
1045for ac_pass in 1 2
833do 1046do
834 case $ac_arg in 1047 for ac_arg
835 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 1048 do
836 | --no-cr | --no-c) ;; 1049 case $ac_arg in
837 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 1050 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
838 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 1051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
839 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) 1052 | -silent | --silent | --silen | --sile | --sil)
840 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` 1053 continue ;;
841 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" 1054 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
842 ac_sep=" " ;; 1055 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
843 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" 1056 esac
844 ac_sep=" " ;; 1057 case $ac_pass in
845 esac 1058 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
846 # Get rid of the leading space. 1059 2)
1060 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1061 if test $ac_must_keep_next = true; then
1062 ac_must_keep_next=false # Got value, back to normal.
1063 else
1064 case $ac_arg in
1065 *=* | --config-cache | -C | -disable-* | --disable-* \
1066 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1067 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1068 | -with-* | --with-* | -without-* | --without-* | --x)
1069 case "$ac_configure_args0 " in
1070 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1071 esac
1072 ;;
1073 -* ) ac_must_keep_next=true ;;
1074 esac
1075 fi
1076 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1077 # Get rid of the leading space.
1078 ac_sep=" "
1079 ;;
1080 esac
1081 done
847done 1082done
1083$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1084$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
848 1085
849# When interrupted or exit'd, cleanup temporary files, and complete 1086# When interrupted or exit'd, cleanup temporary files, and complete
850# config.log. We remove comments because anyway the quotes in there 1087# config.log. We remove comments because anyway the quotes in there
851# would cause problems or look ugly. 1088# would cause problems or look ugly.
1089# WARNING: Be sure not to use single quotes in there, as some shells,
1090# such as our DU 5.0 friend, will then `close' the trap.
852trap 'exit_status=$? 1091trap 'exit_status=$?
853 # Save into config.log some information that might help in debugging. 1092 # Save into config.log some information that might help in debugging.
854 echo >&5 1093 {
855 echo "## ----------------- ##" >&5 1094 echo
856 echo "## Cache variables. ##" >&5 1095
857 echo "## ----------------- ##" >&5 1096 cat <<\_ASBOX
858 echo >&5 1097## ---------------- ##
859 # The following way of writing the cache mishandles newlines in values, 1098## Cache variables. ##
1099## ---------------- ##
1100_ASBOX
1101 echo
1102 # The following way of writing the cache mishandles newlines in values,
860{ 1103{
861 (set) 2>&1 | 1104 (set) 2>&1 |
862 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in 1105 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
@@ -870,21 +1113,53 @@ trap 'exit_status=$?
870 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" 1113 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
871 ;; 1114 ;;
872 esac; 1115 esac;
873} >&5 1116}
874 sed "/^$/d" confdefs.h >conftest.log 1117 echo
875 if test -s conftest.log; then 1118
876 echo >&5 1119 cat <<\_ASBOX
877 echo "## ------------ ##" >&5 1120## ----------------- ##
878 echo "## confdefs.h. ##" >&5 1121## Output variables. ##
879 echo "## ------------ ##" >&5 1122## ----------------- ##
880 echo >&5 1123_ASBOX
881 cat conftest.log >&5 1124 echo
882 fi 1125 for ac_var in $ac_subst_vars
883 (echo; echo) >&5 1126 do
884 test "$ac_signal" != 0 && 1127 eval ac_val=$`echo $ac_var`
885 echo "$as_me: caught signal $ac_signal" >&5 1128 echo "$ac_var='"'"'$ac_val'"'"'"
886 echo "$as_me: exit $exit_status" >&5 1129 done | sort
887 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && 1130 echo
1131
1132 if test -n "$ac_subst_files"; then
1133 cat <<\_ASBOX
1134## ------------- ##
1135## Output files. ##
1136## ------------- ##
1137_ASBOX
1138 echo
1139 for ac_var in $ac_subst_files
1140 do
1141 eval ac_val=$`echo $ac_var`
1142 echo "$ac_var='"'"'$ac_val'"'"'"
1143 done | sort
1144 echo
1145 fi
1146
1147 if test -s confdefs.h; then
1148 cat <<\_ASBOX
1149## ----------- ##
1150## confdefs.h. ##
1151## ----------- ##
1152_ASBOX
1153 echo
1154 sed "/^$/d" confdefs.h | sort
1155 echo
1156 fi
1157 test "$ac_signal" != 0 &&
1158 echo "$as_me: caught signal $ac_signal"
1159 echo "$as_me: exit $exit_status"
1160 } >&5
1161 rm -f core core.* *.core &&
1162 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
888 exit $exit_status 1163 exit $exit_status
889 ' 0 1164 ' 0
890for ac_signal in 1 2 13 15; do 1165for ac_signal in 1 2 13 15; do
@@ -897,6 +1172,33 @@ rm -rf conftest* confdefs.h
897# AIX cpp loses on an empty file, so make sure it contains at least a newline. 1172# AIX cpp loses on an empty file, so make sure it contains at least a newline.
898echo >confdefs.h 1173echo >confdefs.h
899 1174
1175# Predefined preprocessor variables.
1176
1177cat >>confdefs.h <<_ACEOF
1178#define PACKAGE_NAME "$PACKAGE_NAME"
1179_ACEOF
1180
1181
1182cat >>confdefs.h <<_ACEOF
1183#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1184_ACEOF
1185
1186
1187cat >>confdefs.h <<_ACEOF
1188#define PACKAGE_VERSION "$PACKAGE_VERSION"
1189_ACEOF
1190
1191
1192cat >>confdefs.h <<_ACEOF
1193#define PACKAGE_STRING "$PACKAGE_STRING"
1194_ACEOF
1195
1196
1197cat >>confdefs.h <<_ACEOF
1198#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1199_ACEOF
1200
1201
900# Let the site file select an alternate cache file if it wants to. 1202# Let the site file select an alternate cache file if it wants to.
901# Prefer explicitly selected file to automatically selected ones. 1203# Prefer explicitly selected file to automatically selected ones.
902if test -z "$CONFIG_SITE"; then 1204if test -z "$CONFIG_SITE"; then
@@ -908,9 +1210,9 @@ if test -z "$CONFIG_SITE"; then
908fi 1210fi
909for ac_site_file in $CONFIG_SITE; do 1211for ac_site_file in $CONFIG_SITE; do
910 if test -r "$ac_site_file"; then 1212 if test -r "$ac_site_file"; then
911 { echo "$as_me:911: loading site script $ac_site_file" >&5 1213 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
912echo "$as_me: loading site script $ac_site_file" >&6;} 1214echo "$as_me: loading site script $ac_site_file" >&6;}
913 cat "$ac_site_file" >&5 1215 sed 's/^/| /' "$ac_site_file" >&5
914 . "$ac_site_file" 1216 . "$ac_site_file"
915 fi 1217 fi
916done 1218done
@@ -919,7 +1221,7 @@ if test -r "$cache_file"; then
919 # Some versions of bash will fail to source /dev/null (special 1221 # Some versions of bash will fail to source /dev/null (special
920 # files actually), so we avoid doing that. 1222 # files actually), so we avoid doing that.
921 if test -f "$cache_file"; then 1223 if test -f "$cache_file"; then
922 { echo "$as_me:922: loading cache $cache_file" >&5 1224 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
923echo "$as_me: loading cache $cache_file" >&6;} 1225echo "$as_me: loading cache $cache_file" >&6;}
924 case $cache_file in 1226 case $cache_file in
925 [\\/]* | ?:[\\/]* ) . $cache_file;; 1227 [\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -927,7 +1229,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
927 esac 1229 esac
928 fi 1230 fi
929else 1231else
930 { echo "$as_me:930: creating cache $cache_file" >&5 1232 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
931echo "$as_me: creating cache $cache_file" >&6;} 1233echo "$as_me: creating cache $cache_file" >&6;}
932 >$cache_file 1234 >$cache_file
933fi 1235fi
@@ -943,42 +1245,42 @@ for ac_var in `(set) 2>&1 |
943 eval ac_new_val="\$ac_env_${ac_var}_value" 1245 eval ac_new_val="\$ac_env_${ac_var}_value"
944 case $ac_old_set,$ac_new_set in 1246 case $ac_old_set,$ac_new_set in
945 set,) 1247 set,)
946 { echo "$as_me:946: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1248 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
947echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 1249echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
948 ac_cache_corrupted=: ;; 1250 ac_cache_corrupted=: ;;
949 ,set) 1251 ,set)
950 { echo "$as_me:950: error: \`$ac_var' was not set in the previous run" >&5 1252 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
951echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 1253echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
952 ac_cache_corrupted=: ;; 1254 ac_cache_corrupted=: ;;
953 ,);; 1255 ,);;
954 *) 1256 *)
955 if test "x$ac_old_val" != "x$ac_new_val"; then 1257 if test "x$ac_old_val" != "x$ac_new_val"; then
956 { echo "$as_me:956: error: \`$ac_var' has changed since the previous run:" >&5 1258 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
957echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 1259echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
958 { echo "$as_me:958: former value: $ac_old_val" >&5 1260 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
959echo "$as_me: former value: $ac_old_val" >&2;} 1261echo "$as_me: former value: $ac_old_val" >&2;}
960 { echo "$as_me:960: current value: $ac_new_val" >&5 1262 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
961echo "$as_me: current value: $ac_new_val" >&2;} 1263echo "$as_me: current value: $ac_new_val" >&2;}
962 ac_cache_corrupted=: 1264 ac_cache_corrupted=:
963 fi;; 1265 fi;;
964 esac 1266 esac
965 # Pass precious variables to config.status. It doesn't matter if 1267 # Pass precious variables to config.status.
966 # we pass some twice (in addition to the command line arguments).
967 if test "$ac_new_set" = set; then 1268 if test "$ac_new_set" = set; then
968 case $ac_new_val in 1269 case $ac_new_val in
969 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) 1270 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
970 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` 1271 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
971 ac_configure_args="$ac_configure_args '$ac_arg'" 1272 *) ac_arg=$ac_var=$ac_new_val ;;
972 ;; 1273 esac
973 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" 1274 case " $ac_configure_args " in
974 ;; 1275 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1276 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
975 esac 1277 esac
976 fi 1278 fi
977done 1279done
978if $ac_cache_corrupted; then 1280if $ac_cache_corrupted; then
979 { echo "$as_me:979: error: changes in the environment can compromise the build" >&5 1281 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
980echo "$as_me: error: changes in the environment can compromise the build" >&2;} 1282echo "$as_me: error: changes in the environment can compromise the build" >&2;}
981 { { echo "$as_me:981: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 1283 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
982echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} 1284echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
983 { (exit 1); exit 1; }; } 1285 { (exit 1); exit 1; }; }
984fi 1286fi
@@ -989,28 +1291,27 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
989ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
990ac_compiler_gnu=$ac_cv_c_compiler_gnu 1292ac_compiler_gnu=$ac_cv_c_compiler_gnu
991 1293
992case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
993 *c*,-n*) ECHO_N= ECHO_C='
994' ECHO_T=' ' ;;
995 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
996 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
997esac
998echo "#! $SHELL" >conftest.sh
999echo "exit 0" >>conftest.sh
1000chmod +x conftest.sh
1001if { (echo "$as_me:1001: PATH=\".;.\"; conftest.sh") >&5
1002 (PATH=".;."; conftest.sh) 2>&5
1003 ac_status=$?
1004 echo "$as_me:1004: \$? = $ac_status" >&5
1005 (exit $ac_status); }; then
1006 ac_path_separator=';'
1007else
1008 ac_path_separator=:
1009fi
1010PATH_SEPARATOR="$ac_path_separator"
1011rm -f conftest.sh
1012 1294
1013ac_config_headers="$ac_config_headers config.h" 1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314 ac_config_headers="$ac_config_headers config.h"
1014 1315
1015ac_ext=c 1316ac_ext=c
1016ac_cpp='$CPP $CPPFLAGS' 1317ac_cpp='$CPP $CPPFLAGS'
@@ -1020,7 +1321,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1020if test -n "$ac_tool_prefix"; then 1321if test -n "$ac_tool_prefix"; then
1021 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 1322 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1022set dummy ${ac_tool_prefix}gcc; ac_word=$2 1323set dummy ${ac_tool_prefix}gcc; ac_word=$2
1023echo "$as_me:1023: checking for $ac_word" >&5 1324echo "$as_me:$LINENO: checking for $ac_word" >&5
1024echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1025if test "${ac_cv_prog_CC+set}" = set; then 1326if test "${ac_cv_prog_CC+set}" = set; then
1026 echo $ECHO_N "(cached) $ECHO_C" >&6 1327 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1028,25 +1329,28 @@ else
1028 if test -n "$CC"; then 1329 if test -n "$CC"; then
1029 ac_cv_prog_CC="$CC" # Let the user override the test. 1330 ac_cv_prog_CC="$CC" # Let the user override the test.
1030else 1331else
1031 ac_save_IFS=$IFS; IFS=$ac_path_separator 1332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1032ac_dummy="$PATH" 1333for as_dir in $PATH
1033for ac_dir in $ac_dummy; do 1334do
1034 IFS=$ac_save_IFS 1335 IFS=$as_save_IFS
1035 test -z "$ac_dir" && ac_dir=. 1336 test -z "$as_dir" && as_dir=.
1036 $as_executable_p "$ac_dir/$ac_word" || continue 1337 for ac_exec_ext in '' $ac_executable_extensions; do
1037ac_cv_prog_CC="${ac_tool_prefix}gcc" 1338 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1038echo "$as_me:1038: found $ac_dir/$ac_word" >&5 1339 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1039break 1340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1341 break 2
1342 fi
1343done
1040done 1344done
1041 1345
1042fi 1346fi
1043fi 1347fi
1044CC=$ac_cv_prog_CC 1348CC=$ac_cv_prog_CC
1045if test -n "$CC"; then 1349if test -n "$CC"; then
1046 echo "$as_me:1046: result: $CC" >&5 1350 echo "$as_me:$LINENO: result: $CC" >&5
1047echo "${ECHO_T}$CC" >&6 1351echo "${ECHO_T}$CC" >&6
1048else 1352else
1049 echo "$as_me:1049: result: no" >&5 1353 echo "$as_me:$LINENO: result: no" >&5
1050echo "${ECHO_T}no" >&6 1354echo "${ECHO_T}no" >&6
1051fi 1355fi
1052 1356
@@ -1055,7 +1359,7 @@ if test -z "$ac_cv_prog_CC"; then
1055 ac_ct_CC=$CC 1359 ac_ct_CC=$CC
1056 # Extract the first word of "gcc", so it can be a program name with args. 1360 # Extract the first word of "gcc", so it can be a program name with args.
1057set dummy gcc; ac_word=$2 1361set dummy gcc; ac_word=$2
1058echo "$as_me:1058: checking for $ac_word" >&5 1362echo "$as_me:$LINENO: checking for $ac_word" >&5
1059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1060if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1364if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6 1365 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1063,25 +1367,28 @@ else
1063 if test -n "$ac_ct_CC"; then 1367 if test -n "$ac_ct_CC"; then
1064 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1368 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1065else 1369else
1066 ac_save_IFS=$IFS; IFS=$ac_path_separator 1370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1067ac_dummy="$PATH" 1371for as_dir in $PATH
1068for ac_dir in $ac_dummy; do 1372do
1069 IFS=$ac_save_IFS 1373 IFS=$as_save_IFS
1070 test -z "$ac_dir" && ac_dir=. 1374 test -z "$as_dir" && as_dir=.
1071 $as_executable_p "$ac_dir/$ac_word" || continue 1375 for ac_exec_ext in '' $ac_executable_extensions; do
1072ac_cv_prog_ac_ct_CC="gcc" 1376 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1073echo "$as_me:1073: found $ac_dir/$ac_word" >&5 1377 ac_cv_prog_ac_ct_CC="gcc"
1074break 1378 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1379 break 2
1380 fi
1381done
1075done 1382done
1076 1383
1077fi 1384fi
1078fi 1385fi
1079ac_ct_CC=$ac_cv_prog_ac_ct_CC 1386ac_ct_CC=$ac_cv_prog_ac_ct_CC
1080if test -n "$ac_ct_CC"; then 1387if test -n "$ac_ct_CC"; then
1081 echo "$as_me:1081: result: $ac_ct_CC" >&5 1388 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1082echo "${ECHO_T}$ac_ct_CC" >&6 1389echo "${ECHO_T}$ac_ct_CC" >&6
1083else 1390else
1084 echo "$as_me:1084: result: no" >&5 1391 echo "$as_me:$LINENO: result: no" >&5
1085echo "${ECHO_T}no" >&6 1392echo "${ECHO_T}no" >&6
1086fi 1393fi
1087 1394
@@ -1094,7 +1401,7 @@ if test -z "$CC"; then
1094 if test -n "$ac_tool_prefix"; then 1401 if test -n "$ac_tool_prefix"; then
1095 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 1402 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1096set dummy ${ac_tool_prefix}cc; ac_word=$2 1403set dummy ${ac_tool_prefix}cc; ac_word=$2
1097echo "$as_me:1097: checking for $ac_word" >&5 1404echo "$as_me:$LINENO: checking for $ac_word" >&5
1098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1405echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1099if test "${ac_cv_prog_CC+set}" = set; then 1406if test "${ac_cv_prog_CC+set}" = set; then
1100 echo $ECHO_N "(cached) $ECHO_C" >&6 1407 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1102,25 +1409,28 @@ else
1102 if test -n "$CC"; then 1409 if test -n "$CC"; then
1103 ac_cv_prog_CC="$CC" # Let the user override the test. 1410 ac_cv_prog_CC="$CC" # Let the user override the test.
1104else 1411else
1105 ac_save_IFS=$IFS; IFS=$ac_path_separator 1412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1106ac_dummy="$PATH" 1413for as_dir in $PATH
1107for ac_dir in $ac_dummy; do 1414do
1108 IFS=$ac_save_IFS 1415 IFS=$as_save_IFS
1109 test -z "$ac_dir" && ac_dir=. 1416 test -z "$as_dir" && as_dir=.
1110 $as_executable_p "$ac_dir/$ac_word" || continue 1417 for ac_exec_ext in '' $ac_executable_extensions; do
1111ac_cv_prog_CC="${ac_tool_prefix}cc" 1418 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1112echo "$as_me:1112: found $ac_dir/$ac_word" >&5 1419 ac_cv_prog_CC="${ac_tool_prefix}cc"
1113break 1420 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1421 break 2
1422 fi
1423done
1114done 1424done
1115 1425
1116fi 1426fi
1117fi 1427fi
1118CC=$ac_cv_prog_CC 1428CC=$ac_cv_prog_CC
1119if test -n "$CC"; then 1429if test -n "$CC"; then
1120 echo "$as_me:1120: result: $CC" >&5 1430 echo "$as_me:$LINENO: result: $CC" >&5
1121echo "${ECHO_T}$CC" >&6 1431echo "${ECHO_T}$CC" >&6
1122else 1432else
1123 echo "$as_me:1123: result: no" >&5 1433 echo "$as_me:$LINENO: result: no" >&5
1124echo "${ECHO_T}no" >&6 1434echo "${ECHO_T}no" >&6
1125fi 1435fi
1126 1436
@@ -1129,7 +1439,7 @@ if test -z "$ac_cv_prog_CC"; then
1129 ac_ct_CC=$CC 1439 ac_ct_CC=$CC
1130 # Extract the first word of "cc", so it can be a program name with args. 1440 # Extract the first word of "cc", so it can be a program name with args.
1131set dummy cc; ac_word=$2 1441set dummy cc; ac_word=$2
1132echo "$as_me:1132: checking for $ac_word" >&5 1442echo "$as_me:$LINENO: checking for $ac_word" >&5
1133echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1443echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1134if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1444if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1135 echo $ECHO_N "(cached) $ECHO_C" >&6 1445 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1137,25 +1447,28 @@ else
1137 if test -n "$ac_ct_CC"; then 1447 if test -n "$ac_ct_CC"; then
1138 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1448 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1139else 1449else
1140 ac_save_IFS=$IFS; IFS=$ac_path_separator 1450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1141ac_dummy="$PATH" 1451for as_dir in $PATH
1142for ac_dir in $ac_dummy; do 1452do
1143 IFS=$ac_save_IFS 1453 IFS=$as_save_IFS
1144 test -z "$ac_dir" && ac_dir=. 1454 test -z "$as_dir" && as_dir=.
1145 $as_executable_p "$ac_dir/$ac_word" || continue 1455 for ac_exec_ext in '' $ac_executable_extensions; do
1146ac_cv_prog_ac_ct_CC="cc" 1456 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1147echo "$as_me:1147: found $ac_dir/$ac_word" >&5 1457 ac_cv_prog_ac_ct_CC="cc"
1148break 1458 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1459 break 2
1460 fi
1461done
1149done 1462done
1150 1463
1151fi 1464fi
1152fi 1465fi
1153ac_ct_CC=$ac_cv_prog_ac_ct_CC 1466ac_ct_CC=$ac_cv_prog_ac_ct_CC
1154if test -n "$ac_ct_CC"; then 1467if test -n "$ac_ct_CC"; then
1155 echo "$as_me:1155: result: $ac_ct_CC" >&5 1468 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1156echo "${ECHO_T}$ac_ct_CC" >&6 1469echo "${ECHO_T}$ac_ct_CC" >&6
1157else 1470else
1158 echo "$as_me:1158: result: no" >&5 1471 echo "$as_me:$LINENO: result: no" >&5
1159echo "${ECHO_T}no" >&6 1472echo "${ECHO_T}no" >&6
1160fi 1473fi
1161 1474
@@ -1168,7 +1481,7 @@ fi
1168if test -z "$CC"; then 1481if test -z "$CC"; then
1169 # Extract the first word of "cc", so it can be a program name with args. 1482 # Extract the first word of "cc", so it can be a program name with args.
1170set dummy cc; ac_word=$2 1483set dummy cc; ac_word=$2
1171echo "$as_me:1171: checking for $ac_word" >&5 1484echo "$as_me:$LINENO: checking for $ac_word" >&5
1172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1173if test "${ac_cv_prog_CC+set}" = set; then 1486if test "${ac_cv_prog_CC+set}" = set; then
1174 echo $ECHO_N "(cached) $ECHO_C" >&6 1487 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1177,19 +1490,22 @@ else
1177 ac_cv_prog_CC="$CC" # Let the user override the test. 1490 ac_cv_prog_CC="$CC" # Let the user override the test.
1178else 1491else
1179 ac_prog_rejected=no 1492 ac_prog_rejected=no
1180 ac_save_IFS=$IFS; IFS=$ac_path_separator 1493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1181ac_dummy="$PATH" 1494for as_dir in $PATH
1182for ac_dir in $ac_dummy; do 1495do
1183 IFS=$ac_save_IFS 1496 IFS=$as_save_IFS
1184 test -z "$ac_dir" && ac_dir=. 1497 test -z "$as_dir" && as_dir=.
1185 $as_executable_p "$ac_dir/$ac_word" || continue 1498 for ac_exec_ext in '' $ac_executable_extensions; do
1186if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 1499 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1187 ac_prog_rejected=yes 1500 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1188 continue 1501 ac_prog_rejected=yes
1189fi 1502 continue
1190ac_cv_prog_CC="cc" 1503 fi
1191echo "$as_me:1191: found $ac_dir/$ac_word" >&5 1504 ac_cv_prog_CC="cc"
1192break 1505 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1506 break 2
1507 fi
1508done
1193done 1509done
1194 1510
1195if test $ac_prog_rejected = yes; then 1511if test $ac_prog_rejected = yes; then
@@ -1201,19 +1517,17 @@ if test $ac_prog_rejected = yes; then
1201 # However, it has the same basename, so the bogon will be chosen 1517 # However, it has the same basename, so the bogon will be chosen
1202 # first if we set CC to just the basename; use the full file name. 1518 # first if we set CC to just the basename; use the full file name.
1203 shift 1519 shift
1204 set dummy "$ac_dir/$ac_word" ${1+"$@"} 1520 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1205 shift
1206 ac_cv_prog_CC="$@"
1207 fi 1521 fi
1208fi 1522fi
1209fi 1523fi
1210fi 1524fi
1211CC=$ac_cv_prog_CC 1525CC=$ac_cv_prog_CC
1212if test -n "$CC"; then 1526if test -n "$CC"; then
1213 echo "$as_me:1213: result: $CC" >&5 1527 echo "$as_me:$LINENO: result: $CC" >&5
1214echo "${ECHO_T}$CC" >&6 1528echo "${ECHO_T}$CC" >&6
1215else 1529else
1216 echo "$as_me:1216: result: no" >&5 1530 echo "$as_me:$LINENO: result: no" >&5
1217echo "${ECHO_T}no" >&6 1531echo "${ECHO_T}no" >&6
1218fi 1532fi
1219 1533
@@ -1224,7 +1538,7 @@ if test -z "$CC"; then
1224 do 1538 do
1225 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 1539 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1226set dummy $ac_tool_prefix$ac_prog; ac_word=$2 1540set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1227echo "$as_me:1227: checking for $ac_word" >&5 1541echo "$as_me:$LINENO: checking for $ac_word" >&5
1228echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1542echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1229if test "${ac_cv_prog_CC+set}" = set; then 1543if test "${ac_cv_prog_CC+set}" = set; then
1230 echo $ECHO_N "(cached) $ECHO_C" >&6 1544 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1232,25 +1546,28 @@ else
1232 if test -n "$CC"; then 1546 if test -n "$CC"; then
1233 ac_cv_prog_CC="$CC" # Let the user override the test. 1547 ac_cv_prog_CC="$CC" # Let the user override the test.
1234else 1548else
1235 ac_save_IFS=$IFS; IFS=$ac_path_separator 1549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1236ac_dummy="$PATH" 1550for as_dir in $PATH
1237for ac_dir in $ac_dummy; do 1551do
1238 IFS=$ac_save_IFS 1552 IFS=$as_save_IFS
1239 test -z "$ac_dir" && ac_dir=. 1553 test -z "$as_dir" && as_dir=.
1240 $as_executable_p "$ac_dir/$ac_word" || continue 1554 for ac_exec_ext in '' $ac_executable_extensions; do
1241ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 1555 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1242echo "$as_me:1242: found $ac_dir/$ac_word" >&5 1556 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1243break 1557 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1558 break 2
1559 fi
1560done
1244done 1561done
1245 1562
1246fi 1563fi
1247fi 1564fi
1248CC=$ac_cv_prog_CC 1565CC=$ac_cv_prog_CC
1249if test -n "$CC"; then 1566if test -n "$CC"; then
1250 echo "$as_me:1250: result: $CC" >&5 1567 echo "$as_me:$LINENO: result: $CC" >&5
1251echo "${ECHO_T}$CC" >&6 1568echo "${ECHO_T}$CC" >&6
1252else 1569else
1253 echo "$as_me:1253: result: no" >&5 1570 echo "$as_me:$LINENO: result: no" >&5
1254echo "${ECHO_T}no" >&6 1571echo "${ECHO_T}no" >&6
1255fi 1572fi
1256 1573
@@ -1263,7 +1580,7 @@ if test -z "$CC"; then
1263do 1580do
1264 # Extract the first word of "$ac_prog", so it can be a program name with args. 1581 # Extract the first word of "$ac_prog", so it can be a program name with args.
1265set dummy $ac_prog; ac_word=$2 1582set dummy $ac_prog; ac_word=$2
1266echo "$as_me:1266: checking for $ac_word" >&5 1583echo "$as_me:$LINENO: checking for $ac_word" >&5
1267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 1584echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1268if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 1585if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1269 echo $ECHO_N "(cached) $ECHO_C" >&6 1586 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1271,25 +1588,28 @@ else
1271 if test -n "$ac_ct_CC"; then 1588 if test -n "$ac_ct_CC"; then
1272 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1589 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1273else 1590else
1274 ac_save_IFS=$IFS; IFS=$ac_path_separator 1591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1275ac_dummy="$PATH" 1592for as_dir in $PATH
1276for ac_dir in $ac_dummy; do 1593do
1277 IFS=$ac_save_IFS 1594 IFS=$as_save_IFS
1278 test -z "$ac_dir" && ac_dir=. 1595 test -z "$as_dir" && as_dir=.
1279 $as_executable_p "$ac_dir/$ac_word" || continue 1596 for ac_exec_ext in '' $ac_executable_extensions; do
1280ac_cv_prog_ac_ct_CC="$ac_prog" 1597 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1281echo "$as_me:1281: found $ac_dir/$ac_word" >&5 1598 ac_cv_prog_ac_ct_CC="$ac_prog"
1282break 1599 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1600 break 2
1601 fi
1602done
1283done 1603done
1284 1604
1285fi 1605fi
1286fi 1606fi
1287ac_ct_CC=$ac_cv_prog_ac_ct_CC 1607ac_ct_CC=$ac_cv_prog_ac_ct_CC
1288if test -n "$ac_ct_CC"; then 1608if test -n "$ac_ct_CC"; then
1289 echo "$as_me:1289: result: $ac_ct_CC" >&5 1609 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1290echo "${ECHO_T}$ac_ct_CC" >&6 1610echo "${ECHO_T}$ac_ct_CC" >&6
1291else 1611else
1292 echo "$as_me:1292: result: no" >&5 1612 echo "$as_me:$LINENO: result: no" >&5
1293echo "${ECHO_T}no" >&6 1613echo "${ECHO_T}no" >&6
1294fi 1614fi
1295 1615
@@ -1301,33 +1621,40 @@ fi
1301 1621
1302fi 1622fi
1303 1623
1304test -z "$CC" && { { echo "$as_me:1304: error: no acceptable cc found in \$PATH" >&5 1624
1305echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} 1625test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1626See \`config.log' for more details." >&5
1627echo "$as_me: error: no acceptable C compiler found in \$PATH
1628See \`config.log' for more details." >&2;}
1306 { (exit 1); exit 1; }; } 1629 { (exit 1); exit 1; }; }
1307 1630
1308# Provide some information about the compiler. 1631# Provide some information about the compiler.
1309echo "$as_me:1309:" \ 1632echo "$as_me:$LINENO:" \
1310 "checking for C compiler version" >&5 1633 "checking for C compiler version" >&5
1311ac_compiler=`set X $ac_compile; echo $2` 1634ac_compiler=`set X $ac_compile; echo $2`
1312{ (eval echo "$as_me:1312: \"$ac_compiler --version </dev/null >&5\"") >&5 1635{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1313 (eval $ac_compiler --version </dev/null >&5) 2>&5 1636 (eval $ac_compiler --version </dev/null >&5) 2>&5
1314 ac_status=$? 1637 ac_status=$?
1315 echo "$as_me:1315: \$? = $ac_status" >&5 1638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1316 (exit $ac_status); } 1639 (exit $ac_status); }
1317{ (eval echo "$as_me:1317: \"$ac_compiler -v </dev/null >&5\"") >&5 1640{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1318 (eval $ac_compiler -v </dev/null >&5) 2>&5 1641 (eval $ac_compiler -v </dev/null >&5) 2>&5
1319 ac_status=$? 1642 ac_status=$?
1320 echo "$as_me:1320: \$? = $ac_status" >&5 1643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1321 (exit $ac_status); } 1644 (exit $ac_status); }
1322{ (eval echo "$as_me:1322: \"$ac_compiler -V </dev/null >&5\"") >&5 1645{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1323 (eval $ac_compiler -V </dev/null >&5) 2>&5 1646 (eval $ac_compiler -V </dev/null >&5) 2>&5
1324 ac_status=$? 1647 ac_status=$?
1325 echo "$as_me:1325: \$? = $ac_status" >&5 1648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1326 (exit $ac_status); } 1649 (exit $ac_status); }
1327 1650
1328cat >conftest.$ac_ext <<_ACEOF 1651cat >conftest.$ac_ext <<_ACEOF
1329#line 1329 "configure" 1652#line $LINENO "configure"
1330#include "confdefs.h" 1653/* confdefs.h. */
1654_ACEOF
1655cat confdefs.h >>conftest.$ac_ext
1656cat >>conftest.$ac_ext <<_ACEOF
1657/* end confdefs.h. */
1331 1658
1332int 1659int
1333main () 1660main ()
@@ -1338,100 +1665,120 @@ main ()
1338} 1665}
1339_ACEOF 1666_ACEOF
1340ac_clean_files_save=$ac_clean_files 1667ac_clean_files_save=$ac_clean_files
1341ac_clean_files="$ac_clean_files a.out a.exe" 1668ac_clean_files="$ac_clean_files a.out a.exe b.out"
1342# Try to create an executable without -o first, disregard a.out. 1669# Try to create an executable without -o first, disregard a.out.
1343# It will help us diagnose broken compilers, and finding out an intuition 1670# It will help us diagnose broken compilers, and finding out an intuition
1344# of exeext. 1671# of exeext.
1345echo "$as_me:1345: checking for C compiler default output" >&5 1672echo "$as_me:$LINENO: checking for C compiler default output" >&5
1346echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 1673echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1347ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 1674ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1348if { (eval echo "$as_me:1348: \"$ac_link_default\"") >&5 1675if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1349 (eval $ac_link_default) 2>&5 1676 (eval $ac_link_default) 2>&5
1350 ac_status=$? 1677 ac_status=$?
1351 echo "$as_me:1351: \$? = $ac_status" >&5 1678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1352 (exit $ac_status); }; then 1679 (exit $ac_status); }; then
1353 # Find the output, starting from the most likely. This scheme is 1680 # Find the output, starting from the most likely. This scheme is
1354# not robust to junk in `.', hence go to wildcards (a.*) only as a last 1681# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1355# resort. 1682# resort.
1356for ac_file in `ls a.exe conftest.exe 2>/dev/null; 1683
1357 ls a.out conftest 2>/dev/null; 1684# Be careful to initialize this variable, since it used to be cached.
1358 ls a.* conftest.* 2>/dev/null`; do 1685# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1686ac_cv_exeext=
1687# b.out is created by i960 compilers.
1688for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1689do
1690 test -f "$ac_file" || continue
1359 case $ac_file in 1691 case $ac_file in
1360 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; 1692 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1361 a.out ) # We found the default executable, but exeext='' is most 1693 ;;
1362 # certainly right. 1694 conftest.$ac_ext )
1363 break;; 1695 # This is the source file.
1364 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 1696 ;;
1365 # FIXME: I believe we export ac_cv_exeext for Libtool --akim. 1697 [ab].out )
1366 export ac_cv_exeext 1698 # We found the default executable, but exeext='' is most
1367 break;; 1699 # certainly right.
1368 * ) break;; 1700 break;;
1701 *.* )
1702 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1703 # FIXME: I believe we export ac_cv_exeext for Libtool,
1704 # but it would be cool to find out if it's true. Does anybody
1705 # maintain Libtool? --akim.
1706 export ac_cv_exeext
1707 break;;
1708 * )
1709 break;;
1369 esac 1710 esac
1370done 1711done
1371else 1712else
1372 echo "$as_me: failed program was:" >&5 1713 echo "$as_me: failed program was:" >&5
1373cat conftest.$ac_ext >&5 1714sed 's/^/| /' conftest.$ac_ext >&5
1374{ { echo "$as_me:1374: error: C compiler cannot create executables" >&5 1715
1375echo "$as_me: error: C compiler cannot create executables" >&2;} 1716{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1717See \`config.log' for more details." >&5
1718echo "$as_me: error: C compiler cannot create executables
1719See \`config.log' for more details." >&2;}
1376 { (exit 77); exit 77; }; } 1720 { (exit 77); exit 77; }; }
1377fi 1721fi
1378 1722
1379ac_exeext=$ac_cv_exeext 1723ac_exeext=$ac_cv_exeext
1380echo "$as_me:1380: result: $ac_file" >&5 1724echo "$as_me:$LINENO: result: $ac_file" >&5
1381echo "${ECHO_T}$ac_file" >&6 1725echo "${ECHO_T}$ac_file" >&6
1382 1726
1383# Check the compiler produces executables we can run. If not, either 1727# Check the compiler produces executables we can run. If not, either
1384# the compiler is broken, or we cross compile. 1728# the compiler is broken, or we cross compile.
1385echo "$as_me:1385: checking whether the C compiler works" >&5 1729echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1386echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 1730echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1387# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 1731# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1388# If not cross compiling, check that we can run a simple program. 1732# If not cross compiling, check that we can run a simple program.
1389if test "$cross_compiling" != yes; then 1733if test "$cross_compiling" != yes; then
1390 if { ac_try='./$ac_file' 1734 if { ac_try='./$ac_file'
1391 { (eval echo "$as_me:1391: \"$ac_try\"") >&5 1735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1392 (eval $ac_try) 2>&5 1736 (eval $ac_try) 2>&5
1393 ac_status=$? 1737 ac_status=$?
1394 echo "$as_me:1394: \$? = $ac_status" >&5 1738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1395 (exit $ac_status); }; }; then 1739 (exit $ac_status); }; }; then
1396 cross_compiling=no 1740 cross_compiling=no
1397 else 1741 else
1398 if test "$cross_compiling" = maybe; then 1742 if test "$cross_compiling" = maybe; then
1399 cross_compiling=yes 1743 cross_compiling=yes
1400 else 1744 else
1401 { { echo "$as_me:1401: error: cannot run C compiled programs. 1745 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1402If you meant to cross compile, use \`--host'." >&5 1746If you meant to cross compile, use \`--host'.
1747See \`config.log' for more details." >&5
1403echo "$as_me: error: cannot run C compiled programs. 1748echo "$as_me: error: cannot run C compiled programs.
1404If you meant to cross compile, use \`--host'." >&2;} 1749If you meant to cross compile, use \`--host'.
1750See \`config.log' for more details." >&2;}
1405 { (exit 1); exit 1; }; } 1751 { (exit 1); exit 1; }; }
1406 fi 1752 fi
1407 fi 1753 fi
1408fi 1754fi
1409echo "$as_me:1409: result: yes" >&5 1755echo "$as_me:$LINENO: result: yes" >&5
1410echo "${ECHO_T}yes" >&6 1756echo "${ECHO_T}yes" >&6
1411 1757
1412rm -f a.out a.exe conftest$ac_cv_exeext 1758rm -f a.out a.exe conftest$ac_cv_exeext b.out
1413ac_clean_files=$ac_clean_files_save 1759ac_clean_files=$ac_clean_files_save
1414# Check the compiler produces executables we can run. If not, either 1760# Check the compiler produces executables we can run. If not, either
1415# the compiler is broken, or we cross compile. 1761# the compiler is broken, or we cross compile.
1416echo "$as_me:1416: checking whether we are cross compiling" >&5 1762echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1417echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 1763echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1418echo "$as_me:1418: result: $cross_compiling" >&5 1764echo "$as_me:$LINENO: result: $cross_compiling" >&5
1419echo "${ECHO_T}$cross_compiling" >&6 1765echo "${ECHO_T}$cross_compiling" >&6
1420 1766
1421echo "$as_me:1421: checking for executable suffix" >&5 1767echo "$as_me:$LINENO: checking for suffix of executables" >&5
1422echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 1768echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1423if { (eval echo "$as_me:1423: \"$ac_link\"") >&5 1769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1424 (eval $ac_link) 2>&5 1770 (eval $ac_link) 2>&5
1425 ac_status=$? 1771 ac_status=$?
1426 echo "$as_me:1426: \$? = $ac_status" >&5 1772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1427 (exit $ac_status); }; then 1773 (exit $ac_status); }; then
1428 # If both `conftest.exe' and `conftest' are `present' (well, observable) 1774 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1429# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 1775# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1430# work properly (i.e., refer to `conftest.exe'), while it won't with 1776# work properly (i.e., refer to `conftest.exe'), while it won't with
1431# `rm'. 1777# `rm'.
1432for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do 1778for ac_file in conftest.exe conftest conftest.*; do
1779 test -f "$ac_file" || continue
1433 case $ac_file in 1780 case $ac_file in
1434 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; 1781 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1435 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 1782 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1436 export ac_cv_exeext 1783 export ac_cv_exeext
1437 break;; 1784 break;;
@@ -1439,26 +1786,32 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1439 esac 1786 esac
1440done 1787done
1441else 1788else
1442 { { echo "$as_me:1442: error: cannot compute EXEEXT: cannot compile and link" >&5 1789 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1443echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} 1790See \`config.log' for more details." >&5
1791echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1792See \`config.log' for more details." >&2;}
1444 { (exit 1); exit 1; }; } 1793 { (exit 1); exit 1; }; }
1445fi 1794fi
1446 1795
1447rm -f conftest$ac_cv_exeext 1796rm -f conftest$ac_cv_exeext
1448echo "$as_me:1448: result: $ac_cv_exeext" >&5 1797echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1449echo "${ECHO_T}$ac_cv_exeext" >&6 1798echo "${ECHO_T}$ac_cv_exeext" >&6
1450 1799
1451rm -f conftest.$ac_ext 1800rm -f conftest.$ac_ext
1452EXEEXT=$ac_cv_exeext 1801EXEEXT=$ac_cv_exeext
1453ac_exeext=$EXEEXT 1802ac_exeext=$EXEEXT
1454echo "$as_me:1454: checking for object suffix" >&5 1803echo "$as_me:$LINENO: checking for suffix of object files" >&5
1455echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 1804echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1456if test "${ac_cv_objext+set}" = set; then 1805if test "${ac_cv_objext+set}" = set; then
1457 echo $ECHO_N "(cached) $ECHO_C" >&6 1806 echo $ECHO_N "(cached) $ECHO_C" >&6
1458else 1807else
1459 cat >conftest.$ac_ext <<_ACEOF 1808 cat >conftest.$ac_ext <<_ACEOF
1460#line 1460 "configure" 1809#line $LINENO "configure"
1461#include "confdefs.h" 1810/* confdefs.h. */
1811_ACEOF
1812cat confdefs.h >>conftest.$ac_ext
1813cat >>conftest.$ac_ext <<_ACEOF
1814/* end confdefs.h. */
1462 1815
1463int 1816int
1464main () 1817main ()
@@ -1469,40 +1822,47 @@ main ()
1469} 1822}
1470_ACEOF 1823_ACEOF
1471rm -f conftest.o conftest.obj 1824rm -f conftest.o conftest.obj
1472if { (eval echo "$as_me:1472: \"$ac_compile\"") >&5 1825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1473 (eval $ac_compile) 2>&5 1826 (eval $ac_compile) 2>&5
1474 ac_status=$? 1827 ac_status=$?
1475 echo "$as_me:1475: \$? = $ac_status" >&5 1828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1476 (exit $ac_status); }; then 1829 (exit $ac_status); }; then
1477 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do 1830 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1478 case $ac_file in 1831 case $ac_file in
1479 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; 1832 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1480 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 1833 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1481 break;; 1834 break;;
1482 esac 1835 esac
1483done 1836done
1484else 1837else
1485 echo "$as_me: failed program was:" >&5 1838 echo "$as_me: failed program was:" >&5
1486cat conftest.$ac_ext >&5 1839sed 's/^/| /' conftest.$ac_ext >&5
1487{ { echo "$as_me:1487: error: cannot compute OBJEXT: cannot compile" >&5 1840
1488echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} 1841{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1842See \`config.log' for more details." >&5
1843echo "$as_me: error: cannot compute suffix of object files: cannot compile
1844See \`config.log' for more details." >&2;}
1489 { (exit 1); exit 1; }; } 1845 { (exit 1); exit 1; }; }
1490fi 1846fi
1491 1847
1492rm -f conftest.$ac_cv_objext conftest.$ac_ext 1848rm -f conftest.$ac_cv_objext conftest.$ac_ext
1493fi 1849fi
1494echo "$as_me:1494: result: $ac_cv_objext" >&5 1850echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1495echo "${ECHO_T}$ac_cv_objext" >&6 1851echo "${ECHO_T}$ac_cv_objext" >&6
1496OBJEXT=$ac_cv_objext 1852OBJEXT=$ac_cv_objext
1497ac_objext=$OBJEXT 1853ac_objext=$OBJEXT
1498echo "$as_me:1498: checking whether we are using the GNU C compiler" >&5 1854echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1499echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 1855echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1500if test "${ac_cv_c_compiler_gnu+set}" = set; then 1856if test "${ac_cv_c_compiler_gnu+set}" = set; then
1501 echo $ECHO_N "(cached) $ECHO_C" >&6 1857 echo $ECHO_N "(cached) $ECHO_C" >&6
1502else 1858else
1503 cat >conftest.$ac_ext <<_ACEOF 1859 cat >conftest.$ac_ext <<_ACEOF
1504#line 1504 "configure" 1860#line $LINENO "configure"
1505#include "confdefs.h" 1861/* confdefs.h. */
1862_ACEOF
1863cat confdefs.h >>conftest.$ac_ext
1864cat >>conftest.$ac_ext <<_ACEOF
1865/* end confdefs.h. */
1506 1866
1507int 1867int
1508main () 1868main ()
@@ -1516,41 +1876,46 @@ main ()
1516} 1876}
1517_ACEOF 1877_ACEOF
1518rm -f conftest.$ac_objext 1878rm -f conftest.$ac_objext
1519if { (eval echo "$as_me:1519: \"$ac_compile\"") >&5 1879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1520 (eval $ac_compile) 2>&5 1880 (eval $ac_compile) 2>&5
1521 ac_status=$? 1881 ac_status=$?
1522 echo "$as_me:1522: \$? = $ac_status" >&5 1882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1523 (exit $ac_status); } && 1883 (exit $ac_status); } &&
1524 { ac_try='test -s conftest.$ac_objext' 1884 { ac_try='test -s conftest.$ac_objext'
1525 { (eval echo "$as_me:1525: \"$ac_try\"") >&5 1885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1526 (eval $ac_try) 2>&5 1886 (eval $ac_try) 2>&5
1527 ac_status=$? 1887 ac_status=$?
1528 echo "$as_me:1528: \$? = $ac_status" >&5 1888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1529 (exit $ac_status); }; }; then 1889 (exit $ac_status); }; }; then
1530 ac_compiler_gnu=yes 1890 ac_compiler_gnu=yes
1531else 1891else
1532 echo "$as_me: failed program was:" >&5 1892 echo "$as_me: failed program was:" >&5
1533cat conftest.$ac_ext >&5 1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1534ac_compiler_gnu=no 1895ac_compiler_gnu=no
1535fi 1896fi
1536rm -f conftest.$ac_objext conftest.$ac_ext 1897rm -f conftest.$ac_objext conftest.$ac_ext
1537ac_cv_c_compiler_gnu=$ac_compiler_gnu 1898ac_cv_c_compiler_gnu=$ac_compiler_gnu
1538 1899
1539fi 1900fi
1540echo "$as_me:1540: result: $ac_cv_c_compiler_gnu" >&5 1901echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1541echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 1902echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1542GCC=`test $ac_compiler_gnu = yes && echo yes` 1903GCC=`test $ac_compiler_gnu = yes && echo yes`
1543ac_test_CFLAGS=${CFLAGS+set} 1904ac_test_CFLAGS=${CFLAGS+set}
1544ac_save_CFLAGS=$CFLAGS 1905ac_save_CFLAGS=$CFLAGS
1545CFLAGS="-g" 1906CFLAGS="-g"
1546echo "$as_me:1546: checking whether $CC accepts -g" >&5 1907echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1547echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 1908echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1548if test "${ac_cv_prog_cc_g+set}" = set; then 1909if test "${ac_cv_prog_cc_g+set}" = set; then
1549 echo $ECHO_N "(cached) $ECHO_C" >&6 1910 echo $ECHO_N "(cached) $ECHO_C" >&6
1550else 1911else
1551 cat >conftest.$ac_ext <<_ACEOF 1912 cat >conftest.$ac_ext <<_ACEOF
1552#line 1552 "configure" 1913#line $LINENO "configure"
1553#include "confdefs.h" 1914/* confdefs.h. */
1915_ACEOF
1916cat confdefs.h >>conftest.$ac_ext
1917cat >>conftest.$ac_ext <<_ACEOF
1918/* end confdefs.h. */
1554 1919
1555int 1920int
1556main () 1921main ()
@@ -1561,26 +1926,27 @@ main ()
1561} 1926}
1562_ACEOF 1927_ACEOF
1563rm -f conftest.$ac_objext 1928rm -f conftest.$ac_objext
1564if { (eval echo "$as_me:1564: \"$ac_compile\"") >&5 1929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1565 (eval $ac_compile) 2>&5 1930 (eval $ac_compile) 2>&5
1566 ac_status=$? 1931 ac_status=$?
1567 echo "$as_me:1567: \$? = $ac_status" >&5 1932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1568 (exit $ac_status); } && 1933 (exit $ac_status); } &&
1569 { ac_try='test -s conftest.$ac_objext' 1934 { ac_try='test -s conftest.$ac_objext'
1570 { (eval echo "$as_me:1570: \"$ac_try\"") >&5 1935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1571 (eval $ac_try) 2>&5 1936 (eval $ac_try) 2>&5
1572 ac_status=$? 1937 ac_status=$?
1573 echo "$as_me:1573: \$? = $ac_status" >&5 1938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1574 (exit $ac_status); }; }; then 1939 (exit $ac_status); }; }; then
1575 ac_cv_prog_cc_g=yes 1940 ac_cv_prog_cc_g=yes
1576else 1941else
1577 echo "$as_me: failed program was:" >&5 1942 echo "$as_me: failed program was:" >&5
1578cat conftest.$ac_ext >&5 1943sed 's/^/| /' conftest.$ac_ext >&5
1944
1579ac_cv_prog_cc_g=no 1945ac_cv_prog_cc_g=no
1580fi 1946fi
1581rm -f conftest.$ac_objext conftest.$ac_ext 1947rm -f conftest.$ac_objext conftest.$ac_ext
1582fi 1948fi
1583echo "$as_me:1583: result: $ac_cv_prog_cc_g" >&5 1949echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
1584echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 1950echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1585if test "$ac_test_CFLAGS" = set; then 1951if test "$ac_test_CFLAGS" = set; then
1586 CFLAGS=$ac_save_CFLAGS 1952 CFLAGS=$ac_save_CFLAGS
@@ -1597,6 +1963,102 @@ else
1597 CFLAGS= 1963 CFLAGS=
1598 fi 1964 fi
1599fi 1965fi
1966echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
1967echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1968if test "${ac_cv_prog_cc_stdc+set}" = set; then
1969 echo $ECHO_N "(cached) $ECHO_C" >&6
1970else
1971 ac_cv_prog_cc_stdc=no
1972ac_save_CC=$CC
1973cat >conftest.$ac_ext <<_ACEOF
1974#line $LINENO "configure"
1975/* confdefs.h. */
1976_ACEOF
1977cat confdefs.h >>conftest.$ac_ext
1978cat >>conftest.$ac_ext <<_ACEOF
1979/* end confdefs.h. */
1980#include <stdarg.h>
1981#include <stdio.h>
1982#include <sys/types.h>
1983#include <sys/stat.h>
1984/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1985struct buf { int x; };
1986FILE * (*rcsopen) (struct buf *, struct stat *, int);
1987static char *e (p, i)
1988 char **p;
1989 int i;
1990{
1991 return p[i];
1992}
1993static char *f (char * (*g) (char **, int), char **p, ...)
1994{
1995 char *s;
1996 va_list v;
1997 va_start (v,p);
1998 s = g (p, va_arg (v,int));
1999 va_end (v);
2000 return s;
2001}
2002int test (int i, double x);
2003struct s1 {int (*f) (int a);};
2004struct s2 {int (*f) (double a);};
2005int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2006int argc;
2007char **argv;
2008int
2009main ()
2010{
2011return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016# Don't try gcc -ansi; that turns off useful extensions and
2017# breaks some systems' header files.
2018# AIX -qlanglvl=ansi
2019# Ultrix and OSF/1 -std1
2020# HP-UX 10.20 and later -Ae
2021# HP-UX older versions -Aa -D_HPUX_SOURCE
2022# SVR4 -Xc -D__EXTENSIONS__
2023for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2024do
2025 CC="$ac_save_CC $ac_arg"
2026 rm -f conftest.$ac_objext
2027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2028 (eval $ac_compile) 2>&5
2029 ac_status=$?
2030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2031 (exit $ac_status); } &&
2032 { ac_try='test -s conftest.$ac_objext'
2033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2034 (eval $ac_try) 2>&5
2035 ac_status=$?
2036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2037 (exit $ac_status); }; }; then
2038 ac_cv_prog_cc_stdc=$ac_arg
2039break
2040else
2041 echo "$as_me: failed program was:" >&5
2042sed 's/^/| /' conftest.$ac_ext >&5
2043
2044fi
2045rm -f conftest.$ac_objext
2046done
2047rm -f conftest.$ac_ext conftest.$ac_objext
2048CC=$ac_save_CC
2049
2050fi
2051
2052case "x$ac_cv_prog_cc_stdc" in
2053 x|xno)
2054 echo "$as_me:$LINENO: result: none needed" >&5
2055echo "${ECHO_T}none needed" >&6 ;;
2056 *)
2057 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2058echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2059 CC="$CC $ac_cv_prog_cc_stdc" ;;
2060esac
2061
1600# Some people use a C++ compiler to compile C. Since we use `exit', 2062# Some people use a C++ compiler to compile C. Since we use `exit',
1601# in C++ we need to declare it. In case someone uses the same compiler 2063# in C++ we need to declare it. In case someone uses the same compiler
1602# for both compiling C and C++ we need to have the C++ compiler decide 2064# for both compiling C and C++ we need to have the C++ compiler decide
@@ -1607,16 +2069,16 @@ cat >conftest.$ac_ext <<_ACEOF
1607#endif 2069#endif
1608_ACEOF 2070_ACEOF
1609rm -f conftest.$ac_objext 2071rm -f conftest.$ac_objext
1610if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5 2072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5 2073 (eval $ac_compile) 2>&5
1612 ac_status=$? 2074 ac_status=$?
1613 echo "$as_me:1613: \$? = $ac_status" >&5 2075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1614 (exit $ac_status); } && 2076 (exit $ac_status); } &&
1615 { ac_try='test -s conftest.$ac_objext' 2077 { ac_try='test -s conftest.$ac_objext'
1616 { (eval echo "$as_me:1616: \"$ac_try\"") >&5 2078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1617 (eval $ac_try) 2>&5 2079 (eval $ac_try) 2>&5
1618 ac_status=$? 2080 ac_status=$?
1619 echo "$as_me:1619: \$? = $ac_status" >&5 2081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1620 (exit $ac_status); }; }; then 2082 (exit $ac_status); }; }; then
1621 for ac_declaration in \ 2083 for ac_declaration in \
1622 ''\ 2084 ''\
@@ -1628,8 +2090,12 @@ if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1628 'void exit (int);' 2090 'void exit (int);'
1629do 2091do
1630 cat >conftest.$ac_ext <<_ACEOF 2092 cat >conftest.$ac_ext <<_ACEOF
1631#line 1631 "configure" 2093#line $LINENO "configure"
1632#include "confdefs.h" 2094/* confdefs.h. */
2095_ACEOF
2096cat confdefs.h >>conftest.$ac_ext
2097cat >>conftest.$ac_ext <<_ACEOF
2098/* end confdefs.h. */
1633#include <stdlib.h> 2099#include <stdlib.h>
1634$ac_declaration 2100$ac_declaration
1635int 2101int
@@ -1641,27 +2107,32 @@ exit (42);
1641} 2107}
1642_ACEOF 2108_ACEOF
1643rm -f conftest.$ac_objext 2109rm -f conftest.$ac_objext
1644if { (eval echo "$as_me:1644: \"$ac_compile\"") >&5 2110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1645 (eval $ac_compile) 2>&5 2111 (eval $ac_compile) 2>&5
1646 ac_status=$? 2112 ac_status=$?
1647 echo "$as_me:1647: \$? = $ac_status" >&5 2113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1648 (exit $ac_status); } && 2114 (exit $ac_status); } &&
1649 { ac_try='test -s conftest.$ac_objext' 2115 { ac_try='test -s conftest.$ac_objext'
1650 { (eval echo "$as_me:1650: \"$ac_try\"") >&5 2116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1651 (eval $ac_try) 2>&5 2117 (eval $ac_try) 2>&5
1652 ac_status=$? 2118 ac_status=$?
1653 echo "$as_me:1653: \$? = $ac_status" >&5 2119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1654 (exit $ac_status); }; }; then 2120 (exit $ac_status); }; }; then
1655 : 2121 :
1656else 2122else
1657 echo "$as_me: failed program was:" >&5 2123 echo "$as_me: failed program was:" >&5
1658cat conftest.$ac_ext >&5 2124sed 's/^/| /' conftest.$ac_ext >&5
2125
1659continue 2126continue
1660fi 2127fi
1661rm -f conftest.$ac_objext conftest.$ac_ext 2128rm -f conftest.$ac_objext conftest.$ac_ext
1662 cat >conftest.$ac_ext <<_ACEOF 2129 cat >conftest.$ac_ext <<_ACEOF
1663#line 1663 "configure" 2130#line $LINENO "configure"
1664#include "confdefs.h" 2131/* confdefs.h. */
2132_ACEOF
2133cat confdefs.h >>conftest.$ac_ext
2134cat >>conftest.$ac_ext <<_ACEOF
2135/* end confdefs.h. */
1665$ac_declaration 2136$ac_declaration
1666int 2137int
1667main () 2138main ()
@@ -1672,21 +2143,22 @@ exit (42);
1672} 2143}
1673_ACEOF 2144_ACEOF
1674rm -f conftest.$ac_objext 2145rm -f conftest.$ac_objext
1675if { (eval echo "$as_me:1675: \"$ac_compile\"") >&5 2146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1676 (eval $ac_compile) 2>&5 2147 (eval $ac_compile) 2>&5
1677 ac_status=$? 2148 ac_status=$?
1678 echo "$as_me:1678: \$? = $ac_status" >&5 2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1679 (exit $ac_status); } && 2150 (exit $ac_status); } &&
1680 { ac_try='test -s conftest.$ac_objext' 2151 { ac_try='test -s conftest.$ac_objext'
1681 { (eval echo "$as_me:1681: \"$ac_try\"") >&5 2152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1682 (eval $ac_try) 2>&5 2153 (eval $ac_try) 2>&5
1683 ac_status=$? 2154 ac_status=$?
1684 echo "$as_me:1684: \$? = $ac_status" >&5 2155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1685 (exit $ac_status); }; }; then 2156 (exit $ac_status); }; }; then
1686 break 2157 break
1687else 2158else
1688 echo "$as_me: failed program was:" >&5 2159 echo "$as_me: failed program was:" >&5
1689cat conftest.$ac_ext >&5 2160sed 's/^/| /' conftest.$ac_ext >&5
2161
1690fi 2162fi
1691rm -f conftest.$ac_objext conftest.$ac_ext 2163rm -f conftest.$ac_objext conftest.$ac_ext
1692done 2164done
@@ -1699,7 +2171,8 @@ fi
1699 2171
1700else 2172else
1701 echo "$as_me: failed program was:" >&5 2173 echo "$as_me: failed program was:" >&5
1702cat conftest.$ac_ext >&5 2174sed 's/^/| /' conftest.$ac_ext >&5
2175
1703fi 2176fi
1704rm -f conftest.$ac_objext conftest.$ac_ext 2177rm -f conftest.$ac_objext conftest.$ac_ext
1705ac_ext=c 2178ac_ext=c
@@ -1725,7 +2198,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1725 fi 2198 fi
1726done 2199done
1727if test -z "$ac_aux_dir"; then 2200if test -z "$ac_aux_dir"; then
1728 { { echo "$as_me:1728: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 2201 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1729echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} 2202echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1730 { (exit 1); exit 1; }; } 2203 { (exit 1); exit 1; }; }
1731fi 2204fi
@@ -1735,11 +2208,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1735 2208
1736# Make sure we can run config.sub. 2209# Make sure we can run config.sub.
1737$ac_config_sub sun4 >/dev/null 2>&1 || 2210$ac_config_sub sun4 >/dev/null 2>&1 ||
1738 { { echo "$as_me:1738: error: cannot run $ac_config_sub" >&5 2211 { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1739echo "$as_me: error: cannot run $ac_config_sub" >&2;} 2212echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1740 { (exit 1); exit 1; }; } 2213 { (exit 1); exit 1; }; }
1741 2214
1742echo "$as_me:1742: checking build system type" >&5 2215echo "$as_me:$LINENO: checking build system type" >&5
1743echo $ECHO_N "checking build system type... $ECHO_C" >&6 2216echo $ECHO_N "checking build system type... $ECHO_C" >&6
1744if test "${ac_cv_build+set}" = set; then 2217if test "${ac_cv_build+set}" = set; then
1745 echo $ECHO_N "(cached) $ECHO_C" >&6 2218 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1748,23 +2221,24 @@ else
1748test -z "$ac_cv_build_alias" && 2221test -z "$ac_cv_build_alias" &&
1749 ac_cv_build_alias=`$ac_config_guess` 2222 ac_cv_build_alias=`$ac_config_guess`
1750test -z "$ac_cv_build_alias" && 2223test -z "$ac_cv_build_alias" &&
1751 { { echo "$as_me:1751: error: cannot guess build type; you must specify one" >&5 2224 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1752echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 2225echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1753 { (exit 1); exit 1; }; } 2226 { (exit 1); exit 1; }; }
1754ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || 2227ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1755 { { echo "$as_me:1755: error: $ac_config_sub $ac_cv_build_alias failed." >&5 2228 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1756echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} 2229echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1757 { (exit 1); exit 1; }; } 2230 { (exit 1); exit 1; }; }
1758 2231
1759fi 2232fi
1760echo "$as_me:1760: result: $ac_cv_build" >&5 2233echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1761echo "${ECHO_T}$ac_cv_build" >&6 2234echo "${ECHO_T}$ac_cv_build" >&6
1762build=$ac_cv_build 2235build=$ac_cv_build
1763build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 2236build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1764build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 2237build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1765build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 2238build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1766 2239
1767echo "$as_me:1767: checking host system type" >&5 2240
2241echo "$as_me:$LINENO: checking host system type" >&5
1768echo $ECHO_N "checking host system type... $ECHO_C" >&6 2242echo $ECHO_N "checking host system type... $ECHO_C" >&6
1769if test "${ac_cv_host+set}" = set; then 2243if test "${ac_cv_host+set}" = set; then
1770 echo $ECHO_N "(cached) $ECHO_C" >&6 2244 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1773,28 +2247,33 @@ else
1773test -z "$ac_cv_host_alias" && 2247test -z "$ac_cv_host_alias" &&
1774 ac_cv_host_alias=$ac_cv_build_alias 2248 ac_cv_host_alias=$ac_cv_build_alias
1775ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || 2249ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1776 { { echo "$as_me:1776: error: $ac_config_sub $ac_cv_host_alias failed" >&5 2250 { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1777echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} 2251echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1778 { (exit 1); exit 1; }; } 2252 { (exit 1); exit 1; }; }
1779 2253
1780fi 2254fi
1781echo "$as_me:1781: result: $ac_cv_host" >&5 2255echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1782echo "${ECHO_T}$ac_cv_host" >&6 2256echo "${ECHO_T}$ac_cv_host" >&6
1783host=$ac_cv_host 2257host=$ac_cv_host
1784host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 2258host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1785host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 2259host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1786host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 2260host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1787 2261
1788echo "$as_me:1788: checking whether byte ordering is bigendian" >&5 2262
2263
2264echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
1789echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 2265echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
1790if test "${ac_cv_c_bigendian+set}" = set; then 2266if test "${ac_cv_c_bigendian+set}" = set; then
1791 echo $ECHO_N "(cached) $ECHO_C" >&6 2267 echo $ECHO_N "(cached) $ECHO_C" >&6
1792else 2268else
1793 ac_cv_c_bigendian=unknown 2269 # See if sys/param.h defines the BYTE_ORDER macro.
1794# See if sys/param.h defines the BYTE_ORDER macro.
1795cat >conftest.$ac_ext <<_ACEOF 2270cat >conftest.$ac_ext <<_ACEOF
1796#line 1796 "configure" 2271#line $LINENO "configure"
1797#include "confdefs.h" 2272/* confdefs.h. */
2273_ACEOF
2274cat confdefs.h >>conftest.$ac_ext
2275cat >>conftest.$ac_ext <<_ACEOF
2276/* end confdefs.h. */
1798#include <sys/types.h> 2277#include <sys/types.h>
1799#include <sys/param.h> 2278#include <sys/param.h>
1800 2279
@@ -1810,21 +2289,25 @@ main ()
1810} 2289}
1811_ACEOF 2290_ACEOF
1812rm -f conftest.$ac_objext 2291rm -f conftest.$ac_objext
1813if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5 2292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5 2293 (eval $ac_compile) 2>&5
1815 ac_status=$? 2294 ac_status=$?
1816 echo "$as_me:1816: \$? = $ac_status" >&5 2295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1817 (exit $ac_status); } && 2296 (exit $ac_status); } &&
1818 { ac_try='test -s conftest.$ac_objext' 2297 { ac_try='test -s conftest.$ac_objext'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5 2298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1820 (eval $ac_try) 2>&5 2299 (eval $ac_try) 2>&5
1821 ac_status=$? 2300 ac_status=$?
1822 echo "$as_me:1822: \$? = $ac_status" >&5 2301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1823 (exit $ac_status); }; }; then 2302 (exit $ac_status); }; }; then
1824 # It does; now see whether it defined to BIG_ENDIAN or not. 2303 # It does; now see whether it defined to BIG_ENDIAN or not.
1825cat >conftest.$ac_ext <<_ACEOF 2304cat >conftest.$ac_ext <<_ACEOF
1826#line 1826 "configure" 2305#line $LINENO "configure"
1827#include "confdefs.h" 2306/* confdefs.h. */
2307_ACEOF
2308cat confdefs.h >>conftest.$ac_ext
2309cat >>conftest.$ac_ext <<_ACEOF
2310/* end confdefs.h. */
1828#include <sys/types.h> 2311#include <sys/types.h>
1829#include <sys/param.h> 2312#include <sys/param.h>
1830 2313
@@ -1840,38 +2323,91 @@ main ()
1840} 2323}
1841_ACEOF 2324_ACEOF
1842rm -f conftest.$ac_objext 2325rm -f conftest.$ac_objext
1843if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5 2326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1844 (eval $ac_compile) 2>&5 2327 (eval $ac_compile) 2>&5
1845 ac_status=$? 2328 ac_status=$?
1846 echo "$as_me:1846: \$? = $ac_status" >&5 2329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1847 (exit $ac_status); } && 2330 (exit $ac_status); } &&
1848 { ac_try='test -s conftest.$ac_objext' 2331 { ac_try='test -s conftest.$ac_objext'
1849 { (eval echo "$as_me:1849: \"$ac_try\"") >&5 2332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1850 (eval $ac_try) 2>&5 2333 (eval $ac_try) 2>&5
1851 ac_status=$? 2334 ac_status=$?
1852 echo "$as_me:1852: \$? = $ac_status" >&5 2335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1853 (exit $ac_status); }; }; then 2336 (exit $ac_status); }; }; then
1854 ac_cv_c_bigendian=yes 2337 ac_cv_c_bigendian=yes
1855else 2338else
1856 echo "$as_me: failed program was:" >&5 2339 echo "$as_me: failed program was:" >&5
1857cat conftest.$ac_ext >&5 2340sed 's/^/| /' conftest.$ac_ext >&5
2341
1858ac_cv_c_bigendian=no 2342ac_cv_c_bigendian=no
1859fi 2343fi
1860rm -f conftest.$ac_objext conftest.$ac_ext 2344rm -f conftest.$ac_objext conftest.$ac_ext
1861else 2345else
1862 echo "$as_me: failed program was:" >&5 2346 echo "$as_me: failed program was:" >&5
1863cat conftest.$ac_ext >&5 2347sed 's/^/| /' conftest.$ac_ext >&5
2348
2349# It does not; compile a test program.
2350if test "$cross_compiling" = yes; then
2351 # try to guess the endianness by grepping values into an object file
2352 ac_cv_c_bigendian=unknown
2353 cat >conftest.$ac_ext <<_ACEOF
2354#line $LINENO "configure"
2355/* confdefs.h. */
2356_ACEOF
2357cat confdefs.h >>conftest.$ac_ext
2358cat >>conftest.$ac_ext <<_ACEOF
2359/* end confdefs.h. */
2360short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
2361short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
2362void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
2363short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
2364short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
2365void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
2366int
2367main ()
2368{
2369 _ascii (); _ebcdic ();
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
2375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2376 (eval $ac_compile) 2>&5
2377 ac_status=$?
2378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2379 (exit $ac_status); } &&
2380 { ac_try='test -s conftest.$ac_objext'
2381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2382 (eval $ac_try) 2>&5
2383 ac_status=$?
2384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385 (exit $ac_status); }; }; then
2386 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
2387 ac_cv_c_bigendian=yes
2388fi
2389if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
2390 if test "$ac_cv_c_bigendian" = unknown; then
2391 ac_cv_c_bigendian=no
2392 else
2393 # finding both strings is unlikely to happen, but who knows?
2394 ac_cv_c_bigendian=unknown
2395 fi
2396fi
2397else
2398 echo "$as_me: failed program was:" >&5
2399sed 's/^/| /' conftest.$ac_ext >&5
2400
1864fi 2401fi
1865rm -f conftest.$ac_objext conftest.$ac_ext 2402rm -f conftest.$ac_objext conftest.$ac_ext
1866if test $ac_cv_c_bigendian = unknown; then
1867if test "$cross_compiling" = yes; then
1868 { { echo "$as_me:1868: error: cannot run test program while cross compiling" >&5
1869echo "$as_me: error: cannot run test program while cross compiling" >&2;}
1870 { (exit 1); exit 1; }; }
1871else 2403else
1872 cat >conftest.$ac_ext <<_ACEOF 2404 cat >conftest.$ac_ext <<_ACEOF
1873#line 1873 "configure" 2405#line $LINENO "configure"
1874#include "confdefs.h" 2406/* confdefs.h. */
2407_ACEOF
2408cat confdefs.h >>conftest.$ac_ext
2409cat >>conftest.$ac_ext <<_ACEOF
2410/* end confdefs.h. */
1875int 2411int
1876main () 2412main ()
1877{ 2413{
@@ -1886,81 +2422,57 @@ main ()
1886} 2422}
1887_ACEOF 2423_ACEOF
1888rm -f conftest$ac_exeext 2424rm -f conftest$ac_exeext
1889if { (eval echo "$as_me:1889: \"$ac_link\"") >&5 2425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1890 (eval $ac_link) 2>&5 2426 (eval $ac_link) 2>&5
1891 ac_status=$? 2427 ac_status=$?
1892 echo "$as_me:1892: \$? = $ac_status" >&5 2428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 2429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
1894 { (eval echo "$as_me:1894: \"$ac_try\"") >&5 2430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1895 (eval $ac_try) 2>&5 2431 (eval $ac_try) 2>&5
1896 ac_status=$? 2432 ac_status=$?
1897 echo "$as_me:1897: \$? = $ac_status" >&5 2433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1898 (exit $ac_status); }; }; then 2434 (exit $ac_status); }; }; then
1899 ac_cv_c_bigendian=no 2435 ac_cv_c_bigendian=no
1900else 2436else
1901 echo "$as_me: program exited with status $ac_status" >&5 2437 echo "$as_me: program exited with status $ac_status" >&5
1902echo "$as_me: failed program was:" >&5 2438echo "$as_me: failed program was:" >&5
1903cat conftest.$ac_ext >&5 2439sed 's/^/| /' conftest.$ac_ext >&5
2440
2441( exit $ac_status )
1904ac_cv_c_bigendian=yes 2442ac_cv_c_bigendian=yes
1905fi 2443fi
1906rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 2444rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
1907fi 2445fi
1908fi 2446fi
2447rm -f conftest.$ac_objext conftest.$ac_ext
1909fi 2448fi
1910echo "$as_me:1910: result: $ac_cv_c_bigendian" >&5 2449echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
1911echo "${ECHO_T}$ac_cv_c_bigendian" >&6 2450echo "${ECHO_T}$ac_cv_c_bigendian" >&6
1912if test $ac_cv_c_bigendian = yes; then 2451case $ac_cv_c_bigendian in
2452 yes)
1913 2453
1914cat >>confdefs.h <<\EOF 2454cat >>confdefs.h <<\_ACEOF
1915#define WORDS_BIGENDIAN 1 2455#define WORDS_BIGENDIAN 1
1916EOF 2456_ACEOF
2457 ;;
2458 no)
2459 ;;
2460 *)
2461 { { echo "$as_me:$LINENO: error: unknown endianness
2462presetting ac_cv_c_bigendian=no (or yes) will help" >&5
2463echo "$as_me: error: unknown endianness
2464presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
2465 { (exit 1); exit 1; }; } ;;
2466esac
1917 2467
1918fi
1919 2468
1920# Checks for programs. 2469# Checks for programs.
1921for ac_prog in mawk gawk nawk awk
1922do
1923 # Extract the first word of "$ac_prog", so it can be a program name with args.
1924set dummy $ac_prog; ac_word=$2
1925echo "$as_me:1925: checking for $ac_word" >&5
1926echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1927if test "${ac_cv_prog_AWK+set}" = set; then
1928 echo $ECHO_N "(cached) $ECHO_C" >&6
1929else
1930 if test -n "$AWK"; then
1931 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1932else
1933 ac_save_IFS=$IFS; IFS=$ac_path_separator
1934ac_dummy="$PATH"
1935for ac_dir in $ac_dummy; do
1936 IFS=$ac_save_IFS
1937 test -z "$ac_dir" && ac_dir=.
1938 $as_executable_p "$ac_dir/$ac_word" || continue
1939ac_cv_prog_AWK="$ac_prog"
1940echo "$as_me:1940: found $ac_dir/$ac_word" >&5
1941break
1942done
1943
1944fi
1945fi
1946AWK=$ac_cv_prog_AWK
1947if test -n "$AWK"; then
1948 echo "$as_me:1948: result: $AWK" >&5
1949echo "${ECHO_T}$AWK" >&6
1950else
1951 echo "$as_me:1951: result: no" >&5
1952echo "${ECHO_T}no" >&6
1953fi
1954
1955 test -n "$AWK" && break
1956done
1957
1958ac_ext=c 2470ac_ext=c
1959ac_cpp='$CPP $CPPFLAGS' 2471ac_cpp='$CPP $CPPFLAGS'
1960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2472ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2473ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1962ac_compiler_gnu=$ac_cv_c_compiler_gnu 2474ac_compiler_gnu=$ac_cv_c_compiler_gnu
1963echo "$as_me:1963: checking how to run the C preprocessor" >&5 2475echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
1964echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 2476echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1965# On Suns, sometimes $CPP names a directory. 2477# On Suns, sometimes $CPP names a directory.
1966if test -n "$CPP" && test -d "$CPP"; then 2478if test -n "$CPP" && test -d "$CPP"; then
@@ -1978,21 +2490,31 @@ for ac_c_preproc_warn_flag in '' yes
1978do 2490do
1979 # Use a header file that comes with gcc, so configuring glibc 2491 # Use a header file that comes with gcc, so configuring glibc
1980 # with a fresh cross-compiler works. 2492 # with a fresh cross-compiler works.
2493 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2494 # <limits.h> exists even on freestanding compilers.
1981 # On the NeXT, cc -E runs the code through the compiler's parser, 2495 # On the NeXT, cc -E runs the code through the compiler's parser,
1982 # not just through cpp. "Syntax error" is here to catch this case. 2496 # not just through cpp. "Syntax error" is here to catch this case.
1983 cat >conftest.$ac_ext <<_ACEOF 2497 cat >conftest.$ac_ext <<_ACEOF
1984#line 1984 "configure" 2498#line $LINENO "configure"
1985#include "confdefs.h" 2499/* confdefs.h. */
1986#include <assert.h> 2500_ACEOF
2501cat confdefs.h >>conftest.$ac_ext
2502cat >>conftest.$ac_ext <<_ACEOF
2503/* end confdefs.h. */
2504#ifdef __STDC__
2505# include <limits.h>
2506#else
2507# include <assert.h>
2508#endif
1987 Syntax error 2509 Syntax error
1988_ACEOF 2510_ACEOF
1989if { (eval echo "$as_me:1989: \"$ac_cpp conftest.$ac_ext\"") >&5 2511if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
1990 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 2512 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1991 ac_status=$? 2513 ac_status=$?
1992 egrep -v '^ *\+' conftest.er1 >conftest.err 2514 grep -v '^ *+' conftest.er1 >conftest.err
1993 rm -f conftest.er1 2515 rm -f conftest.er1
1994 cat conftest.err >&5 2516 cat conftest.err >&5
1995 echo "$as_me:1995: \$? = $ac_status" >&5 2517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1996 (exit $ac_status); } >/dev/null; then 2518 (exit $ac_status); } >/dev/null; then
1997 if test -s conftest.err; then 2519 if test -s conftest.err; then
1998 ac_cpp_err=$ac_c_preproc_warn_flag 2520 ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2006,7 +2528,8 @@ if test -z "$ac_cpp_err"; then
2006 : 2528 :
2007else 2529else
2008 echo "$as_me: failed program was:" >&5 2530 echo "$as_me: failed program was:" >&5
2009 cat conftest.$ac_ext >&5 2531sed 's/^/| /' conftest.$ac_ext >&5
2532
2010 # Broken: fails on valid input. 2533 # Broken: fails on valid input.
2011continue 2534continue
2012fi 2535fi
@@ -2015,17 +2538,21 @@ rm -f conftest.err conftest.$ac_ext
2015 # OK, works on sane cases. Now check whether non-existent headers 2538 # OK, works on sane cases. Now check whether non-existent headers
2016 # can be detected and how. 2539 # can be detected and how.
2017 cat >conftest.$ac_ext <<_ACEOF 2540 cat >conftest.$ac_ext <<_ACEOF
2018#line 2018 "configure" 2541#line $LINENO "configure"
2019#include "confdefs.h" 2542/* confdefs.h. */
2543_ACEOF
2544cat confdefs.h >>conftest.$ac_ext
2545cat >>conftest.$ac_ext <<_ACEOF
2546/* end confdefs.h. */
2020#include <ac_nonexistent.h> 2547#include <ac_nonexistent.h>
2021_ACEOF 2548_ACEOF
2022if { (eval echo "$as_me:2022: \"$ac_cpp conftest.$ac_ext\"") >&5 2549if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2023 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 2550 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2024 ac_status=$? 2551 ac_status=$?
2025 egrep -v '^ *\+' conftest.er1 >conftest.err 2552 grep -v '^ *+' conftest.er1 >conftest.err
2026 rm -f conftest.er1 2553 rm -f conftest.er1
2027 cat conftest.err >&5 2554 cat conftest.err >&5
2028 echo "$as_me:2028: \$? = $ac_status" >&5 2555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2029 (exit $ac_status); } >/dev/null; then 2556 (exit $ac_status); } >/dev/null; then
2030 if test -s conftest.err; then 2557 if test -s conftest.err; then
2031 ac_cpp_err=$ac_c_preproc_warn_flag 2558 ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2040,7 +2567,8 @@ if test -z "$ac_cpp_err"; then
2040continue 2567continue
2041else 2568else
2042 echo "$as_me: failed program was:" >&5 2569 echo "$as_me: failed program was:" >&5
2043 cat conftest.$ac_ext >&5 2570sed 's/^/| /' conftest.$ac_ext >&5
2571
2044 # Passes both tests. 2572 # Passes both tests.
2045ac_preproc_ok=: 2573ac_preproc_ok=:
2046break 2574break
@@ -2062,28 +2590,38 @@ fi
2062else 2590else
2063 ac_cv_prog_CPP=$CPP 2591 ac_cv_prog_CPP=$CPP
2064fi 2592fi
2065echo "$as_me:2065: result: $CPP" >&5 2593echo "$as_me:$LINENO: result: $CPP" >&5
2066echo "${ECHO_T}$CPP" >&6 2594echo "${ECHO_T}$CPP" >&6
2067ac_preproc_ok=false 2595ac_preproc_ok=false
2068for ac_c_preproc_warn_flag in '' yes 2596for ac_c_preproc_warn_flag in '' yes
2069do 2597do
2070 # Use a header file that comes with gcc, so configuring glibc 2598 # Use a header file that comes with gcc, so configuring glibc
2071 # with a fresh cross-compiler works. 2599 # with a fresh cross-compiler works.
2600 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2601 # <limits.h> exists even on freestanding compilers.
2072 # On the NeXT, cc -E runs the code through the compiler's parser, 2602 # On the NeXT, cc -E runs the code through the compiler's parser,
2073 # not just through cpp. "Syntax error" is here to catch this case. 2603 # not just through cpp. "Syntax error" is here to catch this case.
2074 cat >conftest.$ac_ext <<_ACEOF 2604 cat >conftest.$ac_ext <<_ACEOF
2075#line 2075 "configure" 2605#line $LINENO "configure"
2076#include "confdefs.h" 2606/* confdefs.h. */
2077#include <assert.h> 2607_ACEOF
2608cat confdefs.h >>conftest.$ac_ext
2609cat >>conftest.$ac_ext <<_ACEOF
2610/* end confdefs.h. */
2611#ifdef __STDC__
2612# include <limits.h>
2613#else
2614# include <assert.h>
2615#endif
2078 Syntax error 2616 Syntax error
2079_ACEOF 2617_ACEOF
2080if { (eval echo "$as_me:2080: \"$ac_cpp conftest.$ac_ext\"") >&5 2618if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2081 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 2619 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2082 ac_status=$? 2620 ac_status=$?
2083 egrep -v '^ *\+' conftest.er1 >conftest.err 2621 grep -v '^ *+' conftest.er1 >conftest.err
2084 rm -f conftest.er1 2622 rm -f conftest.er1
2085 cat conftest.err >&5 2623 cat conftest.err >&5
2086 echo "$as_me:2086: \$? = $ac_status" >&5 2624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2087 (exit $ac_status); } >/dev/null; then 2625 (exit $ac_status); } >/dev/null; then
2088 if test -s conftest.err; then 2626 if test -s conftest.err; then
2089 ac_cpp_err=$ac_c_preproc_warn_flag 2627 ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2097,7 +2635,8 @@ if test -z "$ac_cpp_err"; then
2097 : 2635 :
2098else 2636else
2099 echo "$as_me: failed program was:" >&5 2637 echo "$as_me: failed program was:" >&5
2100 cat conftest.$ac_ext >&5 2638sed 's/^/| /' conftest.$ac_ext >&5
2639
2101 # Broken: fails on valid input. 2640 # Broken: fails on valid input.
2102continue 2641continue
2103fi 2642fi
@@ -2106,17 +2645,21 @@ rm -f conftest.err conftest.$ac_ext
2106 # OK, works on sane cases. Now check whether non-existent headers 2645 # OK, works on sane cases. Now check whether non-existent headers
2107 # can be detected and how. 2646 # can be detected and how.
2108 cat >conftest.$ac_ext <<_ACEOF 2647 cat >conftest.$ac_ext <<_ACEOF
2109#line 2109 "configure" 2648#line $LINENO "configure"
2110#include "confdefs.h" 2649/* confdefs.h. */
2650_ACEOF
2651cat confdefs.h >>conftest.$ac_ext
2652cat >>conftest.$ac_ext <<_ACEOF
2653/* end confdefs.h. */
2111#include <ac_nonexistent.h> 2654#include <ac_nonexistent.h>
2112_ACEOF 2655_ACEOF
2113if { (eval echo "$as_me:2113: \"$ac_cpp conftest.$ac_ext\"") >&5 2656if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2114 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 2657 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2115 ac_status=$? 2658 ac_status=$?
2116 egrep -v '^ *\+' conftest.er1 >conftest.err 2659 grep -v '^ *+' conftest.er1 >conftest.err
2117 rm -f conftest.er1 2660 rm -f conftest.er1
2118 cat conftest.err >&5 2661 cat conftest.err >&5
2119 echo "$as_me:2119: \$? = $ac_status" >&5 2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2120 (exit $ac_status); } >/dev/null; then 2663 (exit $ac_status); } >/dev/null; then
2121 if test -s conftest.err; then 2664 if test -s conftest.err; then
2122 ac_cpp_err=$ac_c_preproc_warn_flag 2665 ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2131,7 +2674,8 @@ if test -z "$ac_cpp_err"; then
2131continue 2674continue
2132else 2675else
2133 echo "$as_me: failed program was:" >&5 2676 echo "$as_me: failed program was:" >&5
2134 cat conftest.$ac_ext >&5 2677sed 's/^/| /' conftest.$ac_ext >&5
2678
2135 # Passes both tests. 2679 # Passes both tests.
2136ac_preproc_ok=: 2680ac_preproc_ok=:
2137break 2681break
@@ -2144,8 +2688,10 @@ rm -f conftest.err conftest.$ac_ext
2144if $ac_preproc_ok; then 2688if $ac_preproc_ok; then
2145 : 2689 :
2146else 2690else
2147 { { echo "$as_me:2147: error: C preprocessor \"$CPP\" fails sanity check" >&5 2691 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2148echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} 2692See \`config.log' for more details." >&5
2693echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2694See \`config.log' for more details." >&2;}
2149 { (exit 1); exit 1; }; } 2695 { (exit 1); exit 1; }; }
2150fi 2696fi
2151 2697
@@ -2158,7 +2704,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2158if test -n "$ac_tool_prefix"; then 2704if test -n "$ac_tool_prefix"; then
2159 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 2705 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2160set dummy ${ac_tool_prefix}ranlib; ac_word=$2 2706set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2161echo "$as_me:2161: checking for $ac_word" >&5 2707echo "$as_me:$LINENO: checking for $ac_word" >&5
2162echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2708echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2163if test "${ac_cv_prog_RANLIB+set}" = set; then 2709if test "${ac_cv_prog_RANLIB+set}" = set; then
2164 echo $ECHO_N "(cached) $ECHO_C" >&6 2710 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2166,25 +2712,28 @@ else
2166 if test -n "$RANLIB"; then 2712 if test -n "$RANLIB"; then
2167 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 2713 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2168else 2714else
2169 ac_save_IFS=$IFS; IFS=$ac_path_separator 2715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2170ac_dummy="$PATH" 2716for as_dir in $PATH
2171for ac_dir in $ac_dummy; do 2717do
2172 IFS=$ac_save_IFS 2718 IFS=$as_save_IFS
2173 test -z "$ac_dir" && ac_dir=. 2719 test -z "$as_dir" && as_dir=.
2174 $as_executable_p "$ac_dir/$ac_word" || continue 2720 for ac_exec_ext in '' $ac_executable_extensions; do
2175ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 2721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2176echo "$as_me:2176: found $ac_dir/$ac_word" >&5 2722 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2177break 2723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2724 break 2
2725 fi
2726done
2178done 2727done
2179 2728
2180fi 2729fi
2181fi 2730fi
2182RANLIB=$ac_cv_prog_RANLIB 2731RANLIB=$ac_cv_prog_RANLIB
2183if test -n "$RANLIB"; then 2732if test -n "$RANLIB"; then
2184 echo "$as_me:2184: result: $RANLIB" >&5 2733 echo "$as_me:$LINENO: result: $RANLIB" >&5
2185echo "${ECHO_T}$RANLIB" >&6 2734echo "${ECHO_T}$RANLIB" >&6
2186else 2735else
2187 echo "$as_me:2187: result: no" >&5 2736 echo "$as_me:$LINENO: result: no" >&5
2188echo "${ECHO_T}no" >&6 2737echo "${ECHO_T}no" >&6
2189fi 2738fi
2190 2739
@@ -2193,7 +2742,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
2193 ac_ct_RANLIB=$RANLIB 2742 ac_ct_RANLIB=$RANLIB
2194 # Extract the first word of "ranlib", so it can be a program name with args. 2743 # Extract the first word of "ranlib", so it can be a program name with args.
2195set dummy ranlib; ac_word=$2 2744set dummy ranlib; ac_word=$2
2196echo "$as_me:2196: checking for $ac_word" >&5 2745echo "$as_me:$LINENO: checking for $ac_word" >&5
2197echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2198if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then 2747if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2199 echo $ECHO_N "(cached) $ECHO_C" >&6 2748 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2201,15 +2750,18 @@ else
2201 if test -n "$ac_ct_RANLIB"; then 2750 if test -n "$ac_ct_RANLIB"; then
2202 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 2751 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2203else 2752else
2204 ac_save_IFS=$IFS; IFS=$ac_path_separator 2753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2205ac_dummy="$PATH" 2754for as_dir in $PATH
2206for ac_dir in $ac_dummy; do 2755do
2207 IFS=$ac_save_IFS 2756 IFS=$as_save_IFS
2208 test -z "$ac_dir" && ac_dir=. 2757 test -z "$as_dir" && as_dir=.
2209 $as_executable_p "$ac_dir/$ac_word" || continue 2758 for ac_exec_ext in '' $ac_executable_extensions; do
2210ac_cv_prog_ac_ct_RANLIB="ranlib" 2759 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2211echo "$as_me:2211: found $ac_dir/$ac_word" >&5 2760 ac_cv_prog_ac_ct_RANLIB="ranlib"
2212break 2761 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2762 break 2
2763 fi
2764done
2213done 2765done
2214 2766
2215 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" 2767 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
@@ -2217,10 +2769,10 @@ fi
2217fi 2769fi
2218ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 2770ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2219if test -n "$ac_ct_RANLIB"; then 2771if test -n "$ac_ct_RANLIB"; then
2220 echo "$as_me:2220: result: $ac_ct_RANLIB" >&5 2772 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
2221echo "${ECHO_T}$ac_ct_RANLIB" >&6 2773echo "${ECHO_T}$ac_ct_RANLIB" >&6
2222else 2774else
2223 echo "$as_me:2223: result: no" >&5 2775 echo "$as_me:$LINENO: result: no" >&5
2224echo "${ECHO_T}no" >&6 2776echo "${ECHO_T}no" >&6
2225fi 2777fi
2226 2778
@@ -2241,43 +2793,48 @@ fi
2241# AFS /usr/afsws/bin/install, which mishandles nonexistent args 2793# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2242# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 2794# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2243# ./install, which can be erroneously created by make from ./install.sh. 2795# ./install, which can be erroneously created by make from ./install.sh.
2244echo "$as_me:2244: checking for a BSD compatible install" >&5 2796echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2245echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 2797echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2246if test -z "$INSTALL"; then 2798if test -z "$INSTALL"; then
2247if test "${ac_cv_path_install+set}" = set; then 2799if test "${ac_cv_path_install+set}" = set; then
2248 echo $ECHO_N "(cached) $ECHO_C" >&6 2800 echo $ECHO_N "(cached) $ECHO_C" >&6
2249else 2801else
2250 ac_save_IFS=$IFS; IFS=$ac_path_separator 2802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2251 for ac_dir in $PATH; do 2803for as_dir in $PATH
2252 IFS=$ac_save_IFS 2804do
2253 # Account for people who put trailing slashes in PATH elements. 2805 IFS=$as_save_IFS
2254 case $ac_dir/ in 2806 test -z "$as_dir" && as_dir=.
2255 / | ./ | .// | /cC/* \ 2807 # Account for people who put trailing slashes in PATH elements.
2256 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ 2808case $as_dir/ in
2257 | /usr/ucb/* ) ;; 2809 ./ | .// | /cC/* | \
2258 *) 2810 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2259 # OSF1 and SCO ODT 3.0 have their own names for install. 2811 /usr/ucb/* ) ;;
2260 # Don't use installbsd from OSF since it installs stuff as root 2812 *)
2261 # by default. 2813 # OSF1 and SCO ODT 3.0 have their own names for install.
2262 for ac_prog in ginstall scoinst install; do 2814 # Don't use installbsd from OSF since it installs stuff as root
2263 if $as_executable_p "$ac_dir/$ac_prog"; then 2815 # by default.
2264 if test $ac_prog = install && 2816 for ac_prog in ginstall scoinst install; do
2265 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then 2817 for ac_exec_ext in '' $ac_executable_extensions; do
2266 # AIX install. It has an incompatible calling convention. 2818 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2267 : 2819 if test $ac_prog = install &&
2268 elif test $ac_prog = install && 2820 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2269 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then 2821 # AIX install. It has an incompatible calling convention.
2270 # program-specific install script used by HP pwplus--don't use. 2822 :
2271 : 2823 elif test $ac_prog = install &&
2272 else 2824 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2273 ac_cv_path_install="$ac_dir/$ac_prog -c" 2825 # program-specific install script used by HP pwplus--don't use.
2274 break 2 2826 :
2275 fi 2827 else
2276 fi 2828 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2829 break 3
2830 fi
2831 fi
2277 done 2832 done
2278 ;; 2833 done
2279 esac 2834 ;;
2280 done 2835esac
2836done
2837
2281 2838
2282fi 2839fi
2283 if test "${ac_cv_path_install+set}" = set; then 2840 if test "${ac_cv_path_install+set}" = set; then
@@ -2290,7 +2847,7 @@ fi
2290 INSTALL=$ac_install_sh 2847 INSTALL=$ac_install_sh
2291 fi 2848 fi
2292fi 2849fi
2293echo "$as_me:2293: result: $INSTALL" >&5 2850echo "$as_me:$LINENO: result: $INSTALL" >&5
2294echo "${ECHO_T}$INSTALL" >&6 2851echo "${ECHO_T}$INSTALL" >&6
2295 2852
2296# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 2853# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -2303,7 +2860,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2303 2860
2304# Extract the first word of "ar", so it can be a program name with args. 2861# Extract the first word of "ar", so it can be a program name with args.
2305set dummy ar; ac_word=$2 2862set dummy ar; ac_word=$2
2306echo "$as_me:2306: checking for $ac_word" >&5 2863echo "$as_me:$LINENO: checking for $ac_word" >&5
2307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2308if test "${ac_cv_path_AR+set}" = set; then 2865if test "${ac_cv_path_AR+set}" = set; then
2309 echo $ECHO_N "(cached) $ECHO_C" >&6 2866 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2313,16 +2870,18 @@ else
2313 ac_cv_path_AR="$AR" # Let the user override the test with a path. 2870 ac_cv_path_AR="$AR" # Let the user override the test with a path.
2314 ;; 2871 ;;
2315 *) 2872 *)
2316 ac_save_IFS=$IFS; IFS=$ac_path_separator 2873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2317ac_dummy="$PATH" 2874for as_dir in $PATH
2318for ac_dir in $ac_dummy; do 2875do
2319 IFS=$ac_save_IFS 2876 IFS=$as_save_IFS
2320 test -z "$ac_dir" && ac_dir=. 2877 test -z "$as_dir" && as_dir=.
2321 if $as_executable_p "$ac_dir/$ac_word"; then 2878 for ac_exec_ext in '' $ac_executable_extensions; do
2322 ac_cv_path_AR="$ac_dir/$ac_word" 2879 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2323 echo "$as_me:2323: found $ac_dir/$ac_word" >&5 2880 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
2324 break 2881 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2325fi 2882 break 2
2883 fi
2884done
2326done 2885done
2327 2886
2328 ;; 2887 ;;
@@ -2331,10 +2890,10 @@ fi
2331AR=$ac_cv_path_AR 2890AR=$ac_cv_path_AR
2332 2891
2333if test -n "$AR"; then 2892if test -n "$AR"; then
2334 echo "$as_me:2334: result: $AR" >&5 2893 echo "$as_me:$LINENO: result: $AR" >&5
2335echo "${ECHO_T}$AR" >&6 2894echo "${ECHO_T}$AR" >&6
2336else 2895else
2337 echo "$as_me:2337: result: no" >&5 2896 echo "$as_me:$LINENO: result: no" >&5
2338echo "${ECHO_T}no" >&6 2897echo "${ECHO_T}no" >&6
2339fi 2898fi
2340 2899
@@ -2342,7 +2901,7 @@ for ac_prog in perl5 perl
2342do 2901do
2343 # Extract the first word of "$ac_prog", so it can be a program name with args. 2902 # Extract the first word of "$ac_prog", so it can be a program name with args.
2344set dummy $ac_prog; ac_word=$2 2903set dummy $ac_prog; ac_word=$2
2345echo "$as_me:2345: checking for $ac_word" >&5 2904echo "$as_me:$LINENO: checking for $ac_word" >&5
2346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2905echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2347if test "${ac_cv_path_PERL+set}" = set; then 2906if test "${ac_cv_path_PERL+set}" = set; then
2348 echo $ECHO_N "(cached) $ECHO_C" >&6 2907 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2352,16 +2911,18 @@ else
2352 ac_cv_path_PERL="$PERL" # Let the user override the test with a path. 2911 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
2353 ;; 2912 ;;
2354 *) 2913 *)
2355 ac_save_IFS=$IFS; IFS=$ac_path_separator 2914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2356ac_dummy="$PATH" 2915for as_dir in $PATH
2357for ac_dir in $ac_dummy; do 2916do
2358 IFS=$ac_save_IFS 2917 IFS=$as_save_IFS
2359 test -z "$ac_dir" && ac_dir=. 2918 test -z "$as_dir" && as_dir=.
2360 if $as_executable_p "$ac_dir/$ac_word"; then 2919 for ac_exec_ext in '' $ac_executable_extensions; do
2361 ac_cv_path_PERL="$ac_dir/$ac_word" 2920 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2362 echo "$as_me:2362: found $ac_dir/$ac_word" >&5 2921 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
2363 break 2922 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2364fi 2923 break 2
2924 fi
2925done
2365done 2926done
2366 2927
2367 ;; 2928 ;;
@@ -2370,10 +2931,10 @@ fi
2370PERL=$ac_cv_path_PERL 2931PERL=$ac_cv_path_PERL
2371 2932
2372if test -n "$PERL"; then 2933if test -n "$PERL"; then
2373 echo "$as_me:2373: result: $PERL" >&5 2934 echo "$as_me:$LINENO: result: $PERL" >&5
2374echo "${ECHO_T}$PERL" >&6 2935echo "${ECHO_T}$PERL" >&6
2375else 2936else
2376 echo "$as_me:2376: result: no" >&5 2937 echo "$as_me:$LINENO: result: no" >&5
2377echo "${ECHO_T}no" >&6 2938echo "${ECHO_T}no" >&6
2378fi 2939fi
2379 2940
@@ -2382,7 +2943,7 @@ done
2382 2943
2383# Extract the first word of "sed", so it can be a program name with args. 2944# Extract the first word of "sed", so it can be a program name with args.
2384set dummy sed; ac_word=$2 2945set dummy sed; ac_word=$2
2385echo "$as_me:2385: checking for $ac_word" >&5 2946echo "$as_me:$LINENO: checking for $ac_word" >&5
2386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2947echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2387if test "${ac_cv_path_SED+set}" = set; then 2948if test "${ac_cv_path_SED+set}" = set; then
2388 echo $ECHO_N "(cached) $ECHO_C" >&6 2949 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2392,16 +2953,18 @@ else
2392 ac_cv_path_SED="$SED" # Let the user override the test with a path. 2953 ac_cv_path_SED="$SED" # Let the user override the test with a path.
2393 ;; 2954 ;;
2394 *) 2955 *)
2395 ac_save_IFS=$IFS; IFS=$ac_path_separator 2956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2396ac_dummy="$PATH" 2957for as_dir in $PATH
2397for ac_dir in $ac_dummy; do 2958do
2398 IFS=$ac_save_IFS 2959 IFS=$as_save_IFS
2399 test -z "$ac_dir" && ac_dir=. 2960 test -z "$as_dir" && as_dir=.
2400 if $as_executable_p "$ac_dir/$ac_word"; then 2961 for ac_exec_ext in '' $ac_executable_extensions; do
2401 ac_cv_path_SED="$ac_dir/$ac_word" 2962 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2402 echo "$as_me:2402: found $ac_dir/$ac_word" >&5 2963 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
2403 break 2964 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2404fi 2965 break 2
2966 fi
2967done
2405done 2968done
2406 2969
2407 ;; 2970 ;;
@@ -2410,16 +2973,17 @@ fi
2410SED=$ac_cv_path_SED 2973SED=$ac_cv_path_SED
2411 2974
2412if test -n "$SED"; then 2975if test -n "$SED"; then
2413 echo "$as_me:2413: result: $SED" >&5 2976 echo "$as_me:$LINENO: result: $SED" >&5
2414echo "${ECHO_T}$SED" >&6 2977echo "${ECHO_T}$SED" >&6
2415else 2978else
2416 echo "$as_me:2416: result: no" >&5 2979 echo "$as_me:$LINENO: result: no" >&5
2417echo "${ECHO_T}no" >&6 2980echo "${ECHO_T}no" >&6
2418fi 2981fi
2419 2982
2983
2420# Extract the first word of "ent", so it can be a program name with args. 2984# Extract the first word of "ent", so it can be a program name with args.
2421set dummy ent; ac_word=$2 2985set dummy ent; ac_word=$2
2422echo "$as_me:2422: checking for $ac_word" >&5 2986echo "$as_me:$LINENO: checking for $ac_word" >&5
2423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 2987echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2424if test "${ac_cv_path_ENT+set}" = set; then 2988if test "${ac_cv_path_ENT+set}" = set; then
2425 echo $ECHO_N "(cached) $ECHO_C" >&6 2989 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2429,16 +2993,18 @@ else
2429 ac_cv_path_ENT="$ENT" # Let the user override the test with a path. 2993 ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
2430 ;; 2994 ;;
2431 *) 2995 *)
2432 ac_save_IFS=$IFS; IFS=$ac_path_separator 2996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433ac_dummy="$PATH" 2997for as_dir in $PATH
2434for ac_dir in $ac_dummy; do 2998do
2435 IFS=$ac_save_IFS 2999 IFS=$as_save_IFS
2436 test -z "$ac_dir" && ac_dir=. 3000 test -z "$as_dir" && as_dir=.
2437 if $as_executable_p "$ac_dir/$ac_word"; then 3001 for ac_exec_ext in '' $ac_executable_extensions; do
2438 ac_cv_path_ENT="$ac_dir/$ac_word" 3002 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2439 echo "$as_me:2439: found $ac_dir/$ac_word" >&5 3003 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
2440 break 3004 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2441fi 3005 break 2
3006 fi
3007done
2442done 3008done
2443 3009
2444 ;; 3010 ;;
@@ -2447,16 +3013,17 @@ fi
2447ENT=$ac_cv_path_ENT 3013ENT=$ac_cv_path_ENT
2448 3014
2449if test -n "$ENT"; then 3015if test -n "$ENT"; then
2450 echo "$as_me:2450: result: $ENT" >&5 3016 echo "$as_me:$LINENO: result: $ENT" >&5
2451echo "${ECHO_T}$ENT" >&6 3017echo "${ECHO_T}$ENT" >&6
2452else 3018else
2453 echo "$as_me:2453: result: no" >&5 3019 echo "$as_me:$LINENO: result: no" >&5
2454echo "${ECHO_T}no" >&6 3020echo "${ECHO_T}no" >&6
2455fi 3021fi
2456 3022
3023
2457# Extract the first word of "bash", so it can be a program name with args. 3024# Extract the first word of "bash", so it can be a program name with args.
2458set dummy bash; ac_word=$2 3025set dummy bash; ac_word=$2
2459echo "$as_me:2459: checking for $ac_word" >&5 3026echo "$as_me:$LINENO: checking for $ac_word" >&5
2460echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3027echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2461if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 3028if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
2462 echo $ECHO_N "(cached) $ECHO_C" >&6 3029 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2466,16 +3033,18 @@ else
2466 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path. 3033 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
2467 ;; 3034 ;;
2468 *) 3035 *)
2469 ac_save_IFS=$IFS; IFS=$ac_path_separator 3036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2470ac_dummy="$PATH" 3037for as_dir in $PATH
2471for ac_dir in $ac_dummy; do 3038do
2472 IFS=$ac_save_IFS 3039 IFS=$as_save_IFS
2473 test -z "$ac_dir" && ac_dir=. 3040 test -z "$as_dir" && as_dir=.
2474 if $as_executable_p "$ac_dir/$ac_word"; then 3041 for ac_exec_ext in '' $ac_executable_extensions; do
2475 ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" 3042 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2476 echo "$as_me:2476: found $ac_dir/$ac_word" >&5 3043 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
2477 break 3044 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2478fi 3045 break 2
3046 fi
3047done
2479done 3048done
2480 3049
2481 ;; 3050 ;;
@@ -2484,16 +3053,16 @@ fi
2484TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 3053TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
2485 3054
2486if test -n "$TEST_MINUS_S_SH"; then 3055if test -n "$TEST_MINUS_S_SH"; then
2487 echo "$as_me:2487: result: $TEST_MINUS_S_SH" >&5 3056 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
2488echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 3057echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
2489else 3058else
2490 echo "$as_me:2490: result: no" >&5 3059 echo "$as_me:$LINENO: result: no" >&5
2491echo "${ECHO_T}no" >&6 3060echo "${ECHO_T}no" >&6
2492fi 3061fi
2493 3062
2494# Extract the first word of "ksh", so it can be a program name with args. 3063# Extract the first word of "ksh", so it can be a program name with args.
2495set dummy ksh; ac_word=$2 3064set dummy ksh; ac_word=$2
2496echo "$as_me:2496: checking for $ac_word" >&5 3065echo "$as_me:$LINENO: checking for $ac_word" >&5
2497echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3066echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2498if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 3067if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
2499 echo $ECHO_N "(cached) $ECHO_C" >&6 3068 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2503,16 +3072,18 @@ else
2503 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path. 3072 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
2504 ;; 3073 ;;
2505 *) 3074 *)
2506 ac_save_IFS=$IFS; IFS=$ac_path_separator 3075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2507ac_dummy="$PATH" 3076for as_dir in $PATH
2508for ac_dir in $ac_dummy; do 3077do
2509 IFS=$ac_save_IFS 3078 IFS=$as_save_IFS
2510 test -z "$ac_dir" && ac_dir=. 3079 test -z "$as_dir" && as_dir=.
2511 if $as_executable_p "$ac_dir/$ac_word"; then 3080 for ac_exec_ext in '' $ac_executable_extensions; do
2512 ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" 3081 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2513 echo "$as_me:2513: found $ac_dir/$ac_word" >&5 3082 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
2514 break 3083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2515fi 3084 break 2
3085 fi
3086done
2516done 3087done
2517 3088
2518 ;; 3089 ;;
@@ -2521,16 +3092,16 @@ fi
2521TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 3092TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
2522 3093
2523if test -n "$TEST_MINUS_S_SH"; then 3094if test -n "$TEST_MINUS_S_SH"; then
2524 echo "$as_me:2524: result: $TEST_MINUS_S_SH" >&5 3095 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
2525echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 3096echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
2526else 3097else
2527 echo "$as_me:2527: result: no" >&5 3098 echo "$as_me:$LINENO: result: no" >&5
2528echo "${ECHO_T}no" >&6 3099echo "${ECHO_T}no" >&6
2529fi 3100fi
2530 3101
2531# Extract the first word of "sh", so it can be a program name with args. 3102# Extract the first word of "sh", so it can be a program name with args.
2532set dummy sh; ac_word=$2 3103set dummy sh; ac_word=$2
2533echo "$as_me:2533: checking for $ac_word" >&5 3104echo "$as_me:$LINENO: checking for $ac_word" >&5
2534echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3105echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2535if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 3106if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then
2536 echo $ECHO_N "(cached) $ECHO_C" >&6 3107 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2540,16 +3111,18 @@ else
2540 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path. 3111 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
2541 ;; 3112 ;;
2542 *) 3113 *)
2543 ac_save_IFS=$IFS; IFS=$ac_path_separator 3114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2544ac_dummy="$PATH" 3115for as_dir in $PATH
2545for ac_dir in $ac_dummy; do 3116do
2546 IFS=$ac_save_IFS 3117 IFS=$as_save_IFS
2547 test -z "$ac_dir" && ac_dir=. 3118 test -z "$as_dir" && as_dir=.
2548 if $as_executable_p "$ac_dir/$ac_word"; then 3119 for ac_exec_ext in '' $ac_executable_extensions; do
2549 ac_cv_path_TEST_MINUS_S_SH="$ac_dir/$ac_word" 3120 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2550 echo "$as_me:2550: found $ac_dir/$ac_word" >&5 3121 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
2551 break 3122 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2552fi 3123 break 2
3124 fi
3125done
2553done 3126done
2554 3127
2555 ;; 3128 ;;
@@ -2558,16 +3131,16 @@ fi
2558TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 3131TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
2559 3132
2560if test -n "$TEST_MINUS_S_SH"; then 3133if test -n "$TEST_MINUS_S_SH"; then
2561 echo "$as_me:2561: result: $TEST_MINUS_S_SH" >&5 3134 echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5
2562echo "${ECHO_T}$TEST_MINUS_S_SH" >&6 3135echo "${ECHO_T}$TEST_MINUS_S_SH" >&6
2563else 3136else
2564 echo "$as_me:2564: result: no" >&5 3137 echo "$as_me:$LINENO: result: no" >&5
2565echo "${ECHO_T}no" >&6 3138echo "${ECHO_T}no" >&6
2566fi 3139fi
2567 3140
2568# Extract the first word of "sh", so it can be a program name with args. 3141# Extract the first word of "sh", so it can be a program name with args.
2569set dummy sh; ac_word=$2 3142set dummy sh; ac_word=$2
2570echo "$as_me:2570: checking for $ac_word" >&5 3143echo "$as_me:$LINENO: checking for $ac_word" >&5
2571echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2572if test "${ac_cv_path_SH+set}" = set; then 3145if test "${ac_cv_path_SH+set}" = set; then
2573 echo $ECHO_N "(cached) $ECHO_C" >&6 3146 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2577,16 +3150,18 @@ else
2577 ac_cv_path_SH="$SH" # Let the user override the test with a path. 3150 ac_cv_path_SH="$SH" # Let the user override the test with a path.
2578 ;; 3151 ;;
2579 *) 3152 *)
2580 ac_save_IFS=$IFS; IFS=$ac_path_separator 3153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2581ac_dummy="$PATH" 3154for as_dir in $PATH
2582for ac_dir in $ac_dummy; do 3155do
2583 IFS=$ac_save_IFS 3156 IFS=$as_save_IFS
2584 test -z "$ac_dir" && ac_dir=. 3157 test -z "$as_dir" && as_dir=.
2585 if $as_executable_p "$ac_dir/$ac_word"; then 3158 for ac_exec_ext in '' $ac_executable_extensions; do
2586 ac_cv_path_SH="$ac_dir/$ac_word" 3159 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2587 echo "$as_me:2587: found $ac_dir/$ac_word" >&5 3160 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
2588 break 3161 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2589fi 3162 break 2
3163 fi
3164done
2590done 3165done
2591 3166
2592 ;; 3167 ;;
@@ -2595,13 +3170,14 @@ fi
2595SH=$ac_cv_path_SH 3170SH=$ac_cv_path_SH
2596 3171
2597if test -n "$SH"; then 3172if test -n "$SH"; then
2598 echo "$as_me:2598: result: $SH" >&5 3173 echo "$as_me:$LINENO: result: $SH" >&5
2599echo "${ECHO_T}$SH" >&6 3174echo "${ECHO_T}$SH" >&6
2600else 3175else
2601 echo "$as_me:2601: result: no" >&5 3176 echo "$as_me:$LINENO: result: no" >&5
2602echo "${ECHO_T}no" >&6 3177echo "${ECHO_T}no" >&6
2603fi 3178fi
2604 3179
3180
2605# System features 3181# System features
2606# Check whether --enable-largefile or --disable-largefile was given. 3182# Check whether --enable-largefile or --disable-largefile was given.
2607if test "${enable_largefile+set}" = set; then 3183if test "${enable_largefile+set}" = set; then
@@ -2610,7 +3186,7 @@ if test "${enable_largefile+set}" = set; then
2610fi; 3186fi;
2611if test "$enable_largefile" != no; then 3187if test "$enable_largefile" != no; then
2612 3188
2613 echo "$as_me:2613: checking for special C compiler options needed for large files" >&5 3189 echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
2614echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 3190echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
2615if test "${ac_cv_sys_largefile_CC+set}" = set; then 3191if test "${ac_cv_sys_largefile_CC+set}" = set; then
2616 echo $ECHO_N "(cached) $ECHO_C" >&6 3192 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2622,8 +3198,12 @@ else
2622 # IRIX 6.2 and later do not support large files by default, 3198 # IRIX 6.2 and later do not support large files by default,
2623 # so use the C compiler's -n32 option if that helps. 3199 # so use the C compiler's -n32 option if that helps.
2624 cat >conftest.$ac_ext <<_ACEOF 3200 cat >conftest.$ac_ext <<_ACEOF
2625#line 2625 "configure" 3201#line $LINENO "configure"
2626#include "confdefs.h" 3202/* confdefs.h. */
3203_ACEOF
3204cat confdefs.h >>conftest.$ac_ext
3205cat >>conftest.$ac_ext <<_ACEOF
3206/* end confdefs.h. */
2627#include <sys/types.h> 3207#include <sys/types.h>
2628 /* Check that off_t can represent 2**63 - 1 correctly. 3208 /* Check that off_t can represent 2**63 - 1 correctly.
2629 We can't simply define LARGE_OFF_T to be 9223372036854775807, 3209 We can't simply define LARGE_OFF_T to be 9223372036854775807,
@@ -2642,40 +3222,42 @@ main ()
2642} 3222}
2643_ACEOF 3223_ACEOF
2644 rm -f conftest.$ac_objext 3224 rm -f conftest.$ac_objext
2645if { (eval echo "$as_me:2645: \"$ac_compile\"") >&5 3225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2646 (eval $ac_compile) 2>&5 3226 (eval $ac_compile) 2>&5
2647 ac_status=$? 3227 ac_status=$?
2648 echo "$as_me:2648: \$? = $ac_status" >&5 3228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649 (exit $ac_status); } && 3229 (exit $ac_status); } &&
2650 { ac_try='test -s conftest.$ac_objext' 3230 { ac_try='test -s conftest.$ac_objext'
2651 { (eval echo "$as_me:2651: \"$ac_try\"") >&5 3231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2652 (eval $ac_try) 2>&5 3232 (eval $ac_try) 2>&5
2653 ac_status=$? 3233 ac_status=$?
2654 echo "$as_me:2654: \$? = $ac_status" >&5 3234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655 (exit $ac_status); }; }; then 3235 (exit $ac_status); }; }; then
2656 break 3236 break
2657else 3237else
2658 echo "$as_me: failed program was:" >&5 3238 echo "$as_me: failed program was:" >&5
2659cat conftest.$ac_ext >&5 3239sed 's/^/| /' conftest.$ac_ext >&5
3240
2660fi 3241fi
2661rm -f conftest.$ac_objext 3242rm -f conftest.$ac_objext
2662 CC="$CC -n32" 3243 CC="$CC -n32"
2663 rm -f conftest.$ac_objext 3244 rm -f conftest.$ac_objext
2664if { (eval echo "$as_me:2664: \"$ac_compile\"") >&5 3245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2665 (eval $ac_compile) 2>&5 3246 (eval $ac_compile) 2>&5
2666 ac_status=$? 3247 ac_status=$?
2667 echo "$as_me:2667: \$? = $ac_status" >&5 3248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2668 (exit $ac_status); } && 3249 (exit $ac_status); } &&
2669 { ac_try='test -s conftest.$ac_objext' 3250 { ac_try='test -s conftest.$ac_objext'
2670 { (eval echo "$as_me:2670: \"$ac_try\"") >&5 3251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2671 (eval $ac_try) 2>&5 3252 (eval $ac_try) 2>&5
2672 ac_status=$? 3253 ac_status=$?
2673 echo "$as_me:2673: \$? = $ac_status" >&5 3254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2674 (exit $ac_status); }; }; then 3255 (exit $ac_status); }; }; then
2675 ac_cv_sys_largefile_CC=' -n32'; break 3256 ac_cv_sys_largefile_CC=' -n32'; break
2676else 3257else
2677 echo "$as_me: failed program was:" >&5 3258 echo "$as_me: failed program was:" >&5
2678cat conftest.$ac_ext >&5 3259sed 's/^/| /' conftest.$ac_ext >&5
3260
2679fi 3261fi
2680rm -f conftest.$ac_objext 3262rm -f conftest.$ac_objext
2681 break 3263 break
@@ -2684,13 +3266,13 @@ rm -f conftest.$ac_objext
2684 rm -f conftest.$ac_ext 3266 rm -f conftest.$ac_ext
2685 fi 3267 fi
2686fi 3268fi
2687echo "$as_me:2687: result: $ac_cv_sys_largefile_CC" >&5 3269echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
2688echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 3270echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
2689 if test "$ac_cv_sys_largefile_CC" != no; then 3271 if test "$ac_cv_sys_largefile_CC" != no; then
2690 CC=$CC$ac_cv_sys_largefile_CC 3272 CC=$CC$ac_cv_sys_largefile_CC
2691 fi 3273 fi
2692 3274
2693 echo "$as_me:2693: checking for _FILE_OFFSET_BITS value needed for large files" >&5 3275 echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
2694echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 3276echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
2695if test "${ac_cv_sys_file_offset_bits+set}" = set; then 3277if test "${ac_cv_sys_file_offset_bits+set}" = set; then
2696 echo $ECHO_N "(cached) $ECHO_C" >&6 3278 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2698,8 +3280,12 @@ else
2698 while :; do 3280 while :; do
2699 ac_cv_sys_file_offset_bits=no 3281 ac_cv_sys_file_offset_bits=no
2700 cat >conftest.$ac_ext <<_ACEOF 3282 cat >conftest.$ac_ext <<_ACEOF
2701#line 2701 "configure" 3283#line $LINENO "configure"
2702#include "confdefs.h" 3284/* confdefs.h. */
3285_ACEOF
3286cat confdefs.h >>conftest.$ac_ext
3287cat >>conftest.$ac_ext <<_ACEOF
3288/* end confdefs.h. */
2703#include <sys/types.h> 3289#include <sys/types.h>
2704 /* Check that off_t can represent 2**63 - 1 correctly. 3290 /* Check that off_t can represent 2**63 - 1 correctly.
2705 We can't simply define LARGE_OFF_T to be 9223372036854775807, 3291 We can't simply define LARGE_OFF_T to be 9223372036854775807,
@@ -2718,26 +3304,31 @@ main ()
2718} 3304}
2719_ACEOF 3305_ACEOF
2720rm -f conftest.$ac_objext 3306rm -f conftest.$ac_objext
2721if { (eval echo "$as_me:2721: \"$ac_compile\"") >&5 3307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2722 (eval $ac_compile) 2>&5 3308 (eval $ac_compile) 2>&5
2723 ac_status=$? 3309 ac_status=$?
2724 echo "$as_me:2724: \$? = $ac_status" >&5 3310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2725 (exit $ac_status); } && 3311 (exit $ac_status); } &&
2726 { ac_try='test -s conftest.$ac_objext' 3312 { ac_try='test -s conftest.$ac_objext'
2727 { (eval echo "$as_me:2727: \"$ac_try\"") >&5 3313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2728 (eval $ac_try) 2>&5 3314 (eval $ac_try) 2>&5
2729 ac_status=$? 3315 ac_status=$?
2730 echo "$as_me:2730: \$? = $ac_status" >&5 3316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731 (exit $ac_status); }; }; then 3317 (exit $ac_status); }; }; then
2732 break 3318 break
2733else 3319else
2734 echo "$as_me: failed program was:" >&5 3320 echo "$as_me: failed program was:" >&5
2735cat conftest.$ac_ext >&5 3321sed 's/^/| /' conftest.$ac_ext >&5
3322
2736fi 3323fi
2737rm -f conftest.$ac_objext conftest.$ac_ext 3324rm -f conftest.$ac_objext conftest.$ac_ext
2738 cat >conftest.$ac_ext <<_ACEOF 3325 cat >conftest.$ac_ext <<_ACEOF
2739#line 2739 "configure" 3326#line $LINENO "configure"
2740#include "confdefs.h" 3327/* confdefs.h. */
3328_ACEOF
3329cat confdefs.h >>conftest.$ac_ext
3330cat >>conftest.$ac_ext <<_ACEOF
3331/* end confdefs.h. */
2741#define _FILE_OFFSET_BITS 64 3332#define _FILE_OFFSET_BITS 64
2742#include <sys/types.h> 3333#include <sys/types.h>
2743 /* Check that off_t can represent 2**63 - 1 correctly. 3334 /* Check that off_t can represent 2**63 - 1 correctly.
@@ -2757,37 +3348,38 @@ main ()
2757} 3348}
2758_ACEOF 3349_ACEOF
2759rm -f conftest.$ac_objext 3350rm -f conftest.$ac_objext
2760if { (eval echo "$as_me:2760: \"$ac_compile\"") >&5 3351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2761 (eval $ac_compile) 2>&5 3352 (eval $ac_compile) 2>&5
2762 ac_status=$? 3353 ac_status=$?
2763 echo "$as_me:2763: \$? = $ac_status" >&5 3354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2764 (exit $ac_status); } && 3355 (exit $ac_status); } &&
2765 { ac_try='test -s conftest.$ac_objext' 3356 { ac_try='test -s conftest.$ac_objext'
2766 { (eval echo "$as_me:2766: \"$ac_try\"") >&5 3357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2767 (eval $ac_try) 2>&5 3358 (eval $ac_try) 2>&5
2768 ac_status=$? 3359 ac_status=$?
2769 echo "$as_me:2769: \$? = $ac_status" >&5 3360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2770 (exit $ac_status); }; }; then 3361 (exit $ac_status); }; }; then
2771 ac_cv_sys_file_offset_bits=64; break 3362 ac_cv_sys_file_offset_bits=64; break
2772else 3363else
2773 echo "$as_me: failed program was:" >&5 3364 echo "$as_me: failed program was:" >&5
2774cat conftest.$ac_ext >&5 3365sed 's/^/| /' conftest.$ac_ext >&5
3366
2775fi 3367fi
2776rm -f conftest.$ac_objext conftest.$ac_ext 3368rm -f conftest.$ac_objext conftest.$ac_ext
2777 break 3369 break
2778done 3370done
2779fi 3371fi
2780echo "$as_me:2780: result: $ac_cv_sys_file_offset_bits" >&5 3372echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
2781echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 3373echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
2782if test "$ac_cv_sys_file_offset_bits" != no; then 3374if test "$ac_cv_sys_file_offset_bits" != no; then
2783 3375
2784cat >>confdefs.h <<EOF 3376cat >>confdefs.h <<_ACEOF
2785#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits 3377#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
2786EOF 3378_ACEOF
2787 3379
2788fi 3380fi
2789rm -f conftest* 3381rm -f conftest*
2790 echo "$as_me:2790: checking for _LARGE_FILES value needed for large files" >&5 3382 echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
2791echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 3383echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
2792if test "${ac_cv_sys_large_files+set}" = set; then 3384if test "${ac_cv_sys_large_files+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6 3385 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2795,8 +3387,12 @@ else
2795 while :; do 3387 while :; do
2796 ac_cv_sys_large_files=no 3388 ac_cv_sys_large_files=no
2797 cat >conftest.$ac_ext <<_ACEOF 3389 cat >conftest.$ac_ext <<_ACEOF
2798#line 2798 "configure" 3390#line $LINENO "configure"
2799#include "confdefs.h" 3391/* confdefs.h. */
3392_ACEOF
3393cat confdefs.h >>conftest.$ac_ext
3394cat >>conftest.$ac_ext <<_ACEOF
3395/* end confdefs.h. */
2800#include <sys/types.h> 3396#include <sys/types.h>
2801 /* Check that off_t can represent 2**63 - 1 correctly. 3397 /* Check that off_t can represent 2**63 - 1 correctly.
2802 We can't simply define LARGE_OFF_T to be 9223372036854775807, 3398 We can't simply define LARGE_OFF_T to be 9223372036854775807,
@@ -2815,26 +3411,31 @@ main ()
2815} 3411}
2816_ACEOF 3412_ACEOF
2817rm -f conftest.$ac_objext 3413rm -f conftest.$ac_objext
2818if { (eval echo "$as_me:2818: \"$ac_compile\"") >&5 3414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2819 (eval $ac_compile) 2>&5 3415 (eval $ac_compile) 2>&5
2820 ac_status=$? 3416 ac_status=$?
2821 echo "$as_me:2821: \$? = $ac_status" >&5 3417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2822 (exit $ac_status); } && 3418 (exit $ac_status); } &&
2823 { ac_try='test -s conftest.$ac_objext' 3419 { ac_try='test -s conftest.$ac_objext'
2824 { (eval echo "$as_me:2824: \"$ac_try\"") >&5 3420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2825 (eval $ac_try) 2>&5 3421 (eval $ac_try) 2>&5
2826 ac_status=$? 3422 ac_status=$?
2827 echo "$as_me:2827: \$? = $ac_status" >&5 3423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2828 (exit $ac_status); }; }; then 3424 (exit $ac_status); }; }; then
2829 break 3425 break
2830else 3426else
2831 echo "$as_me: failed program was:" >&5 3427 echo "$as_me: failed program was:" >&5
2832cat conftest.$ac_ext >&5 3428sed 's/^/| /' conftest.$ac_ext >&5
3429
2833fi 3430fi
2834rm -f conftest.$ac_objext conftest.$ac_ext 3431rm -f conftest.$ac_objext conftest.$ac_ext
2835 cat >conftest.$ac_ext <<_ACEOF 3432 cat >conftest.$ac_ext <<_ACEOF
2836#line 2836 "configure" 3433#line $LINENO "configure"
2837#include "confdefs.h" 3434/* confdefs.h. */
3435_ACEOF
3436cat confdefs.h >>conftest.$ac_ext
3437cat >>conftest.$ac_ext <<_ACEOF
3438/* end confdefs.h. */
2838#define _LARGE_FILES 1 3439#define _LARGE_FILES 1
2839#include <sys/types.h> 3440#include <sys/types.h>
2840 /* Check that off_t can represent 2**63 - 1 correctly. 3441 /* Check that off_t can represent 2**63 - 1 correctly.
@@ -2854,55 +3455,57 @@ main ()
2854} 3455}
2855_ACEOF 3456_ACEOF
2856rm -f conftest.$ac_objext 3457rm -f conftest.$ac_objext
2857if { (eval echo "$as_me:2857: \"$ac_compile\"") >&5 3458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2858 (eval $ac_compile) 2>&5 3459 (eval $ac_compile) 2>&5
2859 ac_status=$? 3460 ac_status=$?
2860 echo "$as_me:2860: \$? = $ac_status" >&5 3461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2861 (exit $ac_status); } && 3462 (exit $ac_status); } &&
2862 { ac_try='test -s conftest.$ac_objext' 3463 { ac_try='test -s conftest.$ac_objext'
2863 { (eval echo "$as_me:2863: \"$ac_try\"") >&5 3464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2864 (eval $ac_try) 2>&5 3465 (eval $ac_try) 2>&5
2865 ac_status=$? 3466 ac_status=$?
2866 echo "$as_me:2866: \$? = $ac_status" >&5 3467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2867 (exit $ac_status); }; }; then 3468 (exit $ac_status); }; }; then
2868 ac_cv_sys_large_files=1; break 3469 ac_cv_sys_large_files=1; break
2869else 3470else
2870 echo "$as_me: failed program was:" >&5 3471 echo "$as_me: failed program was:" >&5
2871cat conftest.$ac_ext >&5 3472sed 's/^/| /' conftest.$ac_ext >&5
3473
2872fi 3474fi
2873rm -f conftest.$ac_objext conftest.$ac_ext 3475rm -f conftest.$ac_objext conftest.$ac_ext
2874 break 3476 break
2875done 3477done
2876fi 3478fi
2877echo "$as_me:2877: result: $ac_cv_sys_large_files" >&5 3479echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
2878echo "${ECHO_T}$ac_cv_sys_large_files" >&6 3480echo "${ECHO_T}$ac_cv_sys_large_files" >&6
2879if test "$ac_cv_sys_large_files" != no; then 3481if test "$ac_cv_sys_large_files" != no; then
2880 3482
2881cat >>confdefs.h <<EOF 3483cat >>confdefs.h <<_ACEOF
2882#define _LARGE_FILES $ac_cv_sys_large_files 3484#define _LARGE_FILES $ac_cv_sys_large_files
2883EOF 3485_ACEOF
2884 3486
2885fi 3487fi
2886rm -f conftest* 3488rm -f conftest*
2887fi 3489fi
2888 3490
3491
2889if test -z "$AR" ; then 3492if test -z "$AR" ; then
2890 { { echo "$as_me:2890: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5 3493 { { echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5
2891echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;} 3494echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
2892 { (exit 1); exit 1; }; } 3495 { (exit 1); exit 1; }; }
2893fi 3496fi
2894 3497
2895# Use LOGIN_PROGRAM from environment if possible 3498# Use LOGIN_PROGRAM from environment if possible
2896if test ! -z "$LOGIN_PROGRAM" ; then 3499if test ! -z "$LOGIN_PROGRAM" ; then
2897 cat >>confdefs.h <<EOF 3500 cat >>confdefs.h <<_ACEOF
2898#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM" 3501#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
2899EOF 3502_ACEOF
2900 3503
2901else 3504else
2902 # Search for login 3505 # Search for login
2903 # Extract the first word of "login", so it can be a program name with args. 3506 # Extract the first word of "login", so it can be a program name with args.
2904set dummy login; ac_word=$2 3507set dummy login; ac_word=$2
2905echo "$as_me:2905: checking for $ac_word" >&5 3508echo "$as_me:$LINENO: checking for $ac_word" >&5
2906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 3509echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2907if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then 3510if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then
2908 echo $ECHO_N "(cached) $ECHO_C" >&6 3511 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2912,16 +3515,18 @@ else
2912 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path. 3515 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path.
2913 ;; 3516 ;;
2914 *) 3517 *)
2915 ac_save_IFS=$IFS; IFS=$ac_path_separator 3518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2916ac_dummy="$PATH" 3519for as_dir in $PATH
2917for ac_dir in $ac_dummy; do 3520do
2918 IFS=$ac_save_IFS 3521 IFS=$as_save_IFS
2919 test -z "$ac_dir" && ac_dir=. 3522 test -z "$as_dir" && as_dir=.
2920 if $as_executable_p "$ac_dir/$ac_word"; then 3523 for ac_exec_ext in '' $ac_executable_extensions; do
2921 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$ac_dir/$ac_word" 3524 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2922 echo "$as_me:2922: found $ac_dir/$ac_word" >&5 3525 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
2923 break 3526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2924fi 3527 break 2
3528 fi
3529done
2925done 3530done
2926 3531
2927 ;; 3532 ;;
@@ -2930,17 +3535,17 @@ fi
2930LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK 3535LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
2931 3536
2932if test -n "$LOGIN_PROGRAM_FALLBACK"; then 3537if test -n "$LOGIN_PROGRAM_FALLBACK"; then
2933 echo "$as_me:2933: result: $LOGIN_PROGRAM_FALLBACK" >&5 3538 echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5
2934echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6 3539echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6
2935else 3540else
2936 echo "$as_me:2936: result: no" >&5 3541 echo "$as_me:$LINENO: result: no" >&5
2937echo "${ECHO_T}no" >&6 3542echo "${ECHO_T}no" >&6
2938fi 3543fi
2939 3544
2940 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then 3545 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
2941 cat >>confdefs.h <<EOF 3546 cat >>confdefs.h <<_ACEOF
2942#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK" 3547#define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
2943EOF 3548_ACEOF
2944 3549
2945 fi 3550 fi
2946fi 3551fi
@@ -2949,98 +3554,8 @@ if test -z "$LD" ; then
2949 LD=$CC 3554 LD=$CC
2950fi 3555fi
2951 3556
2952echo "$as_me:2952: checking for $CC option to accept ANSI C" >&5
2953echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2954if test "${ac_cv_prog_cc_stdc+set}" = set; then
2955 echo $ECHO_N "(cached) $ECHO_C" >&6
2956else
2957 ac_cv_prog_cc_stdc=no
2958ac_save_CC=$CC
2959cat >conftest.$ac_ext <<_ACEOF
2960#line 2960 "configure"
2961#include "confdefs.h"
2962#include <stdarg.h>
2963#include <stdio.h>
2964#include <sys/types.h>
2965#include <sys/stat.h>
2966/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2967struct buf { int x; };
2968FILE * (*rcsopen) (struct buf *, struct stat *, int);
2969static char *e (p, i)
2970 char **p;
2971 int i;
2972{
2973 return p[i];
2974}
2975static char *f (char * (*g) (char **, int), char **p, ...)
2976{
2977 char *s;
2978 va_list v;
2979 va_start (v,p);
2980 s = g (p, va_arg (v,int));
2981 va_end (v);
2982 return s;
2983}
2984int test (int i, double x);
2985struct s1 {int (*f) (int a);};
2986struct s2 {int (*f) (double a);};
2987int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2988int argc;
2989char **argv;
2990int
2991main ()
2992{
2993return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2994 ;
2995 return 0;
2996}
2997_ACEOF
2998# Don't try gcc -ansi; that turns off useful extensions and
2999# breaks some systems' header files.
3000# AIX -qlanglvl=ansi
3001# Ultrix and OSF/1 -std1
3002# HP-UX 10.20 and later -Ae
3003# HP-UX older versions -Aa -D_HPUX_SOURCE
3004# SVR4 -Xc -D__EXTENSIONS__
3005for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3006do
3007 CC="$ac_save_CC $ac_arg"
3008 rm -f conftest.$ac_objext
3009if { (eval echo "$as_me:3009: \"$ac_compile\"") >&5
3010 (eval $ac_compile) 2>&5
3011 ac_status=$?
3012 echo "$as_me:3012: \$? = $ac_status" >&5
3013 (exit $ac_status); } &&
3014 { ac_try='test -s conftest.$ac_objext'
3015 { (eval echo "$as_me:3015: \"$ac_try\"") >&5
3016 (eval $ac_try) 2>&5
3017 ac_status=$?
3018 echo "$as_me:3018: \$? = $ac_status" >&5
3019 (exit $ac_status); }; }; then
3020 ac_cv_prog_cc_stdc=$ac_arg
3021break
3022else
3023 echo "$as_me: failed program was:" >&5
3024cat conftest.$ac_ext >&5
3025fi
3026rm -f conftest.$ac_objext
3027done
3028rm -f conftest.$ac_ext conftest.$ac_objext
3029CC=$ac_save_CC
3030
3031fi
3032
3033case "x$ac_cv_prog_cc_stdc" in
3034 x|xno)
3035 echo "$as_me:3035: result: none needed" >&5
3036echo "${ECHO_T}none needed" >&6 ;;
3037 *)
3038 echo "$as_me:3038: result: $ac_cv_prog_cc_stdc" >&5
3039echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3040 CC="$CC $ac_cv_prog_cc_stdc" ;;
3041esac
3042 3557
3043echo "$as_me:3043: checking for inline" >&5 3558echo "$as_me:$LINENO: checking for inline" >&5
3044echo $ECHO_N "checking for inline... $ECHO_C" >&6 3559echo $ECHO_N "checking for inline... $ECHO_C" >&6
3045if test "${ac_cv_c_inline+set}" = set; then 3560if test "${ac_cv_c_inline+set}" = set; then
3046 echo $ECHO_N "(cached) $ECHO_C" >&6 3561 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3048,47 +3563,53 @@ else
3048 ac_cv_c_inline=no 3563 ac_cv_c_inline=no
3049for ac_kw in inline __inline__ __inline; do 3564for ac_kw in inline __inline__ __inline; do
3050 cat >conftest.$ac_ext <<_ACEOF 3565 cat >conftest.$ac_ext <<_ACEOF
3051#line 3051 "configure" 3566#line $LINENO "configure"
3052#include "confdefs.h" 3567/* confdefs.h. */
3568_ACEOF
3569cat confdefs.h >>conftest.$ac_ext
3570cat >>conftest.$ac_ext <<_ACEOF
3571/* end confdefs.h. */
3053#ifndef __cplusplus 3572#ifndef __cplusplus
3054static $ac_kw int static_foo () {return 0; } 3573typedef int foo_t;
3055$ac_kw int foo () {return 0; } 3574static $ac_kw foo_t static_foo () {return 0; }
3575$ac_kw foo_t foo () {return 0; }
3056#endif 3576#endif
3057 3577
3058_ACEOF 3578_ACEOF
3059rm -f conftest.$ac_objext 3579rm -f conftest.$ac_objext
3060if { (eval echo "$as_me:3060: \"$ac_compile\"") >&5 3580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3061 (eval $ac_compile) 2>&5 3581 (eval $ac_compile) 2>&5
3062 ac_status=$? 3582 ac_status=$?
3063 echo "$as_me:3063: \$? = $ac_status" >&5 3583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3064 (exit $ac_status); } && 3584 (exit $ac_status); } &&
3065 { ac_try='test -s conftest.$ac_objext' 3585 { ac_try='test -s conftest.$ac_objext'
3066 { (eval echo "$as_me:3066: \"$ac_try\"") >&5 3586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3067 (eval $ac_try) 2>&5 3587 (eval $ac_try) 2>&5
3068 ac_status=$? 3588 ac_status=$?
3069 echo "$as_me:3069: \$? = $ac_status" >&5 3589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070 (exit $ac_status); }; }; then 3590 (exit $ac_status); }; }; then
3071 ac_cv_c_inline=$ac_kw; break 3591 ac_cv_c_inline=$ac_kw; break
3072else 3592else
3073 echo "$as_me: failed program was:" >&5 3593 echo "$as_me: failed program was:" >&5
3074cat conftest.$ac_ext >&5 3594sed 's/^/| /' conftest.$ac_ext >&5
3595
3075fi 3596fi
3076rm -f conftest.$ac_objext conftest.$ac_ext 3597rm -f conftest.$ac_objext conftest.$ac_ext
3077done 3598done
3078 3599
3079fi 3600fi
3080echo "$as_me:3080: result: $ac_cv_c_inline" >&5 3601echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3081echo "${ECHO_T}$ac_cv_c_inline" >&6 3602echo "${ECHO_T}$ac_cv_c_inline" >&6
3082case $ac_cv_c_inline in 3603case $ac_cv_c_inline in
3083 inline | yes) ;; 3604 inline | yes) ;;
3084 no) 3605 no)
3085cat >>confdefs.h <<\EOF 3606cat >>confdefs.h <<\_ACEOF
3086#define inline 3607#define inline
3087EOF 3608_ACEOF
3088 ;; 3609 ;;
3089 *) cat >>confdefs.h <<EOF 3610 *) cat >>confdefs.h <<_ACEOF
3090#define inline $ac_cv_c_inline 3611#define inline $ac_cv_c_inline
3091EOF 3612_ACEOF
3092 ;; 3613 ;;
3093esac 3614esac
3094 3615
@@ -3099,9 +3620,10 @@ fi
3099# Check for some target-specific stuff 3620# Check for some target-specific stuff
3100case "$host" in 3621case "$host" in
3101*-*-aix*) 3622*-*-aix*)
3623 AFS_LIBS="-lld"
3102 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 3624 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
3103 LDFLAGS="$LDFLAGS -L/usr/local/lib" 3625 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3104 echo "$as_me:3104: checking how to specify blibpath for linker ($LD)" >&5 3626 echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5
3105echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6 3627echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6
3106 if (test -z "$blibpath"); then 3628 if (test -z "$blibpath"); then
3107 blibpath="/usr/lib:/lib:/usr/local/lib" 3629 blibpath="/usr/lib:/lib:/usr/local/lib"
@@ -3111,8 +3633,12 @@ echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6
3111 if (test -z "$blibflags"); then 3633 if (test -z "$blibflags"); then
3112 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" 3634 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
3113 cat >conftest.$ac_ext <<_ACEOF 3635 cat >conftest.$ac_ext <<_ACEOF
3114#line 3114 "configure" 3636#line $LINENO "configure"
3115#include "confdefs.h" 3637/* confdefs.h. */
3638_ACEOF
3639cat confdefs.h >>conftest.$ac_ext
3640cat >>conftest.$ac_ext <<_ACEOF
3641/* end confdefs.h. */
3116 3642
3117int 3643int
3118main () 3644main ()
@@ -3123,101 +3649,116 @@ main ()
3123} 3649}
3124_ACEOF 3650_ACEOF
3125rm -f conftest.$ac_objext conftest$ac_exeext 3651rm -f conftest.$ac_objext conftest$ac_exeext
3126if { (eval echo "$as_me:3126: \"$ac_link\"") >&5 3652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3127 (eval $ac_link) 2>&5 3653 (eval $ac_link) 2>&5
3128 ac_status=$? 3654 ac_status=$?
3129 echo "$as_me:3129: \$? = $ac_status" >&5 3655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3130 (exit $ac_status); } && 3656 (exit $ac_status); } &&
3131 { ac_try='test -s conftest$ac_exeext' 3657 { ac_try='test -s conftest$ac_exeext'
3132 { (eval echo "$as_me:3132: \"$ac_try\"") >&5 3658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3133 (eval $ac_try) 2>&5 3659 (eval $ac_try) 2>&5
3134 ac_status=$? 3660 ac_status=$?
3135 echo "$as_me:3135: \$? = $ac_status" >&5 3661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3136 (exit $ac_status); }; }; then 3662 (exit $ac_status); }; }; then
3137 blibflags=$tryflags 3663 blibflags=$tryflags
3138else 3664else
3139 echo "$as_me: failed program was:" >&5 3665 echo "$as_me: failed program was:" >&5
3140cat conftest.$ac_ext >&5 3666sed 's/^/| /' conftest.$ac_ext >&5
3667
3141fi 3668fi
3142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 3669rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3143 fi 3670 fi
3144 done 3671 done
3145 if (test -z "$blibflags"); then 3672 if (test -z "$blibflags"); then
3146 echo "$as_me:3146: result: not found" >&5 3673 echo "$as_me:$LINENO: result: not found" >&5
3147echo "${ECHO_T}not found" >&6 3674echo "${ECHO_T}not found" >&6
3148 { { echo "$as_me:3148: error: *** must be able to specify blibpath on AIX - check config.log" >&5 3675 { { echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5
3149echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;} 3676echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;}
3150 { (exit 1); exit 1; }; } 3677 { (exit 1); exit 1; }; }
3151 else 3678 else
3152 echo "$as_me:3152: result: $blibflags" >&5 3679 echo "$as_me:$LINENO: result: $blibflags" >&5
3153echo "${ECHO_T}$blibflags" >&6 3680echo "${ECHO_T}$blibflags" >&6
3154 fi 3681 fi
3155 LDFLAGS="$saved_LDFLAGS" 3682 LDFLAGS="$saved_LDFLAGS"
3156 echo "$as_me:3156: checking for authenticate" >&5 3683 echo "$as_me:$LINENO: checking for authenticate" >&5
3157echo $ECHO_N "checking for authenticate... $ECHO_C" >&6 3684echo $ECHO_N "checking for authenticate... $ECHO_C" >&6
3158if test "${ac_cv_func_authenticate+set}" = set; then 3685if test "${ac_cv_func_authenticate+set}" = set; then
3159 echo $ECHO_N "(cached) $ECHO_C" >&6 3686 echo $ECHO_N "(cached) $ECHO_C" >&6
3160else 3687else
3161 cat >conftest.$ac_ext <<_ACEOF 3688 cat >conftest.$ac_ext <<_ACEOF
3162#line 3162 "configure" 3689#line $LINENO "configure"
3163#include "confdefs.h" 3690/* confdefs.h. */
3691_ACEOF
3692cat confdefs.h >>conftest.$ac_ext
3693cat >>conftest.$ac_ext <<_ACEOF
3694/* end confdefs.h. */
3164/* System header to define __stub macros and hopefully few prototypes, 3695/* System header to define __stub macros and hopefully few prototypes,
3165 which can conflict with char authenticate (); below. */ 3696 which can conflict with char authenticate (); below.
3166#include <assert.h> 3697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3698 <limits.h> exists even on freestanding compilers. */
3699#ifdef __STDC__
3700# include <limits.h>
3701#else
3702# include <assert.h>
3703#endif
3167/* Override any gcc2 internal prototype to avoid an error. */ 3704/* Override any gcc2 internal prototype to avoid an error. */
3168#ifdef __cplusplus 3705#ifdef __cplusplus
3169extern "C" 3706extern "C"
3707{
3170#endif 3708#endif
3171/* We use char because int might match the return type of a gcc2 3709/* We use char because int might match the return type of a gcc2
3172 builtin and then its argument prototype would still apply. */ 3710 builtin and then its argument prototype would still apply. */
3173char authenticate (); 3711char authenticate ();
3174char (*f) ();
3175
3176int
3177main ()
3178{
3179/* The GNU C library defines this for functions which it implements 3712/* The GNU C library defines this for functions which it implements
3180 to always fail with ENOSYS. Some functions are actually named 3713 to always fail with ENOSYS. Some functions are actually named
3181 something starting with __ and the normal name is an alias. */ 3714 something starting with __ and the normal name is an alias. */
3182#if defined (__stub_authenticate) || defined (__stub___authenticate) 3715#if defined (__stub_authenticate) || defined (__stub___authenticate)
3183choke me 3716choke me
3184#else 3717#else
3185f = authenticate; 3718char (*f) () = authenticate;
3719#endif
3720#ifdef __cplusplus
3721}
3186#endif 3722#endif
3187 3723
3724int
3725main ()
3726{
3727return f != authenticate;
3188 ; 3728 ;
3189 return 0; 3729 return 0;
3190} 3730}
3191_ACEOF 3731_ACEOF
3192rm -f conftest.$ac_objext conftest$ac_exeext 3732rm -f conftest.$ac_objext conftest$ac_exeext
3193if { (eval echo "$as_me:3193: \"$ac_link\"") >&5 3733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3194 (eval $ac_link) 2>&5 3734 (eval $ac_link) 2>&5
3195 ac_status=$? 3735 ac_status=$?
3196 echo "$as_me:3196: \$? = $ac_status" >&5 3736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3197 (exit $ac_status); } && 3737 (exit $ac_status); } &&
3198 { ac_try='test -s conftest$ac_exeext' 3738 { ac_try='test -s conftest$ac_exeext'
3199 { (eval echo "$as_me:3199: \"$ac_try\"") >&5 3739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3200 (eval $ac_try) 2>&5 3740 (eval $ac_try) 2>&5
3201 ac_status=$? 3741 ac_status=$?
3202 echo "$as_me:3202: \$? = $ac_status" >&5 3742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3203 (exit $ac_status); }; }; then 3743 (exit $ac_status); }; }; then
3204 ac_cv_func_authenticate=yes 3744 ac_cv_func_authenticate=yes
3205else 3745else
3206 echo "$as_me: failed program was:" >&5 3746 echo "$as_me: failed program was:" >&5
3207cat conftest.$ac_ext >&5 3747sed 's/^/| /' conftest.$ac_ext >&5
3748
3208ac_cv_func_authenticate=no 3749ac_cv_func_authenticate=no
3209fi 3750fi
3210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 3751rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3211fi 3752fi
3212echo "$as_me:3212: result: $ac_cv_func_authenticate" >&5 3753echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5
3213echo "${ECHO_T}$ac_cv_func_authenticate" >&6 3754echo "${ECHO_T}$ac_cv_func_authenticate" >&6
3214if test $ac_cv_func_authenticate = yes; then 3755if test $ac_cv_func_authenticate = yes; then
3215 cat >>confdefs.h <<\EOF 3756 cat >>confdefs.h <<\_ACEOF
3216#define WITH_AIXAUTHENTICATE 1 3757#define WITH_AIXAUTHENTICATE 1
3217EOF 3758_ACEOF
3218 3759
3219else 3760else
3220 echo "$as_me:3220: checking for authenticate in -ls" >&5 3761 echo "$as_me:$LINENO: checking for authenticate in -ls" >&5
3221echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6 3762echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6
3222if test "${ac_cv_lib_s_authenticate+set}" = set; then 3763if test "${ac_cv_lib_s_authenticate+set}" = set; then
3223 echo $ECHO_N "(cached) $ECHO_C" >&6 3764 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3225,8 +3766,12 @@ else
3225 ac_check_lib_save_LIBS=$LIBS 3766 ac_check_lib_save_LIBS=$LIBS
3226LIBS="-ls $LIBS" 3767LIBS="-ls $LIBS"
3227cat >conftest.$ac_ext <<_ACEOF 3768cat >conftest.$ac_ext <<_ACEOF
3228#line 3228 "configure" 3769#line $LINENO "configure"
3229#include "confdefs.h" 3770/* confdefs.h. */
3771_ACEOF
3772cat confdefs.h >>conftest.$ac_ext
3773cat >>conftest.$ac_ext <<_ACEOF
3774/* end confdefs.h. */
3230 3775
3231/* Override any gcc2 internal prototype to avoid an error. */ 3776/* Override any gcc2 internal prototype to avoid an error. */
3232#ifdef __cplusplus 3777#ifdef __cplusplus
@@ -3244,279 +3789,126 @@ authenticate ();
3244} 3789}
3245_ACEOF 3790_ACEOF
3246rm -f conftest.$ac_objext conftest$ac_exeext 3791rm -f conftest.$ac_objext conftest$ac_exeext
3247if { (eval echo "$as_me:3247: \"$ac_link\"") >&5 3792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3248 (eval $ac_link) 2>&5 3793 (eval $ac_link) 2>&5
3249 ac_status=$? 3794 ac_status=$?
3250 echo "$as_me:3250: \$? = $ac_status" >&5 3795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3251 (exit $ac_status); } && 3796 (exit $ac_status); } &&
3252 { ac_try='test -s conftest$ac_exeext' 3797 { ac_try='test -s conftest$ac_exeext'
3253 { (eval echo "$as_me:3253: \"$ac_try\"") >&5 3798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3254 (eval $ac_try) 2>&5 3799 (eval $ac_try) 2>&5
3255 ac_status=$? 3800 ac_status=$?
3256 echo "$as_me:3256: \$? = $ac_status" >&5 3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3257 (exit $ac_status); }; }; then 3802 (exit $ac_status); }; }; then
3258 ac_cv_lib_s_authenticate=yes 3803 ac_cv_lib_s_authenticate=yes
3259else 3804else
3260 echo "$as_me: failed program was:" >&5 3805 echo "$as_me: failed program was:" >&5
3261cat conftest.$ac_ext >&5 3806sed 's/^/| /' conftest.$ac_ext >&5
3807
3262ac_cv_lib_s_authenticate=no 3808ac_cv_lib_s_authenticate=no
3263fi 3809fi
3264rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 3810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3265LIBS=$ac_check_lib_save_LIBS 3811LIBS=$ac_check_lib_save_LIBS
3266fi 3812fi
3267echo "$as_me:3267: result: $ac_cv_lib_s_authenticate" >&5 3813echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5
3268echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6 3814echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6
3269if test $ac_cv_lib_s_authenticate = yes; then 3815if test $ac_cv_lib_s_authenticate = yes; then
3270 cat >>confdefs.h <<\EOF 3816 cat >>confdefs.h <<\_ACEOF
3271#define WITH_AIXAUTHENTICATE 1 3817#define WITH_AIXAUTHENTICATE 1
3272EOF
3273
3274 LIBS="$LIBS -ls"
3275
3276fi
3277
3278fi
3279
3280 echo "$as_me:3280: checking whether loginfailed is declared" >&5
3281echo $ECHO_N "checking whether loginfailed is declared... $ECHO_C" >&6
3282if test "${ac_cv_have_decl_loginfailed+set}" = set; then
3283 echo $ECHO_N "(cached) $ECHO_C" >&6
3284else
3285 cat >conftest.$ac_ext <<_ACEOF
3286#line 3286 "configure"
3287#include "confdefs.h"
3288#include <usersec.h>
3289
3290int
3291main ()
3292{
3293#ifndef loginfailed
3294 char *p = (char *) loginfailed;
3295#endif
3296
3297 ;
3298 return 0;
3299}
3300_ACEOF
3301rm -f conftest.$ac_objext
3302if { (eval echo "$as_me:3302: \"$ac_compile\"") >&5
3303 (eval $ac_compile) 2>&5
3304 ac_status=$?
3305 echo "$as_me:3305: \$? = $ac_status" >&5
3306 (exit $ac_status); } &&
3307 { ac_try='test -s conftest.$ac_objext'
3308 { (eval echo "$as_me:3308: \"$ac_try\"") >&5
3309 (eval $ac_try) 2>&5
3310 ac_status=$?
3311 echo "$as_me:3311: \$? = $ac_status" >&5
3312 (exit $ac_status); }; }; then
3313 ac_cv_have_decl_loginfailed=yes
3314else
3315 echo "$as_me: failed program was:" >&5
3316cat conftest.$ac_ext >&5
3317ac_cv_have_decl_loginfailed=no
3318fi
3319rm -f conftest.$ac_objext conftest.$ac_ext
3320fi
3321echo "$as_me:3321: result: $ac_cv_have_decl_loginfailed" >&5
3322echo "${ECHO_T}$ac_cv_have_decl_loginfailed" >&6
3323if test $ac_cv_have_decl_loginfailed = yes; then
3324 echo "$as_me:3324: checking if loginfailed takes 4 arguments" >&5
3325echo $ECHO_N "checking if loginfailed takes 4 arguments... $ECHO_C" >&6
3326 cat >conftest.$ac_ext <<_ACEOF
3327#line 3327 "configure"
3328#include "confdefs.h"
3329#include <usersec.h>
3330int
3331main ()
3332{
3333(void)loginfailed("user","host","tty",0);
3334 ;
3335 return 0;
3336}
3337_ACEOF 3818_ACEOF
3338rm -f conftest.$ac_objext
3339if { (eval echo "$as_me:3339: \"$ac_compile\"") >&5
3340 (eval $ac_compile) 2>&5
3341 ac_status=$?
3342 echo "$as_me:3342: \$? = $ac_status" >&5
3343 (exit $ac_status); } &&
3344 { ac_try='test -s conftest.$ac_objext'
3345 { (eval echo "$as_me:3345: \"$ac_try\"") >&5
3346 (eval $ac_try) 2>&5
3347 ac_status=$?
3348 echo "$as_me:3348: \$? = $ac_status" >&5
3349 (exit $ac_status); }; }; then
3350 echo "$as_me:3350: result: yes" >&5
3351echo "${ECHO_T}yes" >&6
3352 cat >>confdefs.h <<\EOF
3353#define AIX_LOGINFAILED_4ARG 1
3354EOF
3355 3819
3356else 3820 LIBS="$LIBS -ls"
3357 echo "$as_me: failed program was:" >&5
3358cat conftest.$ac_ext >&5
3359echo "$as_me:3359: result: no" >&5
3360echo "${ECHO_T}no" >&6
3361 3821
3362fi 3822fi
3363rm -f conftest.$ac_objext conftest.$ac_ext
3364fi
3365
3366for ac_func in setauthdb
3367do
3368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3369echo "$as_me:3369: checking for $ac_func" >&5
3370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3371if eval "test \"\${$as_ac_var+set}\" = set"; then
3372 echo $ECHO_N "(cached) $ECHO_C" >&6
3373else
3374 cat >conftest.$ac_ext <<_ACEOF
3375#line 3375 "configure"
3376#include "confdefs.h"
3377/* System header to define __stub macros and hopefully few prototypes,
3378 which can conflict with char $ac_func (); below. */
3379#include <assert.h>
3380/* Override any gcc2 internal prototype to avoid an error. */
3381#ifdef __cplusplus
3382extern "C"
3383#endif
3384/* We use char because int might match the return type of a gcc2
3385 builtin and then its argument prototype would still apply. */
3386char $ac_func ();
3387char (*f) ();
3388
3389int
3390main ()
3391{
3392/* The GNU C library defines this for functions which it implements
3393 to always fail with ENOSYS. Some functions are actually named
3394 something starting with __ and the normal name is an alias. */
3395#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3396choke me
3397#else
3398f = $ac_func;
3399#endif
3400 3823
3401 ;
3402 return 0;
3403}
3404_ACEOF
3405rm -f conftest.$ac_objext conftest$ac_exeext
3406if { (eval echo "$as_me:3406: \"$ac_link\"") >&5
3407 (eval $ac_link) 2>&5
3408 ac_status=$?
3409 echo "$as_me:3409: \$? = $ac_status" >&5
3410 (exit $ac_status); } &&
3411 { ac_try='test -s conftest$ac_exeext'
3412 { (eval echo "$as_me:3412: \"$ac_try\"") >&5
3413 (eval $ac_try) 2>&5
3414 ac_status=$?
3415 echo "$as_me:3415: \$? = $ac_status" >&5
3416 (exit $ac_status); }; }; then
3417 eval "$as_ac_var=yes"
3418else
3419 echo "$as_me: failed program was:" >&5
3420cat conftest.$ac_ext >&5
3421eval "$as_ac_var=no"
3422fi
3423rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3424fi
3425echo "$as_me:3425: result: `eval echo '${'$as_ac_var'}'`" >&5
3426echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3427if test `eval echo '${'$as_ac_var'}'` = yes; then
3428 cat >>confdefs.h <<EOF
3429#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3430EOF
3431 3824
3432fi 3825fi
3433done
3434 3826
3435 cat >>confdefs.h <<\EOF 3827 cat >>confdefs.h <<\_ACEOF
3436#define BROKEN_GETADDRINFO 1 3828#define BROKEN_GETADDRINFO 1
3437EOF 3829_ACEOF
3438 3830
3439 cat >>confdefs.h <<\EOF 3831 cat >>confdefs.h <<\_ACEOF
3440#define BROKEN_REALPATH 1 3832#define BROKEN_REALPATH 1
3441EOF 3833_ACEOF
3442
3443 cat >>confdefs.h <<\EOF
3444#define SETEUID_BREAKS_SETUID 1
3445EOF
3446
3447 cat >>confdefs.h <<\EOF
3448#define BROKEN_SETREUID 1
3449EOF
3450
3451 cat >>confdefs.h <<\EOF
3452#define BROKEN_SETREGID 1
3453EOF
3454 3834
3455 cat >>confdefs.h <<\EOF 3835 cat >>confdefs.h <<\_ACEOF
3456#define DISABLE_LASTLOG 1 3836#define DISABLE_LASTLOG 1
3457EOF 3837_ACEOF
3458 3838
3459 cat >>confdefs.h <<\EOF 3839 cat >>confdefs.h <<\_ACEOF
3460#define LOGIN_NEEDS_UTMPX 1 3840#define LOGIN_NEEDS_UTMPX 1
3461EOF 3841_ACEOF
3462 3842
3463 cat >>confdefs.h <<\EOF 3843 cat >>confdefs.h <<\_ACEOF
3464#define SPT_TYPE SPT_REUSEARGV 3844#define SETPROCTITLE_STRATEGY PS_USE_CLOBBER_ARGV
3465EOF 3845_ACEOF
3846
3847 cat >>confdefs.h <<\_ACEOF
3848#define SETPROCTITLE_PS_PADDING '\0'
3849_ACEOF
3466 3850
3467 ;; 3851 ;;
3468*-*-cygwin*) 3852*-*-cygwin*)
3469 check_for_libcrypt_later=1 3853 check_for_libcrypt_later=1
3470 LIBS="$LIBS /usr/lib/textmode.o" 3854 LIBS="$LIBS /usr/lib/textmode.o"
3471 cat >>confdefs.h <<\EOF 3855 cat >>confdefs.h <<\_ACEOF
3472#define HAVE_CYGWIN 1 3856#define HAVE_CYGWIN 1
3473EOF 3857_ACEOF
3474 3858
3475 cat >>confdefs.h <<\EOF 3859 cat >>confdefs.h <<\_ACEOF
3476#define USE_PIPES 1 3860#define USE_PIPES 1
3477EOF 3861_ACEOF
3478 3862
3479 cat >>confdefs.h <<\EOF 3863 cat >>confdefs.h <<\_ACEOF
3480#define DISABLE_SHADOW 1 3864#define DISABLE_SHADOW 1
3481EOF 3865_ACEOF
3866
3867 cat >>confdefs.h <<\_ACEOF
3868#define IPV4_DEFAULT 1
3869_ACEOF
3482 3870
3483 cat >>confdefs.h <<\EOF 3871 cat >>confdefs.h <<\_ACEOF
3484#define IP_TOS_IS_BROKEN 1 3872#define IP_TOS_IS_BROKEN 1
3485EOF 3873_ACEOF
3486 3874
3487 cat >>confdefs.h <<\EOF 3875 cat >>confdefs.h <<\_ACEOF
3488#define NO_X11_UNIX_SOCKETS 1 3876#define NO_X11_UNIX_SOCKETS 1
3489EOF 3877_ACEOF
3490 3878
3491 cat >>confdefs.h <<\EOF 3879 cat >>confdefs.h <<\_ACEOF
3492#define NO_IPPORT_RESERVED_CONCEPT 1 3880#define NO_IPPORT_RESERVED_CONCEPT 1
3493EOF 3881_ACEOF
3494 3882
3495 cat >>confdefs.h <<\EOF 3883 cat >>confdefs.h <<\_ACEOF
3496#define DISABLE_FD_PASSING 1 3884#define DISABLE_FD_PASSING 1
3497EOF 3885_ACEOF
3498 3886
3499 cat >>confdefs.h <<\EOF 3887 cat >>confdefs.h <<\_ACEOF
3500#define SETGROUPS_NOOP 1 3888#define SETGROUPS_NOOP 1
3501EOF 3889_ACEOF
3502 3890
3503 ;; 3891 ;;
3504*-*-dgux*) 3892*-*-dgux*)
3505 cat >>confdefs.h <<\EOF 3893 cat >>confdefs.h <<\_ACEOF
3506#define IP_TOS_IS_BROKEN 1 3894#define IP_TOS_IS_BROKEN 1
3507EOF 3895_ACEOF
3508 3896
3509 ;; 3897 ;;
3510*-*-darwin*) 3898*-*-darwin*)
3511 echo "$as_me:3511: checking if we have working getaddrinfo" >&5 3899 echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5
3512echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6 3900echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6
3513 if test "$cross_compiling" = yes; then 3901 if test "$cross_compiling" = yes; then
3514 echo "$as_me:3514: result: assume it is working" >&5 3902 echo "$as_me:$LINENO: result: assume it is working" >&5
3515echo "${ECHO_T}assume it is working" >&6 3903echo "${ECHO_T}assume it is working" >&6
3516else 3904else
3517 cat >conftest.$ac_ext <<_ACEOF 3905 cat >conftest.$ac_ext <<_ACEOF
3518#line 3518 "configure" 3906#line $LINENO "configure"
3519#include "confdefs.h" 3907/* confdefs.h. */
3908_ACEOF
3909cat confdefs.h >>conftest.$ac_ext
3910cat >>conftest.$ac_ext <<_ACEOF
3911/* end confdefs.h. */
3520#include <mach-o/dyld.h> 3912#include <mach-o/dyld.h>
3521main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) 3913main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
3522 exit(0); 3914 exit(0);
@@ -3525,30 +3917,32 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
3525} 3917}
3526_ACEOF 3918_ACEOF
3527rm -f conftest$ac_exeext 3919rm -f conftest$ac_exeext
3528if { (eval echo "$as_me:3528: \"$ac_link\"") >&5 3920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3529 (eval $ac_link) 2>&5 3921 (eval $ac_link) 2>&5
3530 ac_status=$? 3922 ac_status=$?
3531 echo "$as_me:3531: \$? = $ac_status" >&5 3923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 3924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3533 { (eval echo "$as_me:3533: \"$ac_try\"") >&5 3925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3534 (eval $ac_try) 2>&5 3926 (eval $ac_try) 2>&5
3535 ac_status=$? 3927 ac_status=$?
3536 echo "$as_me:3536: \$? = $ac_status" >&5 3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3537 (exit $ac_status); }; }; then 3929 (exit $ac_status); }; }; then
3538 echo "$as_me:3538: result: working" >&5 3930 echo "$as_me:$LINENO: result: working" >&5
3539echo "${ECHO_T}working" >&6 3931echo "${ECHO_T}working" >&6
3540else 3932else
3541 echo "$as_me: program exited with status $ac_status" >&5 3933 echo "$as_me: program exited with status $ac_status" >&5
3542echo "$as_me: failed program was:" >&5 3934echo "$as_me: failed program was:" >&5
3543cat conftest.$ac_ext >&5 3935sed 's/^/| /' conftest.$ac_ext >&5
3544echo "$as_me:3544: result: buggy" >&5 3936
3937( exit $ac_status )
3938echo "$as_me:$LINENO: result: buggy" >&5
3545echo "${ECHO_T}buggy" >&6 3939echo "${ECHO_T}buggy" >&6
3546 cat >>confdefs.h <<\EOF 3940 cat >>confdefs.h <<\_ACEOF
3547#define BROKEN_GETADDRINFO 1 3941#define BROKEN_GETADDRINFO 1
3548EOF 3942_ACEOF
3549 3943
3550fi 3944fi
3551rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 3945rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3552fi 3946fi
3553 ;; 3947 ;;
3554*-*-hpux10.26) 3948*-*-hpux10.26)
@@ -3557,41 +3951,37 @@ fi
3557 fi 3951 fi
3558 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 3952 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
3559 IPADDR_IN_DISPLAY=yes 3953 IPADDR_IN_DISPLAY=yes
3560 cat >>confdefs.h <<\EOF 3954 cat >>confdefs.h <<\_ACEOF
3561#define HAVE_SECUREWARE 1 3955#define HAVE_SECUREWARE 1
3562EOF 3956_ACEOF
3563 3957
3564 cat >>confdefs.h <<\EOF 3958 cat >>confdefs.h <<\_ACEOF
3565#define USE_PIPES 1 3959#define USE_PIPES 1
3566EOF 3960_ACEOF
3567 3961
3568 cat >>confdefs.h <<\EOF 3962 cat >>confdefs.h <<\_ACEOF
3569#define LOGIN_NO_ENDOPT 1 3963#define LOGIN_NO_ENDOPT 1
3570EOF 3964_ACEOF
3571 3965
3572 cat >>confdefs.h <<\EOF 3966 cat >>confdefs.h <<\_ACEOF
3573#define LOGIN_NEEDS_UTMPX 1 3967#define LOGIN_NEEDS_UTMPX 1
3574EOF 3968_ACEOF
3575 3969
3576 cat >>confdefs.h <<\EOF 3970 cat >>confdefs.h <<\_ACEOF
3577#define DISABLE_SHADOW 1 3971#define DISABLE_SHADOW 1
3578EOF 3972_ACEOF
3579 3973
3580 cat >>confdefs.h <<\EOF 3974 cat >>confdefs.h <<\_ACEOF
3581#define DISABLE_UTMP 1 3975#define DISABLE_UTMP 1
3582EOF 3976_ACEOF
3583
3584 cat >>confdefs.h <<\EOF
3585#define LOCKED_PASSWD_STRING "*"
3586EOF
3587 3977
3588 cat >>confdefs.h <<\EOF 3978 cat >>confdefs.h <<\_ACEOF
3589#define SPT_TYPE SPT_PSTAT 3979#define SETPROCTITLE_STRATEGY PS_USE_PSTAT
3590EOF 3980_ACEOF
3591 3981
3592 LIBS="$LIBS -lsec -lsecpw" 3982 LIBS="$LIBS -lsec -lsecpw"
3593 3983
3594echo "$as_me:3594: checking for t_error in -lxnet" >&5 3984echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
3595echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6 3985echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6
3596if test "${ac_cv_lib_xnet_t_error+set}" = set; then 3986if test "${ac_cv_lib_xnet_t_error+set}" = set; then
3597 echo $ECHO_N "(cached) $ECHO_C" >&6 3987 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3599,8 +3989,12 @@ else
3599 ac_check_lib_save_LIBS=$LIBS 3989 ac_check_lib_save_LIBS=$LIBS
3600LIBS="-lxnet $LIBS" 3990LIBS="-lxnet $LIBS"
3601cat >conftest.$ac_ext <<_ACEOF 3991cat >conftest.$ac_ext <<_ACEOF
3602#line 3602 "configure" 3992#line $LINENO "configure"
3603#include "confdefs.h" 3993/* confdefs.h. */
3994_ACEOF
3995cat confdefs.h >>conftest.$ac_ext
3996cat >>conftest.$ac_ext <<_ACEOF
3997/* end confdefs.h. */
3604 3998
3605/* Override any gcc2 internal prototype to avoid an error. */ 3999/* Override any gcc2 internal prototype to avoid an error. */
3606#ifdef __cplusplus 4000#ifdef __cplusplus
@@ -3618,37 +4012,38 @@ t_error ();
3618} 4012}
3619_ACEOF 4013_ACEOF
3620rm -f conftest.$ac_objext conftest$ac_exeext 4014rm -f conftest.$ac_objext conftest$ac_exeext
3621if { (eval echo "$as_me:3621: \"$ac_link\"") >&5 4015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3622 (eval $ac_link) 2>&5 4016 (eval $ac_link) 2>&5
3623 ac_status=$? 4017 ac_status=$?
3624 echo "$as_me:3624: \$? = $ac_status" >&5 4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3625 (exit $ac_status); } && 4019 (exit $ac_status); } &&
3626 { ac_try='test -s conftest$ac_exeext' 4020 { ac_try='test -s conftest$ac_exeext'
3627 { (eval echo "$as_me:3627: \"$ac_try\"") >&5 4021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3628 (eval $ac_try) 2>&5 4022 (eval $ac_try) 2>&5
3629 ac_status=$? 4023 ac_status=$?
3630 echo "$as_me:3630: \$? = $ac_status" >&5 4024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3631 (exit $ac_status); }; }; then 4025 (exit $ac_status); }; }; then
3632 ac_cv_lib_xnet_t_error=yes 4026 ac_cv_lib_xnet_t_error=yes
3633else 4027else
3634 echo "$as_me: failed program was:" >&5 4028 echo "$as_me: failed program was:" >&5
3635cat conftest.$ac_ext >&5 4029sed 's/^/| /' conftest.$ac_ext >&5
4030
3636ac_cv_lib_xnet_t_error=no 4031ac_cv_lib_xnet_t_error=no
3637fi 4032fi
3638rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4033rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3639LIBS=$ac_check_lib_save_LIBS 4034LIBS=$ac_check_lib_save_LIBS
3640fi 4035fi
3641echo "$as_me:3641: result: $ac_cv_lib_xnet_t_error" >&5 4036echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
3642echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6 4037echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6
3643if test $ac_cv_lib_xnet_t_error = yes; then 4038if test $ac_cv_lib_xnet_t_error = yes; then
3644 cat >>confdefs.h <<EOF 4039 cat >>confdefs.h <<_ACEOF
3645#define HAVE_LIBXNET 1 4040#define HAVE_LIBXNET 1
3646EOF 4041_ACEOF
3647 4042
3648 LIBS="-lxnet $LIBS" 4043 LIBS="-lxnet $LIBS"
3649 4044
3650else 4045else
3651 { { echo "$as_me:3651: error: *** -lxnet needed on HP-UX - check config.log ***" >&5 4046 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
3652echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;} 4047echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
3653 { (exit 1); exit 1; }; } 4048 { (exit 1); exit 1; }; }
3654fi 4049fi
@@ -3661,37 +4056,33 @@ fi
3661 fi 4056 fi
3662 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 4057 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
3663 IPADDR_IN_DISPLAY=yes 4058 IPADDR_IN_DISPLAY=yes
3664 cat >>confdefs.h <<\EOF 4059 cat >>confdefs.h <<\_ACEOF
3665#define USE_PIPES 1 4060#define USE_PIPES 1
3666EOF 4061_ACEOF
3667 4062
3668 cat >>confdefs.h <<\EOF 4063 cat >>confdefs.h <<\_ACEOF
3669#define LOGIN_NO_ENDOPT 1 4064#define LOGIN_NO_ENDOPT 1
3670EOF 4065_ACEOF
3671 4066
3672 cat >>confdefs.h <<\EOF 4067 cat >>confdefs.h <<\_ACEOF
3673#define LOGIN_NEEDS_UTMPX 1 4068#define LOGIN_NEEDS_UTMPX 1
3674EOF 4069_ACEOF
3675 4070
3676 cat >>confdefs.h <<\EOF 4071 cat >>confdefs.h <<\_ACEOF
3677#define DISABLE_SHADOW 1 4072#define DISABLE_SHADOW 1
3678EOF 4073_ACEOF
3679 4074
3680 cat >>confdefs.h <<\EOF 4075 cat >>confdefs.h <<\_ACEOF
3681#define DISABLE_UTMP 1 4076#define DISABLE_UTMP 1
3682EOF 4077_ACEOF
3683
3684 cat >>confdefs.h <<\EOF
3685#define LOCKED_PASSWD_STRING "*"
3686EOF
3687 4078
3688 cat >>confdefs.h <<\EOF 4079 cat >>confdefs.h <<\_ACEOF
3689#define SPT_TYPE SPT_PSTAT 4080#define SETPROCTITLE_STRATEGY PS_USE_PSTAT
3690EOF 4081_ACEOF
3691 4082
3692 LIBS="$LIBS -lsec" 4083 LIBS="$LIBS -lsec"
3693 4084
3694echo "$as_me:3694: checking for t_error in -lxnet" >&5 4085echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
3695echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6 4086echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6
3696if test "${ac_cv_lib_xnet_t_error+set}" = set; then 4087if test "${ac_cv_lib_xnet_t_error+set}" = set; then
3697 echo $ECHO_N "(cached) $ECHO_C" >&6 4088 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3699,8 +4090,12 @@ else
3699 ac_check_lib_save_LIBS=$LIBS 4090 ac_check_lib_save_LIBS=$LIBS
3700LIBS="-lxnet $LIBS" 4091LIBS="-lxnet $LIBS"
3701cat >conftest.$ac_ext <<_ACEOF 4092cat >conftest.$ac_ext <<_ACEOF
3702#line 3702 "configure" 4093#line $LINENO "configure"
3703#include "confdefs.h" 4094/* confdefs.h. */
4095_ACEOF
4096cat confdefs.h >>conftest.$ac_ext
4097cat >>conftest.$ac_ext <<_ACEOF
4098/* end confdefs.h. */
3704 4099
3705/* Override any gcc2 internal prototype to avoid an error. */ 4100/* Override any gcc2 internal prototype to avoid an error. */
3706#ifdef __cplusplus 4101#ifdef __cplusplus
@@ -3718,37 +4113,38 @@ t_error ();
3718} 4113}
3719_ACEOF 4114_ACEOF
3720rm -f conftest.$ac_objext conftest$ac_exeext 4115rm -f conftest.$ac_objext conftest$ac_exeext
3721if { (eval echo "$as_me:3721: \"$ac_link\"") >&5 4116if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3722 (eval $ac_link) 2>&5 4117 (eval $ac_link) 2>&5
3723 ac_status=$? 4118 ac_status=$?
3724 echo "$as_me:3724: \$? = $ac_status" >&5 4119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3725 (exit $ac_status); } && 4120 (exit $ac_status); } &&
3726 { ac_try='test -s conftest$ac_exeext' 4121 { ac_try='test -s conftest$ac_exeext'
3727 { (eval echo "$as_me:3727: \"$ac_try\"") >&5 4122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3728 (eval $ac_try) 2>&5 4123 (eval $ac_try) 2>&5
3729 ac_status=$? 4124 ac_status=$?
3730 echo "$as_me:3730: \$? = $ac_status" >&5 4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731 (exit $ac_status); }; }; then 4126 (exit $ac_status); }; }; then
3732 ac_cv_lib_xnet_t_error=yes 4127 ac_cv_lib_xnet_t_error=yes
3733else 4128else
3734 echo "$as_me: failed program was:" >&5 4129 echo "$as_me: failed program was:" >&5
3735cat conftest.$ac_ext >&5 4130sed 's/^/| /' conftest.$ac_ext >&5
4131
3736ac_cv_lib_xnet_t_error=no 4132ac_cv_lib_xnet_t_error=no
3737fi 4133fi
3738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4134rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3739LIBS=$ac_check_lib_save_LIBS 4135LIBS=$ac_check_lib_save_LIBS
3740fi 4136fi
3741echo "$as_me:3741: result: $ac_cv_lib_xnet_t_error" >&5 4137echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
3742echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6 4138echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6
3743if test $ac_cv_lib_xnet_t_error = yes; then 4139if test $ac_cv_lib_xnet_t_error = yes; then
3744 cat >>confdefs.h <<EOF 4140 cat >>confdefs.h <<_ACEOF
3745#define HAVE_LIBXNET 1 4141#define HAVE_LIBXNET 1
3746EOF 4142_ACEOF
3747 4143
3748 LIBS="-lxnet $LIBS" 4144 LIBS="-lxnet $LIBS"
3749 4145
3750else 4146else
3751 { { echo "$as_me:3751: error: *** -lxnet needed on HP-UX - check config.log ***" >&5 4147 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
3752echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;} 4148echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
3753 { (exit 1); exit 1; }; } 4149 { (exit 1); exit 1; }; }
3754fi 4150fi
@@ -3757,41 +4153,37 @@ fi
3757*-*-hpux11*) 4153*-*-hpux11*)
3758 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 4154 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
3759 IPADDR_IN_DISPLAY=yes 4155 IPADDR_IN_DISPLAY=yes
3760 cat >>confdefs.h <<\EOF 4156 cat >>confdefs.h <<\_ACEOF
3761#define PAM_SUN_CODEBASE 1 4157#define PAM_SUN_CODEBASE 1
3762EOF 4158_ACEOF
3763 4159
3764 cat >>confdefs.h <<\EOF 4160 cat >>confdefs.h <<\_ACEOF
3765#define USE_PIPES 1 4161#define USE_PIPES 1
3766EOF 4162_ACEOF
3767 4163
3768 cat >>confdefs.h <<\EOF 4164 cat >>confdefs.h <<\_ACEOF
3769#define LOGIN_NO_ENDOPT 1 4165#define LOGIN_NO_ENDOPT 1
3770EOF 4166_ACEOF
3771 4167
3772 cat >>confdefs.h <<\EOF 4168 cat >>confdefs.h <<\_ACEOF
3773#define LOGIN_NEEDS_UTMPX 1 4169#define LOGIN_NEEDS_UTMPX 1
3774EOF 4170_ACEOF
3775 4171
3776 cat >>confdefs.h <<\EOF 4172 cat >>confdefs.h <<\_ACEOF
3777#define DISABLE_SHADOW 1 4173#define DISABLE_SHADOW 1
3778EOF 4174_ACEOF
3779 4175
3780 cat >>confdefs.h <<\EOF 4176 cat >>confdefs.h <<\_ACEOF
3781#define DISABLE_UTMP 1 4177#define DISABLE_UTMP 1
3782EOF 4178_ACEOF
3783
3784 cat >>confdefs.h <<\EOF
3785#define LOCKED_PASSWD_STRING "*"
3786EOF
3787 4179
3788 cat >>confdefs.h <<\EOF 4180 cat >>confdefs.h <<\_ACEOF
3789#define SPT_TYPE SPT_PSTAT 4181#define SETPROCTITLE_STRATEGY PS_USE_PSTAT
3790EOF 4182_ACEOF
3791 4183
3792 LIBS="$LIBS -lsec" 4184 LIBS="$LIBS -lsec"
3793 4185
3794echo "$as_me:3794: checking for t_error in -lxnet" >&5 4186echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5
3795echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6 4187echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6
3796if test "${ac_cv_lib_xnet_t_error+set}" = set; then 4188if test "${ac_cv_lib_xnet_t_error+set}" = set; then
3797 echo $ECHO_N "(cached) $ECHO_C" >&6 4189 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3799,8 +4191,12 @@ else
3799 ac_check_lib_save_LIBS=$LIBS 4191 ac_check_lib_save_LIBS=$LIBS
3800LIBS="-lxnet $LIBS" 4192LIBS="-lxnet $LIBS"
3801cat >conftest.$ac_ext <<_ACEOF 4193cat >conftest.$ac_ext <<_ACEOF
3802#line 3802 "configure" 4194#line $LINENO "configure"
3803#include "confdefs.h" 4195/* confdefs.h. */
4196_ACEOF
4197cat confdefs.h >>conftest.$ac_ext
4198cat >>conftest.$ac_ext <<_ACEOF
4199/* end confdefs.h. */
3804 4200
3805/* Override any gcc2 internal prototype to avoid an error. */ 4201/* Override any gcc2 internal prototype to avoid an error. */
3806#ifdef __cplusplus 4202#ifdef __cplusplus
@@ -3818,37 +4214,38 @@ t_error ();
3818} 4214}
3819_ACEOF 4215_ACEOF
3820rm -f conftest.$ac_objext conftest$ac_exeext 4216rm -f conftest.$ac_objext conftest$ac_exeext
3821if { (eval echo "$as_me:3821: \"$ac_link\"") >&5 4217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3822 (eval $ac_link) 2>&5 4218 (eval $ac_link) 2>&5
3823 ac_status=$? 4219 ac_status=$?
3824 echo "$as_me:3824: \$? = $ac_status" >&5 4220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3825 (exit $ac_status); } && 4221 (exit $ac_status); } &&
3826 { ac_try='test -s conftest$ac_exeext' 4222 { ac_try='test -s conftest$ac_exeext'
3827 { (eval echo "$as_me:3827: \"$ac_try\"") >&5 4223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3828 (eval $ac_try) 2>&5 4224 (eval $ac_try) 2>&5
3829 ac_status=$? 4225 ac_status=$?
3830 echo "$as_me:3830: \$? = $ac_status" >&5 4226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3831 (exit $ac_status); }; }; then 4227 (exit $ac_status); }; }; then
3832 ac_cv_lib_xnet_t_error=yes 4228 ac_cv_lib_xnet_t_error=yes
3833else 4229else
3834 echo "$as_me: failed program was:" >&5 4230 echo "$as_me: failed program was:" >&5
3835cat conftest.$ac_ext >&5 4231sed 's/^/| /' conftest.$ac_ext >&5
4232
3836ac_cv_lib_xnet_t_error=no 4233ac_cv_lib_xnet_t_error=no
3837fi 4234fi
3838rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4235rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3839LIBS=$ac_check_lib_save_LIBS 4236LIBS=$ac_check_lib_save_LIBS
3840fi 4237fi
3841echo "$as_me:3841: result: $ac_cv_lib_xnet_t_error" >&5 4238echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5
3842echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6 4239echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6
3843if test $ac_cv_lib_xnet_t_error = yes; then 4240if test $ac_cv_lib_xnet_t_error = yes; then
3844 cat >>confdefs.h <<EOF 4241 cat >>confdefs.h <<_ACEOF
3845#define HAVE_LIBXNET 1 4242#define HAVE_LIBXNET 1
3846EOF 4243_ACEOF
3847 4244
3848 LIBS="-lxnet $LIBS" 4245 LIBS="-lxnet $LIBS"
3849 4246
3850else 4247else
3851 { { echo "$as_me:3851: error: *** -lxnet needed on HP-UX - check config.log ***" >&5 4248 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5
3852echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;} 4249echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
3853 { (exit 1); exit 1; }; } 4250 { (exit 1); exit 1; }; }
3854fi 4251fi
@@ -3858,147 +4255,144 @@ fi
3858 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 4255 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
3859 LDFLAGS="$LDFLAGS" 4256 LDFLAGS="$LDFLAGS"
3860 PATH="$PATH:/usr/etc" 4257 PATH="$PATH:/usr/etc"
3861 cat >>confdefs.h <<\EOF 4258 cat >>confdefs.h <<\_ACEOF
3862#define BROKEN_INET_NTOA 1 4259#define BROKEN_INET_NTOA 1
3863EOF 4260_ACEOF
3864 4261
3865 cat >>confdefs.h <<\EOF 4262 cat >>confdefs.h <<\_ACEOF
3866#define WITH_ABBREV_NO_TTY 1 4263#define WITH_ABBREV_NO_TTY 1
3867EOF 4264_ACEOF
3868
3869 cat >>confdefs.h <<\EOF
3870#define LOCKED_PASSWD_STRING "*LK*"
3871EOF
3872 4265
3873 ;; 4266 ;;
3874*-*-irix6*) 4267*-*-irix6*)
3875 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 4268 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
3876 LDFLAGS="$LDFLAGS" 4269 LDFLAGS="$LDFLAGS"
3877 PATH="$PATH:/usr/etc" 4270 PATH="$PATH:/usr/etc"
3878 cat >>confdefs.h <<\EOF 4271 cat >>confdefs.h <<\_ACEOF
3879#define WITH_IRIX_ARRAY 1 4272#define WITH_IRIX_ARRAY 1
3880EOF 4273_ACEOF
3881 4274
3882 cat >>confdefs.h <<\EOF 4275 cat >>confdefs.h <<\_ACEOF
3883#define WITH_IRIX_PROJECT 1 4276#define WITH_IRIX_PROJECT 1
3884EOF 4277_ACEOF
3885 4278
3886 cat >>confdefs.h <<\EOF 4279 cat >>confdefs.h <<\_ACEOF
3887#define WITH_IRIX_AUDIT 1 4280#define WITH_IRIX_AUDIT 1
3888EOF 4281_ACEOF
3889 4282
3890 echo "$as_me:3890: checking for jlimit_startjob" >&5 4283 echo "$as_me:$LINENO: checking for jlimit_startjob" >&5
3891echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6 4284echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6
3892if test "${ac_cv_func_jlimit_startjob+set}" = set; then 4285if test "${ac_cv_func_jlimit_startjob+set}" = set; then
3893 echo $ECHO_N "(cached) $ECHO_C" >&6 4286 echo $ECHO_N "(cached) $ECHO_C" >&6
3894else 4287else
3895 cat >conftest.$ac_ext <<_ACEOF 4288 cat >conftest.$ac_ext <<_ACEOF
3896#line 3896 "configure" 4289#line $LINENO "configure"
3897#include "confdefs.h" 4290/* confdefs.h. */
4291_ACEOF
4292cat confdefs.h >>conftest.$ac_ext
4293cat >>conftest.$ac_ext <<_ACEOF
4294/* end confdefs.h. */
3898/* System header to define __stub macros and hopefully few prototypes, 4295/* System header to define __stub macros and hopefully few prototypes,
3899 which can conflict with char jlimit_startjob (); below. */ 4296 which can conflict with char jlimit_startjob (); below.
3900#include <assert.h> 4297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4298 <limits.h> exists even on freestanding compilers. */
4299#ifdef __STDC__
4300# include <limits.h>
4301#else
4302# include <assert.h>
4303#endif
3901/* Override any gcc2 internal prototype to avoid an error. */ 4304/* Override any gcc2 internal prototype to avoid an error. */
3902#ifdef __cplusplus 4305#ifdef __cplusplus
3903extern "C" 4306extern "C"
4307{
3904#endif 4308#endif
3905/* We use char because int might match the return type of a gcc2 4309/* We use char because int might match the return type of a gcc2
3906 builtin and then its argument prototype would still apply. */ 4310 builtin and then its argument prototype would still apply. */
3907char jlimit_startjob (); 4311char jlimit_startjob ();
3908char (*f) ();
3909
3910int
3911main ()
3912{
3913/* The GNU C library defines this for functions which it implements 4312/* The GNU C library defines this for functions which it implements
3914 to always fail with ENOSYS. Some functions are actually named 4313 to always fail with ENOSYS. Some functions are actually named
3915 something starting with __ and the normal name is an alias. */ 4314 something starting with __ and the normal name is an alias. */
3916#if defined (__stub_jlimit_startjob) || defined (__stub___jlimit_startjob) 4315#if defined (__stub_jlimit_startjob) || defined (__stub___jlimit_startjob)
3917choke me 4316choke me
3918#else 4317#else
3919f = jlimit_startjob; 4318char (*f) () = jlimit_startjob;
4319#endif
4320#ifdef __cplusplus
4321}
3920#endif 4322#endif
3921 4323
4324int
4325main ()
4326{
4327return f != jlimit_startjob;
3922 ; 4328 ;
3923 return 0; 4329 return 0;
3924} 4330}
3925_ACEOF 4331_ACEOF
3926rm -f conftest.$ac_objext conftest$ac_exeext 4332rm -f conftest.$ac_objext conftest$ac_exeext
3927if { (eval echo "$as_me:3927: \"$ac_link\"") >&5 4333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3928 (eval $ac_link) 2>&5 4334 (eval $ac_link) 2>&5
3929 ac_status=$? 4335 ac_status=$?
3930 echo "$as_me:3930: \$? = $ac_status" >&5 4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); } && 4337 (exit $ac_status); } &&
3932 { ac_try='test -s conftest$ac_exeext' 4338 { ac_try='test -s conftest$ac_exeext'
3933 { (eval echo "$as_me:3933: \"$ac_try\"") >&5 4339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3934 (eval $ac_try) 2>&5 4340 (eval $ac_try) 2>&5
3935 ac_status=$? 4341 ac_status=$?
3936 echo "$as_me:3936: \$? = $ac_status" >&5 4342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3937 (exit $ac_status); }; }; then 4343 (exit $ac_status); }; }; then
3938 ac_cv_func_jlimit_startjob=yes 4344 ac_cv_func_jlimit_startjob=yes
3939else 4345else
3940 echo "$as_me: failed program was:" >&5 4346 echo "$as_me: failed program was:" >&5
3941cat conftest.$ac_ext >&5 4347sed 's/^/| /' conftest.$ac_ext >&5
4348
3942ac_cv_func_jlimit_startjob=no 4349ac_cv_func_jlimit_startjob=no
3943fi 4350fi
3944rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4351rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3945fi 4352fi
3946echo "$as_me:3946: result: $ac_cv_func_jlimit_startjob" >&5 4353echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5
3947echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6 4354echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6
3948if test $ac_cv_func_jlimit_startjob = yes; then 4355if test $ac_cv_func_jlimit_startjob = yes; then
3949 cat >>confdefs.h <<\EOF 4356 cat >>confdefs.h <<\_ACEOF
3950#define WITH_IRIX_JOBS 1 4357#define WITH_IRIX_JOBS 1
3951EOF 4358_ACEOF
3952 4359
3953fi 4360fi
3954 4361
3955 cat >>confdefs.h <<\EOF 4362 cat >>confdefs.h <<\_ACEOF
3956#define BROKEN_INET_NTOA 1 4363#define BROKEN_INET_NTOA 1
3957EOF 4364_ACEOF
3958 4365
3959 cat >>confdefs.h <<\EOF 4366 cat >>confdefs.h <<\_ACEOF
3960#define WITH_ABBREV_NO_TTY 1 4367#define WITH_ABBREV_NO_TTY 1
3961EOF 4368_ACEOF
3962
3963 cat >>confdefs.h <<\EOF
3964#define LOCKED_PASSWD_STRING "*LK*"
3965EOF
3966 4369
3967 ;; 4370 ;;
3968*-*-linux*) 4371*-*-linux*)
3969 no_dev_ptmx=1 4372 no_dev_ptmx=1
3970 check_for_libcrypt_later=1 4373 check_for_libcrypt_later=1
3971 check_for_openpty_ctty_bug=1 4374 cat >>confdefs.h <<\_ACEOF
3972 cat >>confdefs.h <<\EOF
3973#define DONT_TRY_OTHER_AF 1 4375#define DONT_TRY_OTHER_AF 1
3974EOF 4376_ACEOF
3975 4377
3976 cat >>confdefs.h <<\EOF 4378 cat >>confdefs.h <<\_ACEOF
3977#define PAM_TTY_KLUDGE 1 4379#define PAM_TTY_KLUDGE 1
3978EOF 4380_ACEOF
3979 4381
3980 cat >>confdefs.h <<\EOF 4382 cat >>confdefs.h <<\_ACEOF
3981#define LOCKED_PASSWD_PREFIX "!!" 4383#define SETPROCTITLE_STRATEGY PS_USE_CLOBBER_ARGV
3982EOF 4384_ACEOF
3983 4385
3984 cat >>confdefs.h <<\EOF 4386 cat >>confdefs.h <<\_ACEOF
3985#define SPT_TYPE SPT_REUSEARGV 4387#define SETPROCTITLE_PS_PADDING '\0'
3986EOF 4388_ACEOF
3987 4389
3988 inet6_default_4in6=yes 4390 inet6_default_4in6=yes
3989 case `uname -r` in
3990 1.*|2.0.*)
3991 cat >>confdefs.h <<\EOF
3992#define BROKEN_CMSG_TYPE 1
3993EOF
3994
3995 ;;
3996 esac
3997 ;; 4391 ;;
3998mips-sony-bsd|mips-sony-newsos4) 4392mips-sony-bsd|mips-sony-newsos4)
3999 cat >>confdefs.h <<\EOF 4393 cat >>confdefs.h <<\_ACEOF
4000#define HAVE_NEWS4 1 4394#define HAVE_NEWS4 1
4001EOF 4395_ACEOF
4002 4396
4003 SONY=1 4397 SONY=1
4004 ;; 4398 ;;
@@ -4014,21 +4408,21 @@ EOF
4014 conf_utmp_location=/etc/utmp 4408 conf_utmp_location=/etc/utmp
4015 conf_wtmp_location=/usr/adm/wtmp 4409 conf_wtmp_location=/usr/adm/wtmp
4016 MAIL=/usr/spool/mail 4410 MAIL=/usr/spool/mail
4017 cat >>confdefs.h <<\EOF 4411 cat >>confdefs.h <<\_ACEOF
4018#define HAVE_NEXT 1 4412#define HAVE_NEXT 1
4019EOF 4413_ACEOF
4020 4414
4021 cat >>confdefs.h <<\EOF 4415 cat >>confdefs.h <<\_ACEOF
4022#define BROKEN_REALPATH 1 4416#define BROKEN_REALPATH 1
4023EOF 4417_ACEOF
4024 4418
4025 cat >>confdefs.h <<\EOF 4419 cat >>confdefs.h <<\_ACEOF
4026#define USE_PIPES 1 4420#define USE_PIPES 1
4027EOF 4421_ACEOF
4028 4422
4029 cat >>confdefs.h <<\EOF 4423 cat >>confdefs.h <<\_ACEOF
4030#define BROKEN_SAVED_UIDS 1 4424#define BROKEN_SAVED_UIDS 1
4031EOF 4425_ACEOF
4032 4426
4033 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 4427 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4034 CFLAGS="$CFLAGS" 4428 CFLAGS="$CFLAGS"
@@ -4037,50 +4431,44 @@ EOF
4037 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 4431 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4038 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib" 4432 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
4039 need_dash_r=1 4433 need_dash_r=1
4040 cat >>confdefs.h <<\EOF 4434 cat >>confdefs.h <<\_ACEOF
4041#define PAM_SUN_CODEBASE 1 4435#define PAM_SUN_CODEBASE 1
4042EOF 4436_ACEOF
4043 4437
4044 cat >>confdefs.h <<\EOF 4438 cat >>confdefs.h <<\_ACEOF
4045#define LOGIN_NEEDS_UTMPX 1 4439#define LOGIN_NEEDS_UTMPX 1
4046EOF 4440_ACEOF
4047 4441
4048 cat >>confdefs.h <<\EOF 4442 cat >>confdefs.h <<\_ACEOF
4049#define LOGIN_NEEDS_TERM 1 4443#define LOGIN_NEEDS_TERM 1
4050EOF 4444_ACEOF
4051 4445
4052 cat >>confdefs.h <<\EOF 4446 cat >>confdefs.h <<\_ACEOF
4053#define PAM_TTY_KLUDGE 1 4447#define PAM_TTY_KLUDGE 1
4054EOF 4448_ACEOF
4055
4056 cat >>confdefs.h <<\EOF
4057#define LOCKED_PASSWD_STRING "*LK*"
4058EOF
4059 4449
4060 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 4450 cat >>confdefs.h <<\_ACEOF
4061 cat >>confdefs.h <<\EOF 4451#define STREAMS_PUSH_ACQUIRES_CTTY 1
4062#define SSHD_ACQUIRES_CTTY 1 4452_ACEOF
4063EOF
4064 4453
4065 external_path_file=/etc/default/login
4066 # hardwire lastlog location (can't detect it on some versions) 4454 # hardwire lastlog location (can't detect it on some versions)
4067 conf_lastlog_location="/var/adm/lastlog" 4455 conf_lastlog_location="/var/adm/lastlog"
4068 echo "$as_me:4068: checking for obsolete utmp and wtmp in solaris2.x" >&5 4456 echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5
4069echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6 4457echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6
4070 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'` 4458 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
4071 if test "$sol2ver" -ge 8; then 4459 if test "$sol2ver" -ge 8; then
4072 echo "$as_me:4072: result: yes" >&5 4460 echo "$as_me:$LINENO: result: yes" >&5
4073echo "${ECHO_T}yes" >&6 4461echo "${ECHO_T}yes" >&6
4074 cat >>confdefs.h <<\EOF 4462 cat >>confdefs.h <<\_ACEOF
4075#define DISABLE_UTMP 1 4463#define DISABLE_UTMP 1
4076EOF 4464_ACEOF
4077 4465
4078 cat >>confdefs.h <<\EOF 4466 cat >>confdefs.h <<\_ACEOF
4079#define DISABLE_WTMP 1 4467#define DISABLE_WTMP 1
4080EOF 4468_ACEOF
4081 4469
4082 else 4470 else
4083 echo "$as_me:4083: result: no" >&5 4471 echo "$as_me:$LINENO: result: no" >&5
4084echo "${ECHO_T}no" >&6 4472echo "${ECHO_T}no" >&6
4085 fi 4473 fi
4086 ;; 4474 ;;
@@ -4090,95 +4478,105 @@ echo "${ECHO_T}no" >&6
4090for ac_func in getpwanam 4478for ac_func in getpwanam
4091do 4479do
4092as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 4480as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4093echo "$as_me:4093: checking for $ac_func" >&5 4481echo "$as_me:$LINENO: checking for $ac_func" >&5
4094echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 4482echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4095if eval "test \"\${$as_ac_var+set}\" = set"; then 4483if eval "test \"\${$as_ac_var+set}\" = set"; then
4096 echo $ECHO_N "(cached) $ECHO_C" >&6 4484 echo $ECHO_N "(cached) $ECHO_C" >&6
4097else 4485else
4098 cat >conftest.$ac_ext <<_ACEOF 4486 cat >conftest.$ac_ext <<_ACEOF
4099#line 4099 "configure" 4487#line $LINENO "configure"
4100#include "confdefs.h" 4488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
4101/* System header to define __stub macros and hopefully few prototypes, 4493/* System header to define __stub macros and hopefully few prototypes,
4102 which can conflict with char $ac_func (); below. */ 4494 which can conflict with char $ac_func (); below.
4103#include <assert.h> 4495 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4496 <limits.h> exists even on freestanding compilers. */
4497#ifdef __STDC__
4498# include <limits.h>
4499#else
4500# include <assert.h>
4501#endif
4104/* Override any gcc2 internal prototype to avoid an error. */ 4502/* Override any gcc2 internal prototype to avoid an error. */
4105#ifdef __cplusplus 4503#ifdef __cplusplus
4106extern "C" 4504extern "C"
4505{
4107#endif 4506#endif
4108/* We use char because int might match the return type of a gcc2 4507/* We use char because int might match the return type of a gcc2
4109 builtin and then its argument prototype would still apply. */ 4508 builtin and then its argument prototype would still apply. */
4110char $ac_func (); 4509char $ac_func ();
4111char (*f) ();
4112
4113int
4114main ()
4115{
4116/* The GNU C library defines this for functions which it implements 4510/* The GNU C library defines this for functions which it implements
4117 to always fail with ENOSYS. Some functions are actually named 4511 to always fail with ENOSYS. Some functions are actually named
4118 something starting with __ and the normal name is an alias. */ 4512 something starting with __ and the normal name is an alias. */
4119#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 4513#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4120choke me 4514choke me
4121#else 4515#else
4122f = $ac_func; 4516char (*f) () = $ac_func;
4517#endif
4518#ifdef __cplusplus
4519}
4123#endif 4520#endif
4124 4521
4522int
4523main ()
4524{
4525return f != $ac_func;
4125 ; 4526 ;
4126 return 0; 4527 return 0;
4127} 4528}
4128_ACEOF 4529_ACEOF
4129rm -f conftest.$ac_objext conftest$ac_exeext 4530rm -f conftest.$ac_objext conftest$ac_exeext
4130if { (eval echo "$as_me:4130: \"$ac_link\"") >&5 4531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4131 (eval $ac_link) 2>&5 4532 (eval $ac_link) 2>&5
4132 ac_status=$? 4533 ac_status=$?
4133 echo "$as_me:4133: \$? = $ac_status" >&5 4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4134 (exit $ac_status); } && 4535 (exit $ac_status); } &&
4135 { ac_try='test -s conftest$ac_exeext' 4536 { ac_try='test -s conftest$ac_exeext'
4136 { (eval echo "$as_me:4136: \"$ac_try\"") >&5 4537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4137 (eval $ac_try) 2>&5 4538 (eval $ac_try) 2>&5
4138 ac_status=$? 4539 ac_status=$?
4139 echo "$as_me:4139: \$? = $ac_status" >&5 4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140 (exit $ac_status); }; }; then 4541 (exit $ac_status); }; }; then
4141 eval "$as_ac_var=yes" 4542 eval "$as_ac_var=yes"
4142else 4543else
4143 echo "$as_me: failed program was:" >&5 4544 echo "$as_me: failed program was:" >&5
4144cat conftest.$ac_ext >&5 4545sed 's/^/| /' conftest.$ac_ext >&5
4546
4145eval "$as_ac_var=no" 4547eval "$as_ac_var=no"
4146fi 4548fi
4147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4549rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4148fi 4550fi
4149echo "$as_me:4149: result: `eval echo '${'$as_ac_var'}'`" >&5 4551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4150echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 4552echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4151if test `eval echo '${'$as_ac_var'}'` = yes; then 4553if test `eval echo '${'$as_ac_var'}'` = yes; then
4152 cat >>confdefs.h <<EOF 4554 cat >>confdefs.h <<_ACEOF
4153#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 4555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4154EOF 4556_ACEOF
4155 4557
4156fi 4558fi
4157done 4559done
4158 4560
4159 cat >>confdefs.h <<\EOF 4561 cat >>confdefs.h <<\_ACEOF
4160#define PAM_SUN_CODEBASE 1 4562#define PAM_SUN_CODEBASE 1
4161EOF 4563_ACEOF
4162 4564
4163 conf_utmp_location=/etc/utmp 4565 conf_utmp_location=/etc/utmp
4164 conf_wtmp_location=/var/adm/wtmp 4566 conf_wtmp_location=/var/adm/wtmp
4165 conf_lastlog_location=/var/adm/lastlog 4567 conf_lastlog_location=/var/adm/lastlog
4166 cat >>confdefs.h <<\EOF 4568 cat >>confdefs.h <<\_ACEOF
4167#define USE_PIPES 1 4569#define USE_PIPES 1
4168EOF 4570_ACEOF
4169 4571
4170 ;; 4572 ;;
4171*-ncr-sysv*) 4573*-ncr-sysv*)
4172 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 4574 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4173 LDFLAGS="$LDFLAGS -L/usr/local/lib" 4575 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4174 LIBS="$LIBS -lc89" 4576 LIBS="$LIBS -lc89"
4175 cat >>confdefs.h <<\EOF 4577 cat >>confdefs.h <<\_ACEOF
4176#define USE_PIPES 1 4578#define USE_PIPES 1
4177EOF 4579_ACEOF
4178
4179 cat >>confdefs.h <<\EOF
4180#define SSHD_ACQUIRES_CTTY 1
4181EOF
4182 4580
4183 ;; 4581 ;;
4184*-sni-sysv*) 4582*-sni-sysv*)
@@ -4186,19 +4584,14 @@ EOF
4186 # /usr/ucblib MUST NOT be searched on ReliantUNIX 4584 # /usr/ucblib MUST NOT be searched on ReliantUNIX
4187 LDFLAGS="$LDFLAGS -L/usr/local/lib" 4585 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4188 IPADDR_IN_DISPLAY=yes 4586 IPADDR_IN_DISPLAY=yes
4189 cat >>confdefs.h <<\EOF 4587 cat >>confdefs.h <<\_ACEOF
4190#define USE_PIPES 1 4588#define USE_PIPES 1
4191EOF 4589_ACEOF
4192 4590
4193 cat >>confdefs.h <<\EOF 4591 cat >>confdefs.h <<\_ACEOF
4194#define IP_TOS_IS_BROKEN 1 4592#define IP_TOS_IS_BROKEN 1
4195EOF 4593_ACEOF
4196
4197 cat >>confdefs.h <<\EOF
4198#define SSHD_ACQUIRES_CTTY 1
4199EOF
4200 4594
4201 external_path_file=/etc/default/login
4202 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX 4595 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
4203 # Attention: always take care to bind libsocket and libnsl before libc, 4596 # Attention: always take care to bind libsocket and libnsl before libc,
4204 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog 4597 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
@@ -4206,41 +4599,17 @@ EOF
4206*-*-sysv4.2*) 4599*-*-sysv4.2*)
4207 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 4600 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4208 LDFLAGS="$LDFLAGS -L/usr/local/lib" 4601 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4209 cat >>confdefs.h <<\EOF 4602 cat >>confdefs.h <<\_ACEOF
4210#define USE_PIPES 1 4603#define USE_PIPES 1
4211EOF 4604_ACEOF
4212
4213 cat >>confdefs.h <<\EOF
4214#define SETEUID_BREAKS_SETUID 1
4215EOF
4216
4217 cat >>confdefs.h <<\EOF
4218#define BROKEN_SETREUID 1
4219EOF
4220
4221 cat >>confdefs.h <<\EOF
4222#define BROKEN_SETREGID 1
4223EOF
4224 4605
4225 ;; 4606 ;;
4226*-*-sysv5*) 4607*-*-sysv5*)
4227 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 4608 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
4228 LDFLAGS="$LDFLAGS -L/usr/local/lib" 4609 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4229 cat >>confdefs.h <<\EOF 4610 cat >>confdefs.h <<\_ACEOF
4230#define USE_PIPES 1 4611#define USE_PIPES 1
4231EOF 4612_ACEOF
4232
4233 cat >>confdefs.h <<\EOF
4234#define SETEUID_BREAKS_SETUID 1
4235EOF
4236
4237 cat >>confdefs.h <<\EOF
4238#define BROKEN_SETREUID 1
4239EOF
4240
4241 cat >>confdefs.h <<\EOF
4242#define BROKEN_SETREGID 1
4243EOF
4244 4613
4245 ;; 4614 ;;
4246*-*-sysv*) 4615*-*-sysv*)
@@ -4253,95 +4622,107 @@ EOF
4253 LIBS="$LIBS -los -lprot -lx -ltinfo -lm" 4622 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
4254 RANLIB=true 4623 RANLIB=true
4255 no_dev_ptmx=1 4624 no_dev_ptmx=1
4256 cat >>confdefs.h <<\EOF 4625 cat >>confdefs.h <<\_ACEOF
4257#define BROKEN_SYS_TERMIO_H 1 4626#define BROKEN_SYS_TERMIO_H 1
4258EOF 4627_ACEOF
4259 4628
4260 cat >>confdefs.h <<\EOF 4629 cat >>confdefs.h <<\_ACEOF
4261#define USE_PIPES 1 4630#define USE_PIPES 1
4262EOF 4631_ACEOF
4263 4632
4264 cat >>confdefs.h <<\EOF 4633 cat >>confdefs.h <<\_ACEOF
4265#define HAVE_SECUREWARE 1 4634#define HAVE_SECUREWARE 1
4266EOF 4635_ACEOF
4267 4636
4268 cat >>confdefs.h <<\EOF 4637 cat >>confdefs.h <<\_ACEOF
4269#define DISABLE_SHADOW 1 4638#define DISABLE_SHADOW 1
4270EOF 4639_ACEOF
4271 4640
4272 cat >>confdefs.h <<\EOF 4641 cat >>confdefs.h <<\_ACEOF
4273#define BROKEN_SAVED_UIDS 1 4642#define BROKEN_SAVED_UIDS 1
4274EOF 4643_ACEOF
4644
4275 4645
4276 cat >>confdefs.h <<\EOF
4277#define WITH_ABBREV_NO_TTY 1
4278EOF
4279 4646
4280for ac_func in getluid setluid 4647for ac_func in getluid setluid
4281do 4648do
4282as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 4649as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4283echo "$as_me:4283: checking for $ac_func" >&5 4650echo "$as_me:$LINENO: checking for $ac_func" >&5
4284echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 4651echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4285if eval "test \"\${$as_ac_var+set}\" = set"; then 4652if eval "test \"\${$as_ac_var+set}\" = set"; then
4286 echo $ECHO_N "(cached) $ECHO_C" >&6 4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4287else 4654else
4288 cat >conftest.$ac_ext <<_ACEOF 4655 cat >conftest.$ac_ext <<_ACEOF
4289#line 4289 "configure" 4656#line $LINENO "configure"
4290#include "confdefs.h" 4657/* confdefs.h. */
4658_ACEOF
4659cat confdefs.h >>conftest.$ac_ext
4660cat >>conftest.$ac_ext <<_ACEOF
4661/* end confdefs.h. */
4291/* System header to define __stub macros and hopefully few prototypes, 4662/* System header to define __stub macros and hopefully few prototypes,
4292 which can conflict with char $ac_func (); below. */ 4663 which can conflict with char $ac_func (); below.
4293#include <assert.h> 4664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4665 <limits.h> exists even on freestanding compilers. */
4666#ifdef __STDC__
4667# include <limits.h>
4668#else
4669# include <assert.h>
4670#endif
4294/* Override any gcc2 internal prototype to avoid an error. */ 4671/* Override any gcc2 internal prototype to avoid an error. */
4295#ifdef __cplusplus 4672#ifdef __cplusplus
4296extern "C" 4673extern "C"
4674{
4297#endif 4675#endif
4298/* We use char because int might match the return type of a gcc2 4676/* We use char because int might match the return type of a gcc2
4299 builtin and then its argument prototype would still apply. */ 4677 builtin and then its argument prototype would still apply. */
4300char $ac_func (); 4678char $ac_func ();
4301char (*f) ();
4302
4303int
4304main ()
4305{
4306/* The GNU C library defines this for functions which it implements 4679/* The GNU C library defines this for functions which it implements
4307 to always fail with ENOSYS. Some functions are actually named 4680 to always fail with ENOSYS. Some functions are actually named
4308 something starting with __ and the normal name is an alias. */ 4681 something starting with __ and the normal name is an alias. */
4309#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 4682#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4310choke me 4683choke me
4311#else 4684#else
4312f = $ac_func; 4685char (*f) () = $ac_func;
4686#endif
4687#ifdef __cplusplus
4688}
4313#endif 4689#endif
4314 4690
4691int
4692main ()
4693{
4694return f != $ac_func;
4315 ; 4695 ;
4316 return 0; 4696 return 0;
4317} 4697}
4318_ACEOF 4698_ACEOF
4319rm -f conftest.$ac_objext conftest$ac_exeext 4699rm -f conftest.$ac_objext conftest$ac_exeext
4320if { (eval echo "$as_me:4320: \"$ac_link\"") >&5 4700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4321 (eval $ac_link) 2>&5 4701 (eval $ac_link) 2>&5
4322 ac_status=$? 4702 ac_status=$?
4323 echo "$as_me:4323: \$? = $ac_status" >&5 4703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4324 (exit $ac_status); } && 4704 (exit $ac_status); } &&
4325 { ac_try='test -s conftest$ac_exeext' 4705 { ac_try='test -s conftest$ac_exeext'
4326 { (eval echo "$as_me:4326: \"$ac_try\"") >&5 4706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4327 (eval $ac_try) 2>&5 4707 (eval $ac_try) 2>&5
4328 ac_status=$? 4708 ac_status=$?
4329 echo "$as_me:4329: \$? = $ac_status" >&5 4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330 (exit $ac_status); }; }; then 4710 (exit $ac_status); }; }; then
4331 eval "$as_ac_var=yes" 4711 eval "$as_ac_var=yes"
4332else 4712else
4333 echo "$as_me: failed program was:" >&5 4713 echo "$as_me: failed program was:" >&5
4334cat conftest.$ac_ext >&5 4714sed 's/^/| /' conftest.$ac_ext >&5
4715
4335eval "$as_ac_var=no" 4716eval "$as_ac_var=no"
4336fi 4717fi
4337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4718rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4338fi 4719fi
4339echo "$as_me:4339: result: `eval echo '${'$as_ac_var'}'`" >&5 4720echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4340echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 4721echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4341if test `eval echo '${'$as_ac_var'}'` = yes; then 4722if test `eval echo '${'$as_ac_var'}'` = yes; then
4342 cat >>confdefs.h <<EOF 4723 cat >>confdefs.h <<_ACEOF
4343#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 4724#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4344EOF 4725_ACEOF
4345 4726
4346fi 4727fi
4347done 4728done
@@ -4357,103 +4738,103 @@ done
4357 LDFLAGS="$LDFLAGS -L/usr/local/lib" 4738 LDFLAGS="$LDFLAGS -L/usr/local/lib"
4358 LIBS="$LIBS -lprot -lx -ltinfo -lm" 4739 LIBS="$LIBS -lprot -lx -ltinfo -lm"
4359 no_dev_ptmx=1 4740 no_dev_ptmx=1
4360 cat >>confdefs.h <<\EOF 4741 cat >>confdefs.h <<\_ACEOF
4361#define USE_PIPES 1 4742#define USE_PIPES 1
4362EOF 4743_ACEOF
4363 4744
4364 cat >>confdefs.h <<\EOF 4745 cat >>confdefs.h <<\_ACEOF
4365#define HAVE_SECUREWARE 1 4746#define HAVE_SECUREWARE 1
4366EOF 4747_ACEOF
4367 4748
4368 cat >>confdefs.h <<\EOF 4749 cat >>confdefs.h <<\_ACEOF
4369#define DISABLE_SHADOW 1 4750#define DISABLE_SHADOW 1
4370EOF 4751_ACEOF
4371 4752
4372 cat >>confdefs.h <<\EOF 4753 cat >>confdefs.h <<\_ACEOF
4373#define DISABLE_FD_PASSING 1 4754#define DISABLE_FD_PASSING 1
4374EOF 4755_ACEOF
4375
4376 cat >>confdefs.h <<\EOF
4377#define SETEUID_BREAKS_SETUID 1
4378EOF
4379
4380 cat >>confdefs.h <<\EOF
4381#define BROKEN_SETREUID 1
4382EOF
4383 4756
4384 cat >>confdefs.h <<\EOF
4385#define BROKEN_SETREGID 1
4386EOF
4387 4757
4388 cat >>confdefs.h <<\EOF
4389#define WITH_ABBREV_NO_TTY 1
4390EOF
4391 4758
4392for ac_func in getluid setluid 4759for ac_func in getluid setluid
4393do 4760do
4394as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 4761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4395echo "$as_me:4395: checking for $ac_func" >&5 4762echo "$as_me:$LINENO: checking for $ac_func" >&5
4396echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 4763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4397if eval "test \"\${$as_ac_var+set}\" = set"; then 4764if eval "test \"\${$as_ac_var+set}\" = set"; then
4398 echo $ECHO_N "(cached) $ECHO_C" >&6 4765 echo $ECHO_N "(cached) $ECHO_C" >&6
4399else 4766else
4400 cat >conftest.$ac_ext <<_ACEOF 4767 cat >conftest.$ac_ext <<_ACEOF
4401#line 4401 "configure" 4768#line $LINENO "configure"
4402#include "confdefs.h" 4769/* confdefs.h. */
4770_ACEOF
4771cat confdefs.h >>conftest.$ac_ext
4772cat >>conftest.$ac_ext <<_ACEOF
4773/* end confdefs.h. */
4403/* System header to define __stub macros and hopefully few prototypes, 4774/* System header to define __stub macros and hopefully few prototypes,
4404 which can conflict with char $ac_func (); below. */ 4775 which can conflict with char $ac_func (); below.
4405#include <assert.h> 4776 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4777 <limits.h> exists even on freestanding compilers. */
4778#ifdef __STDC__
4779# include <limits.h>
4780#else
4781# include <assert.h>
4782#endif
4406/* Override any gcc2 internal prototype to avoid an error. */ 4783/* Override any gcc2 internal prototype to avoid an error. */
4407#ifdef __cplusplus 4784#ifdef __cplusplus
4408extern "C" 4785extern "C"
4786{
4409#endif 4787#endif
4410/* We use char because int might match the return type of a gcc2 4788/* We use char because int might match the return type of a gcc2
4411 builtin and then its argument prototype would still apply. */ 4789 builtin and then its argument prototype would still apply. */
4412char $ac_func (); 4790char $ac_func ();
4413char (*f) ();
4414
4415int
4416main ()
4417{
4418/* The GNU C library defines this for functions which it implements 4791/* The GNU C library defines this for functions which it implements
4419 to always fail with ENOSYS. Some functions are actually named 4792 to always fail with ENOSYS. Some functions are actually named
4420 something starting with __ and the normal name is an alias. */ 4793 something starting with __ and the normal name is an alias. */
4421#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 4794#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4422choke me 4795choke me
4423#else 4796#else
4424f = $ac_func; 4797char (*f) () = $ac_func;
4798#endif
4799#ifdef __cplusplus
4800}
4425#endif 4801#endif
4426 4802
4803int
4804main ()
4805{
4806return f != $ac_func;
4427 ; 4807 ;
4428 return 0; 4808 return 0;
4429} 4809}
4430_ACEOF 4810_ACEOF
4431rm -f conftest.$ac_objext conftest$ac_exeext 4811rm -f conftest.$ac_objext conftest$ac_exeext
4432if { (eval echo "$as_me:4432: \"$ac_link\"") >&5 4812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4433 (eval $ac_link) 2>&5 4813 (eval $ac_link) 2>&5
4434 ac_status=$? 4814 ac_status=$?
4435 echo "$as_me:4435: \$? = $ac_status" >&5 4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4436 (exit $ac_status); } && 4816 (exit $ac_status); } &&
4437 { ac_try='test -s conftest$ac_exeext' 4817 { ac_try='test -s conftest$ac_exeext'
4438 { (eval echo "$as_me:4438: \"$ac_try\"") >&5 4818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4439 (eval $ac_try) 2>&5 4819 (eval $ac_try) 2>&5
4440 ac_status=$? 4820 ac_status=$?
4441 echo "$as_me:4441: \$? = $ac_status" >&5 4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4442 (exit $ac_status); }; }; then 4822 (exit $ac_status); }; }; then
4443 eval "$as_ac_var=yes" 4823 eval "$as_ac_var=yes"
4444else 4824else
4445 echo "$as_me: failed program was:" >&5 4825 echo "$as_me: failed program was:" >&5
4446cat conftest.$ac_ext >&5 4826sed 's/^/| /' conftest.$ac_ext >&5
4827
4447eval "$as_ac_var=no" 4828eval "$as_ac_var=no"
4448fi 4829fi
4449rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 4830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4450fi 4831fi
4451echo "$as_me:4451: result: `eval echo '${'$as_ac_var'}'`" >&5 4832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4452echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 4833echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4453if test `eval echo '${'$as_ac_var'}'` = yes; then 4834if test `eval echo '${'$as_ac_var'}'` = yes; then
4454 cat >>confdefs.h <<EOF 4835 cat >>confdefs.h <<_ACEOF
4455#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 4836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4456EOF 4837_ACEOF
4457 4838
4458fi 4839fi
4459done 4840done
@@ -4461,54 +4842,37 @@ done
4461 MANTYPE=man 4842 MANTYPE=man
4462 ;; 4843 ;;
4463*-*-unicosmk*) 4844*-*-unicosmk*)
4464 cat >>confdefs.h <<\EOF 4845 cat >>confdefs.h <<\_ACEOF
4465#define USE_PIPES 1 4846#define USE_PIPES 1
4466EOF 4847_ACEOF
4467 4848
4468 cat >>confdefs.h <<\EOF 4849 cat >>confdefs.h <<\_ACEOF
4469#define DISABLE_FD_PASSING 1 4850#define DISABLE_FD_PASSING 1
4470EOF 4851_ACEOF
4471 4852
4472 LDFLAGS="$LDFLAGS" 4853 LDFLAGS="$LDFLAGS"
4473 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" 4854 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
4474 MANTYPE=cat 4855 MANTYPE=cat
4475 ;; 4856 ;;
4476*-*-unicosmp*)
4477 cat >>confdefs.h <<\EOF
4478#define WITH_ABBREV_NO_TTY 1
4479EOF
4480
4481 cat >>confdefs.h <<\EOF
4482#define USE_PIPES 1
4483EOF
4484
4485 cat >>confdefs.h <<\EOF
4486#define DISABLE_FD_PASSING 1
4487EOF
4488
4489 LDFLAGS="$LDFLAGS"
4490 LIBS="$LIBS -lgen -lacid"
4491 MANTYPE=cat
4492 ;;
4493*-*-unicos*) 4857*-*-unicos*)
4494 cat >>confdefs.h <<\EOF 4858 cat >>confdefs.h <<\_ACEOF
4495#define USE_PIPES 1 4859#define USE_PIPES 1
4496EOF 4860_ACEOF
4497 4861
4498 cat >>confdefs.h <<\EOF 4862 cat >>confdefs.h <<\_ACEOF
4499#define DISABLE_FD_PASSING 1 4863#define DISABLE_FD_PASSING 1
4500EOF 4864_ACEOF
4501 4865
4502 cat >>confdefs.h <<\EOF 4866 cat >>confdefs.h <<\_ACEOF
4503#define NO_SSH_LASTLOG 1 4867#define NO_SSH_LASTLOG 1
4504EOF 4868_ACEOF
4505 4869
4506 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" 4870 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
4507 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" 4871 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
4508 MANTYPE=cat 4872 MANTYPE=cat
4509 ;; 4873 ;;
4510*-dec-osf*) 4874*-dec-osf*)
4511 echo "$as_me:4511: checking for Digital Unix SIA" >&5 4875 echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5
4512echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6 4876echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6
4513 no_osfsia="" 4877 no_osfsia=""
4514 4878
@@ -4517,7 +4881,7 @@ if test "${with_osfsia+set}" = set; then
4517 withval="$with_osfsia" 4881 withval="$with_osfsia"
4518 4882
4519 if test "x$withval" = "xno" ; then 4883 if test "x$withval" = "xno" ; then
4520 echo "$as_me:4520: result: disabled" >&5 4884 echo "$as_me:$LINENO: result: disabled" >&5
4521echo "${ECHO_T}disabled" >&6 4885echo "${ECHO_T}disabled" >&6
4522 no_osfsia=1 4886 no_osfsia=1
4523 fi 4887 fi
@@ -4525,60 +4889,52 @@ echo "${ECHO_T}disabled" >&6
4525fi; 4889fi;
4526 if test -z "$no_osfsia" ; then 4890 if test -z "$no_osfsia" ; then
4527 if test -f /etc/sia/matrix.conf; then 4891 if test -f /etc/sia/matrix.conf; then
4528 echo "$as_me:4528: result: yes" >&5 4892 echo "$as_me:$LINENO: result: yes" >&5
4529echo "${ECHO_T}yes" >&6 4893echo "${ECHO_T}yes" >&6
4530 cat >>confdefs.h <<\EOF 4894 cat >>confdefs.h <<\_ACEOF
4531#define HAVE_OSF_SIA 1 4895#define HAVE_OSF_SIA 1
4532EOF 4896_ACEOF
4533 4897
4534 cat >>confdefs.h <<\EOF 4898 cat >>confdefs.h <<\_ACEOF
4535#define DISABLE_LOGIN 1 4899#define DISABLE_LOGIN 1
4536EOF 4900_ACEOF
4537 4901
4538 cat >>confdefs.h <<\EOF 4902 cat >>confdefs.h <<\_ACEOF
4539#define DISABLE_FD_PASSING 1 4903#define DISABLE_FD_PASSING 1
4540EOF 4904_ACEOF
4541 4905
4542 LIBS="$LIBS -lsecurity -ldb -lm -laud" 4906 LIBS="$LIBS -lsecurity -ldb -lm -laud"
4543 else 4907 else
4544 echo "$as_me:4544: result: no" >&5 4908 echo "$as_me:$LINENO: result: no" >&5
4545echo "${ECHO_T}no" >&6 4909echo "${ECHO_T}no" >&6
4546 fi 4910 fi
4547 fi 4911 fi
4548 cat >>confdefs.h <<\EOF 4912 cat >>confdefs.h <<\_ACEOF
4549#define DISABLE_FD_PASSING 1 4913#define DISABLE_FD_PASSING 1
4550EOF 4914_ACEOF
4551
4552 cat >>confdefs.h <<\EOF
4553#define BROKEN_GETADDRINFO 1
4554EOF
4555
4556 cat >>confdefs.h <<\EOF
4557#define LOCKED_PASSWD_SUBSTR "Nologin"
4558EOF
4559 4915
4560 ;; 4916 ;;
4561 4917
4562*-*-nto-qnx) 4918*-*-nto-qnx)
4563 cat >>confdefs.h <<\EOF 4919 cat >>confdefs.h <<\_ACEOF
4564#define USE_PIPES 1 4920#define USE_PIPES 1
4565EOF 4921_ACEOF
4566 4922
4567 cat >>confdefs.h <<\EOF 4923 cat >>confdefs.h <<\_ACEOF
4568#define NO_X11_UNIX_SOCKETS 1 4924#define NO_X11_UNIX_SOCKETS 1
4569EOF 4925_ACEOF
4570 4926
4571 cat >>confdefs.h <<\EOF 4927 cat >>confdefs.h <<\_ACEOF
4572#define MISSING_NFDBITS 1 4928#define MISSING_NFDBITS 1
4573EOF 4929_ACEOF
4574 4930
4575 cat >>confdefs.h <<\EOF 4931 cat >>confdefs.h <<\_ACEOF
4576#define MISSING_HOWMANY 1 4932#define MISSING_HOWMANY 1
4577EOF 4933_ACEOF
4578 4934
4579 cat >>confdefs.h <<\EOF 4935 cat >>confdefs.h <<\_ACEOF
4580#define MISSING_FD_MASK 1 4936#define MISSING_FD_MASK 1
4581EOF 4937_ACEOF
4582 4938
4583 ;; 4939 ;;
4584esac 4940esac
@@ -4593,6 +4949,7 @@ if test "${with_cflags+set}" = set; then
4593 CFLAGS="$CFLAGS $withval" 4949 CFLAGS="$CFLAGS $withval"
4594 fi 4950 fi
4595 4951
4952
4596fi; 4953fi;
4597 4954
4598# Check whether --with-cppflags or --without-cppflags was given. 4955# Check whether --with-cppflags or --without-cppflags was given.
@@ -4603,6 +4960,7 @@ if test "${with_cppflags+set}" = set; then
4603 CPPFLAGS="$CPPFLAGS $withval" 4960 CPPFLAGS="$CPPFLAGS $withval"
4604 fi 4961 fi
4605 4962
4963
4606fi; 4964fi;
4607 4965
4608# Check whether --with-ldflags or --without-ldflags was given. 4966# Check whether --with-ldflags or --without-ldflags was given.
@@ -4613,6 +4971,7 @@ if test "${with_ldflags+set}" = set; then
4613 LDFLAGS="$LDFLAGS $withval" 4971 LDFLAGS="$LDFLAGS $withval"
4614 fi 4972 fi
4615 4973
4974
4616fi; 4975fi;
4617 4976
4618# Check whether --with-libs or --without-libs was given. 4977# Check whether --with-libs or --without-libs was given.
@@ -4623,82 +4982,370 @@ if test "${with_libs+set}" = set; then
4623 LIBS="$LIBS $withval" 4982 LIBS="$LIBS $withval"
4624 fi 4983 fi
4625 4984
4985
4626fi; 4986fi;
4627 4987
4628echo "$as_me:4628: checking compiler and flags for sanity" >&5 4988# Checks for header files.
4629echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6 4989
4630if test "$cross_compiling" = yes; then 4990echo "$as_me:$LINENO: checking for egrep" >&5
4631 { { echo "$as_me:4631: error: cannot run test program while cross compiling" >&5 4991echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4632echo "$as_me: error: cannot run test program while cross compiling" >&2;} 4992if test "${ac_cv_prog_egrep+set}" = set; then
4633 { (exit 1); exit 1; }; } 4993 echo $ECHO_N "(cached) $ECHO_C" >&6
4994else
4995 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4996 then ac_cv_prog_egrep='grep -E'
4997 else ac_cv_prog_egrep='egrep'
4998 fi
4999fi
5000echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5001echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5002 EGREP=$ac_cv_prog_egrep
5003
5004
5005echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5006echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5007if test "${ac_cv_header_stdc+set}" = set; then
5008 echo $ECHO_N "(cached) $ECHO_C" >&6
4634else 5009else
4635 cat >conftest.$ac_ext <<_ACEOF 5010 cat >conftest.$ac_ext <<_ACEOF
4636#line 4636 "configure" 5011#line $LINENO "configure"
4637#include "confdefs.h" 5012/* confdefs.h. */
5013_ACEOF
5014cat confdefs.h >>conftest.$ac_ext
5015cat >>conftest.$ac_ext <<_ACEOF
5016/* end confdefs.h. */
5017#include <stdlib.h>
5018#include <stdarg.h>
5019#include <string.h>
5020#include <float.h>
4638 5021
4639#include <stdio.h> 5022int
4640int main(){exit(0);} 5023main ()
5024{
5025
5026 ;
5027 return 0;
5028}
5029_ACEOF
5030rm -f conftest.$ac_objext
5031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5032 (eval $ac_compile) 2>&5
5033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); } &&
5036 { ac_try='test -s conftest.$ac_objext'
5037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5038 (eval $ac_try) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); }; }; then
5042 ac_cv_header_stdc=yes
5043else
5044 echo "$as_me: failed program was:" >&5
5045sed 's/^/| /' conftest.$ac_ext >&5
5046
5047ac_cv_header_stdc=no
5048fi
5049rm -f conftest.$ac_objext conftest.$ac_ext
5050
5051if test $ac_cv_header_stdc = yes; then
5052 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5053 cat >conftest.$ac_ext <<_ACEOF
5054#line $LINENO "configure"
5055/* confdefs.h. */
5056_ACEOF
5057cat confdefs.h >>conftest.$ac_ext
5058cat >>conftest.$ac_ext <<_ACEOF
5059/* end confdefs.h. */
5060#include <string.h>
4641 5061
4642_ACEOF 5062_ACEOF
5063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5064 $EGREP "memchr" >/dev/null 2>&1; then
5065 :
5066else
5067 ac_cv_header_stdc=no
5068fi
5069rm -f conftest*
5070
5071fi
5072
5073if test $ac_cv_header_stdc = yes; then
5074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5075 cat >conftest.$ac_ext <<_ACEOF
5076#line $LINENO "configure"
5077/* confdefs.h. */
5078_ACEOF
5079cat confdefs.h >>conftest.$ac_ext
5080cat >>conftest.$ac_ext <<_ACEOF
5081/* end confdefs.h. */
5082#include <stdlib.h>
5083
5084_ACEOF
5085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5086 $EGREP "free" >/dev/null 2>&1; then
5087 :
5088else
5089 ac_cv_header_stdc=no
5090fi
5091rm -f conftest*
5092
5093fi
5094
5095if test $ac_cv_header_stdc = yes; then
5096 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5097 if test "$cross_compiling" = yes; then
5098 :
5099else
5100 cat >conftest.$ac_ext <<_ACEOF
5101#line $LINENO "configure"
5102/* confdefs.h. */
5103_ACEOF
5104cat confdefs.h >>conftest.$ac_ext
5105cat >>conftest.$ac_ext <<_ACEOF
5106/* end confdefs.h. */
5107#include <ctype.h>
5108#if ((' ' & 0x0FF) == 0x020)
5109# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5110# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5111#else
5112# define ISLOWER(c) \
5113 (('a' <= (c) && (c) <= 'i') \
5114 || ('j' <= (c) && (c) <= 'r') \
5115 || ('s' <= (c) && (c) <= 'z'))
5116# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5117#endif
5118
5119#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5120int
5121main ()
5122{
5123 int i;
5124 for (i = 0; i < 256; i++)
5125 if (XOR (islower (i), ISLOWER (i))
5126 || toupper (i) != TOUPPER (i))
5127 exit(2);
5128 exit (0);
5129}
5130_ACEOF
4643rm -f conftest$ac_exeext 5131rm -f conftest$ac_exeext
4644if { (eval echo "$as_me:4644: \"$ac_link\"") >&5 5132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4645 (eval $ac_link) 2>&5 5133 (eval $ac_link) 2>&5
4646 ac_status=$? 5134 ac_status=$?
4647 echo "$as_me:4647: \$? = $ac_status" >&5 5135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 5136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4649 { (eval echo "$as_me:4649: \"$ac_try\"") >&5 5137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4650 (eval $ac_try) 2>&5 5138 (eval $ac_try) 2>&5
4651 ac_status=$? 5139 ac_status=$?
4652 echo "$as_me:4652: \$? = $ac_status" >&5 5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653 (exit $ac_status); }; }; then 5141 (exit $ac_status); }; }; then
4654 echo "$as_me:4654: result: yes" >&5 5142 :
4655echo "${ECHO_T}yes" >&6
4656else 5143else
4657 echo "$as_me: program exited with status $ac_status" >&5 5144 echo "$as_me: program exited with status $ac_status" >&5
4658echo "$as_me: failed program was:" >&5 5145echo "$as_me: failed program was:" >&5
4659cat conftest.$ac_ext >&5 5146sed 's/^/| /' conftest.$ac_ext >&5
4660 5147
4661 echo "$as_me:4661: result: no" >&5 5148( exit $ac_status )
4662echo "${ECHO_T}no" >&6 5149ac_cv_header_stdc=no
4663 { { echo "$as_me:4663: error: *** compiler cannot create working executables, check config.log ***" >&5 5150fi
4664echo "$as_me: error: *** compiler cannot create working executables, check config.log ***" >&2;} 5151rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4665 { (exit 1); exit 1; }; } 5152fi
5153fi
5154fi
5155echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5156echo "${ECHO_T}$ac_cv_header_stdc" >&6
5157if test $ac_cv_header_stdc = yes; then
5158
5159cat >>confdefs.h <<\_ACEOF
5160#define STDC_HEADERS 1
5161_ACEOF
5162
5163fi
5164
5165# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5176 inttypes.h stdint.h unistd.h
5177do
5178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5179echo "$as_me:$LINENO: checking for $ac_header" >&5
5180echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5181if eval "test \"\${$as_ac_Header+set}\" = set"; then
5182 echo $ECHO_N "(cached) $ECHO_C" >&6
5183else
5184 cat >conftest.$ac_ext <<_ACEOF
5185#line $LINENO "configure"
5186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
5191$ac_includes_default
5192
5193#include <$ac_header>
5194_ACEOF
5195rm -f conftest.$ac_objext
5196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5197 (eval $ac_compile) 2>&5
5198 ac_status=$?
5199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200 (exit $ac_status); } &&
5201 { ac_try='test -s conftest.$ac_objext'
5202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5203 (eval $ac_try) 2>&5
5204 ac_status=$?
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); }; }; then
5207 eval "$as_ac_Header=yes"
5208else
5209 echo "$as_me: failed program was:" >&5
5210sed 's/^/| /' conftest.$ac_ext >&5
4666 5211
5212eval "$as_ac_Header=no"
4667fi 5213fi
4668rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 5214rm -f conftest.$ac_objext conftest.$ac_ext
5215fi
5216echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5217echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5218if test `eval echo '${'$as_ac_Header'}'` = yes; then
5219 cat >>confdefs.h <<_ACEOF
5220#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5221_ACEOF
5222
4669fi 5223fi
4670 5224
4671# Checks for header files. 5225done
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
4672 5245
4673for ac_header in bstring.h crypt.h endian.h features.h floatingpoint.h \ 5246
4674 getopt.h glob.h ia.h lastlog.h limits.h login.h \ 5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273for ac_header in bstring.h crypt.h endian.h floatingpoint.h \
5274 getopt.h glob.h ia.h lastlog.h libgen.h limits.h login.h \
4675 login_cap.h maillock.h netdb.h netgroup.h \ 5275 login_cap.h maillock.h netdb.h netgroup.h \
4676 netinet/in_systm.h paths.h pty.h readpassphrase.h \ 5276 netinet/in_systm.h paths.h pty.h readpassphrase.h \
4677 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ 5277 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
4678 strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \ 5278 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
4679 sys/cdefs.h sys/mman.h sys/pstat.h sys/select.h sys/stat.h \ 5279 sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
4680 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \ 5280 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
4681 sys/un.h time.h tmpdir.h ttyent.h usersec.h \ 5281 sys/un.h time.h tmpdir.h ttyent.h usersec.h \
4682 util.h utime.h utmp.h utmpx.h 5282 util.h utime.h utmp.h utmpx.h
4683do 5283do
4684as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 5284as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4685echo "$as_me:4685: checking for $ac_header" >&5 5285if eval "test \"\${$as_ac_Header+set}\" = set"; then
5286 echo "$as_me:$LINENO: checking for $ac_header" >&5
4686echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 5287echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4687if eval "test \"\${$as_ac_Header+set}\" = set"; then 5288if eval "test \"\${$as_ac_Header+set}\" = set"; then
4688 echo $ECHO_N "(cached) $ECHO_C" >&6 5289 echo $ECHO_N "(cached) $ECHO_C" >&6
5290fi
5291echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5292echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4689else 5293else
4690 cat >conftest.$ac_ext <<_ACEOF 5294 # Is the header compilable?
4691#line 4691 "configure" 5295echo "$as_me:$LINENO: checking $ac_header usability" >&5
4692#include "confdefs.h" 5296echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5297cat >conftest.$ac_ext <<_ACEOF
5298#line $LINENO "configure"
5299/* confdefs.h. */
5300_ACEOF
5301cat confdefs.h >>conftest.$ac_ext
5302cat >>conftest.$ac_ext <<_ACEOF
5303/* end confdefs.h. */
5304$ac_includes_default
5305#include <$ac_header>
5306_ACEOF
5307rm -f conftest.$ac_objext
5308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5309 (eval $ac_compile) 2>&5
5310 ac_status=$?
5311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312 (exit $ac_status); } &&
5313 { ac_try='test -s conftest.$ac_objext'
5314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5315 (eval $ac_try) 2>&5
5316 ac_status=$?
5317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5318 (exit $ac_status); }; }; then
5319 ac_header_compiler=yes
5320else
5321 echo "$as_me: failed program was:" >&5
5322sed 's/^/| /' conftest.$ac_ext >&5
5323
5324ac_header_compiler=no
5325fi
5326rm -f conftest.$ac_objext conftest.$ac_ext
5327echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5328echo "${ECHO_T}$ac_header_compiler" >&6
5329
5330# Is the header present?
5331echo "$as_me:$LINENO: checking $ac_header presence" >&5
5332echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5333cat >conftest.$ac_ext <<_ACEOF
5334#line $LINENO "configure"
5335/* confdefs.h. */
5336_ACEOF
5337cat confdefs.h >>conftest.$ac_ext
5338cat >>conftest.$ac_ext <<_ACEOF
5339/* end confdefs.h. */
4693#include <$ac_header> 5340#include <$ac_header>
4694_ACEOF 5341_ACEOF
4695if { (eval echo "$as_me:4695: \"$ac_cpp conftest.$ac_ext\"") >&5 5342if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4696 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 5343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4697 ac_status=$? 5344 ac_status=$?
4698 egrep -v '^ *\+' conftest.er1 >conftest.err 5345 grep -v '^ *+' conftest.er1 >conftest.err
4699 rm -f conftest.er1 5346 rm -f conftest.er1
4700 cat conftest.err >&5 5347 cat conftest.err >&5
4701 echo "$as_me:4701: \$? = $ac_status" >&5 5348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4702 (exit $ac_status); } >/dev/null; then 5349 (exit $ac_status); } >/dev/null; then
4703 if test -s conftest.err; then 5350 if test -s conftest.err; then
4704 ac_cpp_err=$ac_c_preproc_warn_flag 5351 ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4709,88 +5356,149 @@ else
4709 ac_cpp_err=yes 5356 ac_cpp_err=yes
4710fi 5357fi
4711if test -z "$ac_cpp_err"; then 5358if test -z "$ac_cpp_err"; then
4712 eval "$as_ac_Header=yes" 5359 ac_header_preproc=yes
4713else 5360else
4714 echo "$as_me: failed program was:" >&5 5361 echo "$as_me: failed program was:" >&5
4715 cat conftest.$ac_ext >&5 5362sed 's/^/| /' conftest.$ac_ext >&5
4716 eval "$as_ac_Header=no" 5363
5364 ac_header_preproc=no
4717fi 5365fi
4718rm -f conftest.err conftest.$ac_ext 5366rm -f conftest.err conftest.$ac_ext
5367echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5368echo "${ECHO_T}$ac_header_preproc" >&6
5369
5370# So? What about this header?
5371case $ac_header_compiler:$ac_header_preproc in
5372 yes:no )
5373 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5374echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5375 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5376echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5377 (
5378 cat <<\_ASBOX
5379## ------------------------------------ ##
5380## Report this to bug-autoconf@gnu.org. ##
5381## ------------------------------------ ##
5382_ASBOX
5383 ) |
5384 sed "s/^/$as_me: WARNING: /" >&2
5385 ;;
5386 no:yes )
5387 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5388echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5389 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5390echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5391 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5392echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5393 (
5394 cat <<\_ASBOX
5395## ------------------------------------ ##
5396## Report this to bug-autoconf@gnu.org. ##
5397## ------------------------------------ ##
5398_ASBOX
5399 ) |
5400 sed "s/^/$as_me: WARNING: /" >&2
5401 ;;
5402esac
5403echo "$as_me:$LINENO: checking for $ac_header" >&5
5404echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5405if eval "test \"\${$as_ac_Header+set}\" = set"; then
5406 echo $ECHO_N "(cached) $ECHO_C" >&6
5407else
5408 eval "$as_ac_Header=$ac_header_preproc"
4719fi 5409fi
4720echo "$as_me:4720: result: `eval echo '${'$as_ac_Header'}'`" >&5 5410echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4721echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 5411echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5412
5413fi
4722if test `eval echo '${'$as_ac_Header'}'` = yes; then 5414if test `eval echo '${'$as_ac_Header'}'` = yes; then
4723 cat >>confdefs.h <<EOF 5415 cat >>confdefs.h <<_ACEOF
4724#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 5416#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4725EOF 5417_ACEOF
4726 5418
4727fi 5419fi
5420
4728done 5421done
4729 5422
5423
4730# Checks for libraries. 5424# Checks for libraries.
4731echo "$as_me:4731: checking for yp_match" >&5 5425echo "$as_me:$LINENO: checking for yp_match" >&5
4732echo $ECHO_N "checking for yp_match... $ECHO_C" >&6 5426echo $ECHO_N "checking for yp_match... $ECHO_C" >&6
4733if test "${ac_cv_func_yp_match+set}" = set; then 5427if test "${ac_cv_func_yp_match+set}" = set; then
4734 echo $ECHO_N "(cached) $ECHO_C" >&6 5428 echo $ECHO_N "(cached) $ECHO_C" >&6
4735else 5429else
4736 cat >conftest.$ac_ext <<_ACEOF 5430 cat >conftest.$ac_ext <<_ACEOF
4737#line 4737 "configure" 5431#line $LINENO "configure"
4738#include "confdefs.h" 5432/* confdefs.h. */
5433_ACEOF
5434cat confdefs.h >>conftest.$ac_ext
5435cat >>conftest.$ac_ext <<_ACEOF
5436/* end confdefs.h. */
4739/* System header to define __stub macros and hopefully few prototypes, 5437/* System header to define __stub macros and hopefully few prototypes,
4740 which can conflict with char yp_match (); below. */ 5438 which can conflict with char yp_match (); below.
4741#include <assert.h> 5439 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5440 <limits.h> exists even on freestanding compilers. */
5441#ifdef __STDC__
5442# include <limits.h>
5443#else
5444# include <assert.h>
5445#endif
4742/* Override any gcc2 internal prototype to avoid an error. */ 5446/* Override any gcc2 internal prototype to avoid an error. */
4743#ifdef __cplusplus 5447#ifdef __cplusplus
4744extern "C" 5448extern "C"
5449{
4745#endif 5450#endif
4746/* We use char because int might match the return type of a gcc2 5451/* We use char because int might match the return type of a gcc2
4747 builtin and then its argument prototype would still apply. */ 5452 builtin and then its argument prototype would still apply. */
4748char yp_match (); 5453char yp_match ();
4749char (*f) ();
4750
4751int
4752main ()
4753{
4754/* The GNU C library defines this for functions which it implements 5454/* The GNU C library defines this for functions which it implements
4755 to always fail with ENOSYS. Some functions are actually named 5455 to always fail with ENOSYS. Some functions are actually named
4756 something starting with __ and the normal name is an alias. */ 5456 something starting with __ and the normal name is an alias. */
4757#if defined (__stub_yp_match) || defined (__stub___yp_match) 5457#if defined (__stub_yp_match) || defined (__stub___yp_match)
4758choke me 5458choke me
4759#else 5459#else
4760f = yp_match; 5460char (*f) () = yp_match;
5461#endif
5462#ifdef __cplusplus
5463}
4761#endif 5464#endif
4762 5465
5466int
5467main ()
5468{
5469return f != yp_match;
4763 ; 5470 ;
4764 return 0; 5471 return 0;
4765} 5472}
4766_ACEOF 5473_ACEOF
4767rm -f conftest.$ac_objext conftest$ac_exeext 5474rm -f conftest.$ac_objext conftest$ac_exeext
4768if { (eval echo "$as_me:4768: \"$ac_link\"") >&5 5475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4769 (eval $ac_link) 2>&5 5476 (eval $ac_link) 2>&5
4770 ac_status=$? 5477 ac_status=$?
4771 echo "$as_me:4771: \$? = $ac_status" >&5 5478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772 (exit $ac_status); } && 5479 (exit $ac_status); } &&
4773 { ac_try='test -s conftest$ac_exeext' 5480 { ac_try='test -s conftest$ac_exeext'
4774 { (eval echo "$as_me:4774: \"$ac_try\"") >&5 5481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4775 (eval $ac_try) 2>&5 5482 (eval $ac_try) 2>&5
4776 ac_status=$? 5483 ac_status=$?
4777 echo "$as_me:4777: \$? = $ac_status" >&5 5484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778 (exit $ac_status); }; }; then 5485 (exit $ac_status); }; }; then
4779 ac_cv_func_yp_match=yes 5486 ac_cv_func_yp_match=yes
4780else 5487else
4781 echo "$as_me: failed program was:" >&5 5488 echo "$as_me: failed program was:" >&5
4782cat conftest.$ac_ext >&5 5489sed 's/^/| /' conftest.$ac_ext >&5
5490
4783ac_cv_func_yp_match=no 5491ac_cv_func_yp_match=no
4784fi 5492fi
4785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 5493rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4786fi 5494fi
4787echo "$as_me:4787: result: $ac_cv_func_yp_match" >&5 5495echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5
4788echo "${ECHO_T}$ac_cv_func_yp_match" >&6 5496echo "${ECHO_T}$ac_cv_func_yp_match" >&6
4789if test $ac_cv_func_yp_match = yes; then 5497if test $ac_cv_func_yp_match = yes; then
4790 : 5498 :
4791else 5499else
4792 5500
4793echo "$as_me:4793: checking for yp_match in -lnsl" >&5 5501echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5
4794echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6 5502echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6
4795if test "${ac_cv_lib_nsl_yp_match+set}" = set; then 5503if test "${ac_cv_lib_nsl_yp_match+set}" = set; then
4796 echo $ECHO_N "(cached) $ECHO_C" >&6 5504 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4798,8 +5506,12 @@ else
4798 ac_check_lib_save_LIBS=$LIBS 5506 ac_check_lib_save_LIBS=$LIBS
4799LIBS="-lnsl $LIBS" 5507LIBS="-lnsl $LIBS"
4800cat >conftest.$ac_ext <<_ACEOF 5508cat >conftest.$ac_ext <<_ACEOF
4801#line 4801 "configure" 5509#line $LINENO "configure"
4802#include "confdefs.h" 5510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
4803 5515
4804/* Override any gcc2 internal prototype to avoid an error. */ 5516/* Override any gcc2 internal prototype to avoid an error. */
4805#ifdef __cplusplus 5517#ifdef __cplusplus
@@ -4817,32 +5529,33 @@ yp_match ();
4817} 5529}
4818_ACEOF 5530_ACEOF
4819rm -f conftest.$ac_objext conftest$ac_exeext 5531rm -f conftest.$ac_objext conftest$ac_exeext
4820if { (eval echo "$as_me:4820: \"$ac_link\"") >&5 5532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4821 (eval $ac_link) 2>&5 5533 (eval $ac_link) 2>&5
4822 ac_status=$? 5534 ac_status=$?
4823 echo "$as_me:4823: \$? = $ac_status" >&5 5535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); } && 5536 (exit $ac_status); } &&
4825 { ac_try='test -s conftest$ac_exeext' 5537 { ac_try='test -s conftest$ac_exeext'
4826 { (eval echo "$as_me:4826: \"$ac_try\"") >&5 5538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4827 (eval $ac_try) 2>&5 5539 (eval $ac_try) 2>&5
4828 ac_status=$? 5540 ac_status=$?
4829 echo "$as_me:4829: \$? = $ac_status" >&5 5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4830 (exit $ac_status); }; }; then 5542 (exit $ac_status); }; }; then
4831 ac_cv_lib_nsl_yp_match=yes 5543 ac_cv_lib_nsl_yp_match=yes
4832else 5544else
4833 echo "$as_me: failed program was:" >&5 5545 echo "$as_me: failed program was:" >&5
4834cat conftest.$ac_ext >&5 5546sed 's/^/| /' conftest.$ac_ext >&5
5547
4835ac_cv_lib_nsl_yp_match=no 5548ac_cv_lib_nsl_yp_match=no
4836fi 5549fi
4837rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 5550rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4838LIBS=$ac_check_lib_save_LIBS 5551LIBS=$ac_check_lib_save_LIBS
4839fi 5552fi
4840echo "$as_me:4840: result: $ac_cv_lib_nsl_yp_match" >&5 5553echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5
4841echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6 5554echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6
4842if test $ac_cv_lib_nsl_yp_match = yes; then 5555if test $ac_cv_lib_nsl_yp_match = yes; then
4843 cat >>confdefs.h <<EOF 5556 cat >>confdefs.h <<_ACEOF
4844#define HAVE_LIBNSL 1 5557#define HAVE_LIBNSL 1
4845EOF 5558_ACEOF
4846 5559
4847 LIBS="-lnsl $LIBS" 5560 LIBS="-lnsl $LIBS"
4848 5561
@@ -4850,69 +5563,83 @@ fi
4850 5563
4851fi 5564fi
4852 5565
4853echo "$as_me:4853: checking for setsockopt" >&5 5566echo "$as_me:$LINENO: checking for setsockopt" >&5
4854echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6 5567echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
4855if test "${ac_cv_func_setsockopt+set}" = set; then 5568if test "${ac_cv_func_setsockopt+set}" = set; then
4856 echo $ECHO_N "(cached) $ECHO_C" >&6 5569 echo $ECHO_N "(cached) $ECHO_C" >&6
4857else 5570else
4858 cat >conftest.$ac_ext <<_ACEOF 5571 cat >conftest.$ac_ext <<_ACEOF
4859#line 4859 "configure" 5572#line $LINENO "configure"
4860#include "confdefs.h" 5573/* confdefs.h. */
5574_ACEOF
5575cat confdefs.h >>conftest.$ac_ext
5576cat >>conftest.$ac_ext <<_ACEOF
5577/* end confdefs.h. */
4861/* System header to define __stub macros and hopefully few prototypes, 5578/* System header to define __stub macros and hopefully few prototypes,
4862 which can conflict with char setsockopt (); below. */ 5579 which can conflict with char setsockopt (); below.
4863#include <assert.h> 5580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5581 <limits.h> exists even on freestanding compilers. */
5582#ifdef __STDC__
5583# include <limits.h>
5584#else
5585# include <assert.h>
5586#endif
4864/* Override any gcc2 internal prototype to avoid an error. */ 5587/* Override any gcc2 internal prototype to avoid an error. */
4865#ifdef __cplusplus 5588#ifdef __cplusplus
4866extern "C" 5589extern "C"
5590{
4867#endif 5591#endif
4868/* We use char because int might match the return type of a gcc2 5592/* We use char because int might match the return type of a gcc2
4869 builtin and then its argument prototype would still apply. */ 5593 builtin and then its argument prototype would still apply. */
4870char setsockopt (); 5594char setsockopt ();
4871char (*f) ();
4872
4873int
4874main ()
4875{
4876/* The GNU C library defines this for functions which it implements 5595/* The GNU C library defines this for functions which it implements
4877 to always fail with ENOSYS. Some functions are actually named 5596 to always fail with ENOSYS. Some functions are actually named
4878 something starting with __ and the normal name is an alias. */ 5597 something starting with __ and the normal name is an alias. */
4879#if defined (__stub_setsockopt) || defined (__stub___setsockopt) 5598#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
4880choke me 5599choke me
4881#else 5600#else
4882f = setsockopt; 5601char (*f) () = setsockopt;
5602#endif
5603#ifdef __cplusplus
5604}
4883#endif 5605#endif
4884 5606
5607int
5608main ()
5609{
5610return f != setsockopt;
4885 ; 5611 ;
4886 return 0; 5612 return 0;
4887} 5613}
4888_ACEOF 5614_ACEOF
4889rm -f conftest.$ac_objext conftest$ac_exeext 5615rm -f conftest.$ac_objext conftest$ac_exeext
4890if { (eval echo "$as_me:4890: \"$ac_link\"") >&5 5616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4891 (eval $ac_link) 2>&5 5617 (eval $ac_link) 2>&5
4892 ac_status=$? 5618 ac_status=$?
4893 echo "$as_me:4893: \$? = $ac_status" >&5 5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4894 (exit $ac_status); } && 5620 (exit $ac_status); } &&
4895 { ac_try='test -s conftest$ac_exeext' 5621 { ac_try='test -s conftest$ac_exeext'
4896 { (eval echo "$as_me:4896: \"$ac_try\"") >&5 5622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4897 (eval $ac_try) 2>&5 5623 (eval $ac_try) 2>&5
4898 ac_status=$? 5624 ac_status=$?
4899 echo "$as_me:4899: \$? = $ac_status" >&5 5625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4900 (exit $ac_status); }; }; then 5626 (exit $ac_status); }; }; then
4901 ac_cv_func_setsockopt=yes 5627 ac_cv_func_setsockopt=yes
4902else 5628else
4903 echo "$as_me: failed program was:" >&5 5629 echo "$as_me: failed program was:" >&5
4904cat conftest.$ac_ext >&5 5630sed 's/^/| /' conftest.$ac_ext >&5
5631
4905ac_cv_func_setsockopt=no 5632ac_cv_func_setsockopt=no
4906fi 5633fi
4907rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 5634rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4908fi 5635fi
4909echo "$as_me:4909: result: $ac_cv_func_setsockopt" >&5 5636echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4910echo "${ECHO_T}$ac_cv_func_setsockopt" >&6 5637echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
4911if test $ac_cv_func_setsockopt = yes; then 5638if test $ac_cv_func_setsockopt = yes; then
4912 : 5639 :
4913else 5640else
4914 5641
4915echo "$as_me:4915: checking for setsockopt in -lsocket" >&5 5642echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4916echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6 5643echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
4917if test "${ac_cv_lib_socket_setsockopt+set}" = set; then 5644if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4918 echo $ECHO_N "(cached) $ECHO_C" >&6 5645 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4920,8 +5647,12 @@ else
4920 ac_check_lib_save_LIBS=$LIBS 5647 ac_check_lib_save_LIBS=$LIBS
4921LIBS="-lsocket $LIBS" 5648LIBS="-lsocket $LIBS"
4922cat >conftest.$ac_ext <<_ACEOF 5649cat >conftest.$ac_ext <<_ACEOF
4923#line 4923 "configure" 5650#line $LINENO "configure"
4924#include "confdefs.h" 5651/* confdefs.h. */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h. */
4925 5656
4926/* Override any gcc2 internal prototype to avoid an error. */ 5657/* Override any gcc2 internal prototype to avoid an error. */
4927#ifdef __cplusplus 5658#ifdef __cplusplus
@@ -4939,32 +5670,33 @@ setsockopt ();
4939} 5670}
4940_ACEOF 5671_ACEOF
4941rm -f conftest.$ac_objext conftest$ac_exeext 5672rm -f conftest.$ac_objext conftest$ac_exeext
4942if { (eval echo "$as_me:4942: \"$ac_link\"") >&5 5673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4943 (eval $ac_link) 2>&5 5674 (eval $ac_link) 2>&5
4944 ac_status=$? 5675 ac_status=$?
4945 echo "$as_me:4945: \$? = $ac_status" >&5 5676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); } && 5677 (exit $ac_status); } &&
4947 { ac_try='test -s conftest$ac_exeext' 5678 { ac_try='test -s conftest$ac_exeext'
4948 { (eval echo "$as_me:4948: \"$ac_try\"") >&5 5679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4949 (eval $ac_try) 2>&5 5680 (eval $ac_try) 2>&5
4950 ac_status=$? 5681 ac_status=$?
4951 echo "$as_me:4951: \$? = $ac_status" >&5 5682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4952 (exit $ac_status); }; }; then 5683 (exit $ac_status); }; }; then
4953 ac_cv_lib_socket_setsockopt=yes 5684 ac_cv_lib_socket_setsockopt=yes
4954else 5685else
4955 echo "$as_me: failed program was:" >&5 5686 echo "$as_me: failed program was:" >&5
4956cat conftest.$ac_ext >&5 5687sed 's/^/| /' conftest.$ac_ext >&5
5688
4957ac_cv_lib_socket_setsockopt=no 5689ac_cv_lib_socket_setsockopt=no
4958fi 5690fi
4959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 5691rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4960LIBS=$ac_check_lib_save_LIBS 5692LIBS=$ac_check_lib_save_LIBS
4961fi 5693fi
4962echo "$as_me:4962: result: $ac_cv_lib_socket_setsockopt" >&5 5694echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4963echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6 5695echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
4964if test $ac_cv_lib_socket_setsockopt = yes; then 5696if test $ac_cv_lib_socket_setsockopt = yes; then
4965 cat >>confdefs.h <<EOF 5697 cat >>confdefs.h <<_ACEOF
4966#define HAVE_LIBSOCKET 1 5698#define HAVE_LIBSOCKET 1
4967EOF 5699_ACEOF
4968 5700
4969 LIBS="-lsocket $LIBS" 5701 LIBS="-lsocket $LIBS"
4970 5702
@@ -4972,9 +5704,10 @@ fi
4972 5704
4973fi 5705fi
4974 5706
5707
4975if test "x$with_tcp_wrappers" != "xno" ; then 5708if test "x$with_tcp_wrappers" != "xno" ; then
4976 if test "x$do_sco3_extra_lib_check" = "xyes" ; then 5709 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
4977 echo "$as_me:4977: checking for innetgr in -lrpc" >&5 5710 echo "$as_me:$LINENO: checking for innetgr in -lrpc" >&5
4978echo $ECHO_N "checking for innetgr in -lrpc... $ECHO_C" >&6 5711echo $ECHO_N "checking for innetgr in -lrpc... $ECHO_C" >&6
4979if test "${ac_cv_lib_rpc_innetgr+set}" = set; then 5712if test "${ac_cv_lib_rpc_innetgr+set}" = set; then
4980 echo $ECHO_N "(cached) $ECHO_C" >&6 5713 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4982,8 +5715,12 @@ else
4982 ac_check_lib_save_LIBS=$LIBS 5715 ac_check_lib_save_LIBS=$LIBS
4983LIBS="-lrpc -lyp -lrpc $LIBS" 5716LIBS="-lrpc -lyp -lrpc $LIBS"
4984cat >conftest.$ac_ext <<_ACEOF 5717cat >conftest.$ac_ext <<_ACEOF
4985#line 4985 "configure" 5718#line $LINENO "configure"
4986#include "confdefs.h" 5719/* confdefs.h. */
5720_ACEOF
5721cat confdefs.h >>conftest.$ac_ext
5722cat >>conftest.$ac_ext <<_ACEOF
5723/* end confdefs.h. */
4987 5724
4988/* Override any gcc2 internal prototype to avoid an error. */ 5725/* Override any gcc2 internal prototype to avoid an error. */
4989#ifdef __cplusplus 5726#ifdef __cplusplus
@@ -5001,27 +5738,28 @@ innetgr ();
5001} 5738}
5002_ACEOF 5739_ACEOF
5003rm -f conftest.$ac_objext conftest$ac_exeext 5740rm -f conftest.$ac_objext conftest$ac_exeext
5004if { (eval echo "$as_me:5004: \"$ac_link\"") >&5 5741if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5005 (eval $ac_link) 2>&5 5742 (eval $ac_link) 2>&5
5006 ac_status=$? 5743 ac_status=$?
5007 echo "$as_me:5007: \$? = $ac_status" >&5 5744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008 (exit $ac_status); } && 5745 (exit $ac_status); } &&
5009 { ac_try='test -s conftest$ac_exeext' 5746 { ac_try='test -s conftest$ac_exeext'
5010 { (eval echo "$as_me:5010: \"$ac_try\"") >&5 5747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5011 (eval $ac_try) 2>&5 5748 (eval $ac_try) 2>&5
5012 ac_status=$? 5749 ac_status=$?
5013 echo "$as_me:5013: \$? = $ac_status" >&5 5750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5014 (exit $ac_status); }; }; then 5751 (exit $ac_status); }; }; then
5015 ac_cv_lib_rpc_innetgr=yes 5752 ac_cv_lib_rpc_innetgr=yes
5016else 5753else
5017 echo "$as_me: failed program was:" >&5 5754 echo "$as_me: failed program was:" >&5
5018cat conftest.$ac_ext >&5 5755sed 's/^/| /' conftest.$ac_ext >&5
5756
5019ac_cv_lib_rpc_innetgr=no 5757ac_cv_lib_rpc_innetgr=no
5020fi 5758fi
5021rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 5759rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5022LIBS=$ac_check_lib_save_LIBS 5760LIBS=$ac_check_lib_save_LIBS
5023fi 5761fi
5024echo "$as_me:5024: result: $ac_cv_lib_rpc_innetgr" >&5 5762echo "$as_me:$LINENO: result: $ac_cv_lib_rpc_innetgr" >&5
5025echo "${ECHO_T}$ac_cv_lib_rpc_innetgr" >&6 5763echo "${ECHO_T}$ac_cv_lib_rpc_innetgr" >&6
5026if test $ac_cv_lib_rpc_innetgr = yes; then 5764if test $ac_cv_lib_rpc_innetgr = yes; then
5027 LIBS="-lrpc -lyp -lrpc $LIBS" 5765 LIBS="-lrpc -lyp -lrpc $LIBS"
@@ -5030,355 +5768,82 @@ fi
5030 fi 5768 fi
5031fi 5769fi
5032 5770
5033for ac_func in dirname 5771echo "$as_me:$LINENO: checking for getspnam" >&5
5034do 5772echo $ECHO_N "checking for getspnam... $ECHO_C" >&6
5035as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 5773if test "${ac_cv_func_getspnam+set}" = set; then
5036echo "$as_me:5036: checking for $ac_func" >&5
5037echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5038if eval "test \"\${$as_ac_var+set}\" = set"; then
5039 echo $ECHO_N "(cached) $ECHO_C" >&6 5774 echo $ECHO_N "(cached) $ECHO_C" >&6
5040else 5775else
5041 cat >conftest.$ac_ext <<_ACEOF 5776 cat >conftest.$ac_ext <<_ACEOF
5042#line 5042 "configure" 5777#line $LINENO "configure"
5043#include "confdefs.h" 5778/* confdefs.h. */
5779_ACEOF
5780cat confdefs.h >>conftest.$ac_ext
5781cat >>conftest.$ac_ext <<_ACEOF
5782/* end confdefs.h. */
5044/* System header to define __stub macros and hopefully few prototypes, 5783/* System header to define __stub macros and hopefully few prototypes,
5045 which can conflict with char $ac_func (); below. */ 5784 which can conflict with char getspnam (); below.
5046#include <assert.h> 5785 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5786 <limits.h> exists even on freestanding compilers. */
5787#ifdef __STDC__
5788# include <limits.h>
5789#else
5790# include <assert.h>
5791#endif
5047/* Override any gcc2 internal prototype to avoid an error. */ 5792/* Override any gcc2 internal prototype to avoid an error. */
5048#ifdef __cplusplus 5793#ifdef __cplusplus
5049extern "C" 5794extern "C"
5795{
5050#endif 5796#endif
5051/* We use char because int might match the return type of a gcc2 5797/* We use char because int might match the return type of a gcc2
5052 builtin and then its argument prototype would still apply. */ 5798 builtin and then its argument prototype would still apply. */
5053char $ac_func (); 5799char getspnam ();
5054char (*f) ();
5055
5056int
5057main ()
5058{
5059/* The GNU C library defines this for functions which it implements 5800/* The GNU C library defines this for functions which it implements
5060 to always fail with ENOSYS. Some functions are actually named 5801 to always fail with ENOSYS. Some functions are actually named
5061 something starting with __ and the normal name is an alias. */ 5802 something starting with __ and the normal name is an alias. */
5062#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 5803#if defined (__stub_getspnam) || defined (__stub___getspnam)
5063choke me 5804choke me
5064#else 5805#else
5065f = $ac_func; 5806char (*f) () = getspnam;
5066#endif 5807#endif
5067
5068 ;
5069 return 0;
5070}
5071_ACEOF
5072rm -f conftest.$ac_objext conftest$ac_exeext
5073if { (eval echo "$as_me:5073: \"$ac_link\"") >&5
5074 (eval $ac_link) 2>&5
5075 ac_status=$?
5076 echo "$as_me:5076: \$? = $ac_status" >&5
5077 (exit $ac_status); } &&
5078 { ac_try='test -s conftest$ac_exeext'
5079 { (eval echo "$as_me:5079: \"$ac_try\"") >&5
5080 (eval $ac_try) 2>&5
5081 ac_status=$?
5082 echo "$as_me:5082: \$? = $ac_status" >&5
5083 (exit $ac_status); }; }; then
5084 eval "$as_ac_var=yes"
5085else
5086 echo "$as_me: failed program was:" >&5
5087cat conftest.$ac_ext >&5
5088eval "$as_ac_var=no"
5089fi
5090rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5091fi
5092echo "$as_me:5092: result: `eval echo '${'$as_ac_var'}'`" >&5
5093echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5094if test `eval echo '${'$as_ac_var'}'` = yes; then
5095 cat >>confdefs.h <<EOF
5096#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5097EOF
5098
5099for ac_header in libgen.h
5100do
5101as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5102echo "$as_me:5102: checking for $ac_header" >&5
5103echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5104if eval "test \"\${$as_ac_Header+set}\" = set"; then
5105 echo $ECHO_N "(cached) $ECHO_C" >&6
5106else
5107 cat >conftest.$ac_ext <<_ACEOF
5108#line 5108 "configure"
5109#include "confdefs.h"
5110#include <$ac_header>
5111_ACEOF
5112if { (eval echo "$as_me:5112: \"$ac_cpp conftest.$ac_ext\"") >&5
5113 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5114 ac_status=$?
5115 egrep -v '^ *\+' conftest.er1 >conftest.err
5116 rm -f conftest.er1
5117 cat conftest.err >&5
5118 echo "$as_me:5118: \$? = $ac_status" >&5
5119 (exit $ac_status); } >/dev/null; then
5120 if test -s conftest.err; then
5121 ac_cpp_err=$ac_c_preproc_warn_flag
5122 else
5123 ac_cpp_err=
5124 fi
5125else
5126 ac_cpp_err=yes
5127fi
5128if test -z "$ac_cpp_err"; then
5129 eval "$as_ac_Header=yes"
5130else
5131 echo "$as_me: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 eval "$as_ac_Header=no"
5134fi
5135rm -f conftest.err conftest.$ac_ext
5136fi
5137echo "$as_me:5137: result: `eval echo '${'$as_ac_Header'}'`" >&5
5138echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5139if test `eval echo '${'$as_ac_Header'}'` = yes; then
5140 cat >>confdefs.h <<EOF
5141#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5142EOF
5143
5144fi
5145done
5146
5147else
5148
5149 echo "$as_me:5149: checking for dirname in -lgen" >&5
5150echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6
5151if test "${ac_cv_lib_gen_dirname+set}" = set; then
5152 echo $ECHO_N "(cached) $ECHO_C" >&6
5153else
5154 ac_check_lib_save_LIBS=$LIBS
5155LIBS="-lgen $LIBS"
5156cat >conftest.$ac_ext <<_ACEOF
5157#line 5157 "configure"
5158#include "confdefs.h"
5159
5160/* Override any gcc2 internal prototype to avoid an error. */
5161#ifdef __cplusplus 5808#ifdef __cplusplus
5162extern "C"
5163#endif
5164/* We use char because int might match the return type of a gcc2
5165 builtin and then its argument prototype would still apply. */
5166char dirname ();
5167int
5168main ()
5169{
5170dirname ();
5171 ;
5172 return 0;
5173}
5174_ACEOF
5175rm -f conftest.$ac_objext conftest$ac_exeext
5176if { (eval echo "$as_me:5176: \"$ac_link\"") >&5
5177 (eval $ac_link) 2>&5
5178 ac_status=$?
5179 echo "$as_me:5179: \$? = $ac_status" >&5
5180 (exit $ac_status); } &&
5181 { ac_try='test -s conftest$ac_exeext'
5182 { (eval echo "$as_me:5182: \"$ac_try\"") >&5
5183 (eval $ac_try) 2>&5
5184 ac_status=$?
5185 echo "$as_me:5185: \$? = $ac_status" >&5
5186 (exit $ac_status); }; }; then
5187 ac_cv_lib_gen_dirname=yes
5188else
5189 echo "$as_me: failed program was:" >&5
5190cat conftest.$ac_ext >&5
5191ac_cv_lib_gen_dirname=no
5192fi
5193rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5194LIBS=$ac_check_lib_save_LIBS
5195fi
5196echo "$as_me:5196: result: $ac_cv_lib_gen_dirname" >&5
5197echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6
5198if test $ac_cv_lib_gen_dirname = yes; then
5199
5200 echo "$as_me:5200: checking for broken dirname" >&5
5201echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6
5202if test "${ac_cv_have_broken_dirname+set}" = set; then
5203 echo $ECHO_N "(cached) $ECHO_C" >&6
5204else
5205
5206 save_LIBS="$LIBS"
5207 LIBS="$LIBS -lgen"
5208 if test "$cross_compiling" = yes; then
5209 { { echo "$as_me:5209: error: cannot run test program while cross compiling" >&5
5210echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5211 { (exit 1); exit 1; }; }
5212else
5213 cat >conftest.$ac_ext <<_ACEOF
5214#line 5214 "configure"
5215#include "confdefs.h"
5216
5217#include <libgen.h>
5218#include <string.h>
5219
5220int main(int argc, char **argv) {
5221 char *s, buf[32];
5222
5223 strncpy(buf,"/etc", 32);
5224 s = dirname(buf);
5225 if (!s || strncmp(s, "/", 32) != 0) {
5226 exit(1);
5227 } else {
5228 exit(0);
5229 }
5230} 5809}
5231
5232_ACEOF
5233rm -f conftest$ac_exeext
5234if { (eval echo "$as_me:5234: \"$ac_link\"") >&5
5235 (eval $ac_link) 2>&5
5236 ac_status=$?
5237 echo "$as_me:5237: \$? = $ac_status" >&5
5238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5239 { (eval echo "$as_me:5239: \"$ac_try\"") >&5
5240 (eval $ac_try) 2>&5
5241 ac_status=$?
5242 echo "$as_me:5242: \$? = $ac_status" >&5
5243 (exit $ac_status); }; }; then
5244 ac_cv_have_broken_dirname="no"
5245else
5246 echo "$as_me: program exited with status $ac_status" >&5
5247echo "$as_me: failed program was:" >&5
5248cat conftest.$ac_ext >&5
5249 ac_cv_have_broken_dirname="yes"
5250
5251fi
5252rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5253fi
5254 LIBS="$save_LIBS"
5255
5256fi
5257echo "$as_me:5257: result: $ac_cv_have_broken_dirname" >&5
5258echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6
5259 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
5260 LIBS="$LIBS -lgen"
5261 cat >>confdefs.h <<\EOF
5262#define HAVE_DIRNAME 1
5263EOF
5264
5265for ac_header in libgen.h
5266do
5267as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5268echo "$as_me:5268: checking for $ac_header" >&5
5269echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5270if eval "test \"\${$as_ac_Header+set}\" = set"; then
5271 echo $ECHO_N "(cached) $ECHO_C" >&6
5272else
5273 cat >conftest.$ac_ext <<_ACEOF
5274#line 5274 "configure"
5275#include "confdefs.h"
5276#include <$ac_header>
5277_ACEOF
5278if { (eval echo "$as_me:5278: \"$ac_cpp conftest.$ac_ext\"") >&5
5279 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5280 ac_status=$?
5281 egrep -v '^ *\+' conftest.er1 >conftest.err
5282 rm -f conftest.er1
5283 cat conftest.err >&5
5284 echo "$as_me:5284: \$? = $ac_status" >&5
5285 (exit $ac_status); } >/dev/null; then
5286 if test -s conftest.err; then
5287 ac_cpp_err=$ac_c_preproc_warn_flag
5288 else
5289 ac_cpp_err=
5290 fi
5291else
5292 ac_cpp_err=yes
5293fi
5294if test -z "$ac_cpp_err"; then
5295 eval "$as_ac_Header=yes"
5296else
5297 echo "$as_me: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 eval "$as_ac_Header=no"
5300fi
5301rm -f conftest.err conftest.$ac_ext
5302fi
5303echo "$as_me:5303: result: `eval echo '${'$as_ac_Header'}'`" >&5
5304echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5305if test `eval echo '${'$as_ac_Header'}'` = yes; then
5306 cat >>confdefs.h <<EOF
5307#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5308EOF
5309
5310fi
5311done
5312
5313 fi
5314
5315fi
5316
5317fi
5318done
5319
5320echo "$as_me:5320: checking for getspnam" >&5
5321echo $ECHO_N "checking for getspnam... $ECHO_C" >&6
5322if test "${ac_cv_func_getspnam+set}" = set; then
5323 echo $ECHO_N "(cached) $ECHO_C" >&6
5324else
5325 cat >conftest.$ac_ext <<_ACEOF
5326#line 5326 "configure"
5327#include "confdefs.h"
5328/* System header to define __stub macros and hopefully few prototypes,
5329 which can conflict with char getspnam (); below. */
5330#include <assert.h>
5331/* Override any gcc2 internal prototype to avoid an error. */
5332#ifdef __cplusplus
5333extern "C"
5334#endif 5810#endif
5335/* We use char because int might match the return type of a gcc2
5336 builtin and then its argument prototype would still apply. */
5337char getspnam ();
5338char (*f) ();
5339 5811
5340int 5812int
5341main () 5813main ()
5342{ 5814{
5343/* The GNU C library defines this for functions which it implements 5815return f != getspnam;
5344 to always fail with ENOSYS. Some functions are actually named
5345 something starting with __ and the normal name is an alias. */
5346#if defined (__stub_getspnam) || defined (__stub___getspnam)
5347choke me
5348#else
5349f = getspnam;
5350#endif
5351
5352 ; 5816 ;
5353 return 0; 5817 return 0;
5354} 5818}
5355_ACEOF 5819_ACEOF
5356rm -f conftest.$ac_objext conftest$ac_exeext 5820rm -f conftest.$ac_objext conftest$ac_exeext
5357if { (eval echo "$as_me:5357: \"$ac_link\"") >&5 5821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5358 (eval $ac_link) 2>&5 5822 (eval $ac_link) 2>&5
5359 ac_status=$? 5823 ac_status=$?
5360 echo "$as_me:5360: \$? = $ac_status" >&5 5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361 (exit $ac_status); } && 5825 (exit $ac_status); } &&
5362 { ac_try='test -s conftest$ac_exeext' 5826 { ac_try='test -s conftest$ac_exeext'
5363 { (eval echo "$as_me:5363: \"$ac_try\"") >&5 5827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5364 (eval $ac_try) 2>&5 5828 (eval $ac_try) 2>&5
5365 ac_status=$? 5829 ac_status=$?
5366 echo "$as_me:5366: \$? = $ac_status" >&5 5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367 (exit $ac_status); }; }; then 5831 (exit $ac_status); }; }; then
5368 ac_cv_func_getspnam=yes 5832 ac_cv_func_getspnam=yes
5369else 5833else
5370 echo "$as_me: failed program was:" >&5 5834 echo "$as_me: failed program was:" >&5
5371cat conftest.$ac_ext >&5 5835sed 's/^/| /' conftest.$ac_ext >&5
5836
5372ac_cv_func_getspnam=no 5837ac_cv_func_getspnam=no
5373fi 5838fi
5374rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 5839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5375fi 5840fi
5376echo "$as_me:5376: result: $ac_cv_func_getspnam" >&5 5841echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
5377echo "${ECHO_T}$ac_cv_func_getspnam" >&6 5842echo "${ECHO_T}$ac_cv_func_getspnam" >&6
5378if test $ac_cv_func_getspnam = yes; then 5843if test $ac_cv_func_getspnam = yes; then
5379 : 5844 :
5380else 5845else
5381 echo "$as_me:5381: checking for getspnam in -lgen" >&5 5846 echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
5382echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6 5847echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
5383if test "${ac_cv_lib_gen_getspnam+set}" = set; then 5848if test "${ac_cv_lib_gen_getspnam+set}" = set; then
5384 echo $ECHO_N "(cached) $ECHO_C" >&6 5849 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5386,8 +5851,12 @@ else
5386 ac_check_lib_save_LIBS=$LIBS 5851 ac_check_lib_save_LIBS=$LIBS
5387LIBS="-lgen $LIBS" 5852LIBS="-lgen $LIBS"
5388cat >conftest.$ac_ext <<_ACEOF 5853cat >conftest.$ac_ext <<_ACEOF
5389#line 5389 "configure" 5854#line $LINENO "configure"
5390#include "confdefs.h" 5855/* confdefs.h. */
5856_ACEOF
5857cat confdefs.h >>conftest.$ac_ext
5858cat >>conftest.$ac_ext <<_ACEOF
5859/* end confdefs.h. */
5391 5860
5392/* Override any gcc2 internal prototype to avoid an error. */ 5861/* Override any gcc2 internal prototype to avoid an error. */
5393#ifdef __cplusplus 5862#ifdef __cplusplus
@@ -5405,27 +5874,28 @@ getspnam ();
5405} 5874}
5406_ACEOF 5875_ACEOF
5407rm -f conftest.$ac_objext conftest$ac_exeext 5876rm -f conftest.$ac_objext conftest$ac_exeext
5408if { (eval echo "$as_me:5408: \"$ac_link\"") >&5 5877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5409 (eval $ac_link) 2>&5 5878 (eval $ac_link) 2>&5
5410 ac_status=$? 5879 ac_status=$?
5411 echo "$as_me:5411: \$? = $ac_status" >&5 5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412 (exit $ac_status); } && 5881 (exit $ac_status); } &&
5413 { ac_try='test -s conftest$ac_exeext' 5882 { ac_try='test -s conftest$ac_exeext'
5414 { (eval echo "$as_me:5414: \"$ac_try\"") >&5 5883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5415 (eval $ac_try) 2>&5 5884 (eval $ac_try) 2>&5
5416 ac_status=$? 5885 ac_status=$?
5417 echo "$as_me:5417: \$? = $ac_status" >&5 5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418 (exit $ac_status); }; }; then 5887 (exit $ac_status); }; }; then
5419 ac_cv_lib_gen_getspnam=yes 5888 ac_cv_lib_gen_getspnam=yes
5420else 5889else
5421 echo "$as_me: failed program was:" >&5 5890 echo "$as_me: failed program was:" >&5
5422cat conftest.$ac_ext >&5 5891sed 's/^/| /' conftest.$ac_ext >&5
5892
5423ac_cv_lib_gen_getspnam=no 5893ac_cv_lib_gen_getspnam=no
5424fi 5894fi
5425rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 5895rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5426LIBS=$ac_check_lib_save_LIBS 5896LIBS=$ac_check_lib_save_LIBS
5427fi 5897fi
5428echo "$as_me:5428: result: $ac_cv_lib_gen_getspnam" >&5 5898echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
5429echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6 5899echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
5430if test $ac_cv_lib_gen_getspnam = yes; then 5900if test $ac_cv_lib_gen_getspnam = yes; then
5431 LIBS="$LIBS -lgen" 5901 LIBS="$LIBS -lgen"
@@ -5433,104 +5903,7 @@ fi
5433 5903
5434fi 5904fi
5435 5905
5436echo "$as_me:5436: checking for library containing basename" >&5
5437echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6
5438if test "${ac_cv_search_basename+set}" = set; then
5439 echo $ECHO_N "(cached) $ECHO_C" >&6
5440else
5441 ac_func_search_save_LIBS=$LIBS
5442ac_cv_search_basename=no
5443cat >conftest.$ac_ext <<_ACEOF
5444#line 5444 "configure"
5445#include "confdefs.h"
5446
5447/* Override any gcc2 internal prototype to avoid an error. */
5448#ifdef __cplusplus
5449extern "C"
5450#endif
5451/* We use char because int might match the return type of a gcc2
5452 builtin and then its argument prototype would still apply. */
5453char basename ();
5454int
5455main ()
5456{
5457basename ();
5458 ;
5459 return 0;
5460}
5461_ACEOF
5462rm -f conftest.$ac_objext conftest$ac_exeext
5463if { (eval echo "$as_me:5463: \"$ac_link\"") >&5
5464 (eval $ac_link) 2>&5
5465 ac_status=$?
5466 echo "$as_me:5466: \$? = $ac_status" >&5
5467 (exit $ac_status); } &&
5468 { ac_try='test -s conftest$ac_exeext'
5469 { (eval echo "$as_me:5469: \"$ac_try\"") >&5
5470 (eval $ac_try) 2>&5
5471 ac_status=$?
5472 echo "$as_me:5472: \$? = $ac_status" >&5
5473 (exit $ac_status); }; }; then
5474 ac_cv_search_basename="none required"
5475else
5476 echo "$as_me: failed program was:" >&5
5477cat conftest.$ac_ext >&5
5478fi
5479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5480if test "$ac_cv_search_basename" = no; then
5481 for ac_lib in gen; do
5482 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5483 cat >conftest.$ac_ext <<_ACEOF
5484#line 5484 "configure"
5485#include "confdefs.h"
5486
5487/* Override any gcc2 internal prototype to avoid an error. */
5488#ifdef __cplusplus
5489extern "C"
5490#endif
5491/* We use char because int might match the return type of a gcc2
5492 builtin and then its argument prototype would still apply. */
5493char basename ();
5494int
5495main ()
5496{
5497basename ();
5498 ;
5499 return 0;
5500}
5501_ACEOF
5502rm -f conftest.$ac_objext conftest$ac_exeext
5503if { (eval echo "$as_me:5503: \"$ac_link\"") >&5
5504 (eval $ac_link) 2>&5
5505 ac_status=$?
5506 echo "$as_me:5506: \$? = $ac_status" >&5
5507 (exit $ac_status); } &&
5508 { ac_try='test -s conftest$ac_exeext'
5509 { (eval echo "$as_me:5509: \"$ac_try\"") >&5
5510 (eval $ac_try) 2>&5
5511 ac_status=$?
5512 echo "$as_me:5512: \$? = $ac_status" >&5
5513 (exit $ac_status); }; }; then
5514 ac_cv_search_basename="-l$ac_lib"
5515break
5516else
5517 echo "$as_me: failed program was:" >&5
5518cat conftest.$ac_ext >&5
5519fi
5520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5521 done
5522fi
5523LIBS=$ac_func_search_save_LIBS
5524fi
5525echo "$as_me:5525: result: $ac_cv_search_basename" >&5
5526echo "${ECHO_T}$ac_cv_search_basename" >&6
5527if test "$ac_cv_search_basename" != no; then
5528 test "$ac_cv_search_basename" = "none required" || LIBS="$ac_cv_search_basename $LIBS"
5529 cat >>confdefs.h <<\EOF
5530#define HAVE_BASENAME 1
5531EOF
5532 5906
5533fi
5534 5907
5535# Check whether --with-rpath or --without-rpath was given. 5908# Check whether --with-rpath or --without-rpath was given.
5536if test "${with_rpath+set}" = set; then 5909if test "${with_rpath+set}" = set; then
@@ -5543,14 +5916,16 @@ if test "${with_rpath+set}" = set; then
5543 need_dash_r=1 5916 need_dash_r=1
5544 fi 5917 fi
5545 5918
5919
5546fi; 5920fi;
5547 5921
5922
5548# Check whether --with-zlib or --without-zlib was given. 5923# Check whether --with-zlib or --without-zlib was given.
5549if test "${with_zlib+set}" = set; then 5924if test "${with_zlib+set}" = set; then
5550 withval="$with_zlib" 5925 withval="$with_zlib"
5551 5926
5552 if test "x$withval" = "xno" ; then 5927 if test "x$withval" = "xno" ; then
5553 { { echo "$as_me:5553: error: *** zlib is required ***" >&5 5928 { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5
5554echo "$as_me: error: *** zlib is required ***" >&2;} 5929echo "$as_me: error: *** zlib is required ***" >&2;}
5555 { (exit 1); exit 1; }; } 5930 { (exit 1); exit 1; }; }
5556 fi 5931 fi
@@ -5573,9 +5948,11 @@ echo "$as_me: error: *** zlib is required ***" >&2;}
5573 CPPFLAGS="-I${withval} ${CPPFLAGS}" 5948 CPPFLAGS="-I${withval} ${CPPFLAGS}"
5574 fi 5949 fi
5575 5950
5951
5576fi; 5952fi;
5577 5953
5578echo "$as_me:5578: checking for deflate in -lz" >&5 5954
5955echo "$as_me:$LINENO: checking for deflate in -lz" >&5
5579echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6 5956echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
5580if test "${ac_cv_lib_z_deflate+set}" = set; then 5957if test "${ac_cv_lib_z_deflate+set}" = set; then
5581 echo $ECHO_N "(cached) $ECHO_C" >&6 5958 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5583,8 +5960,12 @@ else
5583 ac_check_lib_save_LIBS=$LIBS 5960 ac_check_lib_save_LIBS=$LIBS
5584LIBS="-lz $LIBS" 5961LIBS="-lz $LIBS"
5585cat >conftest.$ac_ext <<_ACEOF 5962cat >conftest.$ac_ext <<_ACEOF
5586#line 5586 "configure" 5963#line $LINENO "configure"
5587#include "confdefs.h" 5964/* confdefs.h. */
5965_ACEOF
5966cat confdefs.h >>conftest.$ac_ext
5967cat >>conftest.$ac_ext <<_ACEOF
5968/* end confdefs.h. */
5588 5969
5589/* Override any gcc2 internal prototype to avoid an error. */ 5970/* Override any gcc2 internal prototype to avoid an error. */
5590#ifdef __cplusplus 5971#ifdef __cplusplus
@@ -5602,103 +5983,119 @@ deflate ();
5602} 5983}
5603_ACEOF 5984_ACEOF
5604rm -f conftest.$ac_objext conftest$ac_exeext 5985rm -f conftest.$ac_objext conftest$ac_exeext
5605if { (eval echo "$as_me:5605: \"$ac_link\"") >&5 5986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5606 (eval $ac_link) 2>&5 5987 (eval $ac_link) 2>&5
5607 ac_status=$? 5988 ac_status=$?
5608 echo "$as_me:5608: \$? = $ac_status" >&5 5989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609 (exit $ac_status); } && 5990 (exit $ac_status); } &&
5610 { ac_try='test -s conftest$ac_exeext' 5991 { ac_try='test -s conftest$ac_exeext'
5611 { (eval echo "$as_me:5611: \"$ac_try\"") >&5 5992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5612 (eval $ac_try) 2>&5 5993 (eval $ac_try) 2>&5
5613 ac_status=$? 5994 ac_status=$?
5614 echo "$as_me:5614: \$? = $ac_status" >&5 5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5615 (exit $ac_status); }; }; then 5996 (exit $ac_status); }; }; then
5616 ac_cv_lib_z_deflate=yes 5997 ac_cv_lib_z_deflate=yes
5617else 5998else
5618 echo "$as_me: failed program was:" >&5 5999 echo "$as_me: failed program was:" >&5
5619cat conftest.$ac_ext >&5 6000sed 's/^/| /' conftest.$ac_ext >&5
6001
5620ac_cv_lib_z_deflate=no 6002ac_cv_lib_z_deflate=no
5621fi 6003fi
5622rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5623LIBS=$ac_check_lib_save_LIBS 6005LIBS=$ac_check_lib_save_LIBS
5624fi 6006fi
5625echo "$as_me:5625: result: $ac_cv_lib_z_deflate" >&5 6007echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
5626echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6 6008echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
5627if test $ac_cv_lib_z_deflate = yes; then 6009if test $ac_cv_lib_z_deflate = yes; then
5628 cat >>confdefs.h <<EOF 6010 cat >>confdefs.h <<_ACEOF
5629#define HAVE_LIBZ 1 6011#define HAVE_LIBZ 1
5630EOF 6012_ACEOF
5631 6013
5632 LIBS="-lz $LIBS" 6014 LIBS="-lz $LIBS"
5633 6015
5634else 6016else
5635 { { echo "$as_me:5635: error: *** zlib missing - please install first or check config.log ***" >&5 6017 { { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5
5636echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;} 6018echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
5637 { (exit 1); exit 1; }; } 6019 { (exit 1); exit 1; }; }
5638fi 6020fi
5639 6021
5640echo "$as_me:5640: checking for strcasecmp" >&5 6022
6023echo "$as_me:$LINENO: checking for strcasecmp" >&5
5641echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6 6024echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6
5642if test "${ac_cv_func_strcasecmp+set}" = set; then 6025if test "${ac_cv_func_strcasecmp+set}" = set; then
5643 echo $ECHO_N "(cached) $ECHO_C" >&6 6026 echo $ECHO_N "(cached) $ECHO_C" >&6
5644else 6027else
5645 cat >conftest.$ac_ext <<_ACEOF 6028 cat >conftest.$ac_ext <<_ACEOF
5646#line 5646 "configure" 6029#line $LINENO "configure"
5647#include "confdefs.h" 6030/* confdefs.h. */
6031_ACEOF
6032cat confdefs.h >>conftest.$ac_ext
6033cat >>conftest.$ac_ext <<_ACEOF
6034/* end confdefs.h. */
5648/* System header to define __stub macros and hopefully few prototypes, 6035/* System header to define __stub macros and hopefully few prototypes,
5649 which can conflict with char strcasecmp (); below. */ 6036 which can conflict with char strcasecmp (); below.
5650#include <assert.h> 6037 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6038 <limits.h> exists even on freestanding compilers. */
6039#ifdef __STDC__
6040# include <limits.h>
6041#else
6042# include <assert.h>
6043#endif
5651/* Override any gcc2 internal prototype to avoid an error. */ 6044/* Override any gcc2 internal prototype to avoid an error. */
5652#ifdef __cplusplus 6045#ifdef __cplusplus
5653extern "C" 6046extern "C"
6047{
5654#endif 6048#endif
5655/* We use char because int might match the return type of a gcc2 6049/* We use char because int might match the return type of a gcc2
5656 builtin and then its argument prototype would still apply. */ 6050 builtin and then its argument prototype would still apply. */
5657char strcasecmp (); 6051char strcasecmp ();
5658char (*f) ();
5659
5660int
5661main ()
5662{
5663/* The GNU C library defines this for functions which it implements 6052/* The GNU C library defines this for functions which it implements
5664 to always fail with ENOSYS. Some functions are actually named 6053 to always fail with ENOSYS. Some functions are actually named
5665 something starting with __ and the normal name is an alias. */ 6054 something starting with __ and the normal name is an alias. */
5666#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp) 6055#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
5667choke me 6056choke me
5668#else 6057#else
5669f = strcasecmp; 6058char (*f) () = strcasecmp;
6059#endif
6060#ifdef __cplusplus
6061}
5670#endif 6062#endif
5671 6063
6064int
6065main ()
6066{
6067return f != strcasecmp;
5672 ; 6068 ;
5673 return 0; 6069 return 0;
5674} 6070}
5675_ACEOF 6071_ACEOF
5676rm -f conftest.$ac_objext conftest$ac_exeext 6072rm -f conftest.$ac_objext conftest$ac_exeext
5677if { (eval echo "$as_me:5677: \"$ac_link\"") >&5 6073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5678 (eval $ac_link) 2>&5 6074 (eval $ac_link) 2>&5
5679 ac_status=$? 6075 ac_status=$?
5680 echo "$as_me:5680: \$? = $ac_status" >&5 6076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5681 (exit $ac_status); } && 6077 (exit $ac_status); } &&
5682 { ac_try='test -s conftest$ac_exeext' 6078 { ac_try='test -s conftest$ac_exeext'
5683 { (eval echo "$as_me:5683: \"$ac_try\"") >&5 6079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5684 (eval $ac_try) 2>&5 6080 (eval $ac_try) 2>&5
5685 ac_status=$? 6081 ac_status=$?
5686 echo "$as_me:5686: \$? = $ac_status" >&5 6082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5687 (exit $ac_status); }; }; then 6083 (exit $ac_status); }; }; then
5688 ac_cv_func_strcasecmp=yes 6084 ac_cv_func_strcasecmp=yes
5689else 6085else
5690 echo "$as_me: failed program was:" >&5 6086 echo "$as_me: failed program was:" >&5
5691cat conftest.$ac_ext >&5 6087sed 's/^/| /' conftest.$ac_ext >&5
6088
5692ac_cv_func_strcasecmp=no 6089ac_cv_func_strcasecmp=no
5693fi 6090fi
5694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5695fi 6092fi
5696echo "$as_me:5696: result: $ac_cv_func_strcasecmp" >&5 6093echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
5697echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6 6094echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6
5698if test $ac_cv_func_strcasecmp = yes; then 6095if test $ac_cv_func_strcasecmp = yes; then
5699 : 6096 :
5700else 6097else
5701 echo "$as_me:5701: checking for strcasecmp in -lresolv" >&5 6098 echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
5702echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6 6099echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
5703if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then 6100if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
5704 echo $ECHO_N "(cached) $ECHO_C" >&6 6101 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5706,8 +6103,12 @@ else
5706 ac_check_lib_save_LIBS=$LIBS 6103 ac_check_lib_save_LIBS=$LIBS
5707LIBS="-lresolv $LIBS" 6104LIBS="-lresolv $LIBS"
5708cat >conftest.$ac_ext <<_ACEOF 6105cat >conftest.$ac_ext <<_ACEOF
5709#line 5709 "configure" 6106#line $LINENO "configure"
5710#include "confdefs.h" 6107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
5711 6112
5712/* Override any gcc2 internal prototype to avoid an error. */ 6113/* Override any gcc2 internal prototype to avoid an error. */
5713#ifdef __cplusplus 6114#ifdef __cplusplus
@@ -5725,96 +6126,112 @@ strcasecmp ();
5725} 6126}
5726_ACEOF 6127_ACEOF
5727rm -f conftest.$ac_objext conftest$ac_exeext 6128rm -f conftest.$ac_objext conftest$ac_exeext
5728if { (eval echo "$as_me:5728: \"$ac_link\"") >&5 6129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5729 (eval $ac_link) 2>&5 6130 (eval $ac_link) 2>&5
5730 ac_status=$? 6131 ac_status=$?
5731 echo "$as_me:5731: \$? = $ac_status" >&5 6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); } && 6133 (exit $ac_status); } &&
5733 { ac_try='test -s conftest$ac_exeext' 6134 { ac_try='test -s conftest$ac_exeext'
5734 { (eval echo "$as_me:5734: \"$ac_try\"") >&5 6135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735 (eval $ac_try) 2>&5 6136 (eval $ac_try) 2>&5
5736 ac_status=$? 6137 ac_status=$?
5737 echo "$as_me:5737: \$? = $ac_status" >&5 6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); }; }; then 6139 (exit $ac_status); }; }; then
5739 ac_cv_lib_resolv_strcasecmp=yes 6140 ac_cv_lib_resolv_strcasecmp=yes
5740else 6141else
5741 echo "$as_me: failed program was:" >&5 6142 echo "$as_me: failed program was:" >&5
5742cat conftest.$ac_ext >&5 6143sed 's/^/| /' conftest.$ac_ext >&5
6144
5743ac_cv_lib_resolv_strcasecmp=no 6145ac_cv_lib_resolv_strcasecmp=no
5744fi 6146fi
5745rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5746LIBS=$ac_check_lib_save_LIBS 6148LIBS=$ac_check_lib_save_LIBS
5747fi 6149fi
5748echo "$as_me:5748: result: $ac_cv_lib_resolv_strcasecmp" >&5 6150echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5
5749echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6 6151echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
5750if test $ac_cv_lib_resolv_strcasecmp = yes; then 6152if test $ac_cv_lib_resolv_strcasecmp = yes; then
5751 LIBS="$LIBS -lresolv" 6153 LIBS="$LIBS -lresolv"
5752fi 6154fi
5753 6155
6156
5754fi 6157fi
5755 6158
5756echo "$as_me:5756: checking for utimes" >&5 6159echo "$as_me:$LINENO: checking for utimes" >&5
5757echo $ECHO_N "checking for utimes... $ECHO_C" >&6 6160echo $ECHO_N "checking for utimes... $ECHO_C" >&6
5758if test "${ac_cv_func_utimes+set}" = set; then 6161if test "${ac_cv_func_utimes+set}" = set; then
5759 echo $ECHO_N "(cached) $ECHO_C" >&6 6162 echo $ECHO_N "(cached) $ECHO_C" >&6
5760else 6163else
5761 cat >conftest.$ac_ext <<_ACEOF 6164 cat >conftest.$ac_ext <<_ACEOF
5762#line 5762 "configure" 6165#line $LINENO "configure"
5763#include "confdefs.h" 6166/* confdefs.h. */
6167_ACEOF
6168cat confdefs.h >>conftest.$ac_ext
6169cat >>conftest.$ac_ext <<_ACEOF
6170/* end confdefs.h. */
5764/* System header to define __stub macros and hopefully few prototypes, 6171/* System header to define __stub macros and hopefully few prototypes,
5765 which can conflict with char utimes (); below. */ 6172 which can conflict with char utimes (); below.
5766#include <assert.h> 6173 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6174 <limits.h> exists even on freestanding compilers. */
6175#ifdef __STDC__
6176# include <limits.h>
6177#else
6178# include <assert.h>
6179#endif
5767/* Override any gcc2 internal prototype to avoid an error. */ 6180/* Override any gcc2 internal prototype to avoid an error. */
5768#ifdef __cplusplus 6181#ifdef __cplusplus
5769extern "C" 6182extern "C"
6183{
5770#endif 6184#endif
5771/* We use char because int might match the return type of a gcc2 6185/* We use char because int might match the return type of a gcc2
5772 builtin and then its argument prototype would still apply. */ 6186 builtin and then its argument prototype would still apply. */
5773char utimes (); 6187char utimes ();
5774char (*f) ();
5775
5776int
5777main ()
5778{
5779/* The GNU C library defines this for functions which it implements 6188/* The GNU C library defines this for functions which it implements
5780 to always fail with ENOSYS. Some functions are actually named 6189 to always fail with ENOSYS. Some functions are actually named
5781 something starting with __ and the normal name is an alias. */ 6190 something starting with __ and the normal name is an alias. */
5782#if defined (__stub_utimes) || defined (__stub___utimes) 6191#if defined (__stub_utimes) || defined (__stub___utimes)
5783choke me 6192choke me
5784#else 6193#else
5785f = utimes; 6194char (*f) () = utimes;
6195#endif
6196#ifdef __cplusplus
6197}
5786#endif 6198#endif
5787 6199
6200int
6201main ()
6202{
6203return f != utimes;
5788 ; 6204 ;
5789 return 0; 6205 return 0;
5790} 6206}
5791_ACEOF 6207_ACEOF
5792rm -f conftest.$ac_objext conftest$ac_exeext 6208rm -f conftest.$ac_objext conftest$ac_exeext
5793if { (eval echo "$as_me:5793: \"$ac_link\"") >&5 6209if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5794 (eval $ac_link) 2>&5 6210 (eval $ac_link) 2>&5
5795 ac_status=$? 6211 ac_status=$?
5796 echo "$as_me:5796: \$? = $ac_status" >&5 6212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); } && 6213 (exit $ac_status); } &&
5798 { ac_try='test -s conftest$ac_exeext' 6214 { ac_try='test -s conftest$ac_exeext'
5799 { (eval echo "$as_me:5799: \"$ac_try\"") >&5 6215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5800 (eval $ac_try) 2>&5 6216 (eval $ac_try) 2>&5
5801 ac_status=$? 6217 ac_status=$?
5802 echo "$as_me:5802: \$? = $ac_status" >&5 6218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5803 (exit $ac_status); }; }; then 6219 (exit $ac_status); }; }; then
5804 ac_cv_func_utimes=yes 6220 ac_cv_func_utimes=yes
5805else 6221else
5806 echo "$as_me: failed program was:" >&5 6222 echo "$as_me: failed program was:" >&5
5807cat conftest.$ac_ext >&5 6223sed 's/^/| /' conftest.$ac_ext >&5
6224
5808ac_cv_func_utimes=no 6225ac_cv_func_utimes=no
5809fi 6226fi
5810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5811fi 6228fi
5812echo "$as_me:5812: result: $ac_cv_func_utimes" >&5 6229echo "$as_me:$LINENO: result: $ac_cv_func_utimes" >&5
5813echo "${ECHO_T}$ac_cv_func_utimes" >&6 6230echo "${ECHO_T}$ac_cv_func_utimes" >&6
5814if test $ac_cv_func_utimes = yes; then 6231if test $ac_cv_func_utimes = yes; then
5815 : 6232 :
5816else 6233else
5817 echo "$as_me:5817: checking for utimes in -lc89" >&5 6234 echo "$as_me:$LINENO: checking for utimes in -lc89" >&5
5818echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6 6235echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6
5819if test "${ac_cv_lib_c89_utimes+set}" = set; then 6236if test "${ac_cv_lib_c89_utimes+set}" = set; then
5820 echo $ECHO_N "(cached) $ECHO_C" >&6 6237 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5822,8 +6239,12 @@ else
5822 ac_check_lib_save_LIBS=$LIBS 6239 ac_check_lib_save_LIBS=$LIBS
5823LIBS="-lc89 $LIBS" 6240LIBS="-lc89 $LIBS"
5824cat >conftest.$ac_ext <<_ACEOF 6241cat >conftest.$ac_ext <<_ACEOF
5825#line 5825 "configure" 6242#line $LINENO "configure"
5826#include "confdefs.h" 6243/* confdefs.h. */
6244_ACEOF
6245cat confdefs.h >>conftest.$ac_ext
6246cat >>conftest.$ac_ext <<_ACEOF
6247/* end confdefs.h. */
5827 6248
5828/* Override any gcc2 internal prototype to avoid an error. */ 6249/* Override any gcc2 internal prototype to avoid an error. */
5829#ifdef __cplusplus 6250#ifdef __cplusplus
@@ -5841,58 +6262,109 @@ utimes ();
5841} 6262}
5842_ACEOF 6263_ACEOF
5843rm -f conftest.$ac_objext conftest$ac_exeext 6264rm -f conftest.$ac_objext conftest$ac_exeext
5844if { (eval echo "$as_me:5844: \"$ac_link\"") >&5 6265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5845 (eval $ac_link) 2>&5 6266 (eval $ac_link) 2>&5
5846 ac_status=$? 6267 ac_status=$?
5847 echo "$as_me:5847: \$? = $ac_status" >&5 6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848 (exit $ac_status); } && 6269 (exit $ac_status); } &&
5849 { ac_try='test -s conftest$ac_exeext' 6270 { ac_try='test -s conftest$ac_exeext'
5850 { (eval echo "$as_me:5850: \"$ac_try\"") >&5 6271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5851 (eval $ac_try) 2>&5 6272 (eval $ac_try) 2>&5
5852 ac_status=$? 6273 ac_status=$?
5853 echo "$as_me:5853: \$? = $ac_status" >&5 6274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854 (exit $ac_status); }; }; then 6275 (exit $ac_status); }; }; then
5855 ac_cv_lib_c89_utimes=yes 6276 ac_cv_lib_c89_utimes=yes
5856else 6277else
5857 echo "$as_me: failed program was:" >&5 6278 echo "$as_me: failed program was:" >&5
5858cat conftest.$ac_ext >&5 6279sed 's/^/| /' conftest.$ac_ext >&5
6280
5859ac_cv_lib_c89_utimes=no 6281ac_cv_lib_c89_utimes=no
5860fi 6282fi
5861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5862LIBS=$ac_check_lib_save_LIBS 6284LIBS=$ac_check_lib_save_LIBS
5863fi 6285fi
5864echo "$as_me:5864: result: $ac_cv_lib_c89_utimes" >&5 6286echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5
5865echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6 6287echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6
5866if test $ac_cv_lib_c89_utimes = yes; then 6288if test $ac_cv_lib_c89_utimes = yes; then
5867 cat >>confdefs.h <<\EOF 6289 cat >>confdefs.h <<\_ACEOF
5868#define HAVE_UTIMES 1 6290#define HAVE_UTIMES 1
5869EOF 6291_ACEOF
5870 6292
5871 LIBS="$LIBS -lc89" 6293 LIBS="$LIBS -lc89"
5872fi 6294fi
5873 6295
6296
5874fi 6297fi
5875 6298
6299
6300
5876for ac_header in libutil.h 6301for ac_header in libutil.h
5877do 6302do
5878as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6303as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5879echo "$as_me:5879: checking for $ac_header" >&5 6304if eval "test \"\${$as_ac_Header+set}\" = set"; then
6305 echo "$as_me:$LINENO: checking for $ac_header" >&5
5880echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 6306echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5881if eval "test \"\${$as_ac_Header+set}\" = set"; then 6307if eval "test \"\${$as_ac_Header+set}\" = set"; then
5882 echo $ECHO_N "(cached) $ECHO_C" >&6 6308 echo $ECHO_N "(cached) $ECHO_C" >&6
6309fi
6310echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6311echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5883else 6312else
5884 cat >conftest.$ac_ext <<_ACEOF 6313 # Is the header compilable?
5885#line 5885 "configure" 6314echo "$as_me:$LINENO: checking $ac_header usability" >&5
5886#include "confdefs.h" 6315echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6316cat >conftest.$ac_ext <<_ACEOF
6317#line $LINENO "configure"
6318/* confdefs.h. */
6319_ACEOF
6320cat confdefs.h >>conftest.$ac_ext
6321cat >>conftest.$ac_ext <<_ACEOF
6322/* end confdefs.h. */
6323$ac_includes_default
6324#include <$ac_header>
6325_ACEOF
6326rm -f conftest.$ac_objext
6327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6328 (eval $ac_compile) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); } &&
6332 { ac_try='test -s conftest.$ac_objext'
6333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6334 (eval $ac_try) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); }; }; then
6338 ac_header_compiler=yes
6339else
6340 echo "$as_me: failed program was:" >&5
6341sed 's/^/| /' conftest.$ac_ext >&5
6342
6343ac_header_compiler=no
6344fi
6345rm -f conftest.$ac_objext conftest.$ac_ext
6346echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6347echo "${ECHO_T}$ac_header_compiler" >&6
6348
6349# Is the header present?
6350echo "$as_me:$LINENO: checking $ac_header presence" >&5
6351echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6352cat >conftest.$ac_ext <<_ACEOF
6353#line $LINENO "configure"
6354/* confdefs.h. */
6355_ACEOF
6356cat confdefs.h >>conftest.$ac_ext
6357cat >>conftest.$ac_ext <<_ACEOF
6358/* end confdefs.h. */
5887#include <$ac_header> 6359#include <$ac_header>
5888_ACEOF 6360_ACEOF
5889if { (eval echo "$as_me:5889: \"$ac_cpp conftest.$ac_ext\"") >&5 6361if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5890 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 6362 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5891 ac_status=$? 6363 ac_status=$?
5892 egrep -v '^ *\+' conftest.er1 >conftest.err 6364 grep -v '^ *+' conftest.er1 >conftest.err
5893 rm -f conftest.er1 6365 rm -f conftest.er1
5894 cat conftest.err >&5 6366 cat conftest.err >&5
5895 echo "$as_me:5895: \$? = $ac_status" >&5 6367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5896 (exit $ac_status); } >/dev/null; then 6368 (exit $ac_status); } >/dev/null; then
5897 if test -s conftest.err; then 6369 if test -s conftest.err; then
5898 ac_cpp_err=$ac_c_preproc_warn_flag 6370 ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5903,25 +6375,71 @@ else
5903 ac_cpp_err=yes 6375 ac_cpp_err=yes
5904fi 6376fi
5905if test -z "$ac_cpp_err"; then 6377if test -z "$ac_cpp_err"; then
5906 eval "$as_ac_Header=yes" 6378 ac_header_preproc=yes
5907else 6379else
5908 echo "$as_me: failed program was:" >&5 6380 echo "$as_me: failed program was:" >&5
5909 cat conftest.$ac_ext >&5 6381sed 's/^/| /' conftest.$ac_ext >&5
5910 eval "$as_ac_Header=no" 6382
6383 ac_header_preproc=no
5911fi 6384fi
5912rm -f conftest.err conftest.$ac_ext 6385rm -f conftest.err conftest.$ac_ext
6386echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6387echo "${ECHO_T}$ac_header_preproc" >&6
6388
6389# So? What about this header?
6390case $ac_header_compiler:$ac_header_preproc in
6391 yes:no )
6392 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6393echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6394 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6395echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6396 (
6397 cat <<\_ASBOX
6398## ------------------------------------ ##
6399## Report this to bug-autoconf@gnu.org. ##
6400## ------------------------------------ ##
6401_ASBOX
6402 ) |
6403 sed "s/^/$as_me: WARNING: /" >&2
6404 ;;
6405 no:yes )
6406 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6407echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6408 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6409echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6410 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6411echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6412 (
6413 cat <<\_ASBOX
6414## ------------------------------------ ##
6415## Report this to bug-autoconf@gnu.org. ##
6416## ------------------------------------ ##
6417_ASBOX
6418 ) |
6419 sed "s/^/$as_me: WARNING: /" >&2
6420 ;;
6421esac
6422echo "$as_me:$LINENO: checking for $ac_header" >&5
6423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6424if eval "test \"\${$as_ac_Header+set}\" = set"; then
6425 echo $ECHO_N "(cached) $ECHO_C" >&6
6426else
6427 eval "$as_ac_Header=$ac_header_preproc"
5913fi 6428fi
5914echo "$as_me:5914: result: `eval echo '${'$as_ac_Header'}'`" >&5 6429echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5915echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 6430echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6431
6432fi
5916if test `eval echo '${'$as_ac_Header'}'` = yes; then 6433if test `eval echo '${'$as_ac_Header'}'` = yes; then
5917 cat >>confdefs.h <<EOF 6434 cat >>confdefs.h <<_ACEOF
5918#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5919EOF 6436_ACEOF
5920 6437
5921fi 6438fi
6439
5922done 6440done
5923 6441
5924echo "$as_me:5924: checking for library containing login" >&5 6442echo "$as_me:$LINENO: checking for library containing login" >&5
5925echo $ECHO_N "checking for library containing login... $ECHO_C" >&6 6443echo $ECHO_N "checking for library containing login... $ECHO_C" >&6
5926if test "${ac_cv_search_login+set}" = set; then 6444if test "${ac_cv_search_login+set}" = set; then
5927 echo $ECHO_N "(cached) $ECHO_C" >&6 6445 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5929,8 +6447,12 @@ else
5929 ac_func_search_save_LIBS=$LIBS 6447 ac_func_search_save_LIBS=$LIBS
5930ac_cv_search_login=no 6448ac_cv_search_login=no
5931cat >conftest.$ac_ext <<_ACEOF 6449cat >conftest.$ac_ext <<_ACEOF
5932#line 5932 "configure" 6450#line $LINENO "configure"
5933#include "confdefs.h" 6451/* confdefs.h. */
6452_ACEOF
6453cat confdefs.h >>conftest.$ac_ext
6454cat >>conftest.$ac_ext <<_ACEOF
6455/* end confdefs.h. */
5934 6456
5935/* Override any gcc2 internal prototype to avoid an error. */ 6457/* Override any gcc2 internal prototype to avoid an error. */
5936#ifdef __cplusplus 6458#ifdef __cplusplus
@@ -5948,29 +6470,34 @@ login ();
5948} 6470}
5949_ACEOF 6471_ACEOF
5950rm -f conftest.$ac_objext conftest$ac_exeext 6472rm -f conftest.$ac_objext conftest$ac_exeext
5951if { (eval echo "$as_me:5951: \"$ac_link\"") >&5 6473if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5952 (eval $ac_link) 2>&5 6474 (eval $ac_link) 2>&5
5953 ac_status=$? 6475 ac_status=$?
5954 echo "$as_me:5954: \$? = $ac_status" >&5 6476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955 (exit $ac_status); } && 6477 (exit $ac_status); } &&
5956 { ac_try='test -s conftest$ac_exeext' 6478 { ac_try='test -s conftest$ac_exeext'
5957 { (eval echo "$as_me:5957: \"$ac_try\"") >&5 6479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5958 (eval $ac_try) 2>&5 6480 (eval $ac_try) 2>&5
5959 ac_status=$? 6481 ac_status=$?
5960 echo "$as_me:5960: \$? = $ac_status" >&5 6482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5961 (exit $ac_status); }; }; then 6483 (exit $ac_status); }; }; then
5962 ac_cv_search_login="none required" 6484 ac_cv_search_login="none required"
5963else 6485else
5964 echo "$as_me: failed program was:" >&5 6486 echo "$as_me: failed program was:" >&5
5965cat conftest.$ac_ext >&5 6487sed 's/^/| /' conftest.$ac_ext >&5
6488
5966fi 6489fi
5967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6490rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5968if test "$ac_cv_search_login" = no; then 6491if test "$ac_cv_search_login" = no; then
5969 for ac_lib in util bsd; do 6492 for ac_lib in util bsd; do
5970 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 6493 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5971 cat >conftest.$ac_ext <<_ACEOF 6494 cat >conftest.$ac_ext <<_ACEOF
5972#line 5972 "configure" 6495#line $LINENO "configure"
5973#include "confdefs.h" 6496/* confdefs.h. */
6497_ACEOF
6498cat confdefs.h >>conftest.$ac_ext
6499cat >>conftest.$ac_ext <<_ACEOF
6500/* end confdefs.h. */
5974 6501
5975/* Override any gcc2 internal prototype to avoid an error. */ 6502/* Override any gcc2 internal prototype to avoid an error. */
5976#ifdef __cplusplus 6503#ifdef __cplusplus
@@ -5988,176 +6515,210 @@ login ();
5988} 6515}
5989_ACEOF 6516_ACEOF
5990rm -f conftest.$ac_objext conftest$ac_exeext 6517rm -f conftest.$ac_objext conftest$ac_exeext
5991if { (eval echo "$as_me:5991: \"$ac_link\"") >&5 6518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5992 (eval $ac_link) 2>&5 6519 (eval $ac_link) 2>&5
5993 ac_status=$? 6520 ac_status=$?
5994 echo "$as_me:5994: \$? = $ac_status" >&5 6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995 (exit $ac_status); } && 6522 (exit $ac_status); } &&
5996 { ac_try='test -s conftest$ac_exeext' 6523 { ac_try='test -s conftest$ac_exeext'
5997 { (eval echo "$as_me:5997: \"$ac_try\"") >&5 6524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5998 (eval $ac_try) 2>&5 6525 (eval $ac_try) 2>&5
5999 ac_status=$? 6526 ac_status=$?
6000 echo "$as_me:6000: \$? = $ac_status" >&5 6527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); }; }; then 6528 (exit $ac_status); }; }; then
6002 ac_cv_search_login="-l$ac_lib" 6529 ac_cv_search_login="-l$ac_lib"
6003break 6530break
6004else 6531else
6005 echo "$as_me: failed program was:" >&5 6532 echo "$as_me: failed program was:" >&5
6006cat conftest.$ac_ext >&5 6533sed 's/^/| /' conftest.$ac_ext >&5
6534
6007fi 6535fi
6008rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6536rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6009 done 6537 done
6010fi 6538fi
6011LIBS=$ac_func_search_save_LIBS 6539LIBS=$ac_func_search_save_LIBS
6012fi 6540fi
6013echo "$as_me:6013: result: $ac_cv_search_login" >&5 6541echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5
6014echo "${ECHO_T}$ac_cv_search_login" >&6 6542echo "${ECHO_T}$ac_cv_search_login" >&6
6015if test "$ac_cv_search_login" != no; then 6543if test "$ac_cv_search_login" != no; then
6016 test "$ac_cv_search_login" = "none required" || LIBS="$ac_cv_search_login $LIBS" 6544 test "$ac_cv_search_login" = "none required" || LIBS="$ac_cv_search_login $LIBS"
6017 cat >>confdefs.h <<\EOF 6545 cat >>confdefs.h <<\_ACEOF
6018#define HAVE_LOGIN 1 6546#define HAVE_LOGIN 1
6019EOF 6547_ACEOF
6020 6548
6021fi 6549fi
6022 6550
6551
6552
6553
6023for ac_func in logout updwtmp logwtmp 6554for ac_func in logout updwtmp logwtmp
6024do 6555do
6025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 6556as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6026echo "$as_me:6026: checking for $ac_func" >&5 6557echo "$as_me:$LINENO: checking for $ac_func" >&5
6027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 6558echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6028if eval "test \"\${$as_ac_var+set}\" = set"; then 6559if eval "test \"\${$as_ac_var+set}\" = set"; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6 6560 echo $ECHO_N "(cached) $ECHO_C" >&6
6030else 6561else
6031 cat >conftest.$ac_ext <<_ACEOF 6562 cat >conftest.$ac_ext <<_ACEOF
6032#line 6032 "configure" 6563#line $LINENO "configure"
6033#include "confdefs.h" 6564/* confdefs.h. */
6565_ACEOF
6566cat confdefs.h >>conftest.$ac_ext
6567cat >>conftest.$ac_ext <<_ACEOF
6568/* end confdefs.h. */
6034/* System header to define __stub macros and hopefully few prototypes, 6569/* System header to define __stub macros and hopefully few prototypes,
6035 which can conflict with char $ac_func (); below. */ 6570 which can conflict with char $ac_func (); below.
6036#include <assert.h> 6571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6572 <limits.h> exists even on freestanding compilers. */
6573#ifdef __STDC__
6574# include <limits.h>
6575#else
6576# include <assert.h>
6577#endif
6037/* Override any gcc2 internal prototype to avoid an error. */ 6578/* Override any gcc2 internal prototype to avoid an error. */
6038#ifdef __cplusplus 6579#ifdef __cplusplus
6039extern "C" 6580extern "C"
6581{
6040#endif 6582#endif
6041/* We use char because int might match the return type of a gcc2 6583/* We use char because int might match the return type of a gcc2
6042 builtin and then its argument prototype would still apply. */ 6584 builtin and then its argument prototype would still apply. */
6043char $ac_func (); 6585char $ac_func ();
6044char (*f) ();
6045
6046int
6047main ()
6048{
6049/* The GNU C library defines this for functions which it implements 6586/* The GNU C library defines this for functions which it implements
6050 to always fail with ENOSYS. Some functions are actually named 6587 to always fail with ENOSYS. Some functions are actually named
6051 something starting with __ and the normal name is an alias. */ 6588 something starting with __ and the normal name is an alias. */
6052#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 6589#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6053choke me 6590choke me
6054#else 6591#else
6055f = $ac_func; 6592char (*f) () = $ac_func;
6593#endif
6594#ifdef __cplusplus
6595}
6056#endif 6596#endif
6057 6597
6598int
6599main ()
6600{
6601return f != $ac_func;
6058 ; 6602 ;
6059 return 0; 6603 return 0;
6060} 6604}
6061_ACEOF 6605_ACEOF
6062rm -f conftest.$ac_objext conftest$ac_exeext 6606rm -f conftest.$ac_objext conftest$ac_exeext
6063if { (eval echo "$as_me:6063: \"$ac_link\"") >&5 6607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6064 (eval $ac_link) 2>&5 6608 (eval $ac_link) 2>&5
6065 ac_status=$? 6609 ac_status=$?
6066 echo "$as_me:6066: \$? = $ac_status" >&5 6610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067 (exit $ac_status); } && 6611 (exit $ac_status); } &&
6068 { ac_try='test -s conftest$ac_exeext' 6612 { ac_try='test -s conftest$ac_exeext'
6069 { (eval echo "$as_me:6069: \"$ac_try\"") >&5 6613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6070 (eval $ac_try) 2>&5 6614 (eval $ac_try) 2>&5
6071 ac_status=$? 6615 ac_status=$?
6072 echo "$as_me:6072: \$? = $ac_status" >&5 6616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6073 (exit $ac_status); }; }; then 6617 (exit $ac_status); }; }; then
6074 eval "$as_ac_var=yes" 6618 eval "$as_ac_var=yes"
6075else 6619else
6076 echo "$as_me: failed program was:" >&5 6620 echo "$as_me: failed program was:" >&5
6077cat conftest.$ac_ext >&5 6621sed 's/^/| /' conftest.$ac_ext >&5
6622
6078eval "$as_ac_var=no" 6623eval "$as_ac_var=no"
6079fi 6624fi
6080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6625rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6081fi 6626fi
6082echo "$as_me:6082: result: `eval echo '${'$as_ac_var'}'`" >&5 6627echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6083echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 6628echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6084if test `eval echo '${'$as_ac_var'}'` = yes; then 6629if test `eval echo '${'$as_ac_var'}'` = yes; then
6085 cat >>confdefs.h <<EOF 6630 cat >>confdefs.h <<_ACEOF
6086#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 6631#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6087EOF 6632_ACEOF
6088 6633
6089fi 6634fi
6090done 6635done
6091 6636
6637
6638
6092for ac_func in strftime 6639for ac_func in strftime
6093do 6640do
6094as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 6641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6095echo "$as_me:6095: checking for $ac_func" >&5 6642echo "$as_me:$LINENO: checking for $ac_func" >&5
6096echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 6643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6097if eval "test \"\${$as_ac_var+set}\" = set"; then 6644if eval "test \"\${$as_ac_var+set}\" = set"; then
6098 echo $ECHO_N "(cached) $ECHO_C" >&6 6645 echo $ECHO_N "(cached) $ECHO_C" >&6
6099else 6646else
6100 cat >conftest.$ac_ext <<_ACEOF 6647 cat >conftest.$ac_ext <<_ACEOF
6101#line 6101 "configure" 6648#line $LINENO "configure"
6102#include "confdefs.h" 6649/* confdefs.h. */
6650_ACEOF
6651cat confdefs.h >>conftest.$ac_ext
6652cat >>conftest.$ac_ext <<_ACEOF
6653/* end confdefs.h. */
6103/* System header to define __stub macros and hopefully few prototypes, 6654/* System header to define __stub macros and hopefully few prototypes,
6104 which can conflict with char $ac_func (); below. */ 6655 which can conflict with char $ac_func (); below.
6105#include <assert.h> 6656 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6657 <limits.h> exists even on freestanding compilers. */
6658#ifdef __STDC__
6659# include <limits.h>
6660#else
6661# include <assert.h>
6662#endif
6106/* Override any gcc2 internal prototype to avoid an error. */ 6663/* Override any gcc2 internal prototype to avoid an error. */
6107#ifdef __cplusplus 6664#ifdef __cplusplus
6108extern "C" 6665extern "C"
6666{
6109#endif 6667#endif
6110/* We use char because int might match the return type of a gcc2 6668/* We use char because int might match the return type of a gcc2
6111 builtin and then its argument prototype would still apply. */ 6669 builtin and then its argument prototype would still apply. */
6112char $ac_func (); 6670char $ac_func ();
6113char (*f) ();
6114
6115int
6116main ()
6117{
6118/* The GNU C library defines this for functions which it implements 6671/* The GNU C library defines this for functions which it implements
6119 to always fail with ENOSYS. Some functions are actually named 6672 to always fail with ENOSYS. Some functions are actually named
6120 something starting with __ and the normal name is an alias. */ 6673 something starting with __ and the normal name is an alias. */
6121#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 6674#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6122choke me 6675choke me
6123#else 6676#else
6124f = $ac_func; 6677char (*f) () = $ac_func;
6678#endif
6679#ifdef __cplusplus
6680}
6125#endif 6681#endif
6126 6682
6683int
6684main ()
6685{
6686return f != $ac_func;
6127 ; 6687 ;
6128 return 0; 6688 return 0;
6129} 6689}
6130_ACEOF 6690_ACEOF
6131rm -f conftest.$ac_objext conftest$ac_exeext 6691rm -f conftest.$ac_objext conftest$ac_exeext
6132if { (eval echo "$as_me:6132: \"$ac_link\"") >&5 6692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6133 (eval $ac_link) 2>&5 6693 (eval $ac_link) 2>&5
6134 ac_status=$? 6694 ac_status=$?
6135 echo "$as_me:6135: \$? = $ac_status" >&5 6695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136 (exit $ac_status); } && 6696 (exit $ac_status); } &&
6137 { ac_try='test -s conftest$ac_exeext' 6697 { ac_try='test -s conftest$ac_exeext'
6138 { (eval echo "$as_me:6138: \"$ac_try\"") >&5 6698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6139 (eval $ac_try) 2>&5 6699 (eval $ac_try) 2>&5
6140 ac_status=$? 6700 ac_status=$?
6141 echo "$as_me:6141: \$? = $ac_status" >&5 6701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6142 (exit $ac_status); }; }; then 6702 (exit $ac_status); }; }; then
6143 eval "$as_ac_var=yes" 6703 eval "$as_ac_var=yes"
6144else 6704else
6145 echo "$as_me: failed program was:" >&5 6705 echo "$as_me: failed program was:" >&5
6146cat conftest.$ac_ext >&5 6706sed 's/^/| /' conftest.$ac_ext >&5
6707
6147eval "$as_ac_var=no" 6708eval "$as_ac_var=no"
6148fi 6709fi
6149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6710rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6150fi 6711fi
6151echo "$as_me:6151: result: `eval echo '${'$as_ac_var'}'`" >&5 6712echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6152echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 6713echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6153if test `eval echo '${'$as_ac_var'}'` = yes; then 6714if test `eval echo '${'$as_ac_var'}'` = yes; then
6154 cat >>confdefs.h <<EOF 6715 cat >>confdefs.h <<_ACEOF
6155#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 6716#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6156EOF 6717_ACEOF
6157 6718
6158else 6719else
6159 # strftime is in -lintl on SCO UNIX. 6720 # strftime is in -lintl on SCO UNIX.
6160echo "$as_me:6160: checking for strftime in -lintl" >&5 6721echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
6161echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6 6722echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
6162if test "${ac_cv_lib_intl_strftime+set}" = set; then 6723if test "${ac_cv_lib_intl_strftime+set}" = set; then
6163 echo $ECHO_N "(cached) $ECHO_C" >&6 6724 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6165,8 +6726,12 @@ else
6165 ac_check_lib_save_LIBS=$LIBS 6726 ac_check_lib_save_LIBS=$LIBS
6166LIBS="-lintl $LIBS" 6727LIBS="-lintl $LIBS"
6167cat >conftest.$ac_ext <<_ACEOF 6728cat >conftest.$ac_ext <<_ACEOF
6168#line 6168 "configure" 6729#line $LINENO "configure"
6169#include "confdefs.h" 6730/* confdefs.h. */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h. */
6170 6735
6171/* Override any gcc2 internal prototype to avoid an error. */ 6736/* Override any gcc2 internal prototype to avoid an error. */
6172#ifdef __cplusplus 6737#ifdef __cplusplus
@@ -6184,32 +6749,33 @@ strftime ();
6184} 6749}
6185_ACEOF 6750_ACEOF
6186rm -f conftest.$ac_objext conftest$ac_exeext 6751rm -f conftest.$ac_objext conftest$ac_exeext
6187if { (eval echo "$as_me:6187: \"$ac_link\"") >&5 6752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6188 (eval $ac_link) 2>&5 6753 (eval $ac_link) 2>&5
6189 ac_status=$? 6754 ac_status=$?
6190 echo "$as_me:6190: \$? = $ac_status" >&5 6755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191 (exit $ac_status); } && 6756 (exit $ac_status); } &&
6192 { ac_try='test -s conftest$ac_exeext' 6757 { ac_try='test -s conftest$ac_exeext'
6193 { (eval echo "$as_me:6193: \"$ac_try\"") >&5 6758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6194 (eval $ac_try) 2>&5 6759 (eval $ac_try) 2>&5
6195 ac_status=$? 6760 ac_status=$?
6196 echo "$as_me:6196: \$? = $ac_status" >&5 6761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197 (exit $ac_status); }; }; then 6762 (exit $ac_status); }; }; then
6198 ac_cv_lib_intl_strftime=yes 6763 ac_cv_lib_intl_strftime=yes
6199else 6764else
6200 echo "$as_me: failed program was:" >&5 6765 echo "$as_me: failed program was:" >&5
6201cat conftest.$ac_ext >&5 6766sed 's/^/| /' conftest.$ac_ext >&5
6767
6202ac_cv_lib_intl_strftime=no 6768ac_cv_lib_intl_strftime=no
6203fi 6769fi
6204rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 6770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6205LIBS=$ac_check_lib_save_LIBS 6771LIBS=$ac_check_lib_save_LIBS
6206fi 6772fi
6207echo "$as_me:6207: result: $ac_cv_lib_intl_strftime" >&5 6773echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
6208echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6 6774echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
6209if test $ac_cv_lib_intl_strftime = yes; then 6775if test $ac_cv_lib_intl_strftime = yes; then
6210 cat >>confdefs.h <<\EOF 6776 cat >>confdefs.h <<\_ACEOF
6211#define HAVE_STRFTIME 1 6777#define HAVE_STRFTIME 1
6212EOF 6778_ACEOF
6213 6779
6214LIBS="-lintl $LIBS" 6780LIBS="-lintl $LIBS"
6215fi 6781fi
@@ -6217,12 +6783,17 @@ fi
6217fi 6783fi
6218done 6784done
6219 6785
6786
6220# Check for ALTDIRFUNC glob() extension 6787# Check for ALTDIRFUNC glob() extension
6221echo "$as_me:6221: checking for GLOB_ALTDIRFUNC support" >&5 6788echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5
6222echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6 6789echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6
6223cat >conftest.$ac_ext <<_ACEOF 6790cat >conftest.$ac_ext <<_ACEOF
6224#line 6224 "configure" 6791#line $LINENO "configure"
6225#include "confdefs.h" 6792/* confdefs.h. */
6793_ACEOF
6794cat confdefs.h >>conftest.$ac_ext
6795cat >>conftest.$ac_ext <<_ACEOF
6796/* end confdefs.h. */
6226 6797
6227 #include <glob.h> 6798 #include <glob.h>
6228 #ifdef GLOB_ALTDIRFUNC 6799 #ifdef GLOB_ALTDIRFUNC
@@ -6231,62 +6802,76 @@ cat >conftest.$ac_ext <<_ACEOF
6231 6802
6232_ACEOF 6803_ACEOF
6233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6234 egrep "FOUNDIT" >/dev/null 2>&1; then 6805 $EGREP "FOUNDIT" >/dev/null 2>&1; then
6235 6806
6236 cat >>confdefs.h <<\EOF 6807 cat >>confdefs.h <<\_ACEOF
6237#define GLOB_HAS_ALTDIRFUNC 1 6808#define GLOB_HAS_ALTDIRFUNC 1
6238EOF 6809_ACEOF
6239 6810
6240 echo "$as_me:6240: result: yes" >&5 6811 echo "$as_me:$LINENO: result: yes" >&5
6241echo "${ECHO_T}yes" >&6 6812echo "${ECHO_T}yes" >&6
6242 6813
6243else 6814else
6244 6815
6245 echo "$as_me:6245: result: no" >&5 6816 echo "$as_me:$LINENO: result: no" >&5
6246echo "${ECHO_T}no" >&6 6817echo "${ECHO_T}no" >&6
6247 6818
6819
6248fi 6820fi
6249rm -f conftest* 6821rm -f conftest*
6250 6822
6823
6251# Check for g.gl_matchc glob() extension 6824# Check for g.gl_matchc glob() extension
6252echo "$as_me:6252: checking for gl_matchc field in glob_t" >&5 6825echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5
6253echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6 6826echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6
6254cat >conftest.$ac_ext <<_ACEOF 6827cat >conftest.$ac_ext <<_ACEOF
6255#line 6255 "configure" 6828#line $LINENO "configure"
6256#include "confdefs.h" 6829/* confdefs.h. */
6830_ACEOF
6831cat confdefs.h >>conftest.$ac_ext
6832cat >>conftest.$ac_ext <<_ACEOF
6833/* end confdefs.h. */
6257 6834
6258 #include <glob.h> 6835 #include <glob.h>
6259 int main(void){glob_t g; g.gl_matchc = 1;} 6836 int main(void){glob_t g; g.gl_matchc = 1;}
6260 6837
6261_ACEOF 6838_ACEOF
6262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6263 egrep "FOUNDIT" >/dev/null 2>&1; then 6840 $EGREP "FOUNDIT" >/dev/null 2>&1; then
6264 6841
6265 cat >>confdefs.h <<\EOF 6842 cat >>confdefs.h <<\_ACEOF
6266#define GLOB_HAS_GL_MATCHC 1 6843#define GLOB_HAS_GL_MATCHC 1
6267EOF 6844_ACEOF
6268 6845
6269 echo "$as_me:6269: result: yes" >&5 6846 echo "$as_me:$LINENO: result: yes" >&5
6270echo "${ECHO_T}yes" >&6 6847echo "${ECHO_T}yes" >&6
6271 6848
6272else 6849else
6273 6850
6274 echo "$as_me:6274: result: no" >&5 6851 echo "$as_me:$LINENO: result: no" >&5
6275echo "${ECHO_T}no" >&6 6852echo "${ECHO_T}no" >&6
6276 6853
6854
6277fi 6855fi
6278rm -f conftest* 6856rm -f conftest*
6279 6857
6280echo "$as_me:6280: checking whether struct dirent allocates space for d_name" >&5 6858
6859echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5
6281echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6 6860echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6
6282if test "$cross_compiling" = yes; then 6861if test "$cross_compiling" = yes; then
6283 { { echo "$as_me:6283: error: cannot run test program while cross compiling" >&5 6862 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6284echo "$as_me: error: cannot run test program while cross compiling" >&2;} 6863See \`config.log' for more details." >&5
6864echo "$as_me: error: cannot run test program while cross compiling
6865See \`config.log' for more details." >&2;}
6285 { (exit 1); exit 1; }; } 6866 { (exit 1); exit 1; }; }
6286else 6867else
6287 cat >conftest.$ac_ext <<_ACEOF 6868 cat >conftest.$ac_ext <<_ACEOF
6288#line 6288 "configure" 6869#line $LINENO "configure"
6289#include "confdefs.h" 6870/* confdefs.h. */
6871_ACEOF
6872cat confdefs.h >>conftest.$ac_ext
6873cat >>conftest.$ac_ext <<_ACEOF
6874/* end confdefs.h. */
6290 6875
6291#include <sys/types.h> 6876#include <sys/types.h>
6292#include <dirent.h> 6877#include <dirent.h>
@@ -6294,31 +6879,35 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
6294 6879
6295_ACEOF 6880_ACEOF
6296rm -f conftest$ac_exeext 6881rm -f conftest$ac_exeext
6297if { (eval echo "$as_me:6297: \"$ac_link\"") >&5 6882if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6298 (eval $ac_link) 2>&5 6883 (eval $ac_link) 2>&5
6299 ac_status=$? 6884 ac_status=$?
6300 echo "$as_me:6300: \$? = $ac_status" >&5 6885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6301 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 6886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6302 { (eval echo "$as_me:6302: \"$ac_try\"") >&5 6887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6303 (eval $ac_try) 2>&5 6888 (eval $ac_try) 2>&5
6304 ac_status=$? 6889 ac_status=$?
6305 echo "$as_me:6305: \$? = $ac_status" >&5 6890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6306 (exit $ac_status); }; }; then 6891 (exit $ac_status); }; }; then
6307 echo "$as_me:6307: result: yes" >&5 6892 echo "$as_me:$LINENO: result: yes" >&5
6308echo "${ECHO_T}yes" >&6 6893echo "${ECHO_T}yes" >&6
6309else 6894else
6310 echo "$as_me: program exited with status $ac_status" >&5 6895 echo "$as_me: program exited with status $ac_status" >&5
6311echo "$as_me: failed program was:" >&5 6896echo "$as_me: failed program was:" >&5
6312cat conftest.$ac_ext >&5 6897sed 's/^/| /' conftest.$ac_ext >&5
6313 6898
6314 echo "$as_me:6314: result: no" >&5 6899( exit $ac_status )
6900
6901 echo "$as_me:$LINENO: result: no" >&5
6315echo "${ECHO_T}no" >&6 6902echo "${ECHO_T}no" >&6
6316 cat >>confdefs.h <<\EOF 6903 cat >>confdefs.h <<\_ACEOF
6317#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1 6904#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
6318EOF 6905_ACEOF
6906
6907
6319 6908
6320fi 6909fi
6321rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 6910rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6322fi 6911fi
6323 6912
6324# Check whether user wants S/Key support 6913# Check whether user wants S/Key support
@@ -6335,23 +6924,29 @@ if test "${with_skey+set}" = set; then
6335 LDFLAGS="$LDFLAGS -L${withval}/lib" 6924 LDFLAGS="$LDFLAGS -L${withval}/lib"
6336 fi 6925 fi
6337 6926
6338 cat >>confdefs.h <<\EOF 6927 cat >>confdefs.h <<\_ACEOF
6339#define SKEY 1 6928#define SKEY 1
6340EOF 6929_ACEOF
6341 6930
6342 LIBS="-lskey $LIBS" 6931 LIBS="-lskey $LIBS"
6343 SKEY_MSG="yes" 6932 SKEY_MSG="yes"
6344 6933
6345 echo "$as_me:6345: checking for s/key support" >&5 6934 echo "$as_me:$LINENO: checking for s/key support" >&5
6346echo $ECHO_N "checking for s/key support... $ECHO_C" >&6 6935echo $ECHO_N "checking for s/key support... $ECHO_C" >&6
6347 if test "$cross_compiling" = yes; then 6936 if test "$cross_compiling" = yes; then
6348 { { echo "$as_me:6348: error: cannot run test program while cross compiling" >&5 6937 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6349echo "$as_me: error: cannot run test program while cross compiling" >&2;} 6938See \`config.log' for more details." >&5
6939echo "$as_me: error: cannot run test program while cross compiling
6940See \`config.log' for more details." >&2;}
6350 { (exit 1); exit 1; }; } 6941 { (exit 1); exit 1; }; }
6351else 6942else
6352 cat >conftest.$ac_ext <<_ACEOF 6943 cat >conftest.$ac_ext <<_ACEOF
6353#line 6353 "configure" 6944#line $LINENO "configure"
6354#include "confdefs.h" 6945/* confdefs.h. */
6946_ACEOF
6947cat confdefs.h >>conftest.$ac_ext
6948cat >>conftest.$ac_ext <<_ACEOF
6949/* end confdefs.h. */
6355 6950
6356#include <stdio.h> 6951#include <stdio.h>
6357#include <skey.h> 6952#include <skey.h>
@@ -6359,34 +6954,37 @@ int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
6359 6954
6360_ACEOF 6955_ACEOF
6361rm -f conftest$ac_exeext 6956rm -f conftest$ac_exeext
6362if { (eval echo "$as_me:6362: \"$ac_link\"") >&5 6957if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6363 (eval $ac_link) 2>&5 6958 (eval $ac_link) 2>&5
6364 ac_status=$? 6959 ac_status=$?
6365 echo "$as_me:6365: \$? = $ac_status" >&5 6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 6961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6367 { (eval echo "$as_me:6367: \"$ac_try\"") >&5 6962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6368 (eval $ac_try) 2>&5 6963 (eval $ac_try) 2>&5
6369 ac_status=$? 6964 ac_status=$?
6370 echo "$as_me:6370: \$? = $ac_status" >&5 6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6371 (exit $ac_status); }; }; then 6966 (exit $ac_status); }; }; then
6372 echo "$as_me:6372: result: yes" >&5 6967 echo "$as_me:$LINENO: result: yes" >&5
6373echo "${ECHO_T}yes" >&6 6968echo "${ECHO_T}yes" >&6
6374else 6969else
6375 echo "$as_me: program exited with status $ac_status" >&5 6970 echo "$as_me: program exited with status $ac_status" >&5
6376echo "$as_me: failed program was:" >&5 6971echo "$as_me: failed program was:" >&5
6377cat conftest.$ac_ext >&5 6972sed 's/^/| /' conftest.$ac_ext >&5
6378 6973
6379 echo "$as_me:6379: result: no" >&5 6974( exit $ac_status )
6975
6976 echo "$as_me:$LINENO: result: no" >&5
6380echo "${ECHO_T}no" >&6 6977echo "${ECHO_T}no" >&6
6381 { { echo "$as_me:6381: error: ** Incomplete or missing s/key libraries." >&5 6978 { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5
6382echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;} 6979echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
6383 { (exit 1); exit 1; }; } 6980 { (exit 1); exit 1; }; }
6384 6981
6385fi 6982fi
6386rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 6983rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6387fi 6984fi
6388 fi 6985 fi
6389 6986
6987
6390fi; 6988fi;
6391 6989
6392# Check whether user wants TCP wrappers support 6990# Check whether user wants TCP wrappers support
@@ -6422,11 +7020,15 @@ if test "${with_tcp_wrappers+set}" = set; then
6422 fi 7020 fi
6423 LIBWRAP="-lwrap" 7021 LIBWRAP="-lwrap"
6424 LIBS="$LIBWRAP $LIBS" 7022 LIBS="$LIBWRAP $LIBS"
6425 echo "$as_me:6425: checking for libwrap" >&5 7023 echo "$as_me:$LINENO: checking for libwrap" >&5
6426echo $ECHO_N "checking for libwrap... $ECHO_C" >&6 7024echo $ECHO_N "checking for libwrap... $ECHO_C" >&6
6427 cat >conftest.$ac_ext <<_ACEOF 7025 cat >conftest.$ac_ext <<_ACEOF
6428#line 6428 "configure" 7026#line $LINENO "configure"
6429#include "confdefs.h" 7027/* confdefs.h. */
7028_ACEOF
7029cat confdefs.h >>conftest.$ac_ext
7030cat >>conftest.$ac_ext <<_ACEOF
7031/* end confdefs.h. */
6430 7032
6431#include <tcpd.h> 7033#include <tcpd.h>
6432 int deny_severity = 0, allow_severity = 0; 7034 int deny_severity = 0, allow_severity = 0;
@@ -6440,124 +7042,215 @@ hosts_access(0);
6440} 7042}
6441_ACEOF 7043_ACEOF
6442rm -f conftest.$ac_objext conftest$ac_exeext 7044rm -f conftest.$ac_objext conftest$ac_exeext
6443if { (eval echo "$as_me:6443: \"$ac_link\"") >&5 7045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6444 (eval $ac_link) 2>&5 7046 (eval $ac_link) 2>&5
6445 ac_status=$? 7047 ac_status=$?
6446 echo "$as_me:6446: \$? = $ac_status" >&5 7048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6447 (exit $ac_status); } && 7049 (exit $ac_status); } &&
6448 { ac_try='test -s conftest$ac_exeext' 7050 { ac_try='test -s conftest$ac_exeext'
6449 { (eval echo "$as_me:6449: \"$ac_try\"") >&5 7051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6450 (eval $ac_try) 2>&5 7052 (eval $ac_try) 2>&5
6451 ac_status=$? 7053 ac_status=$?
6452 echo "$as_me:6452: \$? = $ac_status" >&5 7054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6453 (exit $ac_status); }; }; then 7055 (exit $ac_status); }; }; then
6454 7056
6455 echo "$as_me:6455: result: yes" >&5 7057 echo "$as_me:$LINENO: result: yes" >&5
6456echo "${ECHO_T}yes" >&6 7058echo "${ECHO_T}yes" >&6
6457 cat >>confdefs.h <<\EOF 7059 cat >>confdefs.h <<\_ACEOF
6458#define LIBWRAP 1 7060#define LIBWRAP 1
6459EOF 7061_ACEOF
7062
6460 7063
6461 TCPW_MSG="yes" 7064 TCPW_MSG="yes"
6462 7065
6463else 7066else
6464 echo "$as_me: failed program was:" >&5 7067 echo "$as_me: failed program was:" >&5
6465cat conftest.$ac_ext >&5 7068sed 's/^/| /' conftest.$ac_ext >&5
7069
6466 7070
6467 { { echo "$as_me:6467: error: *** libwrap missing" >&5 7071 { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
6468echo "$as_me: error: *** libwrap missing" >&2;} 7072echo "$as_me: error: *** libwrap missing" >&2;}
6469 { (exit 1); exit 1; }; } 7073 { (exit 1); exit 1; }; }
6470 7074
7075
6471fi 7076fi
6472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 7077rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6473 LIBS="$saved_LIBS" 7078 LIBS="$saved_LIBS"
6474 fi 7079 fi
6475 7080
7081
6476fi; 7082fi;
6477 7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
6478for ac_func in \ 7157for ac_func in \
6479 arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename \ 7158 arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename bcopy \
6480 bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \ 7159 bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
6481 gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \ 7160 gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
6482 getpeereid _getpty getrlimit getttyent glob inet_aton \ 7161 getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \
6483 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ 7162 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
6484 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ 7163 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openpty pstat \
6485 pstat readpassphrase realpath recvmsg rresvport_af sendmsg \ 7164 readpassphrase realpath recvmsg rresvport_af sendmsg setdtablesize \
6486 setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ 7165 setegid setenv seteuid setgroups setlogin setpcred setproctitle \
6487 setproctitle setregid setresgid setresuid setreuid setrlimit \ 7166 setresgid setreuid setrlimit setsid setvbuf sigaction sigvec \
6488 setsid setvbuf sigaction sigvec snprintf socketpair strerror \ 7167 snprintf socketpair strerror strlcat strlcpy strmode strnvis \
6489 strlcat strlcpy strmode strnvis sysconf tcgetpgrp \ 7168 sysconf tcgetpgrp truncate utimes vhangup vsnprintf waitpid \
6490 truncate utimes vhangup vsnprintf waitpid \
6491 7169
6492do 7170do
6493as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 7171as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6494echo "$as_me:6494: checking for $ac_func" >&5 7172echo "$as_me:$LINENO: checking for $ac_func" >&5
6495echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 7173echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6496if eval "test \"\${$as_ac_var+set}\" = set"; then 7174if eval "test \"\${$as_ac_var+set}\" = set"; then
6497 echo $ECHO_N "(cached) $ECHO_C" >&6 7175 echo $ECHO_N "(cached) $ECHO_C" >&6
6498else 7176else
6499 cat >conftest.$ac_ext <<_ACEOF 7177 cat >conftest.$ac_ext <<_ACEOF
6500#line 6500 "configure" 7178#line $LINENO "configure"
6501#include "confdefs.h" 7179/* confdefs.h. */
7180_ACEOF
7181cat confdefs.h >>conftest.$ac_ext
7182cat >>conftest.$ac_ext <<_ACEOF
7183/* end confdefs.h. */
6502/* System header to define __stub macros and hopefully few prototypes, 7184/* System header to define __stub macros and hopefully few prototypes,
6503 which can conflict with char $ac_func (); below. */ 7185 which can conflict with char $ac_func (); below.
6504#include <assert.h> 7186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7187 <limits.h> exists even on freestanding compilers. */
7188#ifdef __STDC__
7189# include <limits.h>
7190#else
7191# include <assert.h>
7192#endif
6505/* Override any gcc2 internal prototype to avoid an error. */ 7193/* Override any gcc2 internal prototype to avoid an error. */
6506#ifdef __cplusplus 7194#ifdef __cplusplus
6507extern "C" 7195extern "C"
7196{
6508#endif 7197#endif
6509/* We use char because int might match the return type of a gcc2 7198/* We use char because int might match the return type of a gcc2
6510 builtin and then its argument prototype would still apply. */ 7199 builtin and then its argument prototype would still apply. */
6511char $ac_func (); 7200char $ac_func ();
6512char (*f) ();
6513
6514int
6515main ()
6516{
6517/* The GNU C library defines this for functions which it implements 7201/* The GNU C library defines this for functions which it implements
6518 to always fail with ENOSYS. Some functions are actually named 7202 to always fail with ENOSYS. Some functions are actually named
6519 something starting with __ and the normal name is an alias. */ 7203 something starting with __ and the normal name is an alias. */
6520#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 7204#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6521choke me 7205choke me
6522#else 7206#else
6523f = $ac_func; 7207char (*f) () = $ac_func;
7208#endif
7209#ifdef __cplusplus
7210}
6524#endif 7211#endif
6525 7212
7213int
7214main ()
7215{
7216return f != $ac_func;
6526 ; 7217 ;
6527 return 0; 7218 return 0;
6528} 7219}
6529_ACEOF 7220_ACEOF
6530rm -f conftest.$ac_objext conftest$ac_exeext 7221rm -f conftest.$ac_objext conftest$ac_exeext
6531if { (eval echo "$as_me:6531: \"$ac_link\"") >&5 7222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6532 (eval $ac_link) 2>&5 7223 (eval $ac_link) 2>&5
6533 ac_status=$? 7224 ac_status=$?
6534 echo "$as_me:6534: \$? = $ac_status" >&5 7225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6535 (exit $ac_status); } && 7226 (exit $ac_status); } &&
6536 { ac_try='test -s conftest$ac_exeext' 7227 { ac_try='test -s conftest$ac_exeext'
6537 { (eval echo "$as_me:6537: \"$ac_try\"") >&5 7228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6538 (eval $ac_try) 2>&5 7229 (eval $ac_try) 2>&5
6539 ac_status=$? 7230 ac_status=$?
6540 echo "$as_me:6540: \$? = $ac_status" >&5 7231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); }; }; then 7232 (exit $ac_status); }; }; then
6542 eval "$as_ac_var=yes" 7233 eval "$as_ac_var=yes"
6543else 7234else
6544 echo "$as_me: failed program was:" >&5 7235 echo "$as_me: failed program was:" >&5
6545cat conftest.$ac_ext >&5 7236sed 's/^/| /' conftest.$ac_ext >&5
7237
6546eval "$as_ac_var=no" 7238eval "$as_ac_var=no"
6547fi 7239fi
6548rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 7240rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6549fi 7241fi
6550echo "$as_me:6550: result: `eval echo '${'$as_ac_var'}'`" >&5 7242echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6551echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 7243echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6552if test `eval echo '${'$as_ac_var'}'` = yes; then 7244if test `eval echo '${'$as_ac_var'}'` = yes; then
6553 cat >>confdefs.h <<EOF 7245 cat >>confdefs.h <<_ACEOF
6554#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7246#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6555EOF 7247_ACEOF
6556 7248
6557fi 7249fi
6558done 7250done
6559 7251
6560echo "$as_me:6560: checking for library containing nanosleep" >&5 7252
7253echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
6561echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6 7254echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6
6562if test "${ac_cv_search_nanosleep+set}" = set; then 7255if test "${ac_cv_search_nanosleep+set}" = set; then
6563 echo $ECHO_N "(cached) $ECHO_C" >&6 7256 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6565,8 +7258,12 @@ else
6565 ac_func_search_save_LIBS=$LIBS 7258 ac_func_search_save_LIBS=$LIBS
6566ac_cv_search_nanosleep=no 7259ac_cv_search_nanosleep=no
6567cat >conftest.$ac_ext <<_ACEOF 7260cat >conftest.$ac_ext <<_ACEOF
6568#line 6568 "configure" 7261#line $LINENO "configure"
6569#include "confdefs.h" 7262/* confdefs.h. */
7263_ACEOF
7264cat confdefs.h >>conftest.$ac_ext
7265cat >>conftest.$ac_ext <<_ACEOF
7266/* end confdefs.h. */
6570 7267
6571/* Override any gcc2 internal prototype to avoid an error. */ 7268/* Override any gcc2 internal prototype to avoid an error. */
6572#ifdef __cplusplus 7269#ifdef __cplusplus
@@ -6584,29 +7281,34 @@ nanosleep ();
6584} 7281}
6585_ACEOF 7282_ACEOF
6586rm -f conftest.$ac_objext conftest$ac_exeext 7283rm -f conftest.$ac_objext conftest$ac_exeext
6587if { (eval echo "$as_me:6587: \"$ac_link\"") >&5 7284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6588 (eval $ac_link) 2>&5 7285 (eval $ac_link) 2>&5
6589 ac_status=$? 7286 ac_status=$?
6590 echo "$as_me:6590: \$? = $ac_status" >&5 7287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591 (exit $ac_status); } && 7288 (exit $ac_status); } &&
6592 { ac_try='test -s conftest$ac_exeext' 7289 { ac_try='test -s conftest$ac_exeext'
6593 { (eval echo "$as_me:6593: \"$ac_try\"") >&5 7290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6594 (eval $ac_try) 2>&5 7291 (eval $ac_try) 2>&5
6595 ac_status=$? 7292 ac_status=$?
6596 echo "$as_me:6596: \$? = $ac_status" >&5 7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597 (exit $ac_status); }; }; then 7294 (exit $ac_status); }; }; then
6598 ac_cv_search_nanosleep="none required" 7295 ac_cv_search_nanosleep="none required"
6599else 7296else
6600 echo "$as_me: failed program was:" >&5 7297 echo "$as_me: failed program was:" >&5
6601cat conftest.$ac_ext >&5 7298sed 's/^/| /' conftest.$ac_ext >&5
7299
6602fi 7300fi
6603rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 7301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6604if test "$ac_cv_search_nanosleep" = no; then 7302if test "$ac_cv_search_nanosleep" = no; then
6605 for ac_lib in rt posix4; do 7303 for ac_lib in rt posix4; do
6606 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 7304 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6607 cat >conftest.$ac_ext <<_ACEOF 7305 cat >conftest.$ac_ext <<_ACEOF
6608#line 6608 "configure" 7306#line $LINENO "configure"
6609#include "confdefs.h" 7307/* confdefs.h. */
7308_ACEOF
7309cat confdefs.h >>conftest.$ac_ext
7310cat >>conftest.$ac_ext <<_ACEOF
7311/* end confdefs.h. */
6610 7312
6611/* Override any gcc2 internal prototype to avoid an error. */ 7313/* Override any gcc2 internal prototype to avoid an error. */
6612#ifdef __cplusplus 7314#ifdef __cplusplus
@@ -6624,231 +7326,161 @@ nanosleep ();
6624} 7326}
6625_ACEOF 7327_ACEOF
6626rm -f conftest.$ac_objext conftest$ac_exeext 7328rm -f conftest.$ac_objext conftest$ac_exeext
6627if { (eval echo "$as_me:6627: \"$ac_link\"") >&5 7329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6628 (eval $ac_link) 2>&5 7330 (eval $ac_link) 2>&5
6629 ac_status=$? 7331 ac_status=$?
6630 echo "$as_me:6630: \$? = $ac_status" >&5 7332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); } && 7333 (exit $ac_status); } &&
6632 { ac_try='test -s conftest$ac_exeext' 7334 { ac_try='test -s conftest$ac_exeext'
6633 { (eval echo "$as_me:6633: \"$ac_try\"") >&5 7335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6634 (eval $ac_try) 2>&5 7336 (eval $ac_try) 2>&5
6635 ac_status=$? 7337 ac_status=$?
6636 echo "$as_me:6636: \$? = $ac_status" >&5 7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637 (exit $ac_status); }; }; then 7339 (exit $ac_status); }; }; then
6638 ac_cv_search_nanosleep="-l$ac_lib" 7340 ac_cv_search_nanosleep="-l$ac_lib"
6639break 7341break
6640else 7342else
6641 echo "$as_me: failed program was:" >&5 7343 echo "$as_me: failed program was:" >&5
6642cat conftest.$ac_ext >&5 7344sed 's/^/| /' conftest.$ac_ext >&5
7345
6643fi 7346fi
6644rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 7347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6645 done 7348 done
6646fi 7349fi
6647LIBS=$ac_func_search_save_LIBS 7350LIBS=$ac_func_search_save_LIBS
6648fi 7351fi
6649echo "$as_me:6649: result: $ac_cv_search_nanosleep" >&5 7352echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
6650echo "${ECHO_T}$ac_cv_search_nanosleep" >&6 7353echo "${ECHO_T}$ac_cv_search_nanosleep" >&6
6651if test "$ac_cv_search_nanosleep" != no; then 7354if test "$ac_cv_search_nanosleep" != no; then
6652 test "$ac_cv_search_nanosleep" = "none required" || LIBS="$ac_cv_search_nanosleep $LIBS" 7355 test "$ac_cv_search_nanosleep" = "none required" || LIBS="$ac_cv_search_nanosleep $LIBS"
6653 cat >>confdefs.h <<\EOF 7356 cat >>confdefs.h <<\_ACEOF
6654#define HAVE_NANOSLEEP 1 7357#define HAVE_NANOSLEEP 1
6655EOF 7358_ACEOF
6656 7359
6657fi 7360fi
6658 7361
6659echo "$as_me:6659: checking for ANSI C header files" >&5 7362echo "$as_me:$LINENO: checking for library containing basename" >&5
6660echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 7363echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6
6661if test "${ac_cv_header_stdc+set}" = set; then 7364if test "${ac_cv_search_basename+set}" = set; then
6662 echo $ECHO_N "(cached) $ECHO_C" >&6 7365 echo $ECHO_N "(cached) $ECHO_C" >&6
6663else 7366else
6664 cat >conftest.$ac_ext <<_ACEOF 7367 ac_func_search_save_LIBS=$LIBS
6665#line 6665 "configure" 7368ac_cv_search_basename=no
6666#include "confdefs.h" 7369cat >conftest.$ac_ext <<_ACEOF
6667#include <stdlib.h> 7370#line $LINENO "configure"
6668#include <stdarg.h> 7371/* confdefs.h. */
6669#include <string.h>
6670#include <float.h>
6671
6672_ACEOF
6673if { (eval echo "$as_me:6673: \"$ac_cpp conftest.$ac_ext\"") >&5
6674 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6675 ac_status=$?
6676 egrep -v '^ *\+' conftest.er1 >conftest.err
6677 rm -f conftest.er1
6678 cat conftest.err >&5
6679 echo "$as_me:6679: \$? = $ac_status" >&5
6680 (exit $ac_status); } >/dev/null; then
6681 if test -s conftest.err; then
6682 ac_cpp_err=$ac_c_preproc_warn_flag
6683 else
6684 ac_cpp_err=
6685 fi
6686else
6687 ac_cpp_err=yes
6688fi
6689if test -z "$ac_cpp_err"; then
6690 ac_cv_header_stdc=yes
6691else
6692 echo "$as_me: failed program was:" >&5
6693 cat conftest.$ac_ext >&5
6694 ac_cv_header_stdc=no
6695fi
6696rm -f conftest.err conftest.$ac_ext
6697
6698if test $ac_cv_header_stdc = yes; then
6699 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6700 cat >conftest.$ac_ext <<_ACEOF
6701#line 6701 "configure"
6702#include "confdefs.h"
6703#include <string.h>
6704
6705_ACEOF
6706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6707 egrep "memchr" >/dev/null 2>&1; then
6708 :
6709else
6710 ac_cv_header_stdc=no
6711fi
6712rm -f conftest*
6713
6714fi
6715
6716if test $ac_cv_header_stdc = yes; then
6717 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6718 cat >conftest.$ac_ext <<_ACEOF
6719#line 6719 "configure"
6720#include "confdefs.h"
6721#include <stdlib.h>
6722
6723_ACEOF 7372_ACEOF
6724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7373cat confdefs.h >>conftest.$ac_ext
6725 egrep "free" >/dev/null 2>&1; then 7374cat >>conftest.$ac_ext <<_ACEOF
6726 : 7375/* end confdefs.h. */
6727else
6728 ac_cv_header_stdc=no
6729fi
6730rm -f conftest*
6731
6732fi
6733 7376
6734if test $ac_cv_header_stdc = yes; then 7377/* Override any gcc2 internal prototype to avoid an error. */
6735 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 7378#ifdef __cplusplus
6736 if test "$cross_compiling" = yes; then 7379extern "C"
6737 :
6738else
6739 cat >conftest.$ac_ext <<_ACEOF
6740#line 6740 "configure"
6741#include "confdefs.h"
6742#include <ctype.h>
6743#if ((' ' & 0x0FF) == 0x020)
6744# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6745# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6746#else
6747# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6748 || ('j' <= (c) && (c) <= 'r') \
6749 || ('s' <= (c) && (c) <= 'z'))
6750# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6751#endif 7380#endif
6752 7381/* We use char because int might match the return type of a gcc2
6753#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 7382 builtin and then its argument prototype would still apply. */
7383char basename ();
6754int 7384int
6755main () 7385main ()
6756{ 7386{
6757 int i; 7387basename ();
6758 for (i = 0; i < 256; i++) 7388 ;
6759 if (XOR (islower (i), ISLOWER (i)) 7389 return 0;
6760 || toupper (i) != TOUPPER (i))
6761 exit(2);
6762 exit (0);
6763} 7390}
6764_ACEOF 7391_ACEOF
6765rm -f conftest$ac_exeext 7392rm -f conftest.$ac_objext conftest$ac_exeext
6766if { (eval echo "$as_me:6766: \"$ac_link\"") >&5 7393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6767 (eval $ac_link) 2>&5 7394 (eval $ac_link) 2>&5
6768 ac_status=$? 7395 ac_status=$?
6769 echo "$as_me:6769: \$? = $ac_status" >&5 7396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6770 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 7397 (exit $ac_status); } &&
6771 { (eval echo "$as_me:6771: \"$ac_try\"") >&5 7398 { ac_try='test -s conftest$ac_exeext'
7399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6772 (eval $ac_try) 2>&5 7400 (eval $ac_try) 2>&5
6773 ac_status=$? 7401 ac_status=$?
6774 echo "$as_me:6774: \$? = $ac_status" >&5 7402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6775 (exit $ac_status); }; }; then 7403 (exit $ac_status); }; }; then
6776 : 7404 ac_cv_search_basename="none required"
6777else 7405else
6778 echo "$as_me: program exited with status $ac_status" >&5 7406 echo "$as_me: failed program was:" >&5
6779echo "$as_me: failed program was:" >&5 7407sed 's/^/| /' conftest.$ac_ext >&5
6780cat conftest.$ac_ext >&5
6781ac_cv_header_stdc=no
6782fi
6783rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6784fi
6785fi
6786fi
6787echo "$as_me:6787: result: $ac_cv_header_stdc" >&5
6788echo "${ECHO_T}$ac_cv_header_stdc" >&6
6789if test $ac_cv_header_stdc = yes; then
6790
6791cat >>confdefs.h <<\EOF
6792#define STDC_HEADERS 1
6793EOF
6794 7408
6795fi 7409fi
7410rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7411if test "$ac_cv_search_basename" = no; then
7412 for ac_lib in gen; do
7413 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7414 cat >conftest.$ac_ext <<_ACEOF
7415#line $LINENO "configure"
7416/* confdefs.h. */
7417_ACEOF
7418cat confdefs.h >>conftest.$ac_ext
7419cat >>conftest.$ac_ext <<_ACEOF
7420/* end confdefs.h. */
6796 7421
6797# On IRIX 5.3, sys/types and inttypes.h are conflicting. 7422/* Override any gcc2 internal prototype to avoid an error. */
6798 7423#ifdef __cplusplus
6799for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 7424extern "C"
6800 inttypes.h stdint.h unistd.h 7425#endif
6801do 7426/* We use char because int might match the return type of a gcc2
6802as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 7427 builtin and then its argument prototype would still apply. */
6803echo "$as_me:6803: checking for $ac_header" >&5 7428char basename ();
6804echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 7429int
6805if eval "test \"\${$as_ac_Header+set}\" = set"; then 7430main ()
6806 echo $ECHO_N "(cached) $ECHO_C" >&6 7431{
6807else 7432basename ();
6808 cat >conftest.$ac_ext <<_ACEOF 7433 ;
6809#line 6809 "configure" 7434 return 0;
6810#include "confdefs.h" 7435}
6811$ac_includes_default
6812#include <$ac_header>
6813_ACEOF 7436_ACEOF
6814rm -f conftest.$ac_objext 7437rm -f conftest.$ac_objext conftest$ac_exeext
6815if { (eval echo "$as_me:6815: \"$ac_compile\"") >&5 7438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6816 (eval $ac_compile) 2>&5 7439 (eval $ac_link) 2>&5
6817 ac_status=$? 7440 ac_status=$?
6818 echo "$as_me:6818: \$? = $ac_status" >&5 7441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6819 (exit $ac_status); } && 7442 (exit $ac_status); } &&
6820 { ac_try='test -s conftest.$ac_objext' 7443 { ac_try='test -s conftest$ac_exeext'
6821 { (eval echo "$as_me:6821: \"$ac_try\"") >&5 7444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6822 (eval $ac_try) 2>&5 7445 (eval $ac_try) 2>&5
6823 ac_status=$? 7446 ac_status=$?
6824 echo "$as_me:6824: \$? = $ac_status" >&5 7447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6825 (exit $ac_status); }; }; then 7448 (exit $ac_status); }; }; then
6826 eval "$as_ac_Header=yes" 7449 ac_cv_search_basename="-l$ac_lib"
7450break
6827else 7451else
6828 echo "$as_me: failed program was:" >&5 7452 echo "$as_me: failed program was:" >&5
6829cat conftest.$ac_ext >&5 7453sed 's/^/| /' conftest.$ac_ext >&5
6830eval "$as_ac_Header=no" 7454
6831fi 7455fi
6832rm -f conftest.$ac_objext conftest.$ac_ext 7456rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7457 done
6833fi 7458fi
6834echo "$as_me:6834: result: `eval echo '${'$as_ac_Header'}'`" >&5 7459LIBS=$ac_func_search_save_LIBS
6835echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 7460fi
6836if test `eval echo '${'$as_ac_Header'}'` = yes; then 7461echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5
6837 cat >>confdefs.h <<EOF 7462echo "${ECHO_T}$ac_cv_search_basename" >&6
6838#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7463if test "$ac_cv_search_basename" != no; then
6839EOF 7464 test "$ac_cv_search_basename" = "none required" || LIBS="$ac_cv_search_basename $LIBS"
7465 cat >>confdefs.h <<\_ACEOF
7466#define HAVE_BASENAME 1
7467_ACEOF
6840 7468
6841fi 7469fi
6842done
6843 7470
6844echo "$as_me:6844: checking whether strsep is declared" >&5 7471
7472echo "$as_me:$LINENO: checking whether strsep is declared" >&5
6845echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6 7473echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6
6846if test "${ac_cv_have_decl_strsep+set}" = set; then 7474if test "${ac_cv_have_decl_strsep+set}" = set; then
6847 echo $ECHO_N "(cached) $ECHO_C" >&6 7475 echo $ECHO_N "(cached) $ECHO_C" >&6
6848else 7476else
6849 cat >conftest.$ac_ext <<_ACEOF 7477 cat >conftest.$ac_ext <<_ACEOF
6850#line 6850 "configure" 7478#line $LINENO "configure"
6851#include "confdefs.h" 7479/* confdefs.h. */
7480_ACEOF
7481cat confdefs.h >>conftest.$ac_ext
7482cat >>conftest.$ac_ext <<_ACEOF
7483/* end confdefs.h. */
6852$ac_includes_default 7484$ac_includes_default
6853int 7485int
6854main () 7486main ()
@@ -6862,746 +7494,1131 @@ main ()
6862} 7494}
6863_ACEOF 7495_ACEOF
6864rm -f conftest.$ac_objext 7496rm -f conftest.$ac_objext
6865if { (eval echo "$as_me:6865: \"$ac_compile\"") >&5 7497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6866 (eval $ac_compile) 2>&5 7498 (eval $ac_compile) 2>&5
6867 ac_status=$? 7499 ac_status=$?
6868 echo "$as_me:6868: \$? = $ac_status" >&5 7500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6869 (exit $ac_status); } && 7501 (exit $ac_status); } &&
6870 { ac_try='test -s conftest.$ac_objext' 7502 { ac_try='test -s conftest.$ac_objext'
6871 { (eval echo "$as_me:6871: \"$ac_try\"") >&5 7503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6872 (eval $ac_try) 2>&5 7504 (eval $ac_try) 2>&5
6873 ac_status=$? 7505 ac_status=$?
6874 echo "$as_me:6874: \$? = $ac_status" >&5 7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6875 (exit $ac_status); }; }; then 7507 (exit $ac_status); }; }; then
6876 ac_cv_have_decl_strsep=yes 7508 ac_cv_have_decl_strsep=yes
6877else 7509else
6878 echo "$as_me: failed program was:" >&5 7510 echo "$as_me: failed program was:" >&5
6879cat conftest.$ac_ext >&5 7511sed 's/^/| /' conftest.$ac_ext >&5
7512
6880ac_cv_have_decl_strsep=no 7513ac_cv_have_decl_strsep=no
6881fi 7514fi
6882rm -f conftest.$ac_objext conftest.$ac_ext 7515rm -f conftest.$ac_objext conftest.$ac_ext
6883fi 7516fi
6884echo "$as_me:6884: result: $ac_cv_have_decl_strsep" >&5 7517echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5
6885echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6 7518echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6
6886if test $ac_cv_have_decl_strsep = yes; then 7519if test $ac_cv_have_decl_strsep = yes; then
6887 7520
6888for ac_func in strsep 7521for ac_func in strsep
6889do 7522do
6890as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 7523as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6891echo "$as_me:6891: checking for $ac_func" >&5 7524echo "$as_me:$LINENO: checking for $ac_func" >&5
6892echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 7525echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6893if eval "test \"\${$as_ac_var+set}\" = set"; then 7526if eval "test \"\${$as_ac_var+set}\" = set"; then
6894 echo $ECHO_N "(cached) $ECHO_C" >&6 7527 echo $ECHO_N "(cached) $ECHO_C" >&6
6895else 7528else
6896 cat >conftest.$ac_ext <<_ACEOF 7529 cat >conftest.$ac_ext <<_ACEOF
6897#line 6897 "configure" 7530#line $LINENO "configure"
6898#include "confdefs.h" 7531/* confdefs.h. */
7532_ACEOF
7533cat confdefs.h >>conftest.$ac_ext
7534cat >>conftest.$ac_ext <<_ACEOF
7535/* end confdefs.h. */
6899/* System header to define __stub macros and hopefully few prototypes, 7536/* System header to define __stub macros and hopefully few prototypes,
6900 which can conflict with char $ac_func (); below. */ 7537 which can conflict with char $ac_func (); below.
6901#include <assert.h> 7538 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7539 <limits.h> exists even on freestanding compilers. */
7540#ifdef __STDC__
7541# include <limits.h>
7542#else
7543# include <assert.h>
7544#endif
6902/* Override any gcc2 internal prototype to avoid an error. */ 7545/* Override any gcc2 internal prototype to avoid an error. */
6903#ifdef __cplusplus 7546#ifdef __cplusplus
6904extern "C" 7547extern "C"
7548{
6905#endif 7549#endif
6906/* We use char because int might match the return type of a gcc2 7550/* We use char because int might match the return type of a gcc2
6907 builtin and then its argument prototype would still apply. */ 7551 builtin and then its argument prototype would still apply. */
6908char $ac_func (); 7552char $ac_func ();
6909char (*f) ();
6910
6911int
6912main ()
6913{
6914/* The GNU C library defines this for functions which it implements 7553/* The GNU C library defines this for functions which it implements
6915 to always fail with ENOSYS. Some functions are actually named 7554 to always fail with ENOSYS. Some functions are actually named
6916 something starting with __ and the normal name is an alias. */ 7555 something starting with __ and the normal name is an alias. */
6917#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 7556#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6918choke me 7557choke me
6919#else 7558#else
6920f = $ac_func; 7559char (*f) () = $ac_func;
7560#endif
7561#ifdef __cplusplus
7562}
6921#endif 7563#endif
6922 7564
7565int
7566main ()
7567{
7568return f != $ac_func;
6923 ; 7569 ;
6924 return 0; 7570 return 0;
6925} 7571}
6926_ACEOF 7572_ACEOF
6927rm -f conftest.$ac_objext conftest$ac_exeext 7573rm -f conftest.$ac_objext conftest$ac_exeext
6928if { (eval echo "$as_me:6928: \"$ac_link\"") >&5 7574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6929 (eval $ac_link) 2>&5 7575 (eval $ac_link) 2>&5
6930 ac_status=$? 7576 ac_status=$?
6931 echo "$as_me:6931: \$? = $ac_status" >&5 7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6932 (exit $ac_status); } && 7578 (exit $ac_status); } &&
6933 { ac_try='test -s conftest$ac_exeext' 7579 { ac_try='test -s conftest$ac_exeext'
6934 { (eval echo "$as_me:6934: \"$ac_try\"") >&5 7580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6935 (eval $ac_try) 2>&5 7581 (eval $ac_try) 2>&5
6936 ac_status=$? 7582 ac_status=$?
6937 echo "$as_me:6937: \$? = $ac_status" >&5 7583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6938 (exit $ac_status); }; }; then 7584 (exit $ac_status); }; }; then
6939 eval "$as_ac_var=yes" 7585 eval "$as_ac_var=yes"
6940else 7586else
6941 echo "$as_me: failed program was:" >&5 7587 echo "$as_me: failed program was:" >&5
6942cat conftest.$ac_ext >&5 7588sed 's/^/| /' conftest.$ac_ext >&5
7589
6943eval "$as_ac_var=no" 7590eval "$as_ac_var=no"
6944fi 7591fi
6945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 7592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6946fi 7593fi
6947echo "$as_me:6947: result: `eval echo '${'$as_ac_var'}'`" >&5 7594echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6948echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 7595echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6949if test `eval echo '${'$as_ac_var'}'` = yes; then 7596if test `eval echo '${'$as_ac_var'}'` = yes; then
6950 cat >>confdefs.h <<EOF 7597 cat >>confdefs.h <<_ACEOF
6951#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7598#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6952EOF 7599_ACEOF
6953 7600
6954fi 7601fi
6955done 7602done
6956 7603
6957fi 7604fi
6958 7605
6959echo "$as_me:6959: checking whether getrusage is declared" >&5
6960echo $ECHO_N "checking whether getrusage is declared... $ECHO_C" >&6
6961if test "${ac_cv_have_decl_getrusage+set}" = set; then
6962 echo $ECHO_N "(cached) $ECHO_C" >&6
6963else
6964 cat >conftest.$ac_ext <<_ACEOF
6965#line 6965 "configure"
6966#include "confdefs.h"
6967$ac_includes_default
6968int
6969main ()
6970{
6971#ifndef getrusage
6972 char *p = (char *) getrusage;
6973#endif
6974 7606
6975 ;
6976 return 0;
6977}
6978_ACEOF
6979rm -f conftest.$ac_objext
6980if { (eval echo "$as_me:6980: \"$ac_compile\"") >&5
6981 (eval $ac_compile) 2>&5
6982 ac_status=$?
6983 echo "$as_me:6983: \$? = $ac_status" >&5
6984 (exit $ac_status); } &&
6985 { ac_try='test -s conftest.$ac_objext'
6986 { (eval echo "$as_me:6986: \"$ac_try\"") >&5
6987 (eval $ac_try) 2>&5
6988 ac_status=$?
6989 echo "$as_me:6989: \$? = $ac_status" >&5
6990 (exit $ac_status); }; }; then
6991 ac_cv_have_decl_getrusage=yes
6992else
6993 echo "$as_me: failed program was:" >&5
6994cat conftest.$ac_ext >&5
6995ac_cv_have_decl_getrusage=no
6996fi
6997rm -f conftest.$ac_objext conftest.$ac_ext
6998fi
6999echo "$as_me:6999: result: $ac_cv_have_decl_getrusage" >&5
7000echo "${ECHO_T}$ac_cv_have_decl_getrusage" >&6
7001if test $ac_cv_have_decl_getrusage = yes; then
7002 7607
7003for ac_func in getrusage 7608for ac_func in dirname
7004do 7609do
7005as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 7610as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7006echo "$as_me:7006: checking for $ac_func" >&5 7611echo "$as_me:$LINENO: checking for $ac_func" >&5
7007echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 7612echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7008if eval "test \"\${$as_ac_var+set}\" = set"; then 7613if eval "test \"\${$as_ac_var+set}\" = set"; then
7009 echo $ECHO_N "(cached) $ECHO_C" >&6 7614 echo $ECHO_N "(cached) $ECHO_C" >&6
7010else 7615else
7011 cat >conftest.$ac_ext <<_ACEOF 7616 cat >conftest.$ac_ext <<_ACEOF
7012#line 7012 "configure" 7617#line $LINENO "configure"
7013#include "confdefs.h" 7618/* confdefs.h. */
7619_ACEOF
7620cat confdefs.h >>conftest.$ac_ext
7621cat >>conftest.$ac_ext <<_ACEOF
7622/* end confdefs.h. */
7014/* System header to define __stub macros and hopefully few prototypes, 7623/* System header to define __stub macros and hopefully few prototypes,
7015 which can conflict with char $ac_func (); below. */ 7624 which can conflict with char $ac_func (); below.
7016#include <assert.h> 7625 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7626 <limits.h> exists even on freestanding compilers. */
7627#ifdef __STDC__
7628# include <limits.h>
7629#else
7630# include <assert.h>
7631#endif
7017/* Override any gcc2 internal prototype to avoid an error. */ 7632/* Override any gcc2 internal prototype to avoid an error. */
7018#ifdef __cplusplus 7633#ifdef __cplusplus
7019extern "C" 7634extern "C"
7635{
7020#endif 7636#endif
7021/* We use char because int might match the return type of a gcc2 7637/* We use char because int might match the return type of a gcc2
7022 builtin and then its argument prototype would still apply. */ 7638 builtin and then its argument prototype would still apply. */
7023char $ac_func (); 7639char $ac_func ();
7024char (*f) ();
7025
7026int
7027main ()
7028{
7029/* The GNU C library defines this for functions which it implements 7640/* The GNU C library defines this for functions which it implements
7030 to always fail with ENOSYS. Some functions are actually named 7641 to always fail with ENOSYS. Some functions are actually named
7031 something starting with __ and the normal name is an alias. */ 7642 something starting with __ and the normal name is an alias. */
7032#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 7643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7033choke me 7644choke me
7034#else 7645#else
7035f = $ac_func; 7646char (*f) () = $ac_func;
7647#endif
7648#ifdef __cplusplus
7649}
7036#endif 7650#endif
7037 7651
7652int
7653main ()
7654{
7655return f != $ac_func;
7038 ; 7656 ;
7039 return 0; 7657 return 0;
7040} 7658}
7041_ACEOF 7659_ACEOF
7042rm -f conftest.$ac_objext conftest$ac_exeext 7660rm -f conftest.$ac_objext conftest$ac_exeext
7043if { (eval echo "$as_me:7043: \"$ac_link\"") >&5 7661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7044 (eval $ac_link) 2>&5 7662 (eval $ac_link) 2>&5
7045 ac_status=$? 7663 ac_status=$?
7046 echo "$as_me:7046: \$? = $ac_status" >&5 7664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7047 (exit $ac_status); } && 7665 (exit $ac_status); } &&
7048 { ac_try='test -s conftest$ac_exeext' 7666 { ac_try='test -s conftest$ac_exeext'
7049 { (eval echo "$as_me:7049: \"$ac_try\"") >&5 7667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7050 (eval $ac_try) 2>&5 7668 (eval $ac_try) 2>&5
7051 ac_status=$? 7669 ac_status=$?
7052 echo "$as_me:7052: \$? = $ac_status" >&5 7670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053 (exit $ac_status); }; }; then 7671 (exit $ac_status); }; }; then
7054 eval "$as_ac_var=yes" 7672 eval "$as_ac_var=yes"
7055else 7673else
7056 echo "$as_me: failed program was:" >&5 7674 echo "$as_me: failed program was:" >&5
7057cat conftest.$ac_ext >&5 7675sed 's/^/| /' conftest.$ac_ext >&5
7676
7058eval "$as_ac_var=no" 7677eval "$as_ac_var=no"
7059fi 7678fi
7060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 7679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7061fi 7680fi
7062echo "$as_me:7062: result: `eval echo '${'$as_ac_var'}'`" >&5 7681echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7063echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 7682echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7064if test `eval echo '${'$as_ac_var'}'` = yes; then 7683if test `eval echo '${'$as_ac_var'}'` = yes; then
7065 cat >>confdefs.h <<EOF 7684 cat >>confdefs.h <<_ACEOF
7066#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7685#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7067EOF 7686_ACEOF
7068
7069fi
7070done
7071
7072fi
7073 7687
7074echo "$as_me:7074: checking whether tcsendbreak is declared" >&5 7688for ac_header in libgen.h
7075echo $ECHO_N "checking whether tcsendbreak is declared... $ECHO_C" >&6 7689do
7076if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then 7690as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7691if eval "test \"\${$as_ac_Header+set}\" = set"; then
7692 echo "$as_me:$LINENO: checking for $ac_header" >&5
7693echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7694if eval "test \"\${$as_ac_Header+set}\" = set"; then
7077 echo $ECHO_N "(cached) $ECHO_C" >&6 7695 echo $ECHO_N "(cached) $ECHO_C" >&6
7696fi
7697echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7698echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7078else 7699else
7079 cat >conftest.$ac_ext <<_ACEOF 7700 # Is the header compilable?
7080#line 7080 "configure" 7701echo "$as_me:$LINENO: checking $ac_header usability" >&5
7081#include "confdefs.h" 7702echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7082#include <termios.h> 7703cat >conftest.$ac_ext <<_ACEOF
7083 7704#line $LINENO "configure"
7084int 7705/* confdefs.h. */
7085main () 7706_ACEOF
7086{ 7707cat confdefs.h >>conftest.$ac_ext
7087#ifndef tcsendbreak 7708cat >>conftest.$ac_ext <<_ACEOF
7088 char *p = (char *) tcsendbreak; 7709/* end confdefs.h. */
7089#endif 7710$ac_includes_default
7090 7711#include <$ac_header>
7091 ;
7092 return 0;
7093}
7094_ACEOF 7712_ACEOF
7095rm -f conftest.$ac_objext 7713rm -f conftest.$ac_objext
7096if { (eval echo "$as_me:7096: \"$ac_compile\"") >&5 7714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7097 (eval $ac_compile) 2>&5 7715 (eval $ac_compile) 2>&5
7098 ac_status=$? 7716 ac_status=$?
7099 echo "$as_me:7099: \$? = $ac_status" >&5 7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7100 (exit $ac_status); } && 7718 (exit $ac_status); } &&
7101 { ac_try='test -s conftest.$ac_objext' 7719 { ac_try='test -s conftest.$ac_objext'
7102 { (eval echo "$as_me:7102: \"$ac_try\"") >&5 7720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7103 (eval $ac_try) 2>&5 7721 (eval $ac_try) 2>&5
7104 ac_status=$? 7722 ac_status=$?
7105 echo "$as_me:7105: \$? = $ac_status" >&5 7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106 (exit $ac_status); }; }; then 7724 (exit $ac_status); }; }; then
7107 ac_cv_have_decl_tcsendbreak=yes 7725 ac_header_compiler=yes
7108else 7726else
7109 echo "$as_me: failed program was:" >&5 7727 echo "$as_me: failed program was:" >&5
7110cat conftest.$ac_ext >&5 7728sed 's/^/| /' conftest.$ac_ext >&5
7111ac_cv_have_decl_tcsendbreak=no 7729
7730ac_header_compiler=no
7112fi 7731fi
7113rm -f conftest.$ac_objext conftest.$ac_ext 7732rm -f conftest.$ac_objext conftest.$ac_ext
7733echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7734echo "${ECHO_T}$ac_header_compiler" >&6
7735
7736# Is the header present?
7737echo "$as_me:$LINENO: checking $ac_header presence" >&5
7738echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7739cat >conftest.$ac_ext <<_ACEOF
7740#line $LINENO "configure"
7741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
7746#include <$ac_header>
7747_ACEOF
7748if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7749 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7750 ac_status=$?
7751 grep -v '^ *+' conftest.er1 >conftest.err
7752 rm -f conftest.er1
7753 cat conftest.err >&5
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); } >/dev/null; then
7756 if test -s conftest.err; then
7757 ac_cpp_err=$ac_c_preproc_warn_flag
7758 else
7759 ac_cpp_err=
7760 fi
7761else
7762 ac_cpp_err=yes
7114fi 7763fi
7115echo "$as_me:7115: result: $ac_cv_have_decl_tcsendbreak" >&5 7764if test -z "$ac_cpp_err"; then
7116echo "${ECHO_T}$ac_cv_have_decl_tcsendbreak" >&6 7765 ac_header_preproc=yes
7117if test $ac_cv_have_decl_tcsendbreak = yes; then 7766else
7118 cat >>confdefs.h <<\EOF 7767 echo "$as_me: failed program was:" >&5
7119#define HAVE_TCSENDBREAK 1 7768sed 's/^/| /' conftest.$ac_ext >&5
7120EOF
7121 7769
7770 ac_header_preproc=no
7771fi
7772rm -f conftest.err conftest.$ac_ext
7773echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7774echo "${ECHO_T}$ac_header_preproc" >&6
7775
7776# So? What about this header?
7777case $ac_header_compiler:$ac_header_preproc in
7778 yes:no )
7779 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7780echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7781 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7782echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7783 (
7784 cat <<\_ASBOX
7785## ------------------------------------ ##
7786## Report this to bug-autoconf@gnu.org. ##
7787## ------------------------------------ ##
7788_ASBOX
7789 ) |
7790 sed "s/^/$as_me: WARNING: /" >&2
7791 ;;
7792 no:yes )
7793 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7794echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7795 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7796echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7797 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7798echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7799 (
7800 cat <<\_ASBOX
7801## ------------------------------------ ##
7802## Report this to bug-autoconf@gnu.org. ##
7803## ------------------------------------ ##
7804_ASBOX
7805 ) |
7806 sed "s/^/$as_me: WARNING: /" >&2
7807 ;;
7808esac
7809echo "$as_me:$LINENO: checking for $ac_header" >&5
7810echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7811if eval "test \"\${$as_ac_Header+set}\" = set"; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
7122else 7813else
7814 eval "$as_ac_Header=$ac_header_preproc"
7815fi
7816echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7817echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7123 7818
7124for ac_func in tcsendbreak 7819fi
7125do 7820if test `eval echo '${'$as_ac_Header'}'` = yes; then
7126as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 7821 cat >>confdefs.h <<_ACEOF
7127echo "$as_me:7127: checking for $ac_func" >&5 7822#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7128echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 7823_ACEOF
7129if eval "test \"\${$as_ac_var+set}\" = set"; then 7824
7825fi
7826
7827done
7828
7829else
7830
7831 echo "$as_me:$LINENO: checking for dirname in -lgen" >&5
7832echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6
7833if test "${ac_cv_lib_gen_dirname+set}" = set; then
7130 echo $ECHO_N "(cached) $ECHO_C" >&6 7834 echo $ECHO_N "(cached) $ECHO_C" >&6
7131else 7835else
7132 cat >conftest.$ac_ext <<_ACEOF 7836 ac_check_lib_save_LIBS=$LIBS
7133#line 7133 "configure" 7837LIBS="-lgen $LIBS"
7134#include "confdefs.h" 7838cat >conftest.$ac_ext <<_ACEOF
7135/* System header to define __stub macros and hopefully few prototypes, 7839#line $LINENO "configure"
7136 which can conflict with char $ac_func (); below. */ 7840/* confdefs.h. */
7137#include <assert.h> 7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
7845
7138/* Override any gcc2 internal prototype to avoid an error. */ 7846/* Override any gcc2 internal prototype to avoid an error. */
7139#ifdef __cplusplus 7847#ifdef __cplusplus
7140extern "C" 7848extern "C"
7141#endif 7849#endif
7142/* We use char because int might match the return type of a gcc2 7850/* We use char because int might match the return type of a gcc2
7143 builtin and then its argument prototype would still apply. */ 7851 builtin and then its argument prototype would still apply. */
7144char $ac_func (); 7852char dirname ();
7145char (*f) ();
7146
7147int 7853int
7148main () 7854main ()
7149{ 7855{
7150/* The GNU C library defines this for functions which it implements 7856dirname ();
7151 to always fail with ENOSYS. Some functions are actually named
7152 something starting with __ and the normal name is an alias. */
7153#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7154choke me
7155#else
7156f = $ac_func;
7157#endif
7158
7159 ; 7857 ;
7160 return 0; 7858 return 0;
7161} 7859}
7162_ACEOF 7860_ACEOF
7163rm -f conftest.$ac_objext conftest$ac_exeext 7861rm -f conftest.$ac_objext conftest$ac_exeext
7164if { (eval echo "$as_me:7164: \"$ac_link\"") >&5 7862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7165 (eval $ac_link) 2>&5 7863 (eval $ac_link) 2>&5
7166 ac_status=$? 7864 ac_status=$?
7167 echo "$as_me:7167: \$? = $ac_status" >&5 7865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7168 (exit $ac_status); } && 7866 (exit $ac_status); } &&
7169 { ac_try='test -s conftest$ac_exeext' 7867 { ac_try='test -s conftest$ac_exeext'
7170 { (eval echo "$as_me:7170: \"$ac_try\"") >&5 7868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7171 (eval $ac_try) 2>&5 7869 (eval $ac_try) 2>&5
7172 ac_status=$? 7870 ac_status=$?
7173 echo "$as_me:7173: \$? = $ac_status" >&5 7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7174 (exit $ac_status); }; }; then 7872 (exit $ac_status); }; }; then
7175 eval "$as_ac_var=yes" 7873 ac_cv_lib_gen_dirname=yes
7176else 7874else
7177 echo "$as_me: failed program was:" >&5 7875 echo "$as_me: failed program was:" >&5
7178cat conftest.$ac_ext >&5 7876sed 's/^/| /' conftest.$ac_ext >&5
7179eval "$as_ac_var=no" 7877
7878ac_cv_lib_gen_dirname=no
7180fi 7879fi
7181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 7880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7881LIBS=$ac_check_lib_save_LIBS
7182fi 7882fi
7183echo "$as_me:7183: result: `eval echo '${'$as_ac_var'}'`" >&5 7883echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5
7184echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 7884echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6
7185if test `eval echo '${'$as_ac_var'}'` = yes; then 7885if test $ac_cv_lib_gen_dirname = yes; then
7186 cat >>confdefs.h <<EOF 7886
7187#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7887 echo "$as_me:$LINENO: checking for broken dirname" >&5
7188EOF 7888echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6
7889if test "${ac_cv_have_broken_dirname+set}" = set; then
7890 echo $ECHO_N "(cached) $ECHO_C" >&6
7891else
7892
7893 save_LIBS="$LIBS"
7894 LIBS="$LIBS -lgen"
7895 if test "$cross_compiling" = yes; then
7896 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7897See \`config.log' for more details." >&5
7898echo "$as_me: error: cannot run test program while cross compiling
7899See \`config.log' for more details." >&2;}
7900 { (exit 1); exit 1; }; }
7901else
7902 cat >conftest.$ac_ext <<_ACEOF
7903#line $LINENO "configure"
7904/* confdefs.h. */
7905_ACEOF
7906cat confdefs.h >>conftest.$ac_ext
7907cat >>conftest.$ac_ext <<_ACEOF
7908/* end confdefs.h. */
7909
7910#include <libgen.h>
7911#include <string.h>
7912
7913int main(int argc, char **argv) {
7914 char *s, buf[32];
7915
7916 strncpy(buf,"/etc", 32);
7917 s = dirname(buf);
7918 if (!s || strncmp(s, "/", 32) != 0) {
7919 exit(1);
7920 } else {
7921 exit(0);
7922 }
7923}
7924
7925_ACEOF
7926rm -f conftest$ac_exeext
7927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7928 (eval $ac_link) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_cv_have_broken_dirname="no"
7938else
7939 echo "$as_me: program exited with status $ac_status" >&5
7940echo "$as_me: failed program was:" >&5
7941sed 's/^/| /' conftest.$ac_ext >&5
7942
7943( exit $ac_status )
7944 ac_cv_have_broken_dirname="yes"
7945
7946fi
7947rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7948fi
7949 LIBS="$save_LIBS"
7950
7951fi
7952echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5
7953echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6
7954 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
7955 LIBS="$LIBS -lgen"
7956 cat >>confdefs.h <<\_ACEOF
7957#define HAVE_DIRNAME 1
7958_ACEOF
7959
7960
7961for ac_header in libgen.h
7962do
7963as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7964if eval "test \"\${$as_ac_Header+set}\" = set"; then
7965 echo "$as_me:$LINENO: checking for $ac_header" >&5
7966echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7967if eval "test \"\${$as_ac_Header+set}\" = set"; then
7968 echo $ECHO_N "(cached) $ECHO_C" >&6
7969fi
7970echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7971echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7972else
7973 # Is the header compilable?
7974echo "$as_me:$LINENO: checking $ac_header usability" >&5
7975echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7976cat >conftest.$ac_ext <<_ACEOF
7977#line $LINENO "configure"
7978/* confdefs.h. */
7979_ACEOF
7980cat confdefs.h >>conftest.$ac_ext
7981cat >>conftest.$ac_ext <<_ACEOF
7982/* end confdefs.h. */
7983$ac_includes_default
7984#include <$ac_header>
7985_ACEOF
7986rm -f conftest.$ac_objext
7987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7988 (eval $ac_compile) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); } &&
7992 { ac_try='test -s conftest.$ac_objext'
7993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7994 (eval $ac_try) 2>&5
7995 ac_status=$?
7996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997 (exit $ac_status); }; }; then
7998 ac_header_compiler=yes
7999else
8000 echo "$as_me: failed program was:" >&5
8001sed 's/^/| /' conftest.$ac_ext >&5
8002
8003ac_header_compiler=no
8004fi
8005rm -f conftest.$ac_objext conftest.$ac_ext
8006echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8007echo "${ECHO_T}$ac_header_compiler" >&6
8008
8009# Is the header present?
8010echo "$as_me:$LINENO: checking $ac_header presence" >&5
8011echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8012cat >conftest.$ac_ext <<_ACEOF
8013#line $LINENO "configure"
8014/* confdefs.h. */
8015_ACEOF
8016cat confdefs.h >>conftest.$ac_ext
8017cat >>conftest.$ac_ext <<_ACEOF
8018/* end confdefs.h. */
8019#include <$ac_header>
8020_ACEOF
8021if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8022 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8023 ac_status=$?
8024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); } >/dev/null; then
8029 if test -s conftest.err; then
8030 ac_cpp_err=$ac_c_preproc_warn_flag
8031 else
8032 ac_cpp_err=
8033 fi
8034else
8035 ac_cpp_err=yes
8036fi
8037if test -z "$ac_cpp_err"; then
8038 ac_header_preproc=yes
8039else
8040 echo "$as_me: failed program was:" >&5
8041sed 's/^/| /' conftest.$ac_ext >&5
8042
8043 ac_header_preproc=no
8044fi
8045rm -f conftest.err conftest.$ac_ext
8046echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8047echo "${ECHO_T}$ac_header_preproc" >&6
8048
8049# So? What about this header?
8050case $ac_header_compiler:$ac_header_preproc in
8051 yes:no )
8052 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8053echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8054 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8055echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8056 (
8057 cat <<\_ASBOX
8058## ------------------------------------ ##
8059## Report this to bug-autoconf@gnu.org. ##
8060## ------------------------------------ ##
8061_ASBOX
8062 ) |
8063 sed "s/^/$as_me: WARNING: /" >&2
8064 ;;
8065 no:yes )
8066 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8067echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8068 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8069echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8070 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8071echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8072 (
8073 cat <<\_ASBOX
8074## ------------------------------------ ##
8075## Report this to bug-autoconf@gnu.org. ##
8076## ------------------------------------ ##
8077_ASBOX
8078 ) |
8079 sed "s/^/$as_me: WARNING: /" >&2
8080 ;;
8081esac
8082echo "$as_me:$LINENO: checking for $ac_header" >&5
8083echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8084if eval "test \"\${$as_ac_Header+set}\" = set"; then
8085 echo $ECHO_N "(cached) $ECHO_C" >&6
8086else
8087 eval "$as_ac_Header=$ac_header_preproc"
8088fi
8089echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8090echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7189 8091
7190fi 8092fi
8093if test `eval echo '${'$as_ac_Header'}'` = yes; then
8094 cat >>confdefs.h <<_ACEOF
8095#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8096_ACEOF
8097
8098fi
8099
7191done 8100done
7192 8101
8102 fi
8103
7193fi 8104fi
7194 8105
8106
8107fi
8108done
8109
8110
8111
8112
7195for ac_func in gettimeofday time 8113for ac_func in gettimeofday time
7196do 8114do
7197as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8115as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7198echo "$as_me:7198: checking for $ac_func" >&5 8116echo "$as_me:$LINENO: checking for $ac_func" >&5
7199echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 8117echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7200if eval "test \"\${$as_ac_var+set}\" = set"; then 8118if eval "test \"\${$as_ac_var+set}\" = set"; then
7201 echo $ECHO_N "(cached) $ECHO_C" >&6 8119 echo $ECHO_N "(cached) $ECHO_C" >&6
7202else 8120else
7203 cat >conftest.$ac_ext <<_ACEOF 8121 cat >conftest.$ac_ext <<_ACEOF
7204#line 7204 "configure" 8122#line $LINENO "configure"
7205#include "confdefs.h" 8123/* confdefs.h. */
8124_ACEOF
8125cat confdefs.h >>conftest.$ac_ext
8126cat >>conftest.$ac_ext <<_ACEOF
8127/* end confdefs.h. */
7206/* System header to define __stub macros and hopefully few prototypes, 8128/* System header to define __stub macros and hopefully few prototypes,
7207 which can conflict with char $ac_func (); below. */ 8129 which can conflict with char $ac_func (); below.
7208#include <assert.h> 8130 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8131 <limits.h> exists even on freestanding compilers. */
8132#ifdef __STDC__
8133# include <limits.h>
8134#else
8135# include <assert.h>
8136#endif
7209/* Override any gcc2 internal prototype to avoid an error. */ 8137/* Override any gcc2 internal prototype to avoid an error. */
7210#ifdef __cplusplus 8138#ifdef __cplusplus
7211extern "C" 8139extern "C"
8140{
7212#endif 8141#endif
7213/* We use char because int might match the return type of a gcc2 8142/* We use char because int might match the return type of a gcc2
7214 builtin and then its argument prototype would still apply. */ 8143 builtin and then its argument prototype would still apply. */
7215char $ac_func (); 8144char $ac_func ();
7216char (*f) ();
7217
7218int
7219main ()
7220{
7221/* The GNU C library defines this for functions which it implements 8145/* The GNU C library defines this for functions which it implements
7222 to always fail with ENOSYS. Some functions are actually named 8146 to always fail with ENOSYS. Some functions are actually named
7223 something starting with __ and the normal name is an alias. */ 8147 something starting with __ and the normal name is an alias. */
7224#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 8148#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7225choke me 8149choke me
7226#else 8150#else
7227f = $ac_func; 8151char (*f) () = $ac_func;
8152#endif
8153#ifdef __cplusplus
8154}
7228#endif 8155#endif
7229 8156
8157int
8158main ()
8159{
8160return f != $ac_func;
7230 ; 8161 ;
7231 return 0; 8162 return 0;
7232} 8163}
7233_ACEOF 8164_ACEOF
7234rm -f conftest.$ac_objext conftest$ac_exeext 8165rm -f conftest.$ac_objext conftest$ac_exeext
7235if { (eval echo "$as_me:7235: \"$ac_link\"") >&5 8166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7236 (eval $ac_link) 2>&5 8167 (eval $ac_link) 2>&5
7237 ac_status=$? 8168 ac_status=$?
7238 echo "$as_me:7238: \$? = $ac_status" >&5 8169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7239 (exit $ac_status); } && 8170 (exit $ac_status); } &&
7240 { ac_try='test -s conftest$ac_exeext' 8171 { ac_try='test -s conftest$ac_exeext'
7241 { (eval echo "$as_me:7241: \"$ac_try\"") >&5 8172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7242 (eval $ac_try) 2>&5 8173 (eval $ac_try) 2>&5
7243 ac_status=$? 8174 ac_status=$?
7244 echo "$as_me:7244: \$? = $ac_status" >&5 8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7245 (exit $ac_status); }; }; then 8176 (exit $ac_status); }; }; then
7246 eval "$as_ac_var=yes" 8177 eval "$as_ac_var=yes"
7247else 8178else
7248 echo "$as_me: failed program was:" >&5 8179 echo "$as_me: failed program was:" >&5
7249cat conftest.$ac_ext >&5 8180sed 's/^/| /' conftest.$ac_ext >&5
8181
7250eval "$as_ac_var=no" 8182eval "$as_ac_var=no"
7251fi 8183fi
7252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7253fi 8185fi
7254echo "$as_me:7254: result: `eval echo '${'$as_ac_var'}'`" >&5 8186echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7255echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 8187echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7256if test `eval echo '${'$as_ac_var'}'` = yes; then 8188if test `eval echo '${'$as_ac_var'}'` = yes; then
7257 cat >>confdefs.h <<EOF 8189 cat >>confdefs.h <<_ACEOF
7258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8190#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7259EOF 8191_ACEOF
7260 8192
7261fi 8193fi
7262done 8194done
7263 8195
8196
8197
8198
8199
8200
8201
7264for ac_func in endutent getutent getutid getutline pututline setutent 8202for ac_func in endutent getutent getutid getutline pututline setutent
7265do 8203do
7266as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8204as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7267echo "$as_me:7267: checking for $ac_func" >&5 8205echo "$as_me:$LINENO: checking for $ac_func" >&5
7268echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 8206echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7269if eval "test \"\${$as_ac_var+set}\" = set"; then 8207if eval "test \"\${$as_ac_var+set}\" = set"; then
7270 echo $ECHO_N "(cached) $ECHO_C" >&6 8208 echo $ECHO_N "(cached) $ECHO_C" >&6
7271else 8209else
7272 cat >conftest.$ac_ext <<_ACEOF 8210 cat >conftest.$ac_ext <<_ACEOF
7273#line 7273 "configure" 8211#line $LINENO "configure"
7274#include "confdefs.h" 8212/* confdefs.h. */
8213_ACEOF
8214cat confdefs.h >>conftest.$ac_ext
8215cat >>conftest.$ac_ext <<_ACEOF
8216/* end confdefs.h. */
7275/* System header to define __stub macros and hopefully few prototypes, 8217/* System header to define __stub macros and hopefully few prototypes,
7276 which can conflict with char $ac_func (); below. */ 8218 which can conflict with char $ac_func (); below.
7277#include <assert.h> 8219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8220 <limits.h> exists even on freestanding compilers. */
8221#ifdef __STDC__
8222# include <limits.h>
8223#else
8224# include <assert.h>
8225#endif
7278/* Override any gcc2 internal prototype to avoid an error. */ 8226/* Override any gcc2 internal prototype to avoid an error. */
7279#ifdef __cplusplus 8227#ifdef __cplusplus
7280extern "C" 8228extern "C"
8229{
7281#endif 8230#endif
7282/* We use char because int might match the return type of a gcc2 8231/* We use char because int might match the return type of a gcc2
7283 builtin and then its argument prototype would still apply. */ 8232 builtin and then its argument prototype would still apply. */
7284char $ac_func (); 8233char $ac_func ();
7285char (*f) ();
7286
7287int
7288main ()
7289{
7290/* The GNU C library defines this for functions which it implements 8234/* The GNU C library defines this for functions which it implements
7291 to always fail with ENOSYS. Some functions are actually named 8235 to always fail with ENOSYS. Some functions are actually named
7292 something starting with __ and the normal name is an alias. */ 8236 something starting with __ and the normal name is an alias. */
7293#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 8237#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7294choke me 8238choke me
7295#else 8239#else
7296f = $ac_func; 8240char (*f) () = $ac_func;
8241#endif
8242#ifdef __cplusplus
8243}
7297#endif 8244#endif
7298 8245
8246int
8247main ()
8248{
8249return f != $ac_func;
7299 ; 8250 ;
7300 return 0; 8251 return 0;
7301} 8252}
7302_ACEOF 8253_ACEOF
7303rm -f conftest.$ac_objext conftest$ac_exeext 8254rm -f conftest.$ac_objext conftest$ac_exeext
7304if { (eval echo "$as_me:7304: \"$ac_link\"") >&5 8255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7305 (eval $ac_link) 2>&5 8256 (eval $ac_link) 2>&5
7306 ac_status=$? 8257 ac_status=$?
7307 echo "$as_me:7307: \$? = $ac_status" >&5 8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308 (exit $ac_status); } && 8259 (exit $ac_status); } &&
7309 { ac_try='test -s conftest$ac_exeext' 8260 { ac_try='test -s conftest$ac_exeext'
7310 { (eval echo "$as_me:7310: \"$ac_try\"") >&5 8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7311 (eval $ac_try) 2>&5 8262 (eval $ac_try) 2>&5
7312 ac_status=$? 8263 ac_status=$?
7313 echo "$as_me:7313: \$? = $ac_status" >&5 8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7314 (exit $ac_status); }; }; then 8265 (exit $ac_status); }; }; then
7315 eval "$as_ac_var=yes" 8266 eval "$as_ac_var=yes"
7316else 8267else
7317 echo "$as_me: failed program was:" >&5 8268 echo "$as_me: failed program was:" >&5
7318cat conftest.$ac_ext >&5 8269sed 's/^/| /' conftest.$ac_ext >&5
8270
7319eval "$as_ac_var=no" 8271eval "$as_ac_var=no"
7320fi 8272fi
7321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7322fi 8274fi
7323echo "$as_me:7323: result: `eval echo '${'$as_ac_var'}'`" >&5 8275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7324echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 8276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7325if test `eval echo '${'$as_ac_var'}'` = yes; then 8277if test `eval echo '${'$as_ac_var'}'` = yes; then
7326 cat >>confdefs.h <<EOF 8278 cat >>confdefs.h <<_ACEOF
7327#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7328EOF 8280_ACEOF
7329 8281
7330fi 8282fi
7331done 8283done
7332 8284
8285
7333for ac_func in utmpname 8286for ac_func in utmpname
7334do 8287do
7335as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7336echo "$as_me:7336: checking for $ac_func" >&5 8289echo "$as_me:$LINENO: checking for $ac_func" >&5
7337echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 8290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7338if eval "test \"\${$as_ac_var+set}\" = set"; then 8291if eval "test \"\${$as_ac_var+set}\" = set"; then
7339 echo $ECHO_N "(cached) $ECHO_C" >&6 8292 echo $ECHO_N "(cached) $ECHO_C" >&6
7340else 8293else
7341 cat >conftest.$ac_ext <<_ACEOF 8294 cat >conftest.$ac_ext <<_ACEOF
7342#line 7342 "configure" 8295#line $LINENO "configure"
7343#include "confdefs.h" 8296/* confdefs.h. */
8297_ACEOF
8298cat confdefs.h >>conftest.$ac_ext
8299cat >>conftest.$ac_ext <<_ACEOF
8300/* end confdefs.h. */
7344/* System header to define __stub macros and hopefully few prototypes, 8301/* System header to define __stub macros and hopefully few prototypes,
7345 which can conflict with char $ac_func (); below. */ 8302 which can conflict with char $ac_func (); below.
7346#include <assert.h> 8303 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8304 <limits.h> exists even on freestanding compilers. */
8305#ifdef __STDC__
8306# include <limits.h>
8307#else
8308# include <assert.h>
8309#endif
7347/* Override any gcc2 internal prototype to avoid an error. */ 8310/* Override any gcc2 internal prototype to avoid an error. */
7348#ifdef __cplusplus 8311#ifdef __cplusplus
7349extern "C" 8312extern "C"
8313{
7350#endif 8314#endif
7351/* We use char because int might match the return type of a gcc2 8315/* We use char because int might match the return type of a gcc2
7352 builtin and then its argument prototype would still apply. */ 8316 builtin and then its argument prototype would still apply. */
7353char $ac_func (); 8317char $ac_func ();
7354char (*f) ();
7355
7356int
7357main ()
7358{
7359/* The GNU C library defines this for functions which it implements 8318/* The GNU C library defines this for functions which it implements
7360 to always fail with ENOSYS. Some functions are actually named 8319 to always fail with ENOSYS. Some functions are actually named
7361 something starting with __ and the normal name is an alias. */ 8320 something starting with __ and the normal name is an alias. */
7362#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 8321#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7363choke me 8322choke me
7364#else 8323#else
7365f = $ac_func; 8324char (*f) () = $ac_func;
8325#endif
8326#ifdef __cplusplus
8327}
7366#endif 8328#endif
7367 8329
8330int
8331main ()
8332{
8333return f != $ac_func;
7368 ; 8334 ;
7369 return 0; 8335 return 0;
7370} 8336}
7371_ACEOF 8337_ACEOF
7372rm -f conftest.$ac_objext conftest$ac_exeext 8338rm -f conftest.$ac_objext conftest$ac_exeext
7373if { (eval echo "$as_me:7373: \"$ac_link\"") >&5 8339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7374 (eval $ac_link) 2>&5 8340 (eval $ac_link) 2>&5
7375 ac_status=$? 8341 ac_status=$?
7376 echo "$as_me:7376: \$? = $ac_status" >&5 8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); } && 8343 (exit $ac_status); } &&
7378 { ac_try='test -s conftest$ac_exeext' 8344 { ac_try='test -s conftest$ac_exeext'
7379 { (eval echo "$as_me:7379: \"$ac_try\"") >&5 8345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7380 (eval $ac_try) 2>&5 8346 (eval $ac_try) 2>&5
7381 ac_status=$? 8347 ac_status=$?
7382 echo "$as_me:7382: \$? = $ac_status" >&5 8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7383 (exit $ac_status); }; }; then 8349 (exit $ac_status); }; }; then
7384 eval "$as_ac_var=yes" 8350 eval "$as_ac_var=yes"
7385else 8351else
7386 echo "$as_me: failed program was:" >&5 8352 echo "$as_me: failed program was:" >&5
7387cat conftest.$ac_ext >&5 8353sed 's/^/| /' conftest.$ac_ext >&5
8354
7388eval "$as_ac_var=no" 8355eval "$as_ac_var=no"
7389fi 8356fi
7390rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8357rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7391fi 8358fi
7392echo "$as_me:7392: result: `eval echo '${'$as_ac_var'}'`" >&5 8359echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7393echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 8360echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7394if test `eval echo '${'$as_ac_var'}'` = yes; then 8361if test `eval echo '${'$as_ac_var'}'` = yes; then
7395 cat >>confdefs.h <<EOF 8362 cat >>confdefs.h <<_ACEOF
7396#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7397EOF 8364_ACEOF
7398 8365
7399fi 8366fi
7400done 8367done
7401 8368
8369
8370
8371
8372
8373
7402for ac_func in endutxent getutxent getutxid getutxline pututxline 8374for ac_func in endutxent getutxent getutxid getutxline pututxline
7403do 8375do
7404as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7405echo "$as_me:7405: checking for $ac_func" >&5 8377echo "$as_me:$LINENO: checking for $ac_func" >&5
7406echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 8378echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7407if eval "test \"\${$as_ac_var+set}\" = set"; then 8379if eval "test \"\${$as_ac_var+set}\" = set"; then
7408 echo $ECHO_N "(cached) $ECHO_C" >&6 8380 echo $ECHO_N "(cached) $ECHO_C" >&6
7409else 8381else
7410 cat >conftest.$ac_ext <<_ACEOF 8382 cat >conftest.$ac_ext <<_ACEOF
7411#line 7411 "configure" 8383#line $LINENO "configure"
7412#include "confdefs.h" 8384/* confdefs.h. */
8385_ACEOF
8386cat confdefs.h >>conftest.$ac_ext
8387cat >>conftest.$ac_ext <<_ACEOF
8388/* end confdefs.h. */
7413/* System header to define __stub macros and hopefully few prototypes, 8389/* System header to define __stub macros and hopefully few prototypes,
7414 which can conflict with char $ac_func (); below. */ 8390 which can conflict with char $ac_func (); below.
7415#include <assert.h> 8391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8392 <limits.h> exists even on freestanding compilers. */
8393#ifdef __STDC__
8394# include <limits.h>
8395#else
8396# include <assert.h>
8397#endif
7416/* Override any gcc2 internal prototype to avoid an error. */ 8398/* Override any gcc2 internal prototype to avoid an error. */
7417#ifdef __cplusplus 8399#ifdef __cplusplus
7418extern "C" 8400extern "C"
8401{
7419#endif 8402#endif
7420/* We use char because int might match the return type of a gcc2 8403/* We use char because int might match the return type of a gcc2
7421 builtin and then its argument prototype would still apply. */ 8404 builtin and then its argument prototype would still apply. */
7422char $ac_func (); 8405char $ac_func ();
7423char (*f) ();
7424
7425int
7426main ()
7427{
7428/* The GNU C library defines this for functions which it implements 8406/* The GNU C library defines this for functions which it implements
7429 to always fail with ENOSYS. Some functions are actually named 8407 to always fail with ENOSYS. Some functions are actually named
7430 something starting with __ and the normal name is an alias. */ 8408 something starting with __ and the normal name is an alias. */
7431#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 8409#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7432choke me 8410choke me
7433#else 8411#else
7434f = $ac_func; 8412char (*f) () = $ac_func;
8413#endif
8414#ifdef __cplusplus
8415}
7435#endif 8416#endif
7436 8417
8418int
8419main ()
8420{
8421return f != $ac_func;
7437 ; 8422 ;
7438 return 0; 8423 return 0;
7439} 8424}
7440_ACEOF 8425_ACEOF
7441rm -f conftest.$ac_objext conftest$ac_exeext 8426rm -f conftest.$ac_objext conftest$ac_exeext
7442if { (eval echo "$as_me:7442: \"$ac_link\"") >&5 8427if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7443 (eval $ac_link) 2>&5 8428 (eval $ac_link) 2>&5
7444 ac_status=$? 8429 ac_status=$?
7445 echo "$as_me:7445: \$? = $ac_status" >&5 8430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446 (exit $ac_status); } && 8431 (exit $ac_status); } &&
7447 { ac_try='test -s conftest$ac_exeext' 8432 { ac_try='test -s conftest$ac_exeext'
7448 { (eval echo "$as_me:7448: \"$ac_try\"") >&5 8433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7449 (eval $ac_try) 2>&5 8434 (eval $ac_try) 2>&5
7450 ac_status=$? 8435 ac_status=$?
7451 echo "$as_me:7451: \$? = $ac_status" >&5 8436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7452 (exit $ac_status); }; }; then 8437 (exit $ac_status); }; }; then
7453 eval "$as_ac_var=yes" 8438 eval "$as_ac_var=yes"
7454else 8439else
7455 echo "$as_me: failed program was:" >&5 8440 echo "$as_me: failed program was:" >&5
7456cat conftest.$ac_ext >&5 8441sed 's/^/| /' conftest.$ac_ext >&5
8442
7457eval "$as_ac_var=no" 8443eval "$as_ac_var=no"
7458fi 8444fi
7459rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8445rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7460fi 8446fi
7461echo "$as_me:7461: result: `eval echo '${'$as_ac_var'}'`" >&5 8447echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7462echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 8448echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7463if test `eval echo '${'$as_ac_var'}'` = yes; then 8449if test `eval echo '${'$as_ac_var'}'` = yes; then
7464 cat >>confdefs.h <<EOF 8450 cat >>confdefs.h <<_ACEOF
7465#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8451#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7466EOF 8452_ACEOF
7467 8453
7468fi 8454fi
7469done 8455done
7470 8456
8457
8458
7471for ac_func in setutxent utmpxname 8459for ac_func in setutxent utmpxname
7472do 8460do
7473as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8461as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7474echo "$as_me:7474: checking for $ac_func" >&5 8462echo "$as_me:$LINENO: checking for $ac_func" >&5
7475echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 8463echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7476if eval "test \"\${$as_ac_var+set}\" = set"; then 8464if eval "test \"\${$as_ac_var+set}\" = set"; then
7477 echo $ECHO_N "(cached) $ECHO_C" >&6 8465 echo $ECHO_N "(cached) $ECHO_C" >&6
7478else 8466else
7479 cat >conftest.$ac_ext <<_ACEOF 8467 cat >conftest.$ac_ext <<_ACEOF
7480#line 7480 "configure" 8468#line $LINENO "configure"
7481#include "confdefs.h" 8469/* confdefs.h. */
8470_ACEOF
8471cat confdefs.h >>conftest.$ac_ext
8472cat >>conftest.$ac_ext <<_ACEOF
8473/* end confdefs.h. */
7482/* System header to define __stub macros and hopefully few prototypes, 8474/* System header to define __stub macros and hopefully few prototypes,
7483 which can conflict with char $ac_func (); below. */ 8475 which can conflict with char $ac_func (); below.
7484#include <assert.h> 8476 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8477 <limits.h> exists even on freestanding compilers. */
8478#ifdef __STDC__
8479# include <limits.h>
8480#else
8481# include <assert.h>
8482#endif
7485/* Override any gcc2 internal prototype to avoid an error. */ 8483/* Override any gcc2 internal prototype to avoid an error. */
7486#ifdef __cplusplus 8484#ifdef __cplusplus
7487extern "C" 8485extern "C"
8486{
7488#endif 8487#endif
7489/* We use char because int might match the return type of a gcc2 8488/* We use char because int might match the return type of a gcc2
7490 builtin and then its argument prototype would still apply. */ 8489 builtin and then its argument prototype would still apply. */
7491char $ac_func (); 8490char $ac_func ();
7492char (*f) ();
7493
7494int
7495main ()
7496{
7497/* The GNU C library defines this for functions which it implements 8491/* The GNU C library defines this for functions which it implements
7498 to always fail with ENOSYS. Some functions are actually named 8492 to always fail with ENOSYS. Some functions are actually named
7499 something starting with __ and the normal name is an alias. */ 8493 something starting with __ and the normal name is an alias. */
7500#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 8494#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7501choke me 8495choke me
7502#else 8496#else
7503f = $ac_func; 8497char (*f) () = $ac_func;
8498#endif
8499#ifdef __cplusplus
8500}
7504#endif 8501#endif
7505 8502
8503int
8504main ()
8505{
8506return f != $ac_func;
7506 ; 8507 ;
7507 return 0; 8508 return 0;
7508} 8509}
7509_ACEOF 8510_ACEOF
7510rm -f conftest.$ac_objext conftest$ac_exeext 8511rm -f conftest.$ac_objext conftest$ac_exeext
7511if { (eval echo "$as_me:7511: \"$ac_link\"") >&5 8512if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7512 (eval $ac_link) 2>&5 8513 (eval $ac_link) 2>&5
7513 ac_status=$? 8514 ac_status=$?
7514 echo "$as_me:7514: \$? = $ac_status" >&5 8515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515 (exit $ac_status); } && 8516 (exit $ac_status); } &&
7516 { ac_try='test -s conftest$ac_exeext' 8517 { ac_try='test -s conftest$ac_exeext'
7517 { (eval echo "$as_me:7517: \"$ac_try\"") >&5 8518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7518 (eval $ac_try) 2>&5 8519 (eval $ac_try) 2>&5
7519 ac_status=$? 8520 ac_status=$?
7520 echo "$as_me:7520: \$? = $ac_status" >&5 8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7521 (exit $ac_status); }; }; then 8522 (exit $ac_status); }; }; then
7522 eval "$as_ac_var=yes" 8523 eval "$as_ac_var=yes"
7523else 8524else
7524 echo "$as_me: failed program was:" >&5 8525 echo "$as_me: failed program was:" >&5
7525cat conftest.$ac_ext >&5 8526sed 's/^/| /' conftest.$ac_ext >&5
8527
7526eval "$as_ac_var=no" 8528eval "$as_ac_var=no"
7527fi 8529fi
7528rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8530rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7529fi 8531fi
7530echo "$as_me:7530: result: `eval echo '${'$as_ac_var'}'`" >&5 8532echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7531echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 8533echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7532if test `eval echo '${'$as_ac_var'}'` = yes; then 8534if test `eval echo '${'$as_ac_var'}'` = yes; then
7533 cat >>confdefs.h <<EOF 8535 cat >>confdefs.h <<_ACEOF
7534#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8536#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7535EOF 8537_ACEOF
7536 8538
7537fi 8539fi
7538done 8540done
7539 8541
7540echo "$as_me:7540: checking for daemon" >&5 8542
8543echo "$as_me:$LINENO: checking for daemon" >&5
7541echo $ECHO_N "checking for daemon... $ECHO_C" >&6 8544echo $ECHO_N "checking for daemon... $ECHO_C" >&6
7542if test "${ac_cv_func_daemon+set}" = set; then 8545if test "${ac_cv_func_daemon+set}" = set; then
7543 echo $ECHO_N "(cached) $ECHO_C" >&6 8546 echo $ECHO_N "(cached) $ECHO_C" >&6
7544else 8547else
7545 cat >conftest.$ac_ext <<_ACEOF 8548 cat >conftest.$ac_ext <<_ACEOF
7546#line 7546 "configure" 8549#line $LINENO "configure"
7547#include "confdefs.h" 8550/* confdefs.h. */
8551_ACEOF
8552cat confdefs.h >>conftest.$ac_ext
8553cat >>conftest.$ac_ext <<_ACEOF
8554/* end confdefs.h. */
7548/* System header to define __stub macros and hopefully few prototypes, 8555/* System header to define __stub macros and hopefully few prototypes,
7549 which can conflict with char daemon (); below. */ 8556 which can conflict with char daemon (); below.
7550#include <assert.h> 8557 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8558 <limits.h> exists even on freestanding compilers. */
8559#ifdef __STDC__
8560# include <limits.h>
8561#else
8562# include <assert.h>
8563#endif
7551/* Override any gcc2 internal prototype to avoid an error. */ 8564/* Override any gcc2 internal prototype to avoid an error. */
7552#ifdef __cplusplus 8565#ifdef __cplusplus
7553extern "C" 8566extern "C"
8567{
7554#endif 8568#endif
7555/* We use char because int might match the return type of a gcc2 8569/* We use char because int might match the return type of a gcc2
7556 builtin and then its argument prototype would still apply. */ 8570 builtin and then its argument prototype would still apply. */
7557char daemon (); 8571char daemon ();
7558char (*f) ();
7559
7560int
7561main ()
7562{
7563/* The GNU C library defines this for functions which it implements 8572/* The GNU C library defines this for functions which it implements
7564 to always fail with ENOSYS. Some functions are actually named 8573 to always fail with ENOSYS. Some functions are actually named
7565 something starting with __ and the normal name is an alias. */ 8574 something starting with __ and the normal name is an alias. */
7566#if defined (__stub_daemon) || defined (__stub___daemon) 8575#if defined (__stub_daemon) || defined (__stub___daemon)
7567choke me 8576choke me
7568#else 8577#else
7569f = daemon; 8578char (*f) () = daemon;
8579#endif
8580#ifdef __cplusplus
8581}
7570#endif 8582#endif
7571 8583
8584int
8585main ()
8586{
8587return f != daemon;
7572 ; 8588 ;
7573 return 0; 8589 return 0;
7574} 8590}
7575_ACEOF 8591_ACEOF
7576rm -f conftest.$ac_objext conftest$ac_exeext 8592rm -f conftest.$ac_objext conftest$ac_exeext
7577if { (eval echo "$as_me:7577: \"$ac_link\"") >&5 8593if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7578 (eval $ac_link) 2>&5 8594 (eval $ac_link) 2>&5
7579 ac_status=$? 8595 ac_status=$?
7580 echo "$as_me:7580: \$? = $ac_status" >&5 8596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7581 (exit $ac_status); } && 8597 (exit $ac_status); } &&
7582 { ac_try='test -s conftest$ac_exeext' 8598 { ac_try='test -s conftest$ac_exeext'
7583 { (eval echo "$as_me:7583: \"$ac_try\"") >&5 8599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7584 (eval $ac_try) 2>&5 8600 (eval $ac_try) 2>&5
7585 ac_status=$? 8601 ac_status=$?
7586 echo "$as_me:7586: \$? = $ac_status" >&5 8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7587 (exit $ac_status); }; }; then 8603 (exit $ac_status); }; }; then
7588 ac_cv_func_daemon=yes 8604 ac_cv_func_daemon=yes
7589else 8605else
7590 echo "$as_me: failed program was:" >&5 8606 echo "$as_me: failed program was:" >&5
7591cat conftest.$ac_ext >&5 8607sed 's/^/| /' conftest.$ac_ext >&5
8608
7592ac_cv_func_daemon=no 8609ac_cv_func_daemon=no
7593fi 8610fi
7594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8611rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7595fi 8612fi
7596echo "$as_me:7596: result: $ac_cv_func_daemon" >&5 8613echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
7597echo "${ECHO_T}$ac_cv_func_daemon" >&6 8614echo "${ECHO_T}$ac_cv_func_daemon" >&6
7598if test $ac_cv_func_daemon = yes; then 8615if test $ac_cv_func_daemon = yes; then
7599 cat >>confdefs.h <<\EOF 8616 cat >>confdefs.h <<\_ACEOF
7600#define HAVE_DAEMON 1 8617#define HAVE_DAEMON 1
7601EOF 8618_ACEOF
7602 8619
7603else 8620else
7604 echo "$as_me:7604: checking for daemon in -lbsd" >&5 8621 echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5
7605echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6 8622echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6
7606if test "${ac_cv_lib_bsd_daemon+set}" = set; then 8623if test "${ac_cv_lib_bsd_daemon+set}" = set; then
7607 echo $ECHO_N "(cached) $ECHO_C" >&6 8624 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7609,8 +8626,12 @@ else
7609 ac_check_lib_save_LIBS=$LIBS 8626 ac_check_lib_save_LIBS=$LIBS
7610LIBS="-lbsd $LIBS" 8627LIBS="-lbsd $LIBS"
7611cat >conftest.$ac_ext <<_ACEOF 8628cat >conftest.$ac_ext <<_ACEOF
7612#line 7612 "configure" 8629#line $LINENO "configure"
7613#include "confdefs.h" 8630/* confdefs.h. */
8631_ACEOF
8632cat confdefs.h >>conftest.$ac_ext
8633cat >>conftest.$ac_ext <<_ACEOF
8634/* end confdefs.h. */
7614 8635
7615/* Override any gcc2 internal prototype to avoid an error. */ 8636/* Override any gcc2 internal prototype to avoid an error. */
7616#ifdef __cplusplus 8637#ifdef __cplusplus
@@ -7628,102 +8649,119 @@ daemon ();
7628} 8649}
7629_ACEOF 8650_ACEOF
7630rm -f conftest.$ac_objext conftest$ac_exeext 8651rm -f conftest.$ac_objext conftest$ac_exeext
7631if { (eval echo "$as_me:7631: \"$ac_link\"") >&5 8652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7632 (eval $ac_link) 2>&5 8653 (eval $ac_link) 2>&5
7633 ac_status=$? 8654 ac_status=$?
7634 echo "$as_me:7634: \$? = $ac_status" >&5 8655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7635 (exit $ac_status); } && 8656 (exit $ac_status); } &&
7636 { ac_try='test -s conftest$ac_exeext' 8657 { ac_try='test -s conftest$ac_exeext'
7637 { (eval echo "$as_me:7637: \"$ac_try\"") >&5 8658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7638 (eval $ac_try) 2>&5 8659 (eval $ac_try) 2>&5
7639 ac_status=$? 8660 ac_status=$?
7640 echo "$as_me:7640: \$? = $ac_status" >&5 8661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7641 (exit $ac_status); }; }; then 8662 (exit $ac_status); }; }; then
7642 ac_cv_lib_bsd_daemon=yes 8663 ac_cv_lib_bsd_daemon=yes
7643else 8664else
7644 echo "$as_me: failed program was:" >&5 8665 echo "$as_me: failed program was:" >&5
7645cat conftest.$ac_ext >&5 8666sed 's/^/| /' conftest.$ac_ext >&5
8667
7646ac_cv_lib_bsd_daemon=no 8668ac_cv_lib_bsd_daemon=no
7647fi 8669fi
7648rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7649LIBS=$ac_check_lib_save_LIBS 8671LIBS=$ac_check_lib_save_LIBS
7650fi 8672fi
7651echo "$as_me:7651: result: $ac_cv_lib_bsd_daemon" >&5 8673echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5
7652echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6 8674echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6
7653if test $ac_cv_lib_bsd_daemon = yes; then 8675if test $ac_cv_lib_bsd_daemon = yes; then
7654 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\EOF 8676 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF
7655#define HAVE_DAEMON 1 8677#define HAVE_DAEMON 1
7656EOF 8678_ACEOF
7657 8679
7658fi 8680fi
7659 8681
8682
7660fi 8683fi
7661 8684
7662echo "$as_me:7662: checking for getpagesize" >&5 8685
8686echo "$as_me:$LINENO: checking for getpagesize" >&5
7663echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6 8687echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
7664if test "${ac_cv_func_getpagesize+set}" = set; then 8688if test "${ac_cv_func_getpagesize+set}" = set; then
7665 echo $ECHO_N "(cached) $ECHO_C" >&6 8689 echo $ECHO_N "(cached) $ECHO_C" >&6
7666else 8690else
7667 cat >conftest.$ac_ext <<_ACEOF 8691 cat >conftest.$ac_ext <<_ACEOF
7668#line 7668 "configure" 8692#line $LINENO "configure"
7669#include "confdefs.h" 8693/* confdefs.h. */
8694_ACEOF
8695cat confdefs.h >>conftest.$ac_ext
8696cat >>conftest.$ac_ext <<_ACEOF
8697/* end confdefs.h. */
7670/* System header to define __stub macros and hopefully few prototypes, 8698/* System header to define __stub macros and hopefully few prototypes,
7671 which can conflict with char getpagesize (); below. */ 8699 which can conflict with char getpagesize (); below.
7672#include <assert.h> 8700 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8701 <limits.h> exists even on freestanding compilers. */
8702#ifdef __STDC__
8703# include <limits.h>
8704#else
8705# include <assert.h>
8706#endif
7673/* Override any gcc2 internal prototype to avoid an error. */ 8707/* Override any gcc2 internal prototype to avoid an error. */
7674#ifdef __cplusplus 8708#ifdef __cplusplus
7675extern "C" 8709extern "C"
8710{
7676#endif 8711#endif
7677/* We use char because int might match the return type of a gcc2 8712/* We use char because int might match the return type of a gcc2
7678 builtin and then its argument prototype would still apply. */ 8713 builtin and then its argument prototype would still apply. */
7679char getpagesize (); 8714char getpagesize ();
7680char (*f) ();
7681
7682int
7683main ()
7684{
7685/* The GNU C library defines this for functions which it implements 8715/* The GNU C library defines this for functions which it implements
7686 to always fail with ENOSYS. Some functions are actually named 8716 to always fail with ENOSYS. Some functions are actually named
7687 something starting with __ and the normal name is an alias. */ 8717 something starting with __ and the normal name is an alias. */
7688#if defined (__stub_getpagesize) || defined (__stub___getpagesize) 8718#if defined (__stub_getpagesize) || defined (__stub___getpagesize)
7689choke me 8719choke me
7690#else 8720#else
7691f = getpagesize; 8721char (*f) () = getpagesize;
8722#endif
8723#ifdef __cplusplus
8724}
7692#endif 8725#endif
7693 8726
8727int
8728main ()
8729{
8730return f != getpagesize;
7694 ; 8731 ;
7695 return 0; 8732 return 0;
7696} 8733}
7697_ACEOF 8734_ACEOF
7698rm -f conftest.$ac_objext conftest$ac_exeext 8735rm -f conftest.$ac_objext conftest$ac_exeext
7699if { (eval echo "$as_me:7699: \"$ac_link\"") >&5 8736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7700 (eval $ac_link) 2>&5 8737 (eval $ac_link) 2>&5
7701 ac_status=$? 8738 ac_status=$?
7702 echo "$as_me:7702: \$? = $ac_status" >&5 8739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7703 (exit $ac_status); } && 8740 (exit $ac_status); } &&
7704 { ac_try='test -s conftest$ac_exeext' 8741 { ac_try='test -s conftest$ac_exeext'
7705 { (eval echo "$as_me:7705: \"$ac_try\"") >&5 8742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7706 (eval $ac_try) 2>&5 8743 (eval $ac_try) 2>&5
7707 ac_status=$? 8744 ac_status=$?
7708 echo "$as_me:7708: \$? = $ac_status" >&5 8745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7709 (exit $ac_status); }; }; then 8746 (exit $ac_status); }; }; then
7710 ac_cv_func_getpagesize=yes 8747 ac_cv_func_getpagesize=yes
7711else 8748else
7712 echo "$as_me: failed program was:" >&5 8749 echo "$as_me: failed program was:" >&5
7713cat conftest.$ac_ext >&5 8750sed 's/^/| /' conftest.$ac_ext >&5
8751
7714ac_cv_func_getpagesize=no 8752ac_cv_func_getpagesize=no
7715fi 8753fi
7716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7717fi 8755fi
7718echo "$as_me:7718: result: $ac_cv_func_getpagesize" >&5 8756echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
7719echo "${ECHO_T}$ac_cv_func_getpagesize" >&6 8757echo "${ECHO_T}$ac_cv_func_getpagesize" >&6
7720if test $ac_cv_func_getpagesize = yes; then 8758if test $ac_cv_func_getpagesize = yes; then
7721 cat >>confdefs.h <<\EOF 8759 cat >>confdefs.h <<\_ACEOF
7722#define HAVE_GETPAGESIZE 1 8760#define HAVE_GETPAGESIZE 1
7723EOF 8761_ACEOF
7724 8762
7725else 8763else
7726 echo "$as_me:7726: checking for getpagesize in -lucb" >&5 8764 echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5
7727echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6 8765echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6
7728if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then 8766if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then
7729 echo $ECHO_N "(cached) $ECHO_C" >&6 8767 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7731,8 +8769,12 @@ else
7731 ac_check_lib_save_LIBS=$LIBS 8769 ac_check_lib_save_LIBS=$LIBS
7732LIBS="-lucb $LIBS" 8770LIBS="-lucb $LIBS"
7733cat >conftest.$ac_ext <<_ACEOF 8771cat >conftest.$ac_ext <<_ACEOF
7734#line 7734 "configure" 8772#line $LINENO "configure"
7735#include "confdefs.h" 8773/* confdefs.h. */
8774_ACEOF
8775cat confdefs.h >>conftest.$ac_ext
8776cat >>conftest.$ac_ext <<_ACEOF
8777/* end confdefs.h. */
7736 8778
7737/* Override any gcc2 internal prototype to avoid an error. */ 8779/* Override any gcc2 internal prototype to avoid an error. */
7738#ifdef __cplusplus 8780#ifdef __cplusplus
@@ -7750,101 +8792,119 @@ getpagesize ();
7750} 8792}
7751_ACEOF 8793_ACEOF
7752rm -f conftest.$ac_objext conftest$ac_exeext 8794rm -f conftest.$ac_objext conftest$ac_exeext
7753if { (eval echo "$as_me:7753: \"$ac_link\"") >&5 8795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7754 (eval $ac_link) 2>&5 8796 (eval $ac_link) 2>&5
7755 ac_status=$? 8797 ac_status=$?
7756 echo "$as_me:7756: \$? = $ac_status" >&5 8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7757 (exit $ac_status); } && 8799 (exit $ac_status); } &&
7758 { ac_try='test -s conftest$ac_exeext' 8800 { ac_try='test -s conftest$ac_exeext'
7759 { (eval echo "$as_me:7759: \"$ac_try\"") >&5 8801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7760 (eval $ac_try) 2>&5 8802 (eval $ac_try) 2>&5
7761 ac_status=$? 8803 ac_status=$?
7762 echo "$as_me:7762: \$? = $ac_status" >&5 8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763 (exit $ac_status); }; }; then 8805 (exit $ac_status); }; }; then
7764 ac_cv_lib_ucb_getpagesize=yes 8806 ac_cv_lib_ucb_getpagesize=yes
7765else 8807else
7766 echo "$as_me: failed program was:" >&5 8808 echo "$as_me: failed program was:" >&5
7767cat conftest.$ac_ext >&5 8809sed 's/^/| /' conftest.$ac_ext >&5
8810
7768ac_cv_lib_ucb_getpagesize=no 8811ac_cv_lib_ucb_getpagesize=no
7769fi 8812fi
7770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 8813rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7771LIBS=$ac_check_lib_save_LIBS 8814LIBS=$ac_check_lib_save_LIBS
7772fi 8815fi
7773echo "$as_me:7773: result: $ac_cv_lib_ucb_getpagesize" >&5 8816echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5
7774echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6 8817echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6
7775if test $ac_cv_lib_ucb_getpagesize = yes; then 8818if test $ac_cv_lib_ucb_getpagesize = yes; then
7776 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\EOF 8819 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF
7777#define HAVE_GETPAGESIZE 1 8820#define HAVE_GETPAGESIZE 1
7778EOF 8821_ACEOF
7779 8822
7780fi 8823fi
7781 8824
8825
7782fi 8826fi
7783 8827
8828
7784# Check for broken snprintf 8829# Check for broken snprintf
7785if test "x$ac_cv_func_snprintf" = "xyes" ; then 8830if test "x$ac_cv_func_snprintf" = "xyes" ; then
7786 echo "$as_me:7786: checking whether snprintf correctly terminates long strings" >&5 8831 echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5
7787echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6 8832echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6
7788 if test "$cross_compiling" = yes; then 8833 if test "$cross_compiling" = yes; then
7789 { { echo "$as_me:7789: error: cannot run test program while cross compiling" >&5 8834 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7790echo "$as_me: error: cannot run test program while cross compiling" >&2;} 8835See \`config.log' for more details." >&5
8836echo "$as_me: error: cannot run test program while cross compiling
8837See \`config.log' for more details." >&2;}
7791 { (exit 1); exit 1; }; } 8838 { (exit 1); exit 1; }; }
7792else 8839else
7793 cat >conftest.$ac_ext <<_ACEOF 8840 cat >conftest.$ac_ext <<_ACEOF
7794#line 7794 "configure" 8841#line $LINENO "configure"
7795#include "confdefs.h" 8842/* confdefs.h. */
8843_ACEOF
8844cat confdefs.h >>conftest.$ac_ext
8845cat >>conftest.$ac_ext <<_ACEOF
8846/* end confdefs.h. */
7796 8847
7797#include <stdio.h> 8848#include <stdio.h>
7798int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} 8849int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
7799 8850
7800_ACEOF 8851_ACEOF
7801rm -f conftest$ac_exeext 8852rm -f conftest$ac_exeext
7802if { (eval echo "$as_me:7802: \"$ac_link\"") >&5 8853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7803 (eval $ac_link) 2>&5 8854 (eval $ac_link) 2>&5
7804 ac_status=$? 8855 ac_status=$?
7805 echo "$as_me:7805: \$? = $ac_status" >&5 8856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 8857 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7807 { (eval echo "$as_me:7807: \"$ac_try\"") >&5 8858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7808 (eval $ac_try) 2>&5 8859 (eval $ac_try) 2>&5
7809 ac_status=$? 8860 ac_status=$?
7810 echo "$as_me:7810: \$? = $ac_status" >&5 8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7811 (exit $ac_status); }; }; then 8862 (exit $ac_status); }; }; then
7812 echo "$as_me:7812: result: yes" >&5 8863 echo "$as_me:$LINENO: result: yes" >&5
7813echo "${ECHO_T}yes" >&6 8864echo "${ECHO_T}yes" >&6
7814else 8865else
7815 echo "$as_me: program exited with status $ac_status" >&5 8866 echo "$as_me: program exited with status $ac_status" >&5
7816echo "$as_me: failed program was:" >&5 8867echo "$as_me: failed program was:" >&5
7817cat conftest.$ac_ext >&5 8868sed 's/^/| /' conftest.$ac_ext >&5
8869
8870( exit $ac_status )
7818 8871
7819 echo "$as_me:7819: result: no" >&5 8872 echo "$as_me:$LINENO: result: no" >&5
7820echo "${ECHO_T}no" >&6 8873echo "${ECHO_T}no" >&6
7821 cat >>confdefs.h <<\EOF 8874 cat >>confdefs.h <<\_ACEOF
7822#define BROKEN_SNPRINTF 1 8875#define BROKEN_SNPRINTF 1
7823EOF 8876_ACEOF
7824 8877
7825 { echo "$as_me:7825: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5 8878 { echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
7826echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;} 8879echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
7827 8880
8881
7828fi 8882fi
7829rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 8883rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7830fi 8884fi
7831fi 8885fi
7832 8886
7833if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 8887if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
7834echo "$as_me:7834: checking for (overly) strict mkstemp" >&5 8888echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5
7835echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6 8889echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6
7836if test "$cross_compiling" = yes; then 8890if test "$cross_compiling" = yes; then
7837 8891
7838 echo "$as_me:7838: result: yes" >&5 8892 echo "$as_me:$LINENO: result: yes" >&5
7839echo "${ECHO_T}yes" >&6 8893echo "${ECHO_T}yes" >&6
7840 cat >>confdefs.h <<\EOF 8894 cat >>confdefs.h <<\_ACEOF
7841#define HAVE_STRICT_MKSTEMP 1 8895#define HAVE_STRICT_MKSTEMP 1
7842EOF 8896_ACEOF
8897
8898
7843 8899
7844else 8900else
7845 cat >conftest.$ac_ext <<_ACEOF 8901 cat >conftest.$ac_ext <<_ACEOF
7846#line 7846 "configure" 8902#line $LINENO "configure"
7847#include "confdefs.h" 8903/* confdefs.h. */
8904_ACEOF
8905cat confdefs.h >>conftest.$ac_ext
8906cat >>conftest.$ac_ext <<_ACEOF
8907/* end confdefs.h. */
7848 8908
7849#include <stdlib.h> 8909#include <stdlib.h>
7850main() { char template[]="conftest.mkstemp-test"; 8910main() { char template[]="conftest.mkstemp-test";
@@ -7855,277 +8915,94 @@ unlink(template); exit(0);
7855 8915
7856_ACEOF 8916_ACEOF
7857rm -f conftest$ac_exeext 8917rm -f conftest$ac_exeext
7858if { (eval echo "$as_me:7858: \"$ac_link\"") >&5 8918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7859 (eval $ac_link) 2>&5 8919 (eval $ac_link) 2>&5
7860 ac_status=$? 8920 ac_status=$?
7861 echo "$as_me:7861: \$? = $ac_status" >&5 8921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 8922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7863 { (eval echo "$as_me:7863: \"$ac_try\"") >&5 8923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7864 (eval $ac_try) 2>&5 8924 (eval $ac_try) 2>&5
7865 ac_status=$? 8925 ac_status=$?
7866 echo "$as_me:7866: \$? = $ac_status" >&5 8926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7867 (exit $ac_status); }; }; then 8927 (exit $ac_status); }; }; then
7868 8928
7869 echo "$as_me:7869: result: no" >&5 8929 echo "$as_me:$LINENO: result: no" >&5
7870echo "${ECHO_T}no" >&6 8930echo "${ECHO_T}no" >&6
7871 8931
7872else 8932else
7873 echo "$as_me: program exited with status $ac_status" >&5 8933 echo "$as_me: program exited with status $ac_status" >&5
7874echo "$as_me: failed program was:" >&5 8934echo "$as_me: failed program was:" >&5
7875cat conftest.$ac_ext >&5 8935sed 's/^/| /' conftest.$ac_ext >&5
7876 8936
7877 echo "$as_me:7877: result: yes" >&5 8937( exit $ac_status )
8938
8939 echo "$as_me:$LINENO: result: yes" >&5
7878echo "${ECHO_T}yes" >&6 8940echo "${ECHO_T}yes" >&6
7879 cat >>confdefs.h <<\EOF 8941 cat >>confdefs.h <<\_ACEOF
7880#define HAVE_STRICT_MKSTEMP 1 8942#define HAVE_STRICT_MKSTEMP 1
7881EOF
7882
7883fi
7884rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7885fi
7886fi
7887
7888if test ! -z "$check_for_openpty_ctty_bug"; then
7889 echo "$as_me:7889: checking if openpty correctly handles controlling tty" >&5
7890echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6
7891 if test "$cross_compiling" = yes; then
7892 { { echo "$as_me:7892: error: cannot run test program while cross compiling" >&5
7893echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7894 { (exit 1); exit 1; }; }
7895else
7896 cat >conftest.$ac_ext <<_ACEOF
7897#line 7897 "configure"
7898#include "confdefs.h"
7899
7900#include <stdio.h>
7901#include <sys/fcntl.h>
7902#include <sys/types.h>
7903#include <sys/wait.h>
7904
7905int
7906main()
7907{
7908 pid_t pid;
7909 int fd, ptyfd, ttyfd, status;
7910
7911 pid = fork();
7912 if (pid < 0) { /* failed */
7913 exit(1);
7914 } else if (pid > 0) { /* parent */
7915 waitpid(pid, &status, 0);
7916 if (WIFEXITED(status))
7917 exit(WEXITSTATUS(status));
7918 else
7919 exit(2);
7920 } else { /* child */
7921 close(0); close(1); close(2);
7922 setsid();
7923 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
7924 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
7925 if (fd >= 0)
7926 exit(3); /* Acquired ctty: broken */
7927 else
7928 exit(0); /* Did not acquire ctty: OK */
7929 }
7930}
7931
7932_ACEOF 8943_ACEOF
7933rm -f conftest$ac_exeext
7934if { (eval echo "$as_me:7934: \"$ac_link\"") >&5
7935 (eval $ac_link) 2>&5
7936 ac_status=$?
7937 echo "$as_me:7937: \$? = $ac_status" >&5
7938 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7939 { (eval echo "$as_me:7939: \"$ac_try\"") >&5
7940 (eval $ac_try) 2>&5
7941 ac_status=$?
7942 echo "$as_me:7942: \$? = $ac_status" >&5
7943 (exit $ac_status); }; }; then
7944
7945 echo "$as_me:7945: result: yes" >&5
7946echo "${ECHO_T}yes" >&6
7947 8944
7948else
7949 echo "$as_me: program exited with status $ac_status" >&5
7950echo "$as_me: failed program was:" >&5
7951cat conftest.$ac_ext >&5
7952
7953 echo "$as_me:7953: result: no" >&5
7954echo "${ECHO_T}no" >&6
7955 cat >>confdefs.h <<\EOF
7956#define SSHD_ACQUIRES_CTTY 1
7957EOF
7958 8945
7959fi 8946fi
7960rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 8947rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7961fi 8948fi
7962fi 8949fi
7963 8950
7964echo "$as_me:7964: checking whether getpgrp takes no argument" >&5 8951echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
7965echo $ECHO_N "checking whether getpgrp takes no argument... $ECHO_C" >&6 8952echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6
7966if test "${ac_cv_func_getpgrp_void+set}" = set; then 8953if test "${ac_cv_func_getpgrp_void+set}" = set; then
7967 echo $ECHO_N "(cached) $ECHO_C" >&6 8954 echo $ECHO_N "(cached) $ECHO_C" >&6
7968else 8955else
7969 # Use it with a single arg. 8956 # Use it with a single arg.
7970cat >conftest.$ac_ext <<_ACEOF 8957cat >conftest.$ac_ext <<_ACEOF
7971#line 7971 "configure" 8958#line $LINENO "configure"
7972#include "confdefs.h" 8959/* confdefs.h. */
7973$ac_includes_default
7974int
7975main ()
7976{
7977getpgrp (0);
7978 ;
7979 return 0;
7980}
7981_ACEOF 8960_ACEOF
7982rm -f conftest.$ac_objext 8961cat confdefs.h >>conftest.$ac_ext
7983if { (eval echo "$as_me:7983: \"$ac_compile\"") >&5 8962cat >>conftest.$ac_ext <<_ACEOF
7984 (eval $ac_compile) 2>&5 8963/* end confdefs.h. */
7985 ac_status=$?
7986 echo "$as_me:7986: \$? = $ac_status" >&5
7987 (exit $ac_status); } &&
7988 { ac_try='test -s conftest.$ac_objext'
7989 { (eval echo "$as_me:7989: \"$ac_try\"") >&5
7990 (eval $ac_try) 2>&5
7991 ac_status=$?
7992 echo "$as_me:7992: \$? = $ac_status" >&5
7993 (exit $ac_status); }; }; then
7994 ac_func_getpgrp_1=yes
7995else
7996 echo "$as_me: failed program was:" >&5
7997cat conftest.$ac_ext >&5
7998ac_func_getpgrp_1=no
7999fi
8000rm -f conftest.$ac_objext conftest.$ac_ext
8001# Use it with no arg.
8002cat >conftest.$ac_ext <<_ACEOF
8003#line 8003 "configure"
8004#include "confdefs.h"
8005$ac_includes_default 8964$ac_includes_default
8006int 8965int
8007main () 8966main ()
8008{ 8967{
8009getpgrp (); 8968getpgrp (0);
8010 ; 8969 ;
8011 return 0; 8970 return 0;
8012} 8971}
8013_ACEOF 8972_ACEOF
8014rm -f conftest.$ac_objext 8973rm -f conftest.$ac_objext
8015if { (eval echo "$as_me:8015: \"$ac_compile\"") >&5 8974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8016 (eval $ac_compile) 2>&5 8975 (eval $ac_compile) 2>&5
8017 ac_status=$? 8976 ac_status=$?
8018 echo "$as_me:8018: \$? = $ac_status" >&5 8977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8019 (exit $ac_status); } && 8978 (exit $ac_status); } &&
8020 { ac_try='test -s conftest.$ac_objext' 8979 { ac_try='test -s conftest.$ac_objext'
8021 { (eval echo "$as_me:8021: \"$ac_try\"") >&5 8980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8022 (eval $ac_try) 2>&5 8981 (eval $ac_try) 2>&5
8023 ac_status=$? 8982 ac_status=$?
8024 echo "$as_me:8024: \$? = $ac_status" >&5 8983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8025 (exit $ac_status); }; }; then 8984 (exit $ac_status); }; }; then
8026 ac_func_getpgrp_0=yes 8985 ac_cv_func_getpgrp_void=no
8027else 8986else
8028 echo "$as_me: failed program was:" >&5 8987 echo "$as_me: failed program was:" >&5
8029cat conftest.$ac_ext >&5 8988sed 's/^/| /' conftest.$ac_ext >&5
8030ac_func_getpgrp_0=no
8031fi
8032rm -f conftest.$ac_objext conftest.$ac_ext
8033# If both static checks agree, we are done.
8034case $ac_func_getpgrp_0:$ac_func_getpgrp_1 in
8035 yes:no) ac_cv_func_getpgrp_void=yes;;
8036 no:yes) ac_cv_func_getpgrp_void=false;;
8037 *) if test "$cross_compiling" = yes; then
8038 { { echo "$as_me:8038: error: cannot check getpgrp if cross compiling" >&5
8039echo "$as_me: error: cannot check getpgrp if cross compiling" >&2;}
8040 { (exit 1); exit 1; }; }
8041else
8042 cat >conftest.$ac_ext <<_ACEOF
8043#line 8043 "configure"
8044#include "confdefs.h"
8045$ac_includes_default
8046
8047/*
8048 * If this system has a BSD-style getpgrp(),
8049 * which takes a pid argument, exit unsuccessfully.
8050 *
8051 * Snarfed from Chet Ramey's bash pgrp.c test program
8052 */
8053
8054int pid;
8055int pg1, pg2, pg3, pg4;
8056int ng, np, s, child;
8057
8058int
8059main ()
8060{
8061 pid = getpid ();
8062 pg1 = getpgrp (0);
8063 pg2 = getpgrp ();
8064 pg3 = getpgrp (pid);
8065 pg4 = getpgrp (1);
8066
8067 /* If all of these values are the same, it's pretty sure that we're
8068 on a system that ignores getpgrp's first argument. */
8069 if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
8070 exit (0);
8071
8072 child = fork ();
8073 if (child < 0)
8074 exit(1);
8075 else if (child == 0)
8076 {
8077 np = getpid ();
8078 /* If this is Sys V, this will not work; pgrp will be set to np
8079 because setpgrp just changes a pgrp to be the same as the
8080 pid. */
8081 setpgrp (np, pg1);
8082 ng = getpgrp (0); /* Same result for Sys V and BSD */
8083 if (ng == pg1)
8084 exit (1);
8085 else
8086 exit (0);
8087 }
8088 else
8089 {
8090 wait (&s);
8091 exit (s>>8);
8092 }
8093}
8094 8989
8095_ACEOF 8990ac_cv_func_getpgrp_void=yes
8096rm -f conftest$ac_exeext
8097if { (eval echo "$as_me:8097: \"$ac_link\"") >&5
8098 (eval $ac_link) 2>&5
8099 ac_status=$?
8100 echo "$as_me:8100: \$? = $ac_status" >&5
8101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8102 { (eval echo "$as_me:8102: \"$ac_try\"") >&5
8103 (eval $ac_try) 2>&5
8104 ac_status=$?
8105 echo "$as_me:8105: \$? = $ac_status" >&5
8106 (exit $ac_status); }; }; then
8107 ac_cv_func_getpgrp_void=yes
8108else
8109 echo "$as_me: program exited with status $ac_status" >&5
8110echo "$as_me: failed program was:" >&5
8111cat conftest.$ac_ext >&5
8112ac_cv_func_getpgrp_void=no
8113fi 8991fi
8114rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 8992rm -f conftest.$ac_objext conftest.$ac_ext
8115fi;;
8116esac # $ac_func_getpgrp_0:$ac_func_getpgrp_1
8117 8993
8118fi 8994fi
8119echo "$as_me:8119: result: $ac_cv_func_getpgrp_void" >&5 8995echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
8120echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 8996echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6
8121if test $ac_cv_func_getpgrp_void = yes; then 8997if test $ac_cv_func_getpgrp_void = yes; then
8122 8998
8123cat >>confdefs.h <<\EOF 8999cat >>confdefs.h <<\_ACEOF
8124#define GETPGRP_VOID 1 9000#define GETPGRP_VOID 1
8125EOF 9001_ACEOF
8126 9002
8127fi 9003fi
8128 9004
9005
8129# Check for PAM libs 9006# Check for PAM libs
8130PAM_MSG="no" 9007PAM_MSG="no"
8131 9008
@@ -8135,12 +9012,13 @@ if test "${with_pam+set}" = set; then
8135 9012
8136 if test "x$withval" != "xno" ; then 9013 if test "x$withval" != "xno" ; then
8137 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then 9014 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
8138 { { echo "$as_me:8138: error: PAM headers not found" >&5 9015 { { echo "$as_me:$LINENO: error: PAM headers not found" >&5
8139echo "$as_me: error: PAM headers not found" >&2;} 9016echo "$as_me: error: PAM headers not found" >&2;}
8140 { (exit 1); exit 1; }; } 9017 { (exit 1); exit 1; }; }
8141 fi 9018 fi
8142 9019
8143echo "$as_me:8143: checking for dlopen in -ldl" >&5 9020
9021echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8144echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 9022echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8145if test "${ac_cv_lib_dl_dlopen+set}" = set; then 9023if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8146 echo $ECHO_N "(cached) $ECHO_C" >&6 9024 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8148,8 +9026,12 @@ else
8148 ac_check_lib_save_LIBS=$LIBS 9026 ac_check_lib_save_LIBS=$LIBS
8149LIBS="-ldl $LIBS" 9027LIBS="-ldl $LIBS"
8150cat >conftest.$ac_ext <<_ACEOF 9028cat >conftest.$ac_ext <<_ACEOF
8151#line 8151 "configure" 9029#line $LINENO "configure"
8152#include "confdefs.h" 9030/* confdefs.h. */
9031_ACEOF
9032cat confdefs.h >>conftest.$ac_ext
9033cat >>conftest.$ac_ext <<_ACEOF
9034/* end confdefs.h. */
8153 9035
8154/* Override any gcc2 internal prototype to avoid an error. */ 9036/* Override any gcc2 internal prototype to avoid an error. */
8155#ifdef __cplusplus 9037#ifdef __cplusplus
@@ -8167,38 +9049,40 @@ dlopen ();
8167} 9049}
8168_ACEOF 9050_ACEOF
8169rm -f conftest.$ac_objext conftest$ac_exeext 9051rm -f conftest.$ac_objext conftest$ac_exeext
8170if { (eval echo "$as_me:8170: \"$ac_link\"") >&5 9052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8171 (eval $ac_link) 2>&5 9053 (eval $ac_link) 2>&5
8172 ac_status=$? 9054 ac_status=$?
8173 echo "$as_me:8173: \$? = $ac_status" >&5 9055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); } && 9056 (exit $ac_status); } &&
8175 { ac_try='test -s conftest$ac_exeext' 9057 { ac_try='test -s conftest$ac_exeext'
8176 { (eval echo "$as_me:8176: \"$ac_try\"") >&5 9058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8177 (eval $ac_try) 2>&5 9059 (eval $ac_try) 2>&5
8178 ac_status=$? 9060 ac_status=$?
8179 echo "$as_me:8179: \$? = $ac_status" >&5 9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8180 (exit $ac_status); }; }; then 9062 (exit $ac_status); }; }; then
8181 ac_cv_lib_dl_dlopen=yes 9063 ac_cv_lib_dl_dlopen=yes
8182else 9064else
8183 echo "$as_me: failed program was:" >&5 9065 echo "$as_me: failed program was:" >&5
8184cat conftest.$ac_ext >&5 9066sed 's/^/| /' conftest.$ac_ext >&5
9067
8185ac_cv_lib_dl_dlopen=no 9068ac_cv_lib_dl_dlopen=no
8186fi 9069fi
8187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 9070rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8188LIBS=$ac_check_lib_save_LIBS 9071LIBS=$ac_check_lib_save_LIBS
8189fi 9072fi
8190echo "$as_me:8190: result: $ac_cv_lib_dl_dlopen" >&5 9073echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8191echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 9074echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8192if test $ac_cv_lib_dl_dlopen = yes; then 9075if test $ac_cv_lib_dl_dlopen = yes; then
8193 cat >>confdefs.h <<EOF 9076 cat >>confdefs.h <<_ACEOF
8194#define HAVE_LIBDL 1 9077#define HAVE_LIBDL 1
8195EOF 9078_ACEOF
8196 9079
8197 LIBS="-ldl $LIBS" 9080 LIBS="-ldl $LIBS"
8198 9081
8199fi 9082fi
8200 9083
8201echo "$as_me:8201: checking for pam_set_item in -lpam" >&5 9084
9085echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5
8202echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6 9086echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6
8203if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then 9087if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then
8204 echo $ECHO_N "(cached) $ECHO_C" >&6 9088 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8206,8 +9090,12 @@ else
8206 ac_check_lib_save_LIBS=$LIBS 9090 ac_check_lib_save_LIBS=$LIBS
8207LIBS="-lpam $LIBS" 9091LIBS="-lpam $LIBS"
8208cat >conftest.$ac_ext <<_ACEOF 9092cat >conftest.$ac_ext <<_ACEOF
8209#line 8209 "configure" 9093#line $LINENO "configure"
8210#include "confdefs.h" 9094/* confdefs.h. */
9095_ACEOF
9096cat confdefs.h >>conftest.$ac_ext
9097cat >>conftest.$ac_ext <<_ACEOF
9098/* end confdefs.h. */
8211 9099
8212/* Override any gcc2 internal prototype to avoid an error. */ 9100/* Override any gcc2 internal prototype to avoid an error. */
8213#ifdef __cplusplus 9101#ifdef __cplusplus
@@ -8225,185 +9113,133 @@ pam_set_item ();
8225} 9113}
8226_ACEOF 9114_ACEOF
8227rm -f conftest.$ac_objext conftest$ac_exeext 9115rm -f conftest.$ac_objext conftest$ac_exeext
8228if { (eval echo "$as_me:8228: \"$ac_link\"") >&5 9116if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8229 (eval $ac_link) 2>&5 9117 (eval $ac_link) 2>&5
8230 ac_status=$? 9118 ac_status=$?
8231 echo "$as_me:8231: \$? = $ac_status" >&5 9119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232 (exit $ac_status); } && 9120 (exit $ac_status); } &&
8233 { ac_try='test -s conftest$ac_exeext' 9121 { ac_try='test -s conftest$ac_exeext'
8234 { (eval echo "$as_me:8234: \"$ac_try\"") >&5 9122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8235 (eval $ac_try) 2>&5 9123 (eval $ac_try) 2>&5
8236 ac_status=$? 9124 ac_status=$?
8237 echo "$as_me:8237: \$? = $ac_status" >&5 9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); }; }; then 9126 (exit $ac_status); }; }; then
8239 ac_cv_lib_pam_pam_set_item=yes 9127 ac_cv_lib_pam_pam_set_item=yes
8240else 9128else
8241 echo "$as_me: failed program was:" >&5 9129 echo "$as_me: failed program was:" >&5
8242cat conftest.$ac_ext >&5 9130sed 's/^/| /' conftest.$ac_ext >&5
9131
8243ac_cv_lib_pam_pam_set_item=no 9132ac_cv_lib_pam_pam_set_item=no
8244fi 9133fi
8245rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 9134rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8246LIBS=$ac_check_lib_save_LIBS 9135LIBS=$ac_check_lib_save_LIBS
8247fi 9136fi
8248echo "$as_me:8248: result: $ac_cv_lib_pam_pam_set_item" >&5 9137echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5
8249echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6 9138echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6
8250if test $ac_cv_lib_pam_pam_set_item = yes; then 9139if test $ac_cv_lib_pam_pam_set_item = yes; then
8251 cat >>confdefs.h <<EOF 9140 cat >>confdefs.h <<_ACEOF
8252#define HAVE_LIBPAM 1 9141#define HAVE_LIBPAM 1
8253EOF 9142_ACEOF
8254 9143
8255 LIBS="-lpam $LIBS" 9144 LIBS="-lpam $LIBS"
8256 9145
8257else 9146else
8258 { { echo "$as_me:8258: error: *** libpam missing" >&5 9147 { { echo "$as_me:$LINENO: error: *** libpam missing" >&5
8259echo "$as_me: error: *** libpam missing" >&2;} 9148echo "$as_me: error: *** libpam missing" >&2;}
8260 { (exit 1); exit 1; }; } 9149 { (exit 1); exit 1; }; }
8261fi 9150fi
8262 9151
9152
8263for ac_func in pam_getenvlist 9153for ac_func in pam_getenvlist
8264do 9154do
8265as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9155as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8266echo "$as_me:8266: checking for $ac_func" >&5 9156echo "$as_me:$LINENO: checking for $ac_func" >&5
8267echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 9157echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8268if eval "test \"\${$as_ac_var+set}\" = set"; then 9158if eval "test \"\${$as_ac_var+set}\" = set"; then
8269 echo $ECHO_N "(cached) $ECHO_C" >&6 9159 echo $ECHO_N "(cached) $ECHO_C" >&6
8270else 9160else
8271 cat >conftest.$ac_ext <<_ACEOF 9161 cat >conftest.$ac_ext <<_ACEOF
8272#line 8272 "configure" 9162#line $LINENO "configure"
8273#include "confdefs.h" 9163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
8274/* System header to define __stub macros and hopefully few prototypes, 9168/* System header to define __stub macros and hopefully few prototypes,
8275 which can conflict with char $ac_func (); below. */ 9169 which can conflict with char $ac_func (); below.
8276#include <assert.h> 9170 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9171 <limits.h> exists even on freestanding compilers. */
9172#ifdef __STDC__
9173# include <limits.h>
9174#else
9175# include <assert.h>
9176#endif
8277/* Override any gcc2 internal prototype to avoid an error. */ 9177/* Override any gcc2 internal prototype to avoid an error. */
8278#ifdef __cplusplus 9178#ifdef __cplusplus
8279extern "C" 9179extern "C"
9180{
8280#endif 9181#endif
8281/* We use char because int might match the return type of a gcc2 9182/* We use char because int might match the return type of a gcc2
8282 builtin and then its argument prototype would still apply. */ 9183 builtin and then its argument prototype would still apply. */
8283char $ac_func (); 9184char $ac_func ();
8284char (*f) ();
8285
8286int
8287main ()
8288{
8289/* The GNU C library defines this for functions which it implements 9185/* The GNU C library defines this for functions which it implements
8290 to always fail with ENOSYS. Some functions are actually named 9186 to always fail with ENOSYS. Some functions are actually named
8291 something starting with __ and the normal name is an alias. */ 9187 something starting with __ and the normal name is an alias. */
8292#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 9188#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8293choke me 9189choke me
8294#else 9190#else
8295f = $ac_func; 9191char (*f) () = $ac_func;
8296#endif 9192#endif
8297
8298 ;
8299 return 0;
8300}
8301_ACEOF
8302rm -f conftest.$ac_objext conftest$ac_exeext
8303if { (eval echo "$as_me:8303: \"$ac_link\"") >&5
8304 (eval $ac_link) 2>&5
8305 ac_status=$?
8306 echo "$as_me:8306: \$? = $ac_status" >&5
8307 (exit $ac_status); } &&
8308 { ac_try='test -s conftest$ac_exeext'
8309 { (eval echo "$as_me:8309: \"$ac_try\"") >&5
8310 (eval $ac_try) 2>&5
8311 ac_status=$?
8312 echo "$as_me:8312: \$? = $ac_status" >&5
8313 (exit $ac_status); }; }; then
8314 eval "$as_ac_var=yes"
8315else
8316 echo "$as_me: failed program was:" >&5
8317cat conftest.$ac_ext >&5
8318eval "$as_ac_var=no"
8319fi
8320rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8321fi
8322echo "$as_me:8322: result: `eval echo '${'$as_ac_var'}'`" >&5
8323echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8324if test `eval echo '${'$as_ac_var'}'` = yes; then
8325 cat >>confdefs.h <<EOF
8326#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8327EOF
8328
8329fi
8330done
8331
8332for ac_func in pam_putenv
8333do
8334as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8335echo "$as_me:8335: checking for $ac_func" >&5
8336echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8337if eval "test \"\${$as_ac_var+set}\" = set"; then
8338 echo $ECHO_N "(cached) $ECHO_C" >&6
8339else
8340 cat >conftest.$ac_ext <<_ACEOF
8341#line 8341 "configure"
8342#include "confdefs.h"
8343/* System header to define __stub macros and hopefully few prototypes,
8344 which can conflict with char $ac_func (); below. */
8345#include <assert.h>
8346/* Override any gcc2 internal prototype to avoid an error. */
8347#ifdef __cplusplus 9193#ifdef __cplusplus
8348extern "C" 9194}
8349#endif 9195#endif
8350/* We use char because int might match the return type of a gcc2
8351 builtin and then its argument prototype would still apply. */
8352char $ac_func ();
8353char (*f) ();
8354 9196
8355int 9197int
8356main () 9198main ()
8357{ 9199{
8358/* The GNU C library defines this for functions which it implements 9200return f != $ac_func;
8359 to always fail with ENOSYS. Some functions are actually named
8360 something starting with __ and the normal name is an alias. */
8361#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8362choke me
8363#else
8364f = $ac_func;
8365#endif
8366
8367 ; 9201 ;
8368 return 0; 9202 return 0;
8369} 9203}
8370_ACEOF 9204_ACEOF
8371rm -f conftest.$ac_objext conftest$ac_exeext 9205rm -f conftest.$ac_objext conftest$ac_exeext
8372if { (eval echo "$as_me:8372: \"$ac_link\"") >&5 9206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8373 (eval $ac_link) 2>&5 9207 (eval $ac_link) 2>&5
8374 ac_status=$? 9208 ac_status=$?
8375 echo "$as_me:8375: \$? = $ac_status" >&5 9209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); } && 9210 (exit $ac_status); } &&
8377 { ac_try='test -s conftest$ac_exeext' 9211 { ac_try='test -s conftest$ac_exeext'
8378 { (eval echo "$as_me:8378: \"$ac_try\"") >&5 9212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379 (eval $ac_try) 2>&5 9213 (eval $ac_try) 2>&5
8380 ac_status=$? 9214 ac_status=$?
8381 echo "$as_me:8381: \$? = $ac_status" >&5 9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); }; }; then 9216 (exit $ac_status); }; }; then
8383 eval "$as_ac_var=yes" 9217 eval "$as_ac_var=yes"
8384else 9218else
8385 echo "$as_me: failed program was:" >&5 9219 echo "$as_me: failed program was:" >&5
8386cat conftest.$ac_ext >&5 9220sed 's/^/| /' conftest.$ac_ext >&5
9221
8387eval "$as_ac_var=no" 9222eval "$as_ac_var=no"
8388fi 9223fi
8389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 9224rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8390fi 9225fi
8391echo "$as_me:8391: result: `eval echo '${'$as_ac_var'}'`" >&5 9226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8392echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 9227echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8393if test `eval echo '${'$as_ac_var'}'` = yes; then 9228if test `eval echo '${'$as_ac_var'}'` = yes; then
8394 cat >>confdefs.h <<EOF 9229 cat >>confdefs.h <<_ACEOF
8395#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9230#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8396EOF 9231_ACEOF
8397 9232
8398fi 9233fi
8399done 9234done
8400 9235
9236
8401 disable_shadow=yes 9237 disable_shadow=yes
8402 PAM_MSG="yes" 9238 PAM_MSG="yes"
8403 9239
8404 cat >>confdefs.h <<\EOF 9240 cat >>confdefs.h <<\_ACEOF
8405#define USE_PAM 1 9241#define USE_PAM 1
8406EOF 9242_ACEOF
8407 9243
8408 if test $ac_cv_lib_dl_dlopen = yes; then 9244 if test $ac_cv_lib_dl_dlopen = yes; then
8409 LIBPAM="-lpam -ldl" 9245 LIBPAM="-lpam -ldl"
@@ -8413,16 +9249,21 @@ EOF
8413 9249
8414 fi 9250 fi
8415 9251
9252
8416fi; 9253fi;
8417 9254
8418# Check for older PAM 9255# Check for older PAM
8419if test "x$PAM_MSG" = "xyes" ; then 9256if test "x$PAM_MSG" = "xyes" ; then
8420 # Check PAM strerror arguments (old PAM) 9257 # Check PAM strerror arguments (old PAM)
8421 echo "$as_me:8421: checking whether pam_strerror takes only one argument" >&5 9258 echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5
8422echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6 9259echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6
8423 cat >conftest.$ac_ext <<_ACEOF 9260 cat >conftest.$ac_ext <<_ACEOF
8424#line 8424 "configure" 9261#line $LINENO "configure"
8425#include "confdefs.h" 9262/* confdefs.h. */
9263_ACEOF
9264cat confdefs.h >>conftest.$ac_ext
9265cat >>conftest.$ac_ext <<_ACEOF
9266/* end confdefs.h. */
8426 9267
8427#include <stdlib.h> 9268#include <stdlib.h>
8428#include <security/pam_appl.h> 9269#include <security/pam_appl.h>
@@ -8436,31 +9277,33 @@ main ()
8436} 9277}
8437_ACEOF 9278_ACEOF
8438rm -f conftest.$ac_objext 9279rm -f conftest.$ac_objext
8439if { (eval echo "$as_me:8439: \"$ac_compile\"") >&5 9280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8440 (eval $ac_compile) 2>&5 9281 (eval $ac_compile) 2>&5
8441 ac_status=$? 9282 ac_status=$?
8442 echo "$as_me:8442: \$? = $ac_status" >&5 9283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8443 (exit $ac_status); } && 9284 (exit $ac_status); } &&
8444 { ac_try='test -s conftest.$ac_objext' 9285 { ac_try='test -s conftest.$ac_objext'
8445 { (eval echo "$as_me:8445: \"$ac_try\"") >&5 9286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8446 (eval $ac_try) 2>&5 9287 (eval $ac_try) 2>&5
8447 ac_status=$? 9288 ac_status=$?
8448 echo "$as_me:8448: \$? = $ac_status" >&5 9289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449 (exit $ac_status); }; }; then 9290 (exit $ac_status); }; }; then
8450 echo "$as_me:8450: result: no" >&5 9291 echo "$as_me:$LINENO: result: no" >&5
8451echo "${ECHO_T}no" >&6 9292echo "${ECHO_T}no" >&6
8452else 9293else
8453 echo "$as_me: failed program was:" >&5 9294 echo "$as_me: failed program was:" >&5
8454cat conftest.$ac_ext >&5 9295sed 's/^/| /' conftest.$ac_ext >&5
8455 9296
8456 cat >>confdefs.h <<\EOF 9297
9298 cat >>confdefs.h <<\_ACEOF
8457#define HAVE_OLD_PAM 1 9299#define HAVE_OLD_PAM 1
8458EOF 9300_ACEOF
8459 9301
8460 echo "$as_me:8460: result: yes" >&5 9302 echo "$as_me:$LINENO: result: yes" >&5
8461echo "${ECHO_T}yes" >&6 9303echo "${ECHO_T}yes" >&6
8462 PAM_MSG="yes (old library)" 9304 PAM_MSG="yes (old library)"
8463 9305
9306
8464fi 9307fi
8465rm -f conftest.$ac_objext conftest.$ac_ext 9308rm -f conftest.$ac_objext conftest.$ac_ext
8466fi 9309fi
@@ -8469,7 +9312,7 @@ fi
8469# because the system crypt() is more featureful. 9312# because the system crypt() is more featureful.
8470if test "x$check_for_libcrypt_before" = "x1"; then 9313if test "x$check_for_libcrypt_before" = "x1"; then
8471 9314
8472echo "$as_me:8472: checking for crypt in -lcrypt" >&5 9315echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
8473echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 9316echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
8474if test "${ac_cv_lib_crypt_crypt+set}" = set; then 9317if test "${ac_cv_lib_crypt_crypt+set}" = set; then
8475 echo $ECHO_N "(cached) $ECHO_C" >&6 9318 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8477,8 +9320,12 @@ else
8477 ac_check_lib_save_LIBS=$LIBS 9320 ac_check_lib_save_LIBS=$LIBS
8478LIBS="-lcrypt $LIBS" 9321LIBS="-lcrypt $LIBS"
8479cat >conftest.$ac_ext <<_ACEOF 9322cat >conftest.$ac_ext <<_ACEOF
8480#line 8480 "configure" 9323#line $LINENO "configure"
8481#include "confdefs.h" 9324/* confdefs.h. */
9325_ACEOF
9326cat confdefs.h >>conftest.$ac_ext
9327cat >>conftest.$ac_ext <<_ACEOF
9328/* end confdefs.h. */
8482 9329
8483/* Override any gcc2 internal prototype to avoid an error. */ 9330/* Override any gcc2 internal prototype to avoid an error. */
8484#ifdef __cplusplus 9331#ifdef __cplusplus
@@ -8496,32 +9343,33 @@ crypt ();
8496} 9343}
8497_ACEOF 9344_ACEOF
8498rm -f conftest.$ac_objext conftest$ac_exeext 9345rm -f conftest.$ac_objext conftest$ac_exeext
8499if { (eval echo "$as_me:8499: \"$ac_link\"") >&5 9346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8500 (eval $ac_link) 2>&5 9347 (eval $ac_link) 2>&5
8501 ac_status=$? 9348 ac_status=$?
8502 echo "$as_me:8502: \$? = $ac_status" >&5 9349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503 (exit $ac_status); } && 9350 (exit $ac_status); } &&
8504 { ac_try='test -s conftest$ac_exeext' 9351 { ac_try='test -s conftest$ac_exeext'
8505 { (eval echo "$as_me:8505: \"$ac_try\"") >&5 9352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8506 (eval $ac_try) 2>&5 9353 (eval $ac_try) 2>&5
8507 ac_status=$? 9354 ac_status=$?
8508 echo "$as_me:8508: \$? = $ac_status" >&5 9355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8509 (exit $ac_status); }; }; then 9356 (exit $ac_status); }; }; then
8510 ac_cv_lib_crypt_crypt=yes 9357 ac_cv_lib_crypt_crypt=yes
8511else 9358else
8512 echo "$as_me: failed program was:" >&5 9359 echo "$as_me: failed program was:" >&5
8513cat conftest.$ac_ext >&5 9360sed 's/^/| /' conftest.$ac_ext >&5
9361
8514ac_cv_lib_crypt_crypt=no 9362ac_cv_lib_crypt_crypt=no
8515fi 9363fi
8516rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 9364rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8517LIBS=$ac_check_lib_save_LIBS 9365LIBS=$ac_check_lib_save_LIBS
8518fi 9366fi
8519echo "$as_me:8519: result: $ac_cv_lib_crypt_crypt" >&5 9367echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
8520echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 9368echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
8521if test $ac_cv_lib_crypt_crypt = yes; then 9369if test $ac_cv_lib_crypt_crypt = yes; then
8522 cat >>confdefs.h <<EOF 9370 cat >>confdefs.h <<_ACEOF
8523#define HAVE_LIBCRYPT 1 9371#define HAVE_LIBCRYPT 1
8524EOF 9372_ACEOF
8525 9373
8526 LIBS="-lcrypt $LIBS" 9374 LIBS="-lcrypt $LIBS"
8527 9375
@@ -8558,11 +9406,16 @@ if test "${with_ssl_dir+set}" = set; then
8558 fi 9406 fi
8559 fi 9407 fi
8560 9408
9409
8561fi; 9410fi;
8562LIBS="$LIBS -lcrypto" 9411LIBS="$LIBS -lcrypto"
8563cat >conftest.$ac_ext <<_ACEOF 9412cat >conftest.$ac_ext <<_ACEOF
8564#line 8564 "configure" 9413#line $LINENO "configure"
8565#include "confdefs.h" 9414/* confdefs.h. */
9415_ACEOF
9416cat confdefs.h >>conftest.$ac_ext
9417cat >>conftest.$ac_ext <<_ACEOF
9418/* end confdefs.h. */
8566 9419
8567/* Override any gcc2 internal prototype to avoid an error. */ 9420/* Override any gcc2 internal prototype to avoid an error. */
8568#ifdef __cplusplus 9421#ifdef __cplusplus
@@ -8580,24 +9433,25 @@ RAND_add ();
8580} 9433}
8581_ACEOF 9434_ACEOF
8582rm -f conftest.$ac_objext conftest$ac_exeext 9435rm -f conftest.$ac_objext conftest$ac_exeext
8583if { (eval echo "$as_me:8583: \"$ac_link\"") >&5 9436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8584 (eval $ac_link) 2>&5 9437 (eval $ac_link) 2>&5
8585 ac_status=$? 9438 ac_status=$?
8586 echo "$as_me:8586: \$? = $ac_status" >&5 9439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); } && 9440 (exit $ac_status); } &&
8588 { ac_try='test -s conftest$ac_exeext' 9441 { ac_try='test -s conftest$ac_exeext'
8589 { (eval echo "$as_me:8589: \"$ac_try\"") >&5 9442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8590 (eval $ac_try) 2>&5 9443 (eval $ac_try) 2>&5
8591 ac_status=$? 9444 ac_status=$?
8592 echo "$as_me:8592: \$? = $ac_status" >&5 9445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8593 (exit $ac_status); }; }; then 9446 (exit $ac_status); }; }; then
8594 cat >>confdefs.h <<\EOF 9447 cat >>confdefs.h <<\_ACEOF
8595#define HAVE_OPENSSL 1 9448#define HAVE_OPENSSL 1
8596EOF 9449_ACEOF
8597 9450
8598else 9451else
8599 echo "$as_me: failed program was:" >&5 9452 echo "$as_me: failed program was:" >&5
8600cat conftest.$ac_ext >&5 9453sed 's/^/| /' conftest.$ac_ext >&5
9454
8601 9455
8602 if test -n "${need_dash_r}"; then 9456 if test -n "${need_dash_r}"; then
8603 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}" 9457 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
@@ -8606,8 +9460,12 @@ cat conftest.$ac_ext >&5
8606 fi 9460 fi
8607 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" 9461 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
8608 cat >conftest.$ac_ext <<_ACEOF 9462 cat >conftest.$ac_ext <<_ACEOF
8609#line 8609 "configure" 9463#line $LINENO "configure"
8610#include "confdefs.h" 9464/* confdefs.h. */
9465_ACEOF
9466cat confdefs.h >>conftest.$ac_ext
9467cat >>conftest.$ac_ext <<_ACEOF
9468/* end confdefs.h. */
8611 9469
8612/* Override any gcc2 internal prototype to avoid an error. */ 9470/* Override any gcc2 internal prototype to avoid an error. */
8613#ifdef __cplusplus 9471#ifdef __cplusplus
@@ -8625,46 +9483,55 @@ RAND_add ();
8625} 9483}
8626_ACEOF 9484_ACEOF
8627rm -f conftest.$ac_objext conftest$ac_exeext 9485rm -f conftest.$ac_objext conftest$ac_exeext
8628if { (eval echo "$as_me:8628: \"$ac_link\"") >&5 9486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8629 (eval $ac_link) 2>&5 9487 (eval $ac_link) 2>&5
8630 ac_status=$? 9488 ac_status=$?
8631 echo "$as_me:8631: \$? = $ac_status" >&5 9489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8632 (exit $ac_status); } && 9490 (exit $ac_status); } &&
8633 { ac_try='test -s conftest$ac_exeext' 9491 { ac_try='test -s conftest$ac_exeext'
8634 { (eval echo "$as_me:8634: \"$ac_try\"") >&5 9492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8635 (eval $ac_try) 2>&5 9493 (eval $ac_try) 2>&5
8636 ac_status=$? 9494 ac_status=$?
8637 echo "$as_me:8637: \$? = $ac_status" >&5 9495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8638 (exit $ac_status); }; }; then 9496 (exit $ac_status); }; }; then
8639 cat >>confdefs.h <<\EOF 9497 cat >>confdefs.h <<\_ACEOF
8640#define HAVE_OPENSSL 1 9498#define HAVE_OPENSSL 1
8641EOF 9499_ACEOF
8642 9500
8643else 9501else
8644 echo "$as_me: failed program was:" >&5 9502 echo "$as_me: failed program was:" >&5
8645cat conftest.$ac_ext >&5 9503sed 's/^/| /' conftest.$ac_ext >&5
8646 9504
8647 { { echo "$as_me:8647: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5 9505
9506 { { echo "$as_me:$LINENO: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5
8648echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;} 9507echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;}
8649 { (exit 1); exit 1; }; } 9508 { (exit 1); exit 1; }; }
8650 9509
9510
8651fi 9511fi
8652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 9512rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8653 9513
9514
8654fi 9515fi
8655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 9516rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8656 9517
8657# Determine OpenSSL header version 9518# Determine OpenSSL header version
8658echo "$as_me:8658: checking OpenSSL header version" >&5 9519echo "$as_me:$LINENO: checking OpenSSL header version" >&5
8659echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6 9520echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6
8660if test "$cross_compiling" = yes; then 9521if test "$cross_compiling" = yes; then
8661 { { echo "$as_me:8661: error: cannot run test program while cross compiling" >&5 9522 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8662echo "$as_me: error: cannot run test program while cross compiling" >&2;} 9523See \`config.log' for more details." >&5
9524echo "$as_me: error: cannot run test program while cross compiling
9525See \`config.log' for more details." >&2;}
8663 { (exit 1); exit 1; }; } 9526 { (exit 1); exit 1; }; }
8664else 9527else
8665 cat >conftest.$ac_ext <<_ACEOF 9528 cat >conftest.$ac_ext <<_ACEOF
8666#line 8666 "configure" 9529#line $LINENO "configure"
8667#include "confdefs.h" 9530/* confdefs.h. */
9531_ACEOF
9532cat confdefs.h >>conftest.$ac_ext
9533cat >>conftest.$ac_ext <<_ACEOF
9534/* end confdefs.h. */
8668 9535
8669#include <stdio.h> 9536#include <stdio.h>
8670#include <string.h> 9537#include <string.h>
@@ -8686,47 +9553,56 @@ int main(void) {
8686 9553
8687_ACEOF 9554_ACEOF
8688rm -f conftest$ac_exeext 9555rm -f conftest$ac_exeext
8689if { (eval echo "$as_me:8689: \"$ac_link\"") >&5 9556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8690 (eval $ac_link) 2>&5 9557 (eval $ac_link) 2>&5
8691 ac_status=$? 9558 ac_status=$?
8692 echo "$as_me:8692: \$? = $ac_status" >&5 9559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 9560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8694 { (eval echo "$as_me:8694: \"$ac_try\"") >&5 9561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5 9562 (eval $ac_try) 2>&5
8696 ac_status=$? 9563 ac_status=$?
8697 echo "$as_me:8697: \$? = $ac_status" >&5 9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; }; then 9565 (exit $ac_status); }; }; then
8699 9566
8700 ssl_header_ver=`cat conftest.sslincver` 9567 ssl_header_ver=`cat conftest.sslincver`
8701 echo "$as_me:8701: result: $ssl_header_ver" >&5 9568 echo "$as_me:$LINENO: result: $ssl_header_ver" >&5
8702echo "${ECHO_T}$ssl_header_ver" >&6 9569echo "${ECHO_T}$ssl_header_ver" >&6
8703 9570
8704else 9571else
8705 echo "$as_me: program exited with status $ac_status" >&5 9572 echo "$as_me: program exited with status $ac_status" >&5
8706echo "$as_me: failed program was:" >&5 9573echo "$as_me: failed program was:" >&5
8707cat conftest.$ac_ext >&5 9574sed 's/^/| /' conftest.$ac_ext >&5
8708 9575
8709 echo "$as_me:8709: result: not found" >&5 9576( exit $ac_status )
9577
9578 echo "$as_me:$LINENO: result: not found" >&5
8710echo "${ECHO_T}not found" >&6 9579echo "${ECHO_T}not found" >&6
8711 { { echo "$as_me:8711: error: OpenSSL version header not found." >&5 9580 { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5
8712echo "$as_me: error: OpenSSL version header not found." >&2;} 9581echo "$as_me: error: OpenSSL version header not found." >&2;}
8713 { (exit 1); exit 1; }; } 9582 { (exit 1); exit 1; }; }
8714 9583
9584
8715fi 9585fi
8716rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9586rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8717fi 9587fi
8718 9588
8719# Determine OpenSSL library version 9589# Determine OpenSSL library version
8720echo "$as_me:8720: checking OpenSSL library version" >&5 9590echo "$as_me:$LINENO: checking OpenSSL library version" >&5
8721echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6 9591echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6
8722if test "$cross_compiling" = yes; then 9592if test "$cross_compiling" = yes; then
8723 { { echo "$as_me:8723: error: cannot run test program while cross compiling" >&5 9593 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8724echo "$as_me: error: cannot run test program while cross compiling" >&2;} 9594See \`config.log' for more details." >&5
9595echo "$as_me: error: cannot run test program while cross compiling
9596See \`config.log' for more details." >&2;}
8725 { (exit 1); exit 1; }; } 9597 { (exit 1); exit 1; }; }
8726else 9598else
8727 cat >conftest.$ac_ext <<_ACEOF 9599 cat >conftest.$ac_ext <<_ACEOF
8728#line 8728 "configure" 9600#line $LINENO "configure"
8729#include "confdefs.h" 9601/* confdefs.h. */
9602_ACEOF
9603cat confdefs.h >>conftest.$ac_ext
9604cat >>conftest.$ac_ext <<_ACEOF
9605/* end confdefs.h. */
8730 9606
8731#include <stdio.h> 9607#include <stdio.h>
8732#include <string.h> 9608#include <string.h>
@@ -8749,47 +9625,56 @@ int main(void) {
8749 9625
8750_ACEOF 9626_ACEOF
8751rm -f conftest$ac_exeext 9627rm -f conftest$ac_exeext
8752if { (eval echo "$as_me:8752: \"$ac_link\"") >&5 9628if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8753 (eval $ac_link) 2>&5 9629 (eval $ac_link) 2>&5
8754 ac_status=$? 9630 ac_status=$?
8755 echo "$as_me:8755: \$? = $ac_status" >&5 9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8756 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 9632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8757 { (eval echo "$as_me:8757: \"$ac_try\"") >&5 9633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8758 (eval $ac_try) 2>&5 9634 (eval $ac_try) 2>&5
8759 ac_status=$? 9635 ac_status=$?
8760 echo "$as_me:8760: \$? = $ac_status" >&5 9636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761 (exit $ac_status); }; }; then 9637 (exit $ac_status); }; }; then
8762 9638
8763 ssl_library_ver=`cat conftest.ssllibver` 9639 ssl_library_ver=`cat conftest.ssllibver`
8764 echo "$as_me:8764: result: $ssl_library_ver" >&5 9640 echo "$as_me:$LINENO: result: $ssl_library_ver" >&5
8765echo "${ECHO_T}$ssl_library_ver" >&6 9641echo "${ECHO_T}$ssl_library_ver" >&6
8766 9642
8767else 9643else
8768 echo "$as_me: program exited with status $ac_status" >&5 9644 echo "$as_me: program exited with status $ac_status" >&5
8769echo "$as_me: failed program was:" >&5 9645echo "$as_me: failed program was:" >&5
8770cat conftest.$ac_ext >&5 9646sed 's/^/| /' conftest.$ac_ext >&5
9647
9648( exit $ac_status )
8771 9649
8772 echo "$as_me:8772: result: not found" >&5 9650 echo "$as_me:$LINENO: result: not found" >&5
8773echo "${ECHO_T}not found" >&6 9651echo "${ECHO_T}not found" >&6
8774 { { echo "$as_me:8774: error: OpenSSL library not found." >&5 9652 { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5
8775echo "$as_me: error: OpenSSL library not found." >&2;} 9653echo "$as_me: error: OpenSSL library not found." >&2;}
8776 { (exit 1); exit 1; }; } 9654 { (exit 1); exit 1; }; }
8777 9655
9656
8778fi 9657fi
8779rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9658rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8780fi 9659fi
8781 9660
8782# Sanity check OpenSSL headers 9661# Sanity check OpenSSL headers
8783echo "$as_me:8783: checking whether OpenSSL's headers match the library" >&5 9662echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5
8784echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6 9663echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6
8785if test "$cross_compiling" = yes; then 9664if test "$cross_compiling" = yes; then
8786 { { echo "$as_me:8786: error: cannot run test program while cross compiling" >&5 9665 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8787echo "$as_me: error: cannot run test program while cross compiling" >&2;} 9666See \`config.log' for more details." >&5
9667echo "$as_me: error: cannot run test program while cross compiling
9668See \`config.log' for more details." >&2;}
8788 { (exit 1); exit 1; }; } 9669 { (exit 1); exit 1; }; }
8789else 9670else
8790 cat >conftest.$ac_ext <<_ACEOF 9671 cat >conftest.$ac_ext <<_ACEOF
8791#line 8791 "configure" 9672#line $LINENO "configure"
8792#include "confdefs.h" 9673/* confdefs.h. */
9674_ACEOF
9675cat confdefs.h >>conftest.$ac_ext
9676cat >>conftest.$ac_ext <<_ACEOF
9677/* end confdefs.h. */
8793 9678
8794#include <string.h> 9679#include <string.h>
8795#include <openssl/opensslv.h> 9680#include <openssl/opensslv.h>
@@ -8797,43 +9682,42 @@ int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
8797 9682
8798_ACEOF 9683_ACEOF
8799rm -f conftest$ac_exeext 9684rm -f conftest$ac_exeext
8800if { (eval echo "$as_me:8800: \"$ac_link\"") >&5 9685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8801 (eval $ac_link) 2>&5 9686 (eval $ac_link) 2>&5
8802 ac_status=$? 9687 ac_status=$?
8803 echo "$as_me:8803: \$? = $ac_status" >&5 9688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 9689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8805 { (eval echo "$as_me:8805: \"$ac_try\"") >&5 9690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8806 (eval $ac_try) 2>&5 9691 (eval $ac_try) 2>&5
8807 ac_status=$? 9692 ac_status=$?
8808 echo "$as_me:8808: \$? = $ac_status" >&5 9693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8809 (exit $ac_status); }; }; then 9694 (exit $ac_status); }; }; then
8810 9695
8811 echo "$as_me:8811: result: yes" >&5 9696 echo "$as_me:$LINENO: result: yes" >&5
8812echo "${ECHO_T}yes" >&6 9697echo "${ECHO_T}yes" >&6
8813 9698
8814else 9699else
8815 echo "$as_me: program exited with status $ac_status" >&5 9700 echo "$as_me: program exited with status $ac_status" >&5
8816echo "$as_me: failed program was:" >&5 9701echo "$as_me: failed program was:" >&5
8817cat conftest.$ac_ext >&5 9702sed 's/^/| /' conftest.$ac_ext >&5
8818 9703
8819 echo "$as_me:8819: result: no" >&5 9704( exit $ac_status )
9705
9706 echo "$as_me:$LINENO: result: no" >&5
8820echo "${ECHO_T}no" >&6 9707echo "${ECHO_T}no" >&6
8821 { { echo "$as_me:8821: error: Your OpenSSL headers do not match your library. 9708 { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your library" >&5
8822Check config.log for details. 9709echo "$as_me: error: Your OpenSSL headers do not match your library" >&2;}
8823Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
8824echo "$as_me: error: Your OpenSSL headers do not match your library.
8825Check config.log for details.
8826Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
8827 { (exit 1); exit 1; }; } 9710 { (exit 1); exit 1; }; }
8828 9711
9712
8829fi 9713fi
8830rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9714rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8831fi 9715fi
8832 9716
8833# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 9717# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
8834# version in OpenSSL. Skip this for PAM 9718# version in OpenSSL. Skip this for PAM
8835if test "x$check_for_libcrypt_later" = "x1"; then 9719if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
8836 echo "$as_me:8836: checking for crypt in -lcrypt" >&5 9720 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
8837echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 9721echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
8838if test "${ac_cv_lib_crypt_crypt+set}" = set; then 9722if test "${ac_cv_lib_crypt_crypt+set}" = set; then
8839 echo $ECHO_N "(cached) $ECHO_C" >&6 9723 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8841,8 +9725,12 @@ else
8841 ac_check_lib_save_LIBS=$LIBS 9725 ac_check_lib_save_LIBS=$LIBS
8842LIBS="-lcrypt $LIBS" 9726LIBS="-lcrypt $LIBS"
8843cat >conftest.$ac_ext <<_ACEOF 9727cat >conftest.$ac_ext <<_ACEOF
8844#line 8844 "configure" 9728#line $LINENO "configure"
8845#include "confdefs.h" 9729/* confdefs.h. */
9730_ACEOF
9731cat confdefs.h >>conftest.$ac_ext
9732cat >>conftest.$ac_ext <<_ACEOF
9733/* end confdefs.h. */
8846 9734
8847/* Override any gcc2 internal prototype to avoid an error. */ 9735/* Override any gcc2 internal prototype to avoid an error. */
8848#ifdef __cplusplus 9736#ifdef __cplusplus
@@ -8860,27 +9748,28 @@ crypt ();
8860} 9748}
8861_ACEOF 9749_ACEOF
8862rm -f conftest.$ac_objext conftest$ac_exeext 9750rm -f conftest.$ac_objext conftest$ac_exeext
8863if { (eval echo "$as_me:8863: \"$ac_link\"") >&5 9751if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8864 (eval $ac_link) 2>&5 9752 (eval $ac_link) 2>&5
8865 ac_status=$? 9753 ac_status=$?
8866 echo "$as_me:8866: \$? = $ac_status" >&5 9754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8867 (exit $ac_status); } && 9755 (exit $ac_status); } &&
8868 { ac_try='test -s conftest$ac_exeext' 9756 { ac_try='test -s conftest$ac_exeext'
8869 { (eval echo "$as_me:8869: \"$ac_try\"") >&5 9757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8870 (eval $ac_try) 2>&5 9758 (eval $ac_try) 2>&5
8871 ac_status=$? 9759 ac_status=$?
8872 echo "$as_me:8872: \$? = $ac_status" >&5 9760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8873 (exit $ac_status); }; }; then 9761 (exit $ac_status); }; }; then
8874 ac_cv_lib_crypt_crypt=yes 9762 ac_cv_lib_crypt_crypt=yes
8875else 9763else
8876 echo "$as_me: failed program was:" >&5 9764 echo "$as_me: failed program was:" >&5
8877cat conftest.$ac_ext >&5 9765sed 's/^/| /' conftest.$ac_ext >&5
9766
8878ac_cv_lib_crypt_crypt=no 9767ac_cv_lib_crypt_crypt=no
8879fi 9768fi
8880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 9769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8881LIBS=$ac_check_lib_save_LIBS 9770LIBS=$ac_check_lib_save_LIBS
8882fi 9771fi
8883echo "$as_me:8883: result: $ac_cv_lib_crypt_crypt" >&5 9772echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
8884echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 9773echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
8885if test $ac_cv_lib_crypt_crypt = yes; then 9774if test $ac_cv_lib_crypt_crypt = yes; then
8886 LIBS="$LIBS -lcrypt" 9775 LIBS="$LIBS -lcrypt"
@@ -8888,19 +9777,26 @@ fi
8888 9777
8889fi 9778fi
8890 9779
9780
8891### Configure cryptographic random number support 9781### Configure cryptographic random number support
8892 9782
8893# Check wheter OpenSSL seeds itself 9783# Check wheter OpenSSL seeds itself
8894echo "$as_me:8894: checking whether OpenSSL's PRNG is internally seeded" >&5 9784echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5
8895echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6 9785echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6
8896if test "$cross_compiling" = yes; then 9786if test "$cross_compiling" = yes; then
8897 { { echo "$as_me:8897: error: cannot run test program while cross compiling" >&5 9787 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8898echo "$as_me: error: cannot run test program while cross compiling" >&2;} 9788See \`config.log' for more details." >&5
9789echo "$as_me: error: cannot run test program while cross compiling
9790See \`config.log' for more details." >&2;}
8899 { (exit 1); exit 1; }; } 9791 { (exit 1); exit 1; }; }
8900else 9792else
8901 cat >conftest.$ac_ext <<_ACEOF 9793 cat >conftest.$ac_ext <<_ACEOF
8902#line 8902 "configure" 9794#line $LINENO "configure"
8903#include "confdefs.h" 9795/* confdefs.h. */
9796_ACEOF
9797cat confdefs.h >>conftest.$ac_ext
9798cat >>conftest.$ac_ext <<_ACEOF
9799/* end confdefs.h. */
8904 9800
8905#include <string.h> 9801#include <string.h>
8906#include <openssl/rand.h> 9802#include <openssl/rand.h>
@@ -8908,36 +9804,40 @@ int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
8908 9804
8909_ACEOF 9805_ACEOF
8910rm -f conftest$ac_exeext 9806rm -f conftest$ac_exeext
8911if { (eval echo "$as_me:8911: \"$ac_link\"") >&5 9807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8912 (eval $ac_link) 2>&5 9808 (eval $ac_link) 2>&5
8913 ac_status=$? 9809 ac_status=$?
8914 echo "$as_me:8914: \$? = $ac_status" >&5 9810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 9811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8916 { (eval echo "$as_me:8916: \"$ac_try\"") >&5 9812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8917 (eval $ac_try) 2>&5 9813 (eval $ac_try) 2>&5
8918 ac_status=$? 9814 ac_status=$?
8919 echo "$as_me:8919: \$? = $ac_status" >&5 9815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 (exit $ac_status); }; }; then 9816 (exit $ac_status); }; }; then
8921 9817
8922 OPENSSL_SEEDS_ITSELF=yes 9818 OPENSSL_SEEDS_ITSELF=yes
8923 echo "$as_me:8923: result: yes" >&5 9819 echo "$as_me:$LINENO: result: yes" >&5
8924echo "${ECHO_T}yes" >&6 9820echo "${ECHO_T}yes" >&6
8925 9821
8926else 9822else
8927 echo "$as_me: program exited with status $ac_status" >&5 9823 echo "$as_me: program exited with status $ac_status" >&5
8928echo "$as_me: failed program was:" >&5 9824echo "$as_me: failed program was:" >&5
8929cat conftest.$ac_ext >&5 9825sed 's/^/| /' conftest.$ac_ext >&5
8930 9826
8931 echo "$as_me:8931: result: no" >&5 9827( exit $ac_status )
9828
9829 echo "$as_me:$LINENO: result: no" >&5
8932echo "${ECHO_T}no" >&6 9830echo "${ECHO_T}no" >&6
8933 # Default to use of the rand helper if OpenSSL doesn't 9831 # Default to use of the rand helper if OpenSSL doesn't
8934 # seed itself 9832 # seed itself
8935 USE_RAND_HELPER=yes 9833 USE_RAND_HELPER=yes
8936 9834
9835
8937fi 9836fi
8938rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9837rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8939fi 9838fi
8940 9839
9840
8941# Do we want to force the use of the rand helper? 9841# Do we want to force the use of the rand helper?
8942 9842
8943# Check whether --with-rand-helper or --without-rand-helper was given. 9843# Check whether --with-rand-helper or --without-rand-helper was given.
@@ -8948,7 +9848,7 @@ if test "${with_rand_helper+set}" = set; then
8948 # Force use of OpenSSL's internal RNG, even if 9848 # Force use of OpenSSL's internal RNG, even if
8949 # the previous test showed it to be unseeded. 9849 # the previous test showed it to be unseeded.
8950 if test -z "$OPENSSL_SEEDS_ITSELF" ; then 9850 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
8951 { echo "$as_me:8951: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&5 9851 { echo "$as_me:$LINENO: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&5
8952echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;} 9852echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;}
8953 OPENSSL_SEEDS_ITSELF=yes 9853 OPENSSL_SEEDS_ITSELF=yes
8954 USE_RAND_HELPER="" 9854 USE_RAND_HELPER=""
@@ -8962,9 +9862,9 @@ fi;
8962# Which randomness source do we use? 9862# Which randomness source do we use?
8963if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then 9863if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
8964 # OpenSSL only 9864 # OpenSSL only
8965 cat >>confdefs.h <<\EOF 9865 cat >>confdefs.h <<\_ACEOF
8966#define OPENSSL_PRNG_ONLY 1 9866#define OPENSSL_PRNG_ONLY 1
8967EOF 9867_ACEOF
8968 9868
8969 RAND_MSG="OpenSSL internal ONLY" 9869 RAND_MSG="OpenSSL internal ONLY"
8970 INSTALL_SSH_RAND_HELPER="" 9870 INSTALL_SSH_RAND_HELPER=""
@@ -8974,6 +9874,7 @@ elif test ! -z "$USE_RAND_HELPER" ; then
8974 INSTALL_SSH_RAND_HELPER="yes" 9874 INSTALL_SSH_RAND_HELPER="yes"
8975fi 9875fi
8976 9876
9877
8977### Configuration of ssh-rand-helper 9878### Configuration of ssh-rand-helper
8978 9879
8979# PRNGD TCP socket 9880# PRNGD TCP socket
@@ -8989,19 +9890,20 @@ if test "${with_prngd_port+set}" = set; then
8989 [0-9]*) 9890 [0-9]*)
8990 ;; 9891 ;;
8991 *) 9892 *)
8992 { { echo "$as_me:8992: error: You must specify a numeric port number for --with-prngd-port" >&5 9893 { { echo "$as_me:$LINENO: error: You must specify a numeric port number for --with-prngd-port" >&5
8993echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;} 9894echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;}
8994 { (exit 1); exit 1; }; } 9895 { (exit 1); exit 1; }; }
8995 ;; 9896 ;;
8996 esac 9897 esac
8997 if test ! -z "$withval" ; then 9898 if test ! -z "$withval" ; then
8998 PRNGD_PORT="$withval" 9899 PRNGD_PORT="$withval"
8999 cat >>confdefs.h <<EOF 9900 cat >>confdefs.h <<_ACEOF
9000#define PRNGD_PORT $PRNGD_PORT 9901#define PRNGD_PORT $PRNGD_PORT
9001EOF 9902_ACEOF
9002 9903
9003 fi 9904 fi
9004 9905
9906
9005fi; 9907fi;
9006 9908
9007# PRNGD Unix domain socket 9909# PRNGD Unix domain socket
@@ -9020,7 +9922,7 @@ if test "${with_prngd_socket+set}" = set; then
9020 /*) 9922 /*)
9021 ;; 9923 ;;
9022 *) 9924 *)
9023 { { echo "$as_me:9023: error: You must specify an absolute path to the entropy socket" >&5 9925 { { echo "$as_me:$LINENO: error: You must specify an absolute path to the entropy socket" >&5
9024echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;} 9926echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;}
9025 { (exit 1); exit 1; }; } 9927 { (exit 1); exit 1; }; }
9026 ;; 9928 ;;
@@ -9028,18 +9930,18 @@ echo "$as_me: error: You must specify an absolute path to the entropy socket" >&
9028 9930
9029 if test ! -z "$withval" ; then 9931 if test ! -z "$withval" ; then
9030 if test ! -z "$PRNGD_PORT" ; then 9932 if test ! -z "$PRNGD_PORT" ; then
9031 { { echo "$as_me:9031: error: You may not specify both a PRNGD/EGD port and socket" >&5 9933 { { echo "$as_me:$LINENO: error: You may not specify both a PRNGD/EGD port and socket" >&5
9032echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;} 9934echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;}
9033 { (exit 1); exit 1; }; } 9935 { (exit 1); exit 1; }; }
9034 fi 9936 fi
9035 if test ! -r "$withval" ; then 9937 if test ! -r "$withval" ; then
9036 { echo "$as_me:9036: WARNING: Entropy socket is not readable" >&5 9938 { echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5
9037echo "$as_me: WARNING: Entropy socket is not readable" >&2;} 9939echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
9038 fi 9940 fi
9039 PRNGD_SOCKET="$withval" 9941 PRNGD_SOCKET="$withval"
9040 cat >>confdefs.h <<EOF 9942 cat >>confdefs.h <<_ACEOF
9041#define PRNGD_SOCKET "$PRNGD_SOCKET" 9943#define PRNGD_SOCKET "$PRNGD_SOCKET"
9042EOF 9944_ACEOF
9043 9945
9044 fi 9946 fi
9045 9947
@@ -9047,28 +9949,29 @@ else
9047 9949
9048 # Check for existing socket only if we don't have a random device already 9950 # Check for existing socket only if we don't have a random device already
9049 if test "$USE_RAND_HELPER" = yes ; then 9951 if test "$USE_RAND_HELPER" = yes ; then
9050 echo "$as_me:9050: checking for PRNGD/EGD socket" >&5 9952 echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
9051echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6 9953echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6
9052 # Insert other locations here 9954 # Insert other locations here
9053 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do 9955 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
9054 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then 9956 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
9055 PRNGD_SOCKET="$sock" 9957 PRNGD_SOCKET="$sock"
9056 cat >>confdefs.h <<EOF 9958 cat >>confdefs.h <<_ACEOF
9057#define PRNGD_SOCKET "$PRNGD_SOCKET" 9959#define PRNGD_SOCKET "$PRNGD_SOCKET"
9058EOF 9960_ACEOF
9059 9961
9060 break; 9962 break;
9061 fi 9963 fi
9062 done 9964 done
9063 if test ! -z "$PRNGD_SOCKET" ; then 9965 if test ! -z "$PRNGD_SOCKET" ; then
9064 echo "$as_me:9064: result: $PRNGD_SOCKET" >&5 9966 echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
9065echo "${ECHO_T}$PRNGD_SOCKET" >&6 9967echo "${ECHO_T}$PRNGD_SOCKET" >&6
9066 else 9968 else
9067 echo "$as_me:9067: result: not found" >&5 9969 echo "$as_me:$LINENO: result: not found" >&5
9068echo "${ECHO_T}not found" >&6 9970echo "${ECHO_T}not found" >&6
9069 fi 9971 fi
9070 fi 9972 fi
9071 9973
9974
9072fi; 9975fi;
9073 9976
9074# Change default command timeout for hashing entropy source 9977# Change default command timeout for hashing entropy source
@@ -9082,10 +9985,12 @@ if test "${with_entropy_timeout+set}" = set; then
9082 entropy_timeout=$withval 9985 entropy_timeout=$withval
9083 fi 9986 fi
9084 9987
9988
9085fi; 9989fi;
9086cat >>confdefs.h <<EOF 9990cat >>confdefs.h <<_ACEOF
9087#define ENTROPY_TIMEOUT_MSEC $entropy_timeout 9991#define ENTROPY_TIMEOUT_MSEC $entropy_timeout
9088EOF 9992_ACEOF
9993
9089 9994
9090SSH_PRIVSEP_USER=sshd 9995SSH_PRIVSEP_USER=sshd
9091 9996
@@ -9097,10 +10002,13 @@ if test "${with_privsep_user+set}" = set; then
9097 SSH_PRIVSEP_USER=$withval 10002 SSH_PRIVSEP_USER=$withval
9098 fi 10003 fi
9099 10004
10005
9100fi; 10006fi;
9101cat >>confdefs.h <<EOF 10007cat >>confdefs.h <<_ACEOF
9102#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER" 10008#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
9103EOF 10009_ACEOF
10010
10011
9104 10012
9105# We do this little dance with the search path to insure 10013# We do this little dance with the search path to insure
9106# that programs that we select for use by installed programs 10014# that programs that we select for use by installed programs
@@ -9120,7 +10028,7 @@ PATH=$PATH:/etc:$OPATH
9120 10028
9121 # Extract the first word of "ls", so it can be a program name with args. 10029 # Extract the first word of "ls", so it can be a program name with args.
9122set dummy ls; ac_word=$2 10030set dummy ls; ac_word=$2
9123echo "$as_me:9123: checking for $ac_word" >&5 10031echo "$as_me:$LINENO: checking for $ac_word" >&5
9124echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9125if test "${ac_cv_path_PROG_LS+set}" = set; then 10033if test "${ac_cv_path_PROG_LS+set}" = set; then
9126 echo $ECHO_N "(cached) $ECHO_C" >&6 10034 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9130,16 +10038,18 @@ else
9130 ac_cv_path_PROG_LS="$PROG_LS" # Let the user override the test with a path. 10038 ac_cv_path_PROG_LS="$PROG_LS" # Let the user override the test with a path.
9131 ;; 10039 ;;
9132 *) 10040 *)
9133 ac_save_IFS=$IFS; IFS=$ac_path_separator 10041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9134ac_dummy="$PATH" 10042for as_dir in $PATH
9135for ac_dir in $ac_dummy; do 10043do
9136 IFS=$ac_save_IFS 10044 IFS=$as_save_IFS
9137 test -z "$ac_dir" && ac_dir=. 10045 test -z "$as_dir" && as_dir=.
9138 if $as_executable_p "$ac_dir/$ac_word"; then 10046 for ac_exec_ext in '' $ac_executable_extensions; do
9139 ac_cv_path_PROG_LS="$ac_dir/$ac_word" 10047 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9140 echo "$as_me:9140: found $ac_dir/$ac_word" >&5 10048 ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext"
9141 break 10049 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9142fi 10050 break 2
10051 fi
10052done
9143done 10053done
9144 10054
9145 ;; 10055 ;;
@@ -9148,10 +10058,10 @@ fi
9148PROG_LS=$ac_cv_path_PROG_LS 10058PROG_LS=$ac_cv_path_PROG_LS
9149 10059
9150if test -n "$PROG_LS"; then 10060if test -n "$PROG_LS"; then
9151 echo "$as_me:9151: result: $PROG_LS" >&5 10061 echo "$as_me:$LINENO: result: $PROG_LS" >&5
9152echo "${ECHO_T}$PROG_LS" >&6 10062echo "${ECHO_T}$PROG_LS" >&6
9153else 10063else
9154 echo "$as_me:9154: result: no" >&5 10064 echo "$as_me:$LINENO: result: no" >&5
9155echo "${ECHO_T}no" >&6 10065echo "${ECHO_T}no" >&6
9156fi 10066fi
9157 10067
@@ -9159,9 +10069,11 @@ fi
9159 PROG_LS="undef" 10069 PROG_LS="undef"
9160 fi 10070 fi
9161 10071
10072
10073
9162 # Extract the first word of "netstat", so it can be a program name with args. 10074 # Extract the first word of "netstat", so it can be a program name with args.
9163set dummy netstat; ac_word=$2 10075set dummy netstat; ac_word=$2
9164echo "$as_me:9164: checking for $ac_word" >&5 10076echo "$as_me:$LINENO: checking for $ac_word" >&5
9165echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10077echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9166if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then 10078if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
9167 echo $ECHO_N "(cached) $ECHO_C" >&6 10079 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9171,16 +10083,18 @@ else
9171 ac_cv_path_PROG_NETSTAT="$PROG_NETSTAT" # Let the user override the test with a path. 10083 ac_cv_path_PROG_NETSTAT="$PROG_NETSTAT" # Let the user override the test with a path.
9172 ;; 10084 ;;
9173 *) 10085 *)
9174 ac_save_IFS=$IFS; IFS=$ac_path_separator 10086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9175ac_dummy="$PATH" 10087for as_dir in $PATH
9176for ac_dir in $ac_dummy; do 10088do
9177 IFS=$ac_save_IFS 10089 IFS=$as_save_IFS
9178 test -z "$ac_dir" && ac_dir=. 10090 test -z "$as_dir" && as_dir=.
9179 if $as_executable_p "$ac_dir/$ac_word"; then 10091 for ac_exec_ext in '' $ac_executable_extensions; do
9180 ac_cv_path_PROG_NETSTAT="$ac_dir/$ac_word" 10092 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9181 echo "$as_me:9181: found $ac_dir/$ac_word" >&5 10093 ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext"
9182 break 10094 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9183fi 10095 break 2
10096 fi
10097done
9184done 10098done
9185 10099
9186 ;; 10100 ;;
@@ -9189,10 +10103,10 @@ fi
9189PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT 10103PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
9190 10104
9191if test -n "$PROG_NETSTAT"; then 10105if test -n "$PROG_NETSTAT"; then
9192 echo "$as_me:9192: result: $PROG_NETSTAT" >&5 10106 echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5
9193echo "${ECHO_T}$PROG_NETSTAT" >&6 10107echo "${ECHO_T}$PROG_NETSTAT" >&6
9194else 10108else
9195 echo "$as_me:9195: result: no" >&5 10109 echo "$as_me:$LINENO: result: no" >&5
9196echo "${ECHO_T}no" >&6 10110echo "${ECHO_T}no" >&6
9197fi 10111fi
9198 10112
@@ -9200,9 +10114,11 @@ fi
9200 PROG_NETSTAT="undef" 10114 PROG_NETSTAT="undef"
9201 fi 10115 fi
9202 10116
10117
10118
9203 # Extract the first word of "arp", so it can be a program name with args. 10119 # Extract the first word of "arp", so it can be a program name with args.
9204set dummy arp; ac_word=$2 10120set dummy arp; ac_word=$2
9205echo "$as_me:9205: checking for $ac_word" >&5 10121echo "$as_me:$LINENO: checking for $ac_word" >&5
9206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9207if test "${ac_cv_path_PROG_ARP+set}" = set; then 10123if test "${ac_cv_path_PROG_ARP+set}" = set; then
9208 echo $ECHO_N "(cached) $ECHO_C" >&6 10124 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9212,16 +10128,18 @@ else
9212 ac_cv_path_PROG_ARP="$PROG_ARP" # Let the user override the test with a path. 10128 ac_cv_path_PROG_ARP="$PROG_ARP" # Let the user override the test with a path.
9213 ;; 10129 ;;
9214 *) 10130 *)
9215 ac_save_IFS=$IFS; IFS=$ac_path_separator 10131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9216ac_dummy="$PATH" 10132for as_dir in $PATH
9217for ac_dir in $ac_dummy; do 10133do
9218 IFS=$ac_save_IFS 10134 IFS=$as_save_IFS
9219 test -z "$ac_dir" && ac_dir=. 10135 test -z "$as_dir" && as_dir=.
9220 if $as_executable_p "$ac_dir/$ac_word"; then 10136 for ac_exec_ext in '' $ac_executable_extensions; do
9221 ac_cv_path_PROG_ARP="$ac_dir/$ac_word" 10137 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9222 echo "$as_me:9222: found $ac_dir/$ac_word" >&5 10138 ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext"
9223 break 10139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9224fi 10140 break 2
10141 fi
10142done
9225done 10143done
9226 10144
9227 ;; 10145 ;;
@@ -9230,10 +10148,10 @@ fi
9230PROG_ARP=$ac_cv_path_PROG_ARP 10148PROG_ARP=$ac_cv_path_PROG_ARP
9231 10149
9232if test -n "$PROG_ARP"; then 10150if test -n "$PROG_ARP"; then
9233 echo "$as_me:9233: result: $PROG_ARP" >&5 10151 echo "$as_me:$LINENO: result: $PROG_ARP" >&5
9234echo "${ECHO_T}$PROG_ARP" >&6 10152echo "${ECHO_T}$PROG_ARP" >&6
9235else 10153else
9236 echo "$as_me:9236: result: no" >&5 10154 echo "$as_me:$LINENO: result: no" >&5
9237echo "${ECHO_T}no" >&6 10155echo "${ECHO_T}no" >&6
9238fi 10156fi
9239 10157
@@ -9241,9 +10159,11 @@ fi
9241 PROG_ARP="undef" 10159 PROG_ARP="undef"
9242 fi 10160 fi
9243 10161
10162
10163
9244 # Extract the first word of "ifconfig", so it can be a program name with args. 10164 # Extract the first word of "ifconfig", so it can be a program name with args.
9245set dummy ifconfig; ac_word=$2 10165set dummy ifconfig; ac_word=$2
9246echo "$as_me:9246: checking for $ac_word" >&5 10166echo "$as_me:$LINENO: checking for $ac_word" >&5
9247echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9248if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then 10168if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
9249 echo $ECHO_N "(cached) $ECHO_C" >&6 10169 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9253,16 +10173,18 @@ else
9253 ac_cv_path_PROG_IFCONFIG="$PROG_IFCONFIG" # Let the user override the test with a path. 10173 ac_cv_path_PROG_IFCONFIG="$PROG_IFCONFIG" # Let the user override the test with a path.
9254 ;; 10174 ;;
9255 *) 10175 *)
9256 ac_save_IFS=$IFS; IFS=$ac_path_separator 10176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257ac_dummy="$PATH" 10177for as_dir in $PATH
9258for ac_dir in $ac_dummy; do 10178do
9259 IFS=$ac_save_IFS 10179 IFS=$as_save_IFS
9260 test -z "$ac_dir" && ac_dir=. 10180 test -z "$as_dir" && as_dir=.
9261 if $as_executable_p "$ac_dir/$ac_word"; then 10181 for ac_exec_ext in '' $ac_executable_extensions; do
9262 ac_cv_path_PROG_IFCONFIG="$ac_dir/$ac_word" 10182 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9263 echo "$as_me:9263: found $ac_dir/$ac_word" >&5 10183 ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext"
9264 break 10184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9265fi 10185 break 2
10186 fi
10187done
9266done 10188done
9267 10189
9268 ;; 10190 ;;
@@ -9271,10 +10193,10 @@ fi
9271PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG 10193PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
9272 10194
9273if test -n "$PROG_IFCONFIG"; then 10195if test -n "$PROG_IFCONFIG"; then
9274 echo "$as_me:9274: result: $PROG_IFCONFIG" >&5 10196 echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5
9275echo "${ECHO_T}$PROG_IFCONFIG" >&6 10197echo "${ECHO_T}$PROG_IFCONFIG" >&6
9276else 10198else
9277 echo "$as_me:9277: result: no" >&5 10199 echo "$as_me:$LINENO: result: no" >&5
9278echo "${ECHO_T}no" >&6 10200echo "${ECHO_T}no" >&6
9279fi 10201fi
9280 10202
@@ -9282,9 +10204,11 @@ fi
9282 PROG_IFCONFIG="undef" 10204 PROG_IFCONFIG="undef"
9283 fi 10205 fi
9284 10206
10207
10208
9285 # Extract the first word of "jstat", so it can be a program name with args. 10209 # Extract the first word of "jstat", so it can be a program name with args.
9286set dummy jstat; ac_word=$2 10210set dummy jstat; ac_word=$2
9287echo "$as_me:9287: checking for $ac_word" >&5 10211echo "$as_me:$LINENO: checking for $ac_word" >&5
9288echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9289if test "${ac_cv_path_PROG_JSTAT+set}" = set; then 10213if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
9290 echo $ECHO_N "(cached) $ECHO_C" >&6 10214 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9294,16 +10218,18 @@ else
9294 ac_cv_path_PROG_JSTAT="$PROG_JSTAT" # Let the user override the test with a path. 10218 ac_cv_path_PROG_JSTAT="$PROG_JSTAT" # Let the user override the test with a path.
9295 ;; 10219 ;;
9296 *) 10220 *)
9297 ac_save_IFS=$IFS; IFS=$ac_path_separator 10221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9298ac_dummy="$PATH" 10222for as_dir in $PATH
9299for ac_dir in $ac_dummy; do 10223do
9300 IFS=$ac_save_IFS 10224 IFS=$as_save_IFS
9301 test -z "$ac_dir" && ac_dir=. 10225 test -z "$as_dir" && as_dir=.
9302 if $as_executable_p "$ac_dir/$ac_word"; then 10226 for ac_exec_ext in '' $ac_executable_extensions; do
9303 ac_cv_path_PROG_JSTAT="$ac_dir/$ac_word" 10227 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9304 echo "$as_me:9304: found $ac_dir/$ac_word" >&5 10228 ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext"
9305 break 10229 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9306fi 10230 break 2
10231 fi
10232done
9307done 10233done
9308 10234
9309 ;; 10235 ;;
@@ -9312,10 +10238,10 @@ fi
9312PROG_JSTAT=$ac_cv_path_PROG_JSTAT 10238PROG_JSTAT=$ac_cv_path_PROG_JSTAT
9313 10239
9314if test -n "$PROG_JSTAT"; then 10240if test -n "$PROG_JSTAT"; then
9315 echo "$as_me:9315: result: $PROG_JSTAT" >&5 10241 echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5
9316echo "${ECHO_T}$PROG_JSTAT" >&6 10242echo "${ECHO_T}$PROG_JSTAT" >&6
9317else 10243else
9318 echo "$as_me:9318: result: no" >&5 10244 echo "$as_me:$LINENO: result: no" >&5
9319echo "${ECHO_T}no" >&6 10245echo "${ECHO_T}no" >&6
9320fi 10246fi
9321 10247
@@ -9323,9 +10249,11 @@ fi
9323 PROG_JSTAT="undef" 10249 PROG_JSTAT="undef"
9324 fi 10250 fi
9325 10251
10252
10253
9326 # Extract the first word of "ps", so it can be a program name with args. 10254 # Extract the first word of "ps", so it can be a program name with args.
9327set dummy ps; ac_word=$2 10255set dummy ps; ac_word=$2
9328echo "$as_me:9328: checking for $ac_word" >&5 10256echo "$as_me:$LINENO: checking for $ac_word" >&5
9329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9330if test "${ac_cv_path_PROG_PS+set}" = set; then 10258if test "${ac_cv_path_PROG_PS+set}" = set; then
9331 echo $ECHO_N "(cached) $ECHO_C" >&6 10259 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9335,16 +10263,18 @@ else
9335 ac_cv_path_PROG_PS="$PROG_PS" # Let the user override the test with a path. 10263 ac_cv_path_PROG_PS="$PROG_PS" # Let the user override the test with a path.
9336 ;; 10264 ;;
9337 *) 10265 *)
9338 ac_save_IFS=$IFS; IFS=$ac_path_separator 10266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339ac_dummy="$PATH" 10267for as_dir in $PATH
9340for ac_dir in $ac_dummy; do 10268do
9341 IFS=$ac_save_IFS 10269 IFS=$as_save_IFS
9342 test -z "$ac_dir" && ac_dir=. 10270 test -z "$as_dir" && as_dir=.
9343 if $as_executable_p "$ac_dir/$ac_word"; then 10271 for ac_exec_ext in '' $ac_executable_extensions; do
9344 ac_cv_path_PROG_PS="$ac_dir/$ac_word" 10272 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9345 echo "$as_me:9345: found $ac_dir/$ac_word" >&5 10273 ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext"
9346 break 10274 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9347fi 10275 break 2
10276 fi
10277done
9348done 10278done
9349 10279
9350 ;; 10280 ;;
@@ -9353,10 +10283,10 @@ fi
9353PROG_PS=$ac_cv_path_PROG_PS 10283PROG_PS=$ac_cv_path_PROG_PS
9354 10284
9355if test -n "$PROG_PS"; then 10285if test -n "$PROG_PS"; then
9356 echo "$as_me:9356: result: $PROG_PS" >&5 10286 echo "$as_me:$LINENO: result: $PROG_PS" >&5
9357echo "${ECHO_T}$PROG_PS" >&6 10287echo "${ECHO_T}$PROG_PS" >&6
9358else 10288else
9359 echo "$as_me:9359: result: no" >&5 10289 echo "$as_me:$LINENO: result: no" >&5
9360echo "${ECHO_T}no" >&6 10290echo "${ECHO_T}no" >&6
9361fi 10291fi
9362 10292
@@ -9364,9 +10294,11 @@ fi
9364 PROG_PS="undef" 10294 PROG_PS="undef"
9365 fi 10295 fi
9366 10296
10297
10298
9367 # Extract the first word of "sar", so it can be a program name with args. 10299 # Extract the first word of "sar", so it can be a program name with args.
9368set dummy sar; ac_word=$2 10300set dummy sar; ac_word=$2
9369echo "$as_me:9369: checking for $ac_word" >&5 10301echo "$as_me:$LINENO: checking for $ac_word" >&5
9370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10302echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9371if test "${ac_cv_path_PROG_SAR+set}" = set; then 10303if test "${ac_cv_path_PROG_SAR+set}" = set; then
9372 echo $ECHO_N "(cached) $ECHO_C" >&6 10304 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9376,16 +10308,18 @@ else
9376 ac_cv_path_PROG_SAR="$PROG_SAR" # Let the user override the test with a path. 10308 ac_cv_path_PROG_SAR="$PROG_SAR" # Let the user override the test with a path.
9377 ;; 10309 ;;
9378 *) 10310 *)
9379 ac_save_IFS=$IFS; IFS=$ac_path_separator 10311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9380ac_dummy="$PATH" 10312for as_dir in $PATH
9381for ac_dir in $ac_dummy; do 10313do
9382 IFS=$ac_save_IFS 10314 IFS=$as_save_IFS
9383 test -z "$ac_dir" && ac_dir=. 10315 test -z "$as_dir" && as_dir=.
9384 if $as_executable_p "$ac_dir/$ac_word"; then 10316 for ac_exec_ext in '' $ac_executable_extensions; do
9385 ac_cv_path_PROG_SAR="$ac_dir/$ac_word" 10317 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9386 echo "$as_me:9386: found $ac_dir/$ac_word" >&5 10318 ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext"
9387 break 10319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9388fi 10320 break 2
10321 fi
10322done
9389done 10323done
9390 10324
9391 ;; 10325 ;;
@@ -9394,10 +10328,10 @@ fi
9394PROG_SAR=$ac_cv_path_PROG_SAR 10328PROG_SAR=$ac_cv_path_PROG_SAR
9395 10329
9396if test -n "$PROG_SAR"; then 10330if test -n "$PROG_SAR"; then
9397 echo "$as_me:9397: result: $PROG_SAR" >&5 10331 echo "$as_me:$LINENO: result: $PROG_SAR" >&5
9398echo "${ECHO_T}$PROG_SAR" >&6 10332echo "${ECHO_T}$PROG_SAR" >&6
9399else 10333else
9400 echo "$as_me:9400: result: no" >&5 10334 echo "$as_me:$LINENO: result: no" >&5
9401echo "${ECHO_T}no" >&6 10335echo "${ECHO_T}no" >&6
9402fi 10336fi
9403 10337
@@ -9405,9 +10339,11 @@ fi
9405 PROG_SAR="undef" 10339 PROG_SAR="undef"
9406 fi 10340 fi
9407 10341
10342
10343
9408 # Extract the first word of "w", so it can be a program name with args. 10344 # Extract the first word of "w", so it can be a program name with args.
9409set dummy w; ac_word=$2 10345set dummy w; ac_word=$2
9410echo "$as_me:9410: checking for $ac_word" >&5 10346echo "$as_me:$LINENO: checking for $ac_word" >&5
9411echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9412if test "${ac_cv_path_PROG_W+set}" = set; then 10348if test "${ac_cv_path_PROG_W+set}" = set; then
9413 echo $ECHO_N "(cached) $ECHO_C" >&6 10349 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9417,16 +10353,18 @@ else
9417 ac_cv_path_PROG_W="$PROG_W" # Let the user override the test with a path. 10353 ac_cv_path_PROG_W="$PROG_W" # Let the user override the test with a path.
9418 ;; 10354 ;;
9419 *) 10355 *)
9420 ac_save_IFS=$IFS; IFS=$ac_path_separator 10356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9421ac_dummy="$PATH" 10357for as_dir in $PATH
9422for ac_dir in $ac_dummy; do 10358do
9423 IFS=$ac_save_IFS 10359 IFS=$as_save_IFS
9424 test -z "$ac_dir" && ac_dir=. 10360 test -z "$as_dir" && as_dir=.
9425 if $as_executable_p "$ac_dir/$ac_word"; then 10361 for ac_exec_ext in '' $ac_executable_extensions; do
9426 ac_cv_path_PROG_W="$ac_dir/$ac_word" 10362 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9427 echo "$as_me:9427: found $ac_dir/$ac_word" >&5 10363 ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext"
9428 break 10364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9429fi 10365 break 2
10366 fi
10367done
9430done 10368done
9431 10369
9432 ;; 10370 ;;
@@ -9435,10 +10373,10 @@ fi
9435PROG_W=$ac_cv_path_PROG_W 10373PROG_W=$ac_cv_path_PROG_W
9436 10374
9437if test -n "$PROG_W"; then 10375if test -n "$PROG_W"; then
9438 echo "$as_me:9438: result: $PROG_W" >&5 10376 echo "$as_me:$LINENO: result: $PROG_W" >&5
9439echo "${ECHO_T}$PROG_W" >&6 10377echo "${ECHO_T}$PROG_W" >&6
9440else 10378else
9441 echo "$as_me:9441: result: no" >&5 10379 echo "$as_me:$LINENO: result: no" >&5
9442echo "${ECHO_T}no" >&6 10380echo "${ECHO_T}no" >&6
9443fi 10381fi
9444 10382
@@ -9446,9 +10384,11 @@ fi
9446 PROG_W="undef" 10384 PROG_W="undef"
9447 fi 10385 fi
9448 10386
10387
10388
9449 # Extract the first word of "who", so it can be a program name with args. 10389 # Extract the first word of "who", so it can be a program name with args.
9450set dummy who; ac_word=$2 10390set dummy who; ac_word=$2
9451echo "$as_me:9451: checking for $ac_word" >&5 10391echo "$as_me:$LINENO: checking for $ac_word" >&5
9452echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10392echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9453if test "${ac_cv_path_PROG_WHO+set}" = set; then 10393if test "${ac_cv_path_PROG_WHO+set}" = set; then
9454 echo $ECHO_N "(cached) $ECHO_C" >&6 10394 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9458,16 +10398,18 @@ else
9458 ac_cv_path_PROG_WHO="$PROG_WHO" # Let the user override the test with a path. 10398 ac_cv_path_PROG_WHO="$PROG_WHO" # Let the user override the test with a path.
9459 ;; 10399 ;;
9460 *) 10400 *)
9461 ac_save_IFS=$IFS; IFS=$ac_path_separator 10401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9462ac_dummy="$PATH" 10402for as_dir in $PATH
9463for ac_dir in $ac_dummy; do 10403do
9464 IFS=$ac_save_IFS 10404 IFS=$as_save_IFS
9465 test -z "$ac_dir" && ac_dir=. 10405 test -z "$as_dir" && as_dir=.
9466 if $as_executable_p "$ac_dir/$ac_word"; then 10406 for ac_exec_ext in '' $ac_executable_extensions; do
9467 ac_cv_path_PROG_WHO="$ac_dir/$ac_word" 10407 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9468 echo "$as_me:9468: found $ac_dir/$ac_word" >&5 10408 ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext"
9469 break 10409 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9470fi 10410 break 2
10411 fi
10412done
9471done 10413done
9472 10414
9473 ;; 10415 ;;
@@ -9476,10 +10418,10 @@ fi
9476PROG_WHO=$ac_cv_path_PROG_WHO 10418PROG_WHO=$ac_cv_path_PROG_WHO
9477 10419
9478if test -n "$PROG_WHO"; then 10420if test -n "$PROG_WHO"; then
9479 echo "$as_me:9479: result: $PROG_WHO" >&5 10421 echo "$as_me:$LINENO: result: $PROG_WHO" >&5
9480echo "${ECHO_T}$PROG_WHO" >&6 10422echo "${ECHO_T}$PROG_WHO" >&6
9481else 10423else
9482 echo "$as_me:9482: result: no" >&5 10424 echo "$as_me:$LINENO: result: no" >&5
9483echo "${ECHO_T}no" >&6 10425echo "${ECHO_T}no" >&6
9484fi 10426fi
9485 10427
@@ -9487,9 +10429,11 @@ fi
9487 PROG_WHO="undef" 10429 PROG_WHO="undef"
9488 fi 10430 fi
9489 10431
10432
10433
9490 # Extract the first word of "last", so it can be a program name with args. 10434 # Extract the first word of "last", so it can be a program name with args.
9491set dummy last; ac_word=$2 10435set dummy last; ac_word=$2
9492echo "$as_me:9492: checking for $ac_word" >&5 10436echo "$as_me:$LINENO: checking for $ac_word" >&5
9493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9494if test "${ac_cv_path_PROG_LAST+set}" = set; then 10438if test "${ac_cv_path_PROG_LAST+set}" = set; then
9495 echo $ECHO_N "(cached) $ECHO_C" >&6 10439 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9499,16 +10443,18 @@ else
9499 ac_cv_path_PROG_LAST="$PROG_LAST" # Let the user override the test with a path. 10443 ac_cv_path_PROG_LAST="$PROG_LAST" # Let the user override the test with a path.
9500 ;; 10444 ;;
9501 *) 10445 *)
9502 ac_save_IFS=$IFS; IFS=$ac_path_separator 10446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9503ac_dummy="$PATH" 10447for as_dir in $PATH
9504for ac_dir in $ac_dummy; do 10448do
9505 IFS=$ac_save_IFS 10449 IFS=$as_save_IFS
9506 test -z "$ac_dir" && ac_dir=. 10450 test -z "$as_dir" && as_dir=.
9507 if $as_executable_p "$ac_dir/$ac_word"; then 10451 for ac_exec_ext in '' $ac_executable_extensions; do
9508 ac_cv_path_PROG_LAST="$ac_dir/$ac_word" 10452 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9509 echo "$as_me:9509: found $ac_dir/$ac_word" >&5 10453 ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext"
9510 break 10454 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9511fi 10455 break 2
10456 fi
10457done
9512done 10458done
9513 10459
9514 ;; 10460 ;;
@@ -9517,10 +10463,10 @@ fi
9517PROG_LAST=$ac_cv_path_PROG_LAST 10463PROG_LAST=$ac_cv_path_PROG_LAST
9518 10464
9519if test -n "$PROG_LAST"; then 10465if test -n "$PROG_LAST"; then
9520 echo "$as_me:9520: result: $PROG_LAST" >&5 10466 echo "$as_me:$LINENO: result: $PROG_LAST" >&5
9521echo "${ECHO_T}$PROG_LAST" >&6 10467echo "${ECHO_T}$PROG_LAST" >&6
9522else 10468else
9523 echo "$as_me:9523: result: no" >&5 10469 echo "$as_me:$LINENO: result: no" >&5
9524echo "${ECHO_T}no" >&6 10470echo "${ECHO_T}no" >&6
9525fi 10471fi
9526 10472
@@ -9528,9 +10474,11 @@ fi
9528 PROG_LAST="undef" 10474 PROG_LAST="undef"
9529 fi 10475 fi
9530 10476
10477
10478
9531 # Extract the first word of "lastlog", so it can be a program name with args. 10479 # Extract the first word of "lastlog", so it can be a program name with args.
9532set dummy lastlog; ac_word=$2 10480set dummy lastlog; ac_word=$2
9533echo "$as_me:9533: checking for $ac_word" >&5 10481echo "$as_me:$LINENO: checking for $ac_word" >&5
9534echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10482echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9535if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then 10483if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
9536 echo $ECHO_N "(cached) $ECHO_C" >&6 10484 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9540,16 +10488,18 @@ else
9540 ac_cv_path_PROG_LASTLOG="$PROG_LASTLOG" # Let the user override the test with a path. 10488 ac_cv_path_PROG_LASTLOG="$PROG_LASTLOG" # Let the user override the test with a path.
9541 ;; 10489 ;;
9542 *) 10490 *)
9543 ac_save_IFS=$IFS; IFS=$ac_path_separator 10491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9544ac_dummy="$PATH" 10492for as_dir in $PATH
9545for ac_dir in $ac_dummy; do 10493do
9546 IFS=$ac_save_IFS 10494 IFS=$as_save_IFS
9547 test -z "$ac_dir" && ac_dir=. 10495 test -z "$as_dir" && as_dir=.
9548 if $as_executable_p "$ac_dir/$ac_word"; then 10496 for ac_exec_ext in '' $ac_executable_extensions; do
9549 ac_cv_path_PROG_LASTLOG="$ac_dir/$ac_word" 10497 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9550 echo "$as_me:9550: found $ac_dir/$ac_word" >&5 10498 ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext"
9551 break 10499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9552fi 10500 break 2
10501 fi
10502done
9553done 10503done
9554 10504
9555 ;; 10505 ;;
@@ -9558,10 +10508,10 @@ fi
9558PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG 10508PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
9559 10509
9560if test -n "$PROG_LASTLOG"; then 10510if test -n "$PROG_LASTLOG"; then
9561 echo "$as_me:9561: result: $PROG_LASTLOG" >&5 10511 echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5
9562echo "${ECHO_T}$PROG_LASTLOG" >&6 10512echo "${ECHO_T}$PROG_LASTLOG" >&6
9563else 10513else
9564 echo "$as_me:9564: result: no" >&5 10514 echo "$as_me:$LINENO: result: no" >&5
9565echo "${ECHO_T}no" >&6 10515echo "${ECHO_T}no" >&6
9566fi 10516fi
9567 10517
@@ -9569,9 +10519,11 @@ fi
9569 PROG_LASTLOG="undef" 10519 PROG_LASTLOG="undef"
9570 fi 10520 fi
9571 10521
10522
10523
9572 # Extract the first word of "df", so it can be a program name with args. 10524 # Extract the first word of "df", so it can be a program name with args.
9573set dummy df; ac_word=$2 10525set dummy df; ac_word=$2
9574echo "$as_me:9574: checking for $ac_word" >&5 10526echo "$as_me:$LINENO: checking for $ac_word" >&5
9575echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10527echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9576if test "${ac_cv_path_PROG_DF+set}" = set; then 10528if test "${ac_cv_path_PROG_DF+set}" = set; then
9577 echo $ECHO_N "(cached) $ECHO_C" >&6 10529 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9581,16 +10533,18 @@ else
9581 ac_cv_path_PROG_DF="$PROG_DF" # Let the user override the test with a path. 10533 ac_cv_path_PROG_DF="$PROG_DF" # Let the user override the test with a path.
9582 ;; 10534 ;;
9583 *) 10535 *)
9584 ac_save_IFS=$IFS; IFS=$ac_path_separator 10536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9585ac_dummy="$PATH" 10537for as_dir in $PATH
9586for ac_dir in $ac_dummy; do 10538do
9587 IFS=$ac_save_IFS 10539 IFS=$as_save_IFS
9588 test -z "$ac_dir" && ac_dir=. 10540 test -z "$as_dir" && as_dir=.
9589 if $as_executable_p "$ac_dir/$ac_word"; then 10541 for ac_exec_ext in '' $ac_executable_extensions; do
9590 ac_cv_path_PROG_DF="$ac_dir/$ac_word" 10542 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9591 echo "$as_me:9591: found $ac_dir/$ac_word" >&5 10543 ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext"
9592 break 10544 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9593fi 10545 break 2
10546 fi
10547done
9594done 10548done
9595 10549
9596 ;; 10550 ;;
@@ -9599,10 +10553,10 @@ fi
9599PROG_DF=$ac_cv_path_PROG_DF 10553PROG_DF=$ac_cv_path_PROG_DF
9600 10554
9601if test -n "$PROG_DF"; then 10555if test -n "$PROG_DF"; then
9602 echo "$as_me:9602: result: $PROG_DF" >&5 10556 echo "$as_me:$LINENO: result: $PROG_DF" >&5
9603echo "${ECHO_T}$PROG_DF" >&6 10557echo "${ECHO_T}$PROG_DF" >&6
9604else 10558else
9605 echo "$as_me:9605: result: no" >&5 10559 echo "$as_me:$LINENO: result: no" >&5
9606echo "${ECHO_T}no" >&6 10560echo "${ECHO_T}no" >&6
9607fi 10561fi
9608 10562
@@ -9610,9 +10564,11 @@ fi
9610 PROG_DF="undef" 10564 PROG_DF="undef"
9611 fi 10565 fi
9612 10566
10567
10568
9613 # Extract the first word of "vmstat", so it can be a program name with args. 10569 # Extract the first word of "vmstat", so it can be a program name with args.
9614set dummy vmstat; ac_word=$2 10570set dummy vmstat; ac_word=$2
9615echo "$as_me:9615: checking for $ac_word" >&5 10571echo "$as_me:$LINENO: checking for $ac_word" >&5
9616echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10572echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9617if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then 10573if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
9618 echo $ECHO_N "(cached) $ECHO_C" >&6 10574 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9622,16 +10578,18 @@ else
9622 ac_cv_path_PROG_VMSTAT="$PROG_VMSTAT" # Let the user override the test with a path. 10578 ac_cv_path_PROG_VMSTAT="$PROG_VMSTAT" # Let the user override the test with a path.
9623 ;; 10579 ;;
9624 *) 10580 *)
9625 ac_save_IFS=$IFS; IFS=$ac_path_separator 10581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9626ac_dummy="$PATH" 10582for as_dir in $PATH
9627for ac_dir in $ac_dummy; do 10583do
9628 IFS=$ac_save_IFS 10584 IFS=$as_save_IFS
9629 test -z "$ac_dir" && ac_dir=. 10585 test -z "$as_dir" && as_dir=.
9630 if $as_executable_p "$ac_dir/$ac_word"; then 10586 for ac_exec_ext in '' $ac_executable_extensions; do
9631 ac_cv_path_PROG_VMSTAT="$ac_dir/$ac_word" 10587 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9632 echo "$as_me:9632: found $ac_dir/$ac_word" >&5 10588 ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext"
9633 break 10589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9634fi 10590 break 2
10591 fi
10592done
9635done 10593done
9636 10594
9637 ;; 10595 ;;
@@ -9640,10 +10598,10 @@ fi
9640PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT 10598PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
9641 10599
9642if test -n "$PROG_VMSTAT"; then 10600if test -n "$PROG_VMSTAT"; then
9643 echo "$as_me:9643: result: $PROG_VMSTAT" >&5 10601 echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5
9644echo "${ECHO_T}$PROG_VMSTAT" >&6 10602echo "${ECHO_T}$PROG_VMSTAT" >&6
9645else 10603else
9646 echo "$as_me:9646: result: no" >&5 10604 echo "$as_me:$LINENO: result: no" >&5
9647echo "${ECHO_T}no" >&6 10605echo "${ECHO_T}no" >&6
9648fi 10606fi
9649 10607
@@ -9651,9 +10609,11 @@ fi
9651 PROG_VMSTAT="undef" 10609 PROG_VMSTAT="undef"
9652 fi 10610 fi
9653 10611
10612
10613
9654 # Extract the first word of "uptime", so it can be a program name with args. 10614 # Extract the first word of "uptime", so it can be a program name with args.
9655set dummy uptime; ac_word=$2 10615set dummy uptime; ac_word=$2
9656echo "$as_me:9656: checking for $ac_word" >&5 10616echo "$as_me:$LINENO: checking for $ac_word" >&5
9657echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10617echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9658if test "${ac_cv_path_PROG_UPTIME+set}" = set; then 10618if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
9659 echo $ECHO_N "(cached) $ECHO_C" >&6 10619 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9663,16 +10623,18 @@ else
9663 ac_cv_path_PROG_UPTIME="$PROG_UPTIME" # Let the user override the test with a path. 10623 ac_cv_path_PROG_UPTIME="$PROG_UPTIME" # Let the user override the test with a path.
9664 ;; 10624 ;;
9665 *) 10625 *)
9666 ac_save_IFS=$IFS; IFS=$ac_path_separator 10626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9667ac_dummy="$PATH" 10627for as_dir in $PATH
9668for ac_dir in $ac_dummy; do 10628do
9669 IFS=$ac_save_IFS 10629 IFS=$as_save_IFS
9670 test -z "$ac_dir" && ac_dir=. 10630 test -z "$as_dir" && as_dir=.
9671 if $as_executable_p "$ac_dir/$ac_word"; then 10631 for ac_exec_ext in '' $ac_executable_extensions; do
9672 ac_cv_path_PROG_UPTIME="$ac_dir/$ac_word" 10632 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9673 echo "$as_me:9673: found $ac_dir/$ac_word" >&5 10633 ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext"
9674 break 10634 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9675fi 10635 break 2
10636 fi
10637done
9676done 10638done
9677 10639
9678 ;; 10640 ;;
@@ -9681,10 +10643,10 @@ fi
9681PROG_UPTIME=$ac_cv_path_PROG_UPTIME 10643PROG_UPTIME=$ac_cv_path_PROG_UPTIME
9682 10644
9683if test -n "$PROG_UPTIME"; then 10645if test -n "$PROG_UPTIME"; then
9684 echo "$as_me:9684: result: $PROG_UPTIME" >&5 10646 echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5
9685echo "${ECHO_T}$PROG_UPTIME" >&6 10647echo "${ECHO_T}$PROG_UPTIME" >&6
9686else 10648else
9687 echo "$as_me:9687: result: no" >&5 10649 echo "$as_me:$LINENO: result: no" >&5
9688echo "${ECHO_T}no" >&6 10650echo "${ECHO_T}no" >&6
9689fi 10651fi
9690 10652
@@ -9692,9 +10654,11 @@ fi
9692 PROG_UPTIME="undef" 10654 PROG_UPTIME="undef"
9693 fi 10655 fi
9694 10656
10657
10658
9695 # Extract the first word of "ipcs", so it can be a program name with args. 10659 # Extract the first word of "ipcs", so it can be a program name with args.
9696set dummy ipcs; ac_word=$2 10660set dummy ipcs; ac_word=$2
9697echo "$as_me:9697: checking for $ac_word" >&5 10661echo "$as_me:$LINENO: checking for $ac_word" >&5
9698echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10662echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9699if test "${ac_cv_path_PROG_IPCS+set}" = set; then 10663if test "${ac_cv_path_PROG_IPCS+set}" = set; then
9700 echo $ECHO_N "(cached) $ECHO_C" >&6 10664 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9704,16 +10668,18 @@ else
9704 ac_cv_path_PROG_IPCS="$PROG_IPCS" # Let the user override the test with a path. 10668 ac_cv_path_PROG_IPCS="$PROG_IPCS" # Let the user override the test with a path.
9705 ;; 10669 ;;
9706 *) 10670 *)
9707 ac_save_IFS=$IFS; IFS=$ac_path_separator 10671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708ac_dummy="$PATH" 10672for as_dir in $PATH
9709for ac_dir in $ac_dummy; do 10673do
9710 IFS=$ac_save_IFS 10674 IFS=$as_save_IFS
9711 test -z "$ac_dir" && ac_dir=. 10675 test -z "$as_dir" && as_dir=.
9712 if $as_executable_p "$ac_dir/$ac_word"; then 10676 for ac_exec_ext in '' $ac_executable_extensions; do
9713 ac_cv_path_PROG_IPCS="$ac_dir/$ac_word" 10677 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714 echo "$as_me:9714: found $ac_dir/$ac_word" >&5 10678 ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext"
9715 break 10679 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9716fi 10680 break 2
10681 fi
10682done
9717done 10683done
9718 10684
9719 ;; 10685 ;;
@@ -9722,10 +10688,10 @@ fi
9722PROG_IPCS=$ac_cv_path_PROG_IPCS 10688PROG_IPCS=$ac_cv_path_PROG_IPCS
9723 10689
9724if test -n "$PROG_IPCS"; then 10690if test -n "$PROG_IPCS"; then
9725 echo "$as_me:9725: result: $PROG_IPCS" >&5 10691 echo "$as_me:$LINENO: result: $PROG_IPCS" >&5
9726echo "${ECHO_T}$PROG_IPCS" >&6 10692echo "${ECHO_T}$PROG_IPCS" >&6
9727else 10693else
9728 echo "$as_me:9728: result: no" >&5 10694 echo "$as_me:$LINENO: result: no" >&5
9729echo "${ECHO_T}no" >&6 10695echo "${ECHO_T}no" >&6
9730fi 10696fi
9731 10697
@@ -9733,9 +10699,11 @@ fi
9733 PROG_IPCS="undef" 10699 PROG_IPCS="undef"
9734 fi 10700 fi
9735 10701
10702
10703
9736 # Extract the first word of "tail", so it can be a program name with args. 10704 # Extract the first word of "tail", so it can be a program name with args.
9737set dummy tail; ac_word=$2 10705set dummy tail; ac_word=$2
9738echo "$as_me:9738: checking for $ac_word" >&5 10706echo "$as_me:$LINENO: checking for $ac_word" >&5
9739echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 10707echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9740if test "${ac_cv_path_PROG_TAIL+set}" = set; then 10708if test "${ac_cv_path_PROG_TAIL+set}" = set; then
9741 echo $ECHO_N "(cached) $ECHO_C" >&6 10709 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9745,16 +10713,18 @@ else
9745 ac_cv_path_PROG_TAIL="$PROG_TAIL" # Let the user override the test with a path. 10713 ac_cv_path_PROG_TAIL="$PROG_TAIL" # Let the user override the test with a path.
9746 ;; 10714 ;;
9747 *) 10715 *)
9748 ac_save_IFS=$IFS; IFS=$ac_path_separator 10716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9749ac_dummy="$PATH" 10717for as_dir in $PATH
9750for ac_dir in $ac_dummy; do 10718do
9751 IFS=$ac_save_IFS 10719 IFS=$as_save_IFS
9752 test -z "$ac_dir" && ac_dir=. 10720 test -z "$as_dir" && as_dir=.
9753 if $as_executable_p "$ac_dir/$ac_word"; then 10721 for ac_exec_ext in '' $ac_executable_extensions; do
9754 ac_cv_path_PROG_TAIL="$ac_dir/$ac_word" 10722 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9755 echo "$as_me:9755: found $ac_dir/$ac_word" >&5 10723 ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext"
9756 break 10724 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9757fi 10725 break 2
10726 fi
10727done
9758done 10728done
9759 10729
9760 ;; 10730 ;;
@@ -9763,10 +10733,10 @@ fi
9763PROG_TAIL=$ac_cv_path_PROG_TAIL 10733PROG_TAIL=$ac_cv_path_PROG_TAIL
9764 10734
9765if test -n "$PROG_TAIL"; then 10735if test -n "$PROG_TAIL"; then
9766 echo "$as_me:9766: result: $PROG_TAIL" >&5 10736 echo "$as_me:$LINENO: result: $PROG_TAIL" >&5
9767echo "${ECHO_T}$PROG_TAIL" >&6 10737echo "${ECHO_T}$PROG_TAIL" >&6
9768else 10738else
9769 echo "$as_me:9769: result: no" >&5 10739 echo "$as_me:$LINENO: result: no" >&5
9770echo "${ECHO_T}no" >&6 10740echo "${ECHO_T}no" >&6
9771fi 10741fi
9772 10742
@@ -9774,6 +10744,7 @@ fi
9774 PROG_TAIL="undef" 10744 PROG_TAIL="undef"
9775 fi 10745 fi
9776 10746
10747
9777# restore PATH 10748# restore PATH
9778PATH=$OPATH 10749PATH=$OPATH
9779 10750
@@ -9791,20 +10762,26 @@ if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
9791 fi 10762 fi
9792fi 10763fi
9793 10764
10765
10766
9794# Cheap hack to ensure NEWS-OS libraries are arranged right. 10767# Cheap hack to ensure NEWS-OS libraries are arranged right.
9795if test ! -z "$SONY" ; then 10768if test ! -z "$SONY" ; then
9796 LIBS="$LIBS -liberty"; 10769 LIBS="$LIBS -liberty";
9797fi 10770fi
9798 10771
9799# Checks for data types 10772# Checks for data types
9800echo "$as_me:9800: checking for char" >&5 10773echo "$as_me:$LINENO: checking for char" >&5
9801echo $ECHO_N "checking for char... $ECHO_C" >&6 10774echo $ECHO_N "checking for char... $ECHO_C" >&6
9802if test "${ac_cv_type_char+set}" = set; then 10775if test "${ac_cv_type_char+set}" = set; then
9803 echo $ECHO_N "(cached) $ECHO_C" >&6 10776 echo $ECHO_N "(cached) $ECHO_C" >&6
9804else 10777else
9805 cat >conftest.$ac_ext <<_ACEOF 10778 cat >conftest.$ac_ext <<_ACEOF
9806#line 9806 "configure" 10779#line $LINENO "configure"
9807#include "confdefs.h" 10780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
9808$ac_includes_default 10785$ac_includes_default
9809int 10786int
9810main () 10787main ()
@@ -9818,209 +10795,328 @@ if (sizeof (char))
9818} 10795}
9819_ACEOF 10796_ACEOF
9820rm -f conftest.$ac_objext 10797rm -f conftest.$ac_objext
9821if { (eval echo "$as_me:9821: \"$ac_compile\"") >&5 10798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9822 (eval $ac_compile) 2>&5 10799 (eval $ac_compile) 2>&5
9823 ac_status=$? 10800 ac_status=$?
9824 echo "$as_me:9824: \$? = $ac_status" >&5 10801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9825 (exit $ac_status); } && 10802 (exit $ac_status); } &&
9826 { ac_try='test -s conftest.$ac_objext' 10803 { ac_try='test -s conftest.$ac_objext'
9827 { (eval echo "$as_me:9827: \"$ac_try\"") >&5 10804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9828 (eval $ac_try) 2>&5 10805 (eval $ac_try) 2>&5
9829 ac_status=$? 10806 ac_status=$?
9830 echo "$as_me:9830: \$? = $ac_status" >&5 10807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9831 (exit $ac_status); }; }; then 10808 (exit $ac_status); }; }; then
9832 ac_cv_type_char=yes 10809 ac_cv_type_char=yes
9833else 10810else
9834 echo "$as_me: failed program was:" >&5 10811 echo "$as_me: failed program was:" >&5
9835cat conftest.$ac_ext >&5 10812sed 's/^/| /' conftest.$ac_ext >&5
10813
9836ac_cv_type_char=no 10814ac_cv_type_char=no
9837fi 10815fi
9838rm -f conftest.$ac_objext conftest.$ac_ext 10816rm -f conftest.$ac_objext conftest.$ac_ext
9839fi 10817fi
9840echo "$as_me:9840: result: $ac_cv_type_char" >&5 10818echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
9841echo "${ECHO_T}$ac_cv_type_char" >&6 10819echo "${ECHO_T}$ac_cv_type_char" >&6
9842 10820
9843echo "$as_me:9843: checking size of char" >&5 10821echo "$as_me:$LINENO: checking size of char" >&5
9844echo $ECHO_N "checking size of char... $ECHO_C" >&6 10822echo $ECHO_N "checking size of char... $ECHO_C" >&6
9845if test "${ac_cv_sizeof_char+set}" = set; then 10823if test "${ac_cv_sizeof_char+set}" = set; then
9846 echo $ECHO_N "(cached) $ECHO_C" >&6 10824 echo $ECHO_N "(cached) $ECHO_C" >&6
9847else 10825else
9848 if test "$ac_cv_type_char" = yes; then 10826 if test "$ac_cv_type_char" = yes; then
10827 # The cast to unsigned long works around a bug in the HP C Compiler
10828 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10829 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10830 # This bug is HP SR number 8606223364.
9849 if test "$cross_compiling" = yes; then 10831 if test "$cross_compiling" = yes; then
9850 # Depending upon the size, compute the lo and hi bounds. 10832 # Depending upon the size, compute the lo and hi bounds.
9851cat >conftest.$ac_ext <<_ACEOF 10833cat >conftest.$ac_ext <<_ACEOF
9852#line 9852 "configure" 10834#line $LINENO "configure"
9853#include "confdefs.h" 10835/* confdefs.h. */
10836_ACEOF
10837cat confdefs.h >>conftest.$ac_ext
10838cat >>conftest.$ac_ext <<_ACEOF
10839/* end confdefs.h. */
9854$ac_includes_default 10840$ac_includes_default
9855int 10841int
9856main () 10842main ()
9857{ 10843{
9858int _array_ [1 - 2 * !((sizeof (char)) >= 0)] 10844static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
10845test_array [0] = 0
10846
9859 ; 10847 ;
9860 return 0; 10848 return 0;
9861} 10849}
9862_ACEOF 10850_ACEOF
9863rm -f conftest.$ac_objext 10851rm -f conftest.$ac_objext
9864if { (eval echo "$as_me:9864: \"$ac_compile\"") >&5 10852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9865 (eval $ac_compile) 2>&5 10853 (eval $ac_compile) 2>&5
9866 ac_status=$? 10854 ac_status=$?
9867 echo "$as_me:9867: \$? = $ac_status" >&5 10855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868 (exit $ac_status); } && 10856 (exit $ac_status); } &&
9869 { ac_try='test -s conftest.$ac_objext' 10857 { ac_try='test -s conftest.$ac_objext'
9870 { (eval echo "$as_me:9870: \"$ac_try\"") >&5 10858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9871 (eval $ac_try) 2>&5 10859 (eval $ac_try) 2>&5
9872 ac_status=$? 10860 ac_status=$?
9873 echo "$as_me:9873: \$? = $ac_status" >&5 10861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9874 (exit $ac_status); }; }; then 10862 (exit $ac_status); }; }; then
9875 ac_lo=0 ac_mid=0 10863 ac_lo=0 ac_mid=0
9876 while :; do 10864 while :; do
9877 cat >conftest.$ac_ext <<_ACEOF 10865 cat >conftest.$ac_ext <<_ACEOF
9878#line 9878 "configure" 10866#line $LINENO "configure"
9879#include "confdefs.h" 10867/* confdefs.h. */
10868_ACEOF
10869cat confdefs.h >>conftest.$ac_ext
10870cat >>conftest.$ac_ext <<_ACEOF
10871/* end confdefs.h. */
9880$ac_includes_default 10872$ac_includes_default
9881int 10873int
9882main () 10874main ()
9883{ 10875{
9884int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)] 10876static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
10877test_array [0] = 0
10878
9885 ; 10879 ;
9886 return 0; 10880 return 0;
9887} 10881}
9888_ACEOF 10882_ACEOF
9889rm -f conftest.$ac_objext 10883rm -f conftest.$ac_objext
9890if { (eval echo "$as_me:9890: \"$ac_compile\"") >&5 10884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9891 (eval $ac_compile) 2>&5 10885 (eval $ac_compile) 2>&5
9892 ac_status=$? 10886 ac_status=$?
9893 echo "$as_me:9893: \$? = $ac_status" >&5 10887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9894 (exit $ac_status); } && 10888 (exit $ac_status); } &&
9895 { ac_try='test -s conftest.$ac_objext' 10889 { ac_try='test -s conftest.$ac_objext'
9896 { (eval echo "$as_me:9896: \"$ac_try\"") >&5 10890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9897 (eval $ac_try) 2>&5 10891 (eval $ac_try) 2>&5
9898 ac_status=$? 10892 ac_status=$?
9899 echo "$as_me:9899: \$? = $ac_status" >&5 10893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900 (exit $ac_status); }; }; then 10894 (exit $ac_status); }; }; then
9901 ac_hi=$ac_mid; break 10895 ac_hi=$ac_mid; break
9902else 10896else
9903 echo "$as_me: failed program was:" >&5 10897 echo "$as_me: failed program was:" >&5
9904cat conftest.$ac_ext >&5 10898sed 's/^/| /' conftest.$ac_ext >&5
9905ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` 10899
10900ac_lo=`expr $ac_mid + 1`
10901 if test $ac_lo -le $ac_mid; then
10902 ac_lo= ac_hi=
10903 break
10904 fi
10905 ac_mid=`expr 2 '*' $ac_mid + 1`
9906fi 10906fi
9907rm -f conftest.$ac_objext conftest.$ac_ext 10907rm -f conftest.$ac_objext conftest.$ac_ext
9908 done 10908 done
9909else 10909else
9910 echo "$as_me: failed program was:" >&5 10910 echo "$as_me: failed program was:" >&5
9911cat conftest.$ac_ext >&5 10911sed 's/^/| /' conftest.$ac_ext >&5
9912ac_hi=-1 ac_mid=-1 10912
10913cat >conftest.$ac_ext <<_ACEOF
10914#line $LINENO "configure"
10915/* confdefs.h. */
10916_ACEOF
10917cat confdefs.h >>conftest.$ac_ext
10918cat >>conftest.$ac_ext <<_ACEOF
10919/* end confdefs.h. */
10920$ac_includes_default
10921int
10922main ()
10923{
10924static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
10925test_array [0] = 0
10926
10927 ;
10928 return 0;
10929}
10930_ACEOF
10931rm -f conftest.$ac_objext
10932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10933 (eval $ac_compile) 2>&5
10934 ac_status=$?
10935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10936 (exit $ac_status); } &&
10937 { ac_try='test -s conftest.$ac_objext'
10938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10939 (eval $ac_try) 2>&5
10940 ac_status=$?
10941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10942 (exit $ac_status); }; }; then
10943 ac_hi=-1 ac_mid=-1
9913 while :; do 10944 while :; do
9914 cat >conftest.$ac_ext <<_ACEOF 10945 cat >conftest.$ac_ext <<_ACEOF
9915#line 9915 "configure" 10946#line $LINENO "configure"
9916#include "confdefs.h" 10947/* confdefs.h. */
10948_ACEOF
10949cat confdefs.h >>conftest.$ac_ext
10950cat >>conftest.$ac_ext <<_ACEOF
10951/* end confdefs.h. */
9917$ac_includes_default 10952$ac_includes_default
9918int 10953int
9919main () 10954main ()
9920{ 10955{
9921int _array_ [1 - 2 * !((sizeof (char)) >= $ac_mid)] 10956static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
10957test_array [0] = 0
10958
9922 ; 10959 ;
9923 return 0; 10960 return 0;
9924} 10961}
9925_ACEOF 10962_ACEOF
9926rm -f conftest.$ac_objext 10963rm -f conftest.$ac_objext
9927if { (eval echo "$as_me:9927: \"$ac_compile\"") >&5 10964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9928 (eval $ac_compile) 2>&5 10965 (eval $ac_compile) 2>&5
9929 ac_status=$? 10966 ac_status=$?
9930 echo "$as_me:9930: \$? = $ac_status" >&5 10967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); } && 10968 (exit $ac_status); } &&
9932 { ac_try='test -s conftest.$ac_objext' 10969 { ac_try='test -s conftest.$ac_objext'
9933 { (eval echo "$as_me:9933: \"$ac_try\"") >&5 10970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9934 (eval $ac_try) 2>&5 10971 (eval $ac_try) 2>&5
9935 ac_status=$? 10972 ac_status=$?
9936 echo "$as_me:9936: \$? = $ac_status" >&5 10973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937 (exit $ac_status); }; }; then 10974 (exit $ac_status); }; }; then
9938 ac_lo=$ac_mid; break 10975 ac_lo=$ac_mid; break
9939else 10976else
9940 echo "$as_me: failed program was:" >&5 10977 echo "$as_me: failed program was:" >&5
9941cat conftest.$ac_ext >&5 10978sed 's/^/| /' conftest.$ac_ext >&5
9942ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` 10979
10980ac_hi=`expr '(' $ac_mid ')' - 1`
10981 if test $ac_mid -le $ac_hi; then
10982 ac_lo= ac_hi=
10983 break
10984 fi
10985 ac_mid=`expr 2 '*' $ac_mid`
9943fi 10986fi
9944rm -f conftest.$ac_objext conftest.$ac_ext 10987rm -f conftest.$ac_objext conftest.$ac_ext
9945 done 10988 done
10989else
10990 echo "$as_me: failed program was:" >&5
10991sed 's/^/| /' conftest.$ac_ext >&5
10992
10993ac_lo= ac_hi=
10994fi
10995rm -f conftest.$ac_objext conftest.$ac_ext
9946fi 10996fi
9947rm -f conftest.$ac_objext conftest.$ac_ext 10997rm -f conftest.$ac_objext conftest.$ac_ext
9948# Binary search between lo and hi bounds. 10998# Binary search between lo and hi bounds.
9949while test "x$ac_lo" != "x$ac_hi"; do 10999while test "x$ac_lo" != "x$ac_hi"; do
9950 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 11000 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9951 cat >conftest.$ac_ext <<_ACEOF 11001 cat >conftest.$ac_ext <<_ACEOF
9952#line 9952 "configure" 11002#line $LINENO "configure"
9953#include "confdefs.h" 11003/* confdefs.h. */
11004_ACEOF
11005cat confdefs.h >>conftest.$ac_ext
11006cat >>conftest.$ac_ext <<_ACEOF
11007/* end confdefs.h. */
9954$ac_includes_default 11008$ac_includes_default
9955int 11009int
9956main () 11010main ()
9957{ 11011{
9958int _array_ [1 - 2 * !((sizeof (char)) <= $ac_mid)] 11012static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
11013test_array [0] = 0
11014
9959 ; 11015 ;
9960 return 0; 11016 return 0;
9961} 11017}
9962_ACEOF 11018_ACEOF
9963rm -f conftest.$ac_objext 11019rm -f conftest.$ac_objext
9964if { (eval echo "$as_me:9964: \"$ac_compile\"") >&5 11020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9965 (eval $ac_compile) 2>&5 11021 (eval $ac_compile) 2>&5
9966 ac_status=$? 11022 ac_status=$?
9967 echo "$as_me:9967: \$? = $ac_status" >&5 11023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9968 (exit $ac_status); } && 11024 (exit $ac_status); } &&
9969 { ac_try='test -s conftest.$ac_objext' 11025 { ac_try='test -s conftest.$ac_objext'
9970 { (eval echo "$as_me:9970: \"$ac_try\"") >&5 11026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9971 (eval $ac_try) 2>&5 11027 (eval $ac_try) 2>&5
9972 ac_status=$? 11028 ac_status=$?
9973 echo "$as_me:9973: \$? = $ac_status" >&5 11029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9974 (exit $ac_status); }; }; then 11030 (exit $ac_status); }; }; then
9975 ac_hi=$ac_mid 11031 ac_hi=$ac_mid
9976else 11032else
9977 echo "$as_me: failed program was:" >&5 11033 echo "$as_me: failed program was:" >&5
9978cat conftest.$ac_ext >&5 11034sed 's/^/| /' conftest.$ac_ext >&5
9979ac_lo=`expr $ac_mid + 1` 11035
11036ac_lo=`expr '(' $ac_mid ')' + 1`
9980fi 11037fi
9981rm -f conftest.$ac_objext conftest.$ac_ext 11038rm -f conftest.$ac_objext conftest.$ac_ext
9982done 11039done
9983ac_cv_sizeof_char=$ac_lo 11040case $ac_lo in
11041?*) ac_cv_sizeof_char=$ac_lo;;
11042'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
11043See \`config.log' for more details." >&5
11044echo "$as_me: error: cannot compute sizeof (char), 77
11045See \`config.log' for more details." >&2;}
11046 { (exit 1); exit 1; }; } ;;
11047esac
9984else 11048else
9985 if test "$cross_compiling" = yes; then 11049 if test "$cross_compiling" = yes; then
9986 { { echo "$as_me:9986: error: cannot run test program while cross compiling" >&5 11050 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9987echo "$as_me: error: cannot run test program while cross compiling" >&2;} 11051See \`config.log' for more details." >&5
11052echo "$as_me: error: cannot run test program while cross compiling
11053See \`config.log' for more details." >&2;}
9988 { (exit 1); exit 1; }; } 11054 { (exit 1); exit 1; }; }
9989else 11055else
9990 cat >conftest.$ac_ext <<_ACEOF 11056 cat >conftest.$ac_ext <<_ACEOF
9991#line 9991 "configure" 11057#line $LINENO "configure"
9992#include "confdefs.h" 11058/* confdefs.h. */
11059_ACEOF
11060cat confdefs.h >>conftest.$ac_ext
11061cat >>conftest.$ac_ext <<_ACEOF
11062/* end confdefs.h. */
9993$ac_includes_default 11063$ac_includes_default
11064long longval () { return (long) (sizeof (char)); }
11065unsigned long ulongval () { return (long) (sizeof (char)); }
11066#include <stdio.h>
11067#include <stdlib.h>
9994int 11068int
9995main () 11069main ()
9996{ 11070{
9997FILE *f = fopen ("conftest.val", "w"); 11071
9998if (!f) 11072 FILE *f = fopen ("conftest.val", "w");
9999 exit (1); 11073 if (! f)
10000fprintf (f, "%d", (sizeof (char))); 11074 exit (1);
10001fclose (f); 11075 if (((long) (sizeof (char))) < 0)
11076 {
11077 long i = longval ();
11078 if (i != ((long) (sizeof (char))))
11079 exit (1);
11080 fprintf (f, "%ld\n", i);
11081 }
11082 else
11083 {
11084 unsigned long i = ulongval ();
11085 if (i != ((long) (sizeof (char))))
11086 exit (1);
11087 fprintf (f, "%lu\n", i);
11088 }
11089 exit (ferror (f) || fclose (f) != 0);
11090
10002 ; 11091 ;
10003 return 0; 11092 return 0;
10004} 11093}
10005_ACEOF 11094_ACEOF
10006rm -f conftest$ac_exeext 11095rm -f conftest$ac_exeext
10007if { (eval echo "$as_me:10007: \"$ac_link\"") >&5 11096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10008 (eval $ac_link) 2>&5 11097 (eval $ac_link) 2>&5
10009 ac_status=$? 11098 ac_status=$?
10010 echo "$as_me:10010: \$? = $ac_status" >&5 11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 11100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10012 { (eval echo "$as_me:10012: \"$ac_try\"") >&5 11101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10013 (eval $ac_try) 2>&5 11102 (eval $ac_try) 2>&5
10014 ac_status=$? 11103 ac_status=$?
10015 echo "$as_me:10015: \$? = $ac_status" >&5 11104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10016 (exit $ac_status); }; }; then 11105 (exit $ac_status); }; }; then
10017 ac_cv_sizeof_char=`cat conftest.val` 11106 ac_cv_sizeof_char=`cat conftest.val`
10018else 11107else
10019 echo "$as_me: program exited with status $ac_status" >&5 11108 echo "$as_me: program exited with status $ac_status" >&5
10020echo "$as_me: failed program was:" >&5 11109echo "$as_me: failed program was:" >&5
10021cat conftest.$ac_ext >&5 11110sed 's/^/| /' conftest.$ac_ext >&5
11111
11112( exit $ac_status )
11113{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
11114See \`config.log' for more details." >&5
11115echo "$as_me: error: cannot compute sizeof (char), 77
11116See \`config.log' for more details." >&2;}
11117 { (exit 1); exit 1; }; }
10022fi 11118fi
10023rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11119rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10024fi 11120fi
10025fi 11121fi
10026rm -f conftest.val 11122rm -f conftest.val
@@ -10028,20 +11124,25 @@ else
10028 ac_cv_sizeof_char=0 11124 ac_cv_sizeof_char=0
10029fi 11125fi
10030fi 11126fi
10031echo "$as_me:10031: result: $ac_cv_sizeof_char" >&5 11127echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
10032echo "${ECHO_T}$ac_cv_sizeof_char" >&6 11128echo "${ECHO_T}$ac_cv_sizeof_char" >&6
10033cat >>confdefs.h <<EOF 11129cat >>confdefs.h <<_ACEOF
10034#define SIZEOF_CHAR $ac_cv_sizeof_char 11130#define SIZEOF_CHAR $ac_cv_sizeof_char
10035EOF 11131_ACEOF
11132
10036 11133
10037echo "$as_me:10037: checking for short int" >&5 11134echo "$as_me:$LINENO: checking for short int" >&5
10038echo $ECHO_N "checking for short int... $ECHO_C" >&6 11135echo $ECHO_N "checking for short int... $ECHO_C" >&6
10039if test "${ac_cv_type_short_int+set}" = set; then 11136if test "${ac_cv_type_short_int+set}" = set; then
10040 echo $ECHO_N "(cached) $ECHO_C" >&6 11137 echo $ECHO_N "(cached) $ECHO_C" >&6
10041else 11138else
10042 cat >conftest.$ac_ext <<_ACEOF 11139 cat >conftest.$ac_ext <<_ACEOF
10043#line 10043 "configure" 11140#line $LINENO "configure"
10044#include "confdefs.h" 11141/* confdefs.h. */
11142_ACEOF
11143cat confdefs.h >>conftest.$ac_ext
11144cat >>conftest.$ac_ext <<_ACEOF
11145/* end confdefs.h. */
10045$ac_includes_default 11146$ac_includes_default
10046int 11147int
10047main () 11148main ()
@@ -10055,209 +11156,328 @@ if (sizeof (short int))
10055} 11156}
10056_ACEOF 11157_ACEOF
10057rm -f conftest.$ac_objext 11158rm -f conftest.$ac_objext
10058if { (eval echo "$as_me:10058: \"$ac_compile\"") >&5 11159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10059 (eval $ac_compile) 2>&5 11160 (eval $ac_compile) 2>&5
10060 ac_status=$? 11161 ac_status=$?
10061 echo "$as_me:10061: \$? = $ac_status" >&5 11162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); } && 11163 (exit $ac_status); } &&
10063 { ac_try='test -s conftest.$ac_objext' 11164 { ac_try='test -s conftest.$ac_objext'
10064 { (eval echo "$as_me:10064: \"$ac_try\"") >&5 11165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10065 (eval $ac_try) 2>&5 11166 (eval $ac_try) 2>&5
10066 ac_status=$? 11167 ac_status=$?
10067 echo "$as_me:10067: \$? = $ac_status" >&5 11168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068 (exit $ac_status); }; }; then 11169 (exit $ac_status); }; }; then
10069 ac_cv_type_short_int=yes 11170 ac_cv_type_short_int=yes
10070else 11171else
10071 echo "$as_me: failed program was:" >&5 11172 echo "$as_me: failed program was:" >&5
10072cat conftest.$ac_ext >&5 11173sed 's/^/| /' conftest.$ac_ext >&5
11174
10073ac_cv_type_short_int=no 11175ac_cv_type_short_int=no
10074fi 11176fi
10075rm -f conftest.$ac_objext conftest.$ac_ext 11177rm -f conftest.$ac_objext conftest.$ac_ext
10076fi 11178fi
10077echo "$as_me:10077: result: $ac_cv_type_short_int" >&5 11179echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5
10078echo "${ECHO_T}$ac_cv_type_short_int" >&6 11180echo "${ECHO_T}$ac_cv_type_short_int" >&6
10079 11181
10080echo "$as_me:10080: checking size of short int" >&5 11182echo "$as_me:$LINENO: checking size of short int" >&5
10081echo $ECHO_N "checking size of short int... $ECHO_C" >&6 11183echo $ECHO_N "checking size of short int... $ECHO_C" >&6
10082if test "${ac_cv_sizeof_short_int+set}" = set; then 11184if test "${ac_cv_sizeof_short_int+set}" = set; then
10083 echo $ECHO_N "(cached) $ECHO_C" >&6 11185 echo $ECHO_N "(cached) $ECHO_C" >&6
10084else 11186else
10085 if test "$ac_cv_type_short_int" = yes; then 11187 if test "$ac_cv_type_short_int" = yes; then
11188 # The cast to unsigned long works around a bug in the HP C Compiler
11189 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11190 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11191 # This bug is HP SR number 8606223364.
10086 if test "$cross_compiling" = yes; then 11192 if test "$cross_compiling" = yes; then
10087 # Depending upon the size, compute the lo and hi bounds. 11193 # Depending upon the size, compute the lo and hi bounds.
10088cat >conftest.$ac_ext <<_ACEOF 11194cat >conftest.$ac_ext <<_ACEOF
10089#line 10089 "configure" 11195#line $LINENO "configure"
10090#include "confdefs.h" 11196/* confdefs.h. */
11197_ACEOF
11198cat confdefs.h >>conftest.$ac_ext
11199cat >>conftest.$ac_ext <<_ACEOF
11200/* end confdefs.h. */
10091$ac_includes_default 11201$ac_includes_default
10092int 11202int
10093main () 11203main ()
10094{ 11204{
10095int _array_ [1 - 2 * !((sizeof (short int)) >= 0)] 11205static int test_array [1 - 2 * !(((long) (sizeof (short int))) >= 0)];
11206test_array [0] = 0
11207
10096 ; 11208 ;
10097 return 0; 11209 return 0;
10098} 11210}
10099_ACEOF 11211_ACEOF
10100rm -f conftest.$ac_objext 11212rm -f conftest.$ac_objext
10101if { (eval echo "$as_me:10101: \"$ac_compile\"") >&5 11213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10102 (eval $ac_compile) 2>&5 11214 (eval $ac_compile) 2>&5
10103 ac_status=$? 11215 ac_status=$?
10104 echo "$as_me:10104: \$? = $ac_status" >&5 11216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10105 (exit $ac_status); } && 11217 (exit $ac_status); } &&
10106 { ac_try='test -s conftest.$ac_objext' 11218 { ac_try='test -s conftest.$ac_objext'
10107 { (eval echo "$as_me:10107: \"$ac_try\"") >&5 11219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10108 (eval $ac_try) 2>&5 11220 (eval $ac_try) 2>&5
10109 ac_status=$? 11221 ac_status=$?
10110 echo "$as_me:10110: \$? = $ac_status" >&5 11222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10111 (exit $ac_status); }; }; then 11223 (exit $ac_status); }; }; then
10112 ac_lo=0 ac_mid=0 11224 ac_lo=0 ac_mid=0
10113 while :; do 11225 while :; do
10114 cat >conftest.$ac_ext <<_ACEOF 11226 cat >conftest.$ac_ext <<_ACEOF
10115#line 10115 "configure" 11227#line $LINENO "configure"
10116#include "confdefs.h" 11228/* confdefs.h. */
11229_ACEOF
11230cat confdefs.h >>conftest.$ac_ext
11231cat >>conftest.$ac_ext <<_ACEOF
11232/* end confdefs.h. */
10117$ac_includes_default 11233$ac_includes_default
10118int 11234int
10119main () 11235main ()
10120{ 11236{
10121int _array_ [1 - 2 * !((sizeof (short int)) <= $ac_mid)] 11237static int test_array [1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)];
11238test_array [0] = 0
11239
10122 ; 11240 ;
10123 return 0; 11241 return 0;
10124} 11242}
10125_ACEOF 11243_ACEOF
10126rm -f conftest.$ac_objext 11244rm -f conftest.$ac_objext
10127if { (eval echo "$as_me:10127: \"$ac_compile\"") >&5 11245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10128 (eval $ac_compile) 2>&5 11246 (eval $ac_compile) 2>&5
10129 ac_status=$? 11247 ac_status=$?
10130 echo "$as_me:10130: \$? = $ac_status" >&5 11248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10131 (exit $ac_status); } && 11249 (exit $ac_status); } &&
10132 { ac_try='test -s conftest.$ac_objext' 11250 { ac_try='test -s conftest.$ac_objext'
10133 { (eval echo "$as_me:10133: \"$ac_try\"") >&5 11251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10134 (eval $ac_try) 2>&5 11252 (eval $ac_try) 2>&5
10135 ac_status=$? 11253 ac_status=$?
10136 echo "$as_me:10136: \$? = $ac_status" >&5 11254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10137 (exit $ac_status); }; }; then 11255 (exit $ac_status); }; }; then
10138 ac_hi=$ac_mid; break 11256 ac_hi=$ac_mid; break
10139else 11257else
10140 echo "$as_me: failed program was:" >&5 11258 echo "$as_me: failed program was:" >&5
10141cat conftest.$ac_ext >&5 11259sed 's/^/| /' conftest.$ac_ext >&5
10142ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` 11260
11261ac_lo=`expr $ac_mid + 1`
11262 if test $ac_lo -le $ac_mid; then
11263 ac_lo= ac_hi=
11264 break
11265 fi
11266 ac_mid=`expr 2 '*' $ac_mid + 1`
10143fi 11267fi
10144rm -f conftest.$ac_objext conftest.$ac_ext 11268rm -f conftest.$ac_objext conftest.$ac_ext
10145 done 11269 done
10146else 11270else
10147 echo "$as_me: failed program was:" >&5 11271 echo "$as_me: failed program was:" >&5
10148cat conftest.$ac_ext >&5 11272sed 's/^/| /' conftest.$ac_ext >&5
10149ac_hi=-1 ac_mid=-1 11273
11274cat >conftest.$ac_ext <<_ACEOF
11275#line $LINENO "configure"
11276/* confdefs.h. */
11277_ACEOF
11278cat confdefs.h >>conftest.$ac_ext
11279cat >>conftest.$ac_ext <<_ACEOF
11280/* end confdefs.h. */
11281$ac_includes_default
11282int
11283main ()
11284{
11285static int test_array [1 - 2 * !(((long) (sizeof (short int))) < 0)];
11286test_array [0] = 0
11287
11288 ;
11289 return 0;
11290}
11291_ACEOF
11292rm -f conftest.$ac_objext
11293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11294 (eval $ac_compile) 2>&5
11295 ac_status=$?
11296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11297 (exit $ac_status); } &&
11298 { ac_try='test -s conftest.$ac_objext'
11299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11300 (eval $ac_try) 2>&5
11301 ac_status=$?
11302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11303 (exit $ac_status); }; }; then
11304 ac_hi=-1 ac_mid=-1
10150 while :; do 11305 while :; do
10151 cat >conftest.$ac_ext <<_ACEOF 11306 cat >conftest.$ac_ext <<_ACEOF
10152#line 10152 "configure" 11307#line $LINENO "configure"
10153#include "confdefs.h" 11308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
10154$ac_includes_default 11313$ac_includes_default
10155int 11314int
10156main () 11315main ()
10157{ 11316{
10158int _array_ [1 - 2 * !((sizeof (short int)) >= $ac_mid)] 11317static int test_array [1 - 2 * !(((long) (sizeof (short int))) >= $ac_mid)];
11318test_array [0] = 0
11319
10159 ; 11320 ;
10160 return 0; 11321 return 0;
10161} 11322}
10162_ACEOF 11323_ACEOF
10163rm -f conftest.$ac_objext 11324rm -f conftest.$ac_objext
10164if { (eval echo "$as_me:10164: \"$ac_compile\"") >&5 11325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10165 (eval $ac_compile) 2>&5 11326 (eval $ac_compile) 2>&5
10166 ac_status=$? 11327 ac_status=$?
10167 echo "$as_me:10167: \$? = $ac_status" >&5 11328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10168 (exit $ac_status); } && 11329 (exit $ac_status); } &&
10169 { ac_try='test -s conftest.$ac_objext' 11330 { ac_try='test -s conftest.$ac_objext'
10170 { (eval echo "$as_me:10170: \"$ac_try\"") >&5 11331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10171 (eval $ac_try) 2>&5 11332 (eval $ac_try) 2>&5
10172 ac_status=$? 11333 ac_status=$?
10173 echo "$as_me:10173: \$? = $ac_status" >&5 11334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10174 (exit $ac_status); }; }; then 11335 (exit $ac_status); }; }; then
10175 ac_lo=$ac_mid; break 11336 ac_lo=$ac_mid; break
10176else 11337else
10177 echo "$as_me: failed program was:" >&5 11338 echo "$as_me: failed program was:" >&5
10178cat conftest.$ac_ext >&5 11339sed 's/^/| /' conftest.$ac_ext >&5
10179ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` 11340
11341ac_hi=`expr '(' $ac_mid ')' - 1`
11342 if test $ac_mid -le $ac_hi; then
11343 ac_lo= ac_hi=
11344 break
11345 fi
11346 ac_mid=`expr 2 '*' $ac_mid`
10180fi 11347fi
10181rm -f conftest.$ac_objext conftest.$ac_ext 11348rm -f conftest.$ac_objext conftest.$ac_ext
10182 done 11349 done
11350else
11351 echo "$as_me: failed program was:" >&5
11352sed 's/^/| /' conftest.$ac_ext >&5
11353
11354ac_lo= ac_hi=
11355fi
11356rm -f conftest.$ac_objext conftest.$ac_ext
10183fi 11357fi
10184rm -f conftest.$ac_objext conftest.$ac_ext 11358rm -f conftest.$ac_objext conftest.$ac_ext
10185# Binary search between lo and hi bounds. 11359# Binary search between lo and hi bounds.
10186while test "x$ac_lo" != "x$ac_hi"; do 11360while test "x$ac_lo" != "x$ac_hi"; do
10187 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 11361 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10188 cat >conftest.$ac_ext <<_ACEOF 11362 cat >conftest.$ac_ext <<_ACEOF
10189#line 10189 "configure" 11363#line $LINENO "configure"
10190#include "confdefs.h" 11364/* confdefs.h. */
11365_ACEOF
11366cat confdefs.h >>conftest.$ac_ext
11367cat >>conftest.$ac_ext <<_ACEOF
11368/* end confdefs.h. */
10191$ac_includes_default 11369$ac_includes_default
10192int 11370int
10193main () 11371main ()
10194{ 11372{
10195int _array_ [1 - 2 * !((sizeof (short int)) <= $ac_mid)] 11373static int test_array [1 - 2 * !(((long) (sizeof (short int))) <= $ac_mid)];
11374test_array [0] = 0
11375
10196 ; 11376 ;
10197 return 0; 11377 return 0;
10198} 11378}
10199_ACEOF 11379_ACEOF
10200rm -f conftest.$ac_objext 11380rm -f conftest.$ac_objext
10201if { (eval echo "$as_me:10201: \"$ac_compile\"") >&5 11381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10202 (eval $ac_compile) 2>&5 11382 (eval $ac_compile) 2>&5
10203 ac_status=$? 11383 ac_status=$?
10204 echo "$as_me:10204: \$? = $ac_status" >&5 11384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10205 (exit $ac_status); } && 11385 (exit $ac_status); } &&
10206 { ac_try='test -s conftest.$ac_objext' 11386 { ac_try='test -s conftest.$ac_objext'
10207 { (eval echo "$as_me:10207: \"$ac_try\"") >&5 11387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10208 (eval $ac_try) 2>&5 11388 (eval $ac_try) 2>&5
10209 ac_status=$? 11389 ac_status=$?
10210 echo "$as_me:10210: \$? = $ac_status" >&5 11390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211 (exit $ac_status); }; }; then 11391 (exit $ac_status); }; }; then
10212 ac_hi=$ac_mid 11392 ac_hi=$ac_mid
10213else 11393else
10214 echo "$as_me: failed program was:" >&5 11394 echo "$as_me: failed program was:" >&5
10215cat conftest.$ac_ext >&5 11395sed 's/^/| /' conftest.$ac_ext >&5
10216ac_lo=`expr $ac_mid + 1` 11396
11397ac_lo=`expr '(' $ac_mid ')' + 1`
10217fi 11398fi
10218rm -f conftest.$ac_objext conftest.$ac_ext 11399rm -f conftest.$ac_objext conftest.$ac_ext
10219done 11400done
10220ac_cv_sizeof_short_int=$ac_lo 11401case $ac_lo in
11402?*) ac_cv_sizeof_short_int=$ac_lo;;
11403'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77
11404See \`config.log' for more details." >&5
11405echo "$as_me: error: cannot compute sizeof (short int), 77
11406See \`config.log' for more details." >&2;}
11407 { (exit 1); exit 1; }; } ;;
11408esac
10221else 11409else
10222 if test "$cross_compiling" = yes; then 11410 if test "$cross_compiling" = yes; then
10223 { { echo "$as_me:10223: error: cannot run test program while cross compiling" >&5 11411 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10224echo "$as_me: error: cannot run test program while cross compiling" >&2;} 11412See \`config.log' for more details." >&5
11413echo "$as_me: error: cannot run test program while cross compiling
11414See \`config.log' for more details." >&2;}
10225 { (exit 1); exit 1; }; } 11415 { (exit 1); exit 1; }; }
10226else 11416else
10227 cat >conftest.$ac_ext <<_ACEOF 11417 cat >conftest.$ac_ext <<_ACEOF
10228#line 10228 "configure" 11418#line $LINENO "configure"
10229#include "confdefs.h" 11419/* confdefs.h. */
11420_ACEOF
11421cat confdefs.h >>conftest.$ac_ext
11422cat >>conftest.$ac_ext <<_ACEOF
11423/* end confdefs.h. */
10230$ac_includes_default 11424$ac_includes_default
11425long longval () { return (long) (sizeof (short int)); }
11426unsigned long ulongval () { return (long) (sizeof (short int)); }
11427#include <stdio.h>
11428#include <stdlib.h>
10231int 11429int
10232main () 11430main ()
10233{ 11431{
10234FILE *f = fopen ("conftest.val", "w"); 11432
10235if (!f) 11433 FILE *f = fopen ("conftest.val", "w");
10236 exit (1); 11434 if (! f)
10237fprintf (f, "%d", (sizeof (short int))); 11435 exit (1);
10238fclose (f); 11436 if (((long) (sizeof (short int))) < 0)
11437 {
11438 long i = longval ();
11439 if (i != ((long) (sizeof (short int))))
11440 exit (1);
11441 fprintf (f, "%ld\n", i);
11442 }
11443 else
11444 {
11445 unsigned long i = ulongval ();
11446 if (i != ((long) (sizeof (short int))))
11447 exit (1);
11448 fprintf (f, "%lu\n", i);
11449 }
11450 exit (ferror (f) || fclose (f) != 0);
11451
10239 ; 11452 ;
10240 return 0; 11453 return 0;
10241} 11454}
10242_ACEOF 11455_ACEOF
10243rm -f conftest$ac_exeext 11456rm -f conftest$ac_exeext
10244if { (eval echo "$as_me:10244: \"$ac_link\"") >&5 11457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10245 (eval $ac_link) 2>&5 11458 (eval $ac_link) 2>&5
10246 ac_status=$? 11459 ac_status=$?
10247 echo "$as_me:10247: \$? = $ac_status" >&5 11460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10248 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 11461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10249 { (eval echo "$as_me:10249: \"$ac_try\"") >&5 11462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10250 (eval $ac_try) 2>&5 11463 (eval $ac_try) 2>&5
10251 ac_status=$? 11464 ac_status=$?
10252 echo "$as_me:10252: \$? = $ac_status" >&5 11465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10253 (exit $ac_status); }; }; then 11466 (exit $ac_status); }; }; then
10254 ac_cv_sizeof_short_int=`cat conftest.val` 11467 ac_cv_sizeof_short_int=`cat conftest.val`
10255else 11468else
10256 echo "$as_me: program exited with status $ac_status" >&5 11469 echo "$as_me: program exited with status $ac_status" >&5
10257echo "$as_me: failed program was:" >&5 11470echo "$as_me: failed program was:" >&5
10258cat conftest.$ac_ext >&5 11471sed 's/^/| /' conftest.$ac_ext >&5
11472
11473( exit $ac_status )
11474{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short int), 77
11475See \`config.log' for more details." >&5
11476echo "$as_me: error: cannot compute sizeof (short int), 77
11477See \`config.log' for more details." >&2;}
11478 { (exit 1); exit 1; }; }
10259fi 11479fi
10260rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11480rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10261fi 11481fi
10262fi 11482fi
10263rm -f conftest.val 11483rm -f conftest.val
@@ -10265,20 +11485,25 @@ else
10265 ac_cv_sizeof_short_int=0 11485 ac_cv_sizeof_short_int=0
10266fi 11486fi
10267fi 11487fi
10268echo "$as_me:10268: result: $ac_cv_sizeof_short_int" >&5 11488echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5
10269echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6 11489echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6
10270cat >>confdefs.h <<EOF 11490cat >>confdefs.h <<_ACEOF
10271#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int 11491#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
10272EOF 11492_ACEOF
11493
10273 11494
10274echo "$as_me:10274: checking for int" >&5 11495echo "$as_me:$LINENO: checking for int" >&5
10275echo $ECHO_N "checking for int... $ECHO_C" >&6 11496echo $ECHO_N "checking for int... $ECHO_C" >&6
10276if test "${ac_cv_type_int+set}" = set; then 11497if test "${ac_cv_type_int+set}" = set; then
10277 echo $ECHO_N "(cached) $ECHO_C" >&6 11498 echo $ECHO_N "(cached) $ECHO_C" >&6
10278else 11499else
10279 cat >conftest.$ac_ext <<_ACEOF 11500 cat >conftest.$ac_ext <<_ACEOF
10280#line 10280 "configure" 11501#line $LINENO "configure"
10281#include "confdefs.h" 11502/* confdefs.h. */
11503_ACEOF
11504cat confdefs.h >>conftest.$ac_ext
11505cat >>conftest.$ac_ext <<_ACEOF
11506/* end confdefs.h. */
10282$ac_includes_default 11507$ac_includes_default
10283int 11508int
10284main () 11509main ()
@@ -10292,209 +11517,328 @@ if (sizeof (int))
10292} 11517}
10293_ACEOF 11518_ACEOF
10294rm -f conftest.$ac_objext 11519rm -f conftest.$ac_objext
10295if { (eval echo "$as_me:10295: \"$ac_compile\"") >&5 11520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10296 (eval $ac_compile) 2>&5 11521 (eval $ac_compile) 2>&5
10297 ac_status=$? 11522 ac_status=$?
10298 echo "$as_me:10298: \$? = $ac_status" >&5 11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10299 (exit $ac_status); } && 11524 (exit $ac_status); } &&
10300 { ac_try='test -s conftest.$ac_objext' 11525 { ac_try='test -s conftest.$ac_objext'
10301 { (eval echo "$as_me:10301: \"$ac_try\"") >&5 11526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10302 (eval $ac_try) 2>&5 11527 (eval $ac_try) 2>&5
10303 ac_status=$? 11528 ac_status=$?
10304 echo "$as_me:10304: \$? = $ac_status" >&5 11529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10305 (exit $ac_status); }; }; then 11530 (exit $ac_status); }; }; then
10306 ac_cv_type_int=yes 11531 ac_cv_type_int=yes
10307else 11532else
10308 echo "$as_me: failed program was:" >&5 11533 echo "$as_me: failed program was:" >&5
10309cat conftest.$ac_ext >&5 11534sed 's/^/| /' conftest.$ac_ext >&5
11535
10310ac_cv_type_int=no 11536ac_cv_type_int=no
10311fi 11537fi
10312rm -f conftest.$ac_objext conftest.$ac_ext 11538rm -f conftest.$ac_objext conftest.$ac_ext
10313fi 11539fi
10314echo "$as_me:10314: result: $ac_cv_type_int" >&5 11540echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
10315echo "${ECHO_T}$ac_cv_type_int" >&6 11541echo "${ECHO_T}$ac_cv_type_int" >&6
10316 11542
10317echo "$as_me:10317: checking size of int" >&5 11543echo "$as_me:$LINENO: checking size of int" >&5
10318echo $ECHO_N "checking size of int... $ECHO_C" >&6 11544echo $ECHO_N "checking size of int... $ECHO_C" >&6
10319if test "${ac_cv_sizeof_int+set}" = set; then 11545if test "${ac_cv_sizeof_int+set}" = set; then
10320 echo $ECHO_N "(cached) $ECHO_C" >&6 11546 echo $ECHO_N "(cached) $ECHO_C" >&6
10321else 11547else
10322 if test "$ac_cv_type_int" = yes; then 11548 if test "$ac_cv_type_int" = yes; then
11549 # The cast to unsigned long works around a bug in the HP C Compiler
11550 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11551 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11552 # This bug is HP SR number 8606223364.
10323 if test "$cross_compiling" = yes; then 11553 if test "$cross_compiling" = yes; then
10324 # Depending upon the size, compute the lo and hi bounds. 11554 # Depending upon the size, compute the lo and hi bounds.
10325cat >conftest.$ac_ext <<_ACEOF 11555cat >conftest.$ac_ext <<_ACEOF
10326#line 10326 "configure" 11556#line $LINENO "configure"
10327#include "confdefs.h" 11557/* confdefs.h. */
11558_ACEOF
11559cat confdefs.h >>conftest.$ac_ext
11560cat >>conftest.$ac_ext <<_ACEOF
11561/* end confdefs.h. */
10328$ac_includes_default 11562$ac_includes_default
10329int 11563int
10330main () 11564main ()
10331{ 11565{
10332int _array_ [1 - 2 * !((sizeof (int)) >= 0)] 11566static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
11567test_array [0] = 0
11568
10333 ; 11569 ;
10334 return 0; 11570 return 0;
10335} 11571}
10336_ACEOF 11572_ACEOF
10337rm -f conftest.$ac_objext 11573rm -f conftest.$ac_objext
10338if { (eval echo "$as_me:10338: \"$ac_compile\"") >&5 11574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10339 (eval $ac_compile) 2>&5 11575 (eval $ac_compile) 2>&5
10340 ac_status=$? 11576 ac_status=$?
10341 echo "$as_me:10341: \$? = $ac_status" >&5 11577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10342 (exit $ac_status); } && 11578 (exit $ac_status); } &&
10343 { ac_try='test -s conftest.$ac_objext' 11579 { ac_try='test -s conftest.$ac_objext'
10344 { (eval echo "$as_me:10344: \"$ac_try\"") >&5 11580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10345 (eval $ac_try) 2>&5 11581 (eval $ac_try) 2>&5
10346 ac_status=$? 11582 ac_status=$?
10347 echo "$as_me:10347: \$? = $ac_status" >&5 11583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10348 (exit $ac_status); }; }; then 11584 (exit $ac_status); }; }; then
10349 ac_lo=0 ac_mid=0 11585 ac_lo=0 ac_mid=0
10350 while :; do 11586 while :; do
10351 cat >conftest.$ac_ext <<_ACEOF 11587 cat >conftest.$ac_ext <<_ACEOF
10352#line 10352 "configure" 11588#line $LINENO "configure"
10353#include "confdefs.h" 11589/* confdefs.h. */
11590_ACEOF
11591cat confdefs.h >>conftest.$ac_ext
11592cat >>conftest.$ac_ext <<_ACEOF
11593/* end confdefs.h. */
10354$ac_includes_default 11594$ac_includes_default
10355int 11595int
10356main () 11596main ()
10357{ 11597{
10358int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] 11598static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
11599test_array [0] = 0
11600
10359 ; 11601 ;
10360 return 0; 11602 return 0;
10361} 11603}
10362_ACEOF 11604_ACEOF
10363rm -f conftest.$ac_objext 11605rm -f conftest.$ac_objext
10364if { (eval echo "$as_me:10364: \"$ac_compile\"") >&5 11606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10365 (eval $ac_compile) 2>&5 11607 (eval $ac_compile) 2>&5
10366 ac_status=$? 11608 ac_status=$?
10367 echo "$as_me:10367: \$? = $ac_status" >&5 11609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10368 (exit $ac_status); } && 11610 (exit $ac_status); } &&
10369 { ac_try='test -s conftest.$ac_objext' 11611 { ac_try='test -s conftest.$ac_objext'
10370 { (eval echo "$as_me:10370: \"$ac_try\"") >&5 11612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10371 (eval $ac_try) 2>&5 11613 (eval $ac_try) 2>&5
10372 ac_status=$? 11614 ac_status=$?
10373 echo "$as_me:10373: \$? = $ac_status" >&5 11615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10374 (exit $ac_status); }; }; then 11616 (exit $ac_status); }; }; then
10375 ac_hi=$ac_mid; break 11617 ac_hi=$ac_mid; break
10376else 11618else
10377 echo "$as_me: failed program was:" >&5 11619 echo "$as_me: failed program was:" >&5
10378cat conftest.$ac_ext >&5 11620sed 's/^/| /' conftest.$ac_ext >&5
10379ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` 11621
11622ac_lo=`expr $ac_mid + 1`
11623 if test $ac_lo -le $ac_mid; then
11624 ac_lo= ac_hi=
11625 break
11626 fi
11627 ac_mid=`expr 2 '*' $ac_mid + 1`
10380fi 11628fi
10381rm -f conftest.$ac_objext conftest.$ac_ext 11629rm -f conftest.$ac_objext conftest.$ac_ext
10382 done 11630 done
10383else 11631else
10384 echo "$as_me: failed program was:" >&5 11632 echo "$as_me: failed program was:" >&5
10385cat conftest.$ac_ext >&5 11633sed 's/^/| /' conftest.$ac_ext >&5
10386ac_hi=-1 ac_mid=-1 11634
11635cat >conftest.$ac_ext <<_ACEOF
11636#line $LINENO "configure"
11637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
11642$ac_includes_default
11643int
11644main ()
11645{
11646static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
11647test_array [0] = 0
11648
11649 ;
11650 return 0;
11651}
11652_ACEOF
11653rm -f conftest.$ac_objext
11654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11655 (eval $ac_compile) 2>&5
11656 ac_status=$?
11657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 (exit $ac_status); } &&
11659 { ac_try='test -s conftest.$ac_objext'
11660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11661 (eval $ac_try) 2>&5
11662 ac_status=$?
11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664 (exit $ac_status); }; }; then
11665 ac_hi=-1 ac_mid=-1
10387 while :; do 11666 while :; do
10388 cat >conftest.$ac_ext <<_ACEOF 11667 cat >conftest.$ac_ext <<_ACEOF
10389#line 10389 "configure" 11668#line $LINENO "configure"
10390#include "confdefs.h" 11669/* confdefs.h. */
11670_ACEOF
11671cat confdefs.h >>conftest.$ac_ext
11672cat >>conftest.$ac_ext <<_ACEOF
11673/* end confdefs.h. */
10391$ac_includes_default 11674$ac_includes_default
10392int 11675int
10393main () 11676main ()
10394{ 11677{
10395int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)] 11678static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
11679test_array [0] = 0
11680
10396 ; 11681 ;
10397 return 0; 11682 return 0;
10398} 11683}
10399_ACEOF 11684_ACEOF
10400rm -f conftest.$ac_objext 11685rm -f conftest.$ac_objext
10401if { (eval echo "$as_me:10401: \"$ac_compile\"") >&5 11686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10402 (eval $ac_compile) 2>&5 11687 (eval $ac_compile) 2>&5
10403 ac_status=$? 11688 ac_status=$?
10404 echo "$as_me:10404: \$? = $ac_status" >&5 11689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10405 (exit $ac_status); } && 11690 (exit $ac_status); } &&
10406 { ac_try='test -s conftest.$ac_objext' 11691 { ac_try='test -s conftest.$ac_objext'
10407 { (eval echo "$as_me:10407: \"$ac_try\"") >&5 11692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10408 (eval $ac_try) 2>&5 11693 (eval $ac_try) 2>&5
10409 ac_status=$? 11694 ac_status=$?
10410 echo "$as_me:10410: \$? = $ac_status" >&5 11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10411 (exit $ac_status); }; }; then 11696 (exit $ac_status); }; }; then
10412 ac_lo=$ac_mid; break 11697 ac_lo=$ac_mid; break
10413else 11698else
10414 echo "$as_me: failed program was:" >&5 11699 echo "$as_me: failed program was:" >&5
10415cat conftest.$ac_ext >&5 11700sed 's/^/| /' conftest.$ac_ext >&5
10416ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` 11701
11702ac_hi=`expr '(' $ac_mid ')' - 1`
11703 if test $ac_mid -le $ac_hi; then
11704 ac_lo= ac_hi=
11705 break
11706 fi
11707 ac_mid=`expr 2 '*' $ac_mid`
10417fi 11708fi
10418rm -f conftest.$ac_objext conftest.$ac_ext 11709rm -f conftest.$ac_objext conftest.$ac_ext
10419 done 11710 done
11711else
11712 echo "$as_me: failed program was:" >&5
11713sed 's/^/| /' conftest.$ac_ext >&5
11714
11715ac_lo= ac_hi=
11716fi
11717rm -f conftest.$ac_objext conftest.$ac_ext
10420fi 11718fi
10421rm -f conftest.$ac_objext conftest.$ac_ext 11719rm -f conftest.$ac_objext conftest.$ac_ext
10422# Binary search between lo and hi bounds. 11720# Binary search between lo and hi bounds.
10423while test "x$ac_lo" != "x$ac_hi"; do 11721while test "x$ac_lo" != "x$ac_hi"; do
10424 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 11722 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10425 cat >conftest.$ac_ext <<_ACEOF 11723 cat >conftest.$ac_ext <<_ACEOF
10426#line 10426 "configure" 11724#line $LINENO "configure"
10427#include "confdefs.h" 11725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
10428$ac_includes_default 11730$ac_includes_default
10429int 11731int
10430main () 11732main ()
10431{ 11733{
10432int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)] 11734static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
11735test_array [0] = 0
11736
10433 ; 11737 ;
10434 return 0; 11738 return 0;
10435} 11739}
10436_ACEOF 11740_ACEOF
10437rm -f conftest.$ac_objext 11741rm -f conftest.$ac_objext
10438if { (eval echo "$as_me:10438: \"$ac_compile\"") >&5 11742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10439 (eval $ac_compile) 2>&5 11743 (eval $ac_compile) 2>&5
10440 ac_status=$? 11744 ac_status=$?
10441 echo "$as_me:10441: \$? = $ac_status" >&5 11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10442 (exit $ac_status); } && 11746 (exit $ac_status); } &&
10443 { ac_try='test -s conftest.$ac_objext' 11747 { ac_try='test -s conftest.$ac_objext'
10444 { (eval echo "$as_me:10444: \"$ac_try\"") >&5 11748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10445 (eval $ac_try) 2>&5 11749 (eval $ac_try) 2>&5
10446 ac_status=$? 11750 ac_status=$?
10447 echo "$as_me:10447: \$? = $ac_status" >&5 11751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10448 (exit $ac_status); }; }; then 11752 (exit $ac_status); }; }; then
10449 ac_hi=$ac_mid 11753 ac_hi=$ac_mid
10450else 11754else
10451 echo "$as_me: failed program was:" >&5 11755 echo "$as_me: failed program was:" >&5
10452cat conftest.$ac_ext >&5 11756sed 's/^/| /' conftest.$ac_ext >&5
10453ac_lo=`expr $ac_mid + 1` 11757
11758ac_lo=`expr '(' $ac_mid ')' + 1`
10454fi 11759fi
10455rm -f conftest.$ac_objext conftest.$ac_ext 11760rm -f conftest.$ac_objext conftest.$ac_ext
10456done 11761done
10457ac_cv_sizeof_int=$ac_lo 11762case $ac_lo in
11763?*) ac_cv_sizeof_int=$ac_lo;;
11764'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
11765See \`config.log' for more details." >&5
11766echo "$as_me: error: cannot compute sizeof (int), 77
11767See \`config.log' for more details." >&2;}
11768 { (exit 1); exit 1; }; } ;;
11769esac
10458else 11770else
10459 if test "$cross_compiling" = yes; then 11771 if test "$cross_compiling" = yes; then
10460 { { echo "$as_me:10460: error: cannot run test program while cross compiling" >&5 11772 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10461echo "$as_me: error: cannot run test program while cross compiling" >&2;} 11773See \`config.log' for more details." >&5
11774echo "$as_me: error: cannot run test program while cross compiling
11775See \`config.log' for more details." >&2;}
10462 { (exit 1); exit 1; }; } 11776 { (exit 1); exit 1; }; }
10463else 11777else
10464 cat >conftest.$ac_ext <<_ACEOF 11778 cat >conftest.$ac_ext <<_ACEOF
10465#line 10465 "configure" 11779#line $LINENO "configure"
10466#include "confdefs.h" 11780/* confdefs.h. */
11781_ACEOF
11782cat confdefs.h >>conftest.$ac_ext
11783cat >>conftest.$ac_ext <<_ACEOF
11784/* end confdefs.h. */
10467$ac_includes_default 11785$ac_includes_default
11786long longval () { return (long) (sizeof (int)); }
11787unsigned long ulongval () { return (long) (sizeof (int)); }
11788#include <stdio.h>
11789#include <stdlib.h>
10468int 11790int
10469main () 11791main ()
10470{ 11792{
10471FILE *f = fopen ("conftest.val", "w"); 11793
10472if (!f) 11794 FILE *f = fopen ("conftest.val", "w");
10473 exit (1); 11795 if (! f)
10474fprintf (f, "%d", (sizeof (int))); 11796 exit (1);
10475fclose (f); 11797 if (((long) (sizeof (int))) < 0)
11798 {
11799 long i = longval ();
11800 if (i != ((long) (sizeof (int))))
11801 exit (1);
11802 fprintf (f, "%ld\n", i);
11803 }
11804 else
11805 {
11806 unsigned long i = ulongval ();
11807 if (i != ((long) (sizeof (int))))
11808 exit (1);
11809 fprintf (f, "%lu\n", i);
11810 }
11811 exit (ferror (f) || fclose (f) != 0);
11812
10476 ; 11813 ;
10477 return 0; 11814 return 0;
10478} 11815}
10479_ACEOF 11816_ACEOF
10480rm -f conftest$ac_exeext 11817rm -f conftest$ac_exeext
10481if { (eval echo "$as_me:10481: \"$ac_link\"") >&5 11818if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10482 (eval $ac_link) 2>&5 11819 (eval $ac_link) 2>&5
10483 ac_status=$? 11820 ac_status=$?
10484 echo "$as_me:10484: \$? = $ac_status" >&5 11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 11822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10486 { (eval echo "$as_me:10486: \"$ac_try\"") >&5 11823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10487 (eval $ac_try) 2>&5 11824 (eval $ac_try) 2>&5
10488 ac_status=$? 11825 ac_status=$?
10489 echo "$as_me:10489: \$? = $ac_status" >&5 11826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10490 (exit $ac_status); }; }; then 11827 (exit $ac_status); }; }; then
10491 ac_cv_sizeof_int=`cat conftest.val` 11828 ac_cv_sizeof_int=`cat conftest.val`
10492else 11829else
10493 echo "$as_me: program exited with status $ac_status" >&5 11830 echo "$as_me: program exited with status $ac_status" >&5
10494echo "$as_me: failed program was:" >&5 11831echo "$as_me: failed program was:" >&5
10495cat conftest.$ac_ext >&5 11832sed 's/^/| /' conftest.$ac_ext >&5
11833
11834( exit $ac_status )
11835{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
11836See \`config.log' for more details." >&5
11837echo "$as_me: error: cannot compute sizeof (int), 77
11838See \`config.log' for more details." >&2;}
11839 { (exit 1); exit 1; }; }
10496fi 11840fi
10497rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11841rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10498fi 11842fi
10499fi 11843fi
10500rm -f conftest.val 11844rm -f conftest.val
@@ -10502,20 +11846,25 @@ else
10502 ac_cv_sizeof_int=0 11846 ac_cv_sizeof_int=0
10503fi 11847fi
10504fi 11848fi
10505echo "$as_me:10505: result: $ac_cv_sizeof_int" >&5 11849echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
10506echo "${ECHO_T}$ac_cv_sizeof_int" >&6 11850echo "${ECHO_T}$ac_cv_sizeof_int" >&6
10507cat >>confdefs.h <<EOF 11851cat >>confdefs.h <<_ACEOF
10508#define SIZEOF_INT $ac_cv_sizeof_int 11852#define SIZEOF_INT $ac_cv_sizeof_int
10509EOF 11853_ACEOF
11854
10510 11855
10511echo "$as_me:10511: checking for long int" >&5 11856echo "$as_me:$LINENO: checking for long int" >&5
10512echo $ECHO_N "checking for long int... $ECHO_C" >&6 11857echo $ECHO_N "checking for long int... $ECHO_C" >&6
10513if test "${ac_cv_type_long_int+set}" = set; then 11858if test "${ac_cv_type_long_int+set}" = set; then
10514 echo $ECHO_N "(cached) $ECHO_C" >&6 11859 echo $ECHO_N "(cached) $ECHO_C" >&6
10515else 11860else
10516 cat >conftest.$ac_ext <<_ACEOF 11861 cat >conftest.$ac_ext <<_ACEOF
10517#line 10517 "configure" 11862#line $LINENO "configure"
10518#include "confdefs.h" 11863/* confdefs.h. */
11864_ACEOF
11865cat confdefs.h >>conftest.$ac_ext
11866cat >>conftest.$ac_ext <<_ACEOF
11867/* end confdefs.h. */
10519$ac_includes_default 11868$ac_includes_default
10520int 11869int
10521main () 11870main ()
@@ -10529,209 +11878,328 @@ if (sizeof (long int))
10529} 11878}
10530_ACEOF 11879_ACEOF
10531rm -f conftest.$ac_objext 11880rm -f conftest.$ac_objext
10532if { (eval echo "$as_me:10532: \"$ac_compile\"") >&5 11881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10533 (eval $ac_compile) 2>&5 11882 (eval $ac_compile) 2>&5
10534 ac_status=$? 11883 ac_status=$?
10535 echo "$as_me:10535: \$? = $ac_status" >&5 11884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); } && 11885 (exit $ac_status); } &&
10537 { ac_try='test -s conftest.$ac_objext' 11886 { ac_try='test -s conftest.$ac_objext'
10538 { (eval echo "$as_me:10538: \"$ac_try\"") >&5 11887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10539 (eval $ac_try) 2>&5 11888 (eval $ac_try) 2>&5
10540 ac_status=$? 11889 ac_status=$?
10541 echo "$as_me:10541: \$? = $ac_status" >&5 11890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10542 (exit $ac_status); }; }; then 11891 (exit $ac_status); }; }; then
10543 ac_cv_type_long_int=yes 11892 ac_cv_type_long_int=yes
10544else 11893else
10545 echo "$as_me: failed program was:" >&5 11894 echo "$as_me: failed program was:" >&5
10546cat conftest.$ac_ext >&5 11895sed 's/^/| /' conftest.$ac_ext >&5
11896
10547ac_cv_type_long_int=no 11897ac_cv_type_long_int=no
10548fi 11898fi
10549rm -f conftest.$ac_objext conftest.$ac_ext 11899rm -f conftest.$ac_objext conftest.$ac_ext
10550fi 11900fi
10551echo "$as_me:10551: result: $ac_cv_type_long_int" >&5 11901echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5
10552echo "${ECHO_T}$ac_cv_type_long_int" >&6 11902echo "${ECHO_T}$ac_cv_type_long_int" >&6
10553 11903
10554echo "$as_me:10554: checking size of long int" >&5 11904echo "$as_me:$LINENO: checking size of long int" >&5
10555echo $ECHO_N "checking size of long int... $ECHO_C" >&6 11905echo $ECHO_N "checking size of long int... $ECHO_C" >&6
10556if test "${ac_cv_sizeof_long_int+set}" = set; then 11906if test "${ac_cv_sizeof_long_int+set}" = set; then
10557 echo $ECHO_N "(cached) $ECHO_C" >&6 11907 echo $ECHO_N "(cached) $ECHO_C" >&6
10558else 11908else
10559 if test "$ac_cv_type_long_int" = yes; then 11909 if test "$ac_cv_type_long_int" = yes; then
11910 # The cast to unsigned long works around a bug in the HP C Compiler
11911 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11912 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11913 # This bug is HP SR number 8606223364.
10560 if test "$cross_compiling" = yes; then 11914 if test "$cross_compiling" = yes; then
10561 # Depending upon the size, compute the lo and hi bounds. 11915 # Depending upon the size, compute the lo and hi bounds.
10562cat >conftest.$ac_ext <<_ACEOF 11916cat >conftest.$ac_ext <<_ACEOF
10563#line 10563 "configure" 11917#line $LINENO "configure"
10564#include "confdefs.h" 11918/* confdefs.h. */
11919_ACEOF
11920cat confdefs.h >>conftest.$ac_ext
11921cat >>conftest.$ac_ext <<_ACEOF
11922/* end confdefs.h. */
10565$ac_includes_default 11923$ac_includes_default
10566int 11924int
10567main () 11925main ()
10568{ 11926{
10569int _array_ [1 - 2 * !((sizeof (long int)) >= 0)] 11927static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= 0)];
11928test_array [0] = 0
11929
10570 ; 11930 ;
10571 return 0; 11931 return 0;
10572} 11932}
10573_ACEOF 11933_ACEOF
10574rm -f conftest.$ac_objext 11934rm -f conftest.$ac_objext
10575if { (eval echo "$as_me:10575: \"$ac_compile\"") >&5 11935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10576 (eval $ac_compile) 2>&5 11936 (eval $ac_compile) 2>&5
10577 ac_status=$? 11937 ac_status=$?
10578 echo "$as_me:10578: \$? = $ac_status" >&5 11938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10579 (exit $ac_status); } && 11939 (exit $ac_status); } &&
10580 { ac_try='test -s conftest.$ac_objext' 11940 { ac_try='test -s conftest.$ac_objext'
10581 { (eval echo "$as_me:10581: \"$ac_try\"") >&5 11941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10582 (eval $ac_try) 2>&5 11942 (eval $ac_try) 2>&5
10583 ac_status=$? 11943 ac_status=$?
10584 echo "$as_me:10584: \$? = $ac_status" >&5 11944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10585 (exit $ac_status); }; }; then 11945 (exit $ac_status); }; }; then
10586 ac_lo=0 ac_mid=0 11946 ac_lo=0 ac_mid=0
10587 while :; do 11947 while :; do
10588 cat >conftest.$ac_ext <<_ACEOF 11948 cat >conftest.$ac_ext <<_ACEOF
10589#line 10589 "configure" 11949#line $LINENO "configure"
10590#include "confdefs.h" 11950/* confdefs.h. */
11951_ACEOF
11952cat confdefs.h >>conftest.$ac_ext
11953cat >>conftest.$ac_ext <<_ACEOF
11954/* end confdefs.h. */
10591$ac_includes_default 11955$ac_includes_default
10592int 11956int
10593main () 11957main ()
10594{ 11958{
10595int _array_ [1 - 2 * !((sizeof (long int)) <= $ac_mid)] 11959static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)];
11960test_array [0] = 0
11961
10596 ; 11962 ;
10597 return 0; 11963 return 0;
10598} 11964}
10599_ACEOF 11965_ACEOF
10600rm -f conftest.$ac_objext 11966rm -f conftest.$ac_objext
10601if { (eval echo "$as_me:10601: \"$ac_compile\"") >&5 11967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10602 (eval $ac_compile) 2>&5 11968 (eval $ac_compile) 2>&5
10603 ac_status=$? 11969 ac_status=$?
10604 echo "$as_me:10604: \$? = $ac_status" >&5 11970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10605 (exit $ac_status); } && 11971 (exit $ac_status); } &&
10606 { ac_try='test -s conftest.$ac_objext' 11972 { ac_try='test -s conftest.$ac_objext'
10607 { (eval echo "$as_me:10607: \"$ac_try\"") >&5 11973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10608 (eval $ac_try) 2>&5 11974 (eval $ac_try) 2>&5
10609 ac_status=$? 11975 ac_status=$?
10610 echo "$as_me:10610: \$? = $ac_status" >&5 11976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611 (exit $ac_status); }; }; then 11977 (exit $ac_status); }; }; then
10612 ac_hi=$ac_mid; break 11978 ac_hi=$ac_mid; break
10613else 11979else
10614 echo "$as_me: failed program was:" >&5 11980 echo "$as_me: failed program was:" >&5
10615cat conftest.$ac_ext >&5 11981sed 's/^/| /' conftest.$ac_ext >&5
10616ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` 11982
11983ac_lo=`expr $ac_mid + 1`
11984 if test $ac_lo -le $ac_mid; then
11985 ac_lo= ac_hi=
11986 break
11987 fi
11988 ac_mid=`expr 2 '*' $ac_mid + 1`
10617fi 11989fi
10618rm -f conftest.$ac_objext conftest.$ac_ext 11990rm -f conftest.$ac_objext conftest.$ac_ext
10619 done 11991 done
10620else 11992else
10621 echo "$as_me: failed program was:" >&5 11993 echo "$as_me: failed program was:" >&5
10622cat conftest.$ac_ext >&5 11994sed 's/^/| /' conftest.$ac_ext >&5
10623ac_hi=-1 ac_mid=-1 11995
11996cat >conftest.$ac_ext <<_ACEOF
11997#line $LINENO "configure"
11998/* confdefs.h. */
11999_ACEOF
12000cat confdefs.h >>conftest.$ac_ext
12001cat >>conftest.$ac_ext <<_ACEOF
12002/* end confdefs.h. */
12003$ac_includes_default
12004int
12005main ()
12006{
12007static int test_array [1 - 2 * !(((long) (sizeof (long int))) < 0)];
12008test_array [0] = 0
12009
12010 ;
12011 return 0;
12012}
12013_ACEOF
12014rm -f conftest.$ac_objext
12015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12016 (eval $ac_compile) 2>&5
12017 ac_status=$?
12018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019 (exit $ac_status); } &&
12020 { ac_try='test -s conftest.$ac_objext'
12021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12022 (eval $ac_try) 2>&5
12023 ac_status=$?
12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025 (exit $ac_status); }; }; then
12026 ac_hi=-1 ac_mid=-1
10624 while :; do 12027 while :; do
10625 cat >conftest.$ac_ext <<_ACEOF 12028 cat >conftest.$ac_ext <<_ACEOF
10626#line 10626 "configure" 12029#line $LINENO "configure"
10627#include "confdefs.h" 12030/* confdefs.h. */
12031_ACEOF
12032cat confdefs.h >>conftest.$ac_ext
12033cat >>conftest.$ac_ext <<_ACEOF
12034/* end confdefs.h. */
10628$ac_includes_default 12035$ac_includes_default
10629int 12036int
10630main () 12037main ()
10631{ 12038{
10632int _array_ [1 - 2 * !((sizeof (long int)) >= $ac_mid)] 12039static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= $ac_mid)];
12040test_array [0] = 0
12041
10633 ; 12042 ;
10634 return 0; 12043 return 0;
10635} 12044}
10636_ACEOF 12045_ACEOF
10637rm -f conftest.$ac_objext 12046rm -f conftest.$ac_objext
10638if { (eval echo "$as_me:10638: \"$ac_compile\"") >&5 12047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10639 (eval $ac_compile) 2>&5 12048 (eval $ac_compile) 2>&5
10640 ac_status=$? 12049 ac_status=$?
10641 echo "$as_me:10641: \$? = $ac_status" >&5 12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); } && 12051 (exit $ac_status); } &&
10643 { ac_try='test -s conftest.$ac_objext' 12052 { ac_try='test -s conftest.$ac_objext'
10644 { (eval echo "$as_me:10644: \"$ac_try\"") >&5 12053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10645 (eval $ac_try) 2>&5 12054 (eval $ac_try) 2>&5
10646 ac_status=$? 12055 ac_status=$?
10647 echo "$as_me:10647: \$? = $ac_status" >&5 12056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648 (exit $ac_status); }; }; then 12057 (exit $ac_status); }; }; then
10649 ac_lo=$ac_mid; break 12058 ac_lo=$ac_mid; break
10650else 12059else
10651 echo "$as_me: failed program was:" >&5 12060 echo "$as_me: failed program was:" >&5
10652cat conftest.$ac_ext >&5 12061sed 's/^/| /' conftest.$ac_ext >&5
10653ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` 12062
12063ac_hi=`expr '(' $ac_mid ')' - 1`
12064 if test $ac_mid -le $ac_hi; then
12065 ac_lo= ac_hi=
12066 break
12067 fi
12068 ac_mid=`expr 2 '*' $ac_mid`
10654fi 12069fi
10655rm -f conftest.$ac_objext conftest.$ac_ext 12070rm -f conftest.$ac_objext conftest.$ac_ext
10656 done 12071 done
12072else
12073 echo "$as_me: failed program was:" >&5
12074sed 's/^/| /' conftest.$ac_ext >&5
12075
12076ac_lo= ac_hi=
12077fi
12078rm -f conftest.$ac_objext conftest.$ac_ext
10657fi 12079fi
10658rm -f conftest.$ac_objext conftest.$ac_ext 12080rm -f conftest.$ac_objext conftest.$ac_ext
10659# Binary search between lo and hi bounds. 12081# Binary search between lo and hi bounds.
10660while test "x$ac_lo" != "x$ac_hi"; do 12082while test "x$ac_lo" != "x$ac_hi"; do
10661 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 12083 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10662 cat >conftest.$ac_ext <<_ACEOF 12084 cat >conftest.$ac_ext <<_ACEOF
10663#line 10663 "configure" 12085#line $LINENO "configure"
10664#include "confdefs.h" 12086/* confdefs.h. */
12087_ACEOF
12088cat confdefs.h >>conftest.$ac_ext
12089cat >>conftest.$ac_ext <<_ACEOF
12090/* end confdefs.h. */
10665$ac_includes_default 12091$ac_includes_default
10666int 12092int
10667main () 12093main ()
10668{ 12094{
10669int _array_ [1 - 2 * !((sizeof (long int)) <= $ac_mid)] 12095static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)];
12096test_array [0] = 0
12097
10670 ; 12098 ;
10671 return 0; 12099 return 0;
10672} 12100}
10673_ACEOF 12101_ACEOF
10674rm -f conftest.$ac_objext 12102rm -f conftest.$ac_objext
10675if { (eval echo "$as_me:10675: \"$ac_compile\"") >&5 12103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10676 (eval $ac_compile) 2>&5 12104 (eval $ac_compile) 2>&5
10677 ac_status=$? 12105 ac_status=$?
10678 echo "$as_me:10678: \$? = $ac_status" >&5 12106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10679 (exit $ac_status); } && 12107 (exit $ac_status); } &&
10680 { ac_try='test -s conftest.$ac_objext' 12108 { ac_try='test -s conftest.$ac_objext'
10681 { (eval echo "$as_me:10681: \"$ac_try\"") >&5 12109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10682 (eval $ac_try) 2>&5 12110 (eval $ac_try) 2>&5
10683 ac_status=$? 12111 ac_status=$?
10684 echo "$as_me:10684: \$? = $ac_status" >&5 12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10685 (exit $ac_status); }; }; then 12113 (exit $ac_status); }; }; then
10686 ac_hi=$ac_mid 12114 ac_hi=$ac_mid
10687else 12115else
10688 echo "$as_me: failed program was:" >&5 12116 echo "$as_me: failed program was:" >&5
10689cat conftest.$ac_ext >&5 12117sed 's/^/| /' conftest.$ac_ext >&5
10690ac_lo=`expr $ac_mid + 1` 12118
12119ac_lo=`expr '(' $ac_mid ')' + 1`
10691fi 12120fi
10692rm -f conftest.$ac_objext conftest.$ac_ext 12121rm -f conftest.$ac_objext conftest.$ac_ext
10693done 12122done
10694ac_cv_sizeof_long_int=$ac_lo 12123case $ac_lo in
12124?*) ac_cv_sizeof_long_int=$ac_lo;;
12125'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77
12126See \`config.log' for more details." >&5
12127echo "$as_me: error: cannot compute sizeof (long int), 77
12128See \`config.log' for more details." >&2;}
12129 { (exit 1); exit 1; }; } ;;
12130esac
10695else 12131else
10696 if test "$cross_compiling" = yes; then 12132 if test "$cross_compiling" = yes; then
10697 { { echo "$as_me:10697: error: cannot run test program while cross compiling" >&5 12133 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10698echo "$as_me: error: cannot run test program while cross compiling" >&2;} 12134See \`config.log' for more details." >&5
12135echo "$as_me: error: cannot run test program while cross compiling
12136See \`config.log' for more details." >&2;}
10699 { (exit 1); exit 1; }; } 12137 { (exit 1); exit 1; }; }
10700else 12138else
10701 cat >conftest.$ac_ext <<_ACEOF 12139 cat >conftest.$ac_ext <<_ACEOF
10702#line 10702 "configure" 12140#line $LINENO "configure"
10703#include "confdefs.h" 12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
10704$ac_includes_default 12146$ac_includes_default
12147long longval () { return (long) (sizeof (long int)); }
12148unsigned long ulongval () { return (long) (sizeof (long int)); }
12149#include <stdio.h>
12150#include <stdlib.h>
10705int 12151int
10706main () 12152main ()
10707{ 12153{
10708FILE *f = fopen ("conftest.val", "w"); 12154
10709if (!f) 12155 FILE *f = fopen ("conftest.val", "w");
10710 exit (1); 12156 if (! f)
10711fprintf (f, "%d", (sizeof (long int))); 12157 exit (1);
10712fclose (f); 12158 if (((long) (sizeof (long int))) < 0)
12159 {
12160 long i = longval ();
12161 if (i != ((long) (sizeof (long int))))
12162 exit (1);
12163 fprintf (f, "%ld\n", i);
12164 }
12165 else
12166 {
12167 unsigned long i = ulongval ();
12168 if (i != ((long) (sizeof (long int))))
12169 exit (1);
12170 fprintf (f, "%lu\n", i);
12171 }
12172 exit (ferror (f) || fclose (f) != 0);
12173
10713 ; 12174 ;
10714 return 0; 12175 return 0;
10715} 12176}
10716_ACEOF 12177_ACEOF
10717rm -f conftest$ac_exeext 12178rm -f conftest$ac_exeext
10718if { (eval echo "$as_me:10718: \"$ac_link\"") >&5 12179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10719 (eval $ac_link) 2>&5 12180 (eval $ac_link) 2>&5
10720 ac_status=$? 12181 ac_status=$?
10721 echo "$as_me:10721: \$? = $ac_status" >&5 12182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 12183 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10723 { (eval echo "$as_me:10723: \"$ac_try\"") >&5 12184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10724 (eval $ac_try) 2>&5 12185 (eval $ac_try) 2>&5
10725 ac_status=$? 12186 ac_status=$?
10726 echo "$as_me:10726: \$? = $ac_status" >&5 12187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); }; }; then 12188 (exit $ac_status); }; }; then
10728 ac_cv_sizeof_long_int=`cat conftest.val` 12189 ac_cv_sizeof_long_int=`cat conftest.val`
10729else 12190else
10730 echo "$as_me: program exited with status $ac_status" >&5 12191 echo "$as_me: program exited with status $ac_status" >&5
10731echo "$as_me: failed program was:" >&5 12192echo "$as_me: failed program was:" >&5
10732cat conftest.$ac_ext >&5 12193sed 's/^/| /' conftest.$ac_ext >&5
12194
12195( exit $ac_status )
12196{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77
12197See \`config.log' for more details." >&5
12198echo "$as_me: error: cannot compute sizeof (long int), 77
12199See \`config.log' for more details." >&2;}
12200 { (exit 1); exit 1; }; }
10733fi 12201fi
10734rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 12202rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10735fi 12203fi
10736fi 12204fi
10737rm -f conftest.val 12205rm -f conftest.val
@@ -10739,20 +12207,25 @@ else
10739 ac_cv_sizeof_long_int=0 12207 ac_cv_sizeof_long_int=0
10740fi 12208fi
10741fi 12209fi
10742echo "$as_me:10742: result: $ac_cv_sizeof_long_int" >&5 12210echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5
10743echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6 12211echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6
10744cat >>confdefs.h <<EOF 12212cat >>confdefs.h <<_ACEOF
10745#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int 12213#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
10746EOF 12214_ACEOF
12215
10747 12216
10748echo "$as_me:10748: checking for long long int" >&5 12217echo "$as_me:$LINENO: checking for long long int" >&5
10749echo $ECHO_N "checking for long long int... $ECHO_C" >&6 12218echo $ECHO_N "checking for long long int... $ECHO_C" >&6
10750if test "${ac_cv_type_long_long_int+set}" = set; then 12219if test "${ac_cv_type_long_long_int+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6 12220 echo $ECHO_N "(cached) $ECHO_C" >&6
10752else 12221else
10753 cat >conftest.$ac_ext <<_ACEOF 12222 cat >conftest.$ac_ext <<_ACEOF
10754#line 10754 "configure" 12223#line $LINENO "configure"
10755#include "confdefs.h" 12224/* confdefs.h. */
12225_ACEOF
12226cat confdefs.h >>conftest.$ac_ext
12227cat >>conftest.$ac_ext <<_ACEOF
12228/* end confdefs.h. */
10756$ac_includes_default 12229$ac_includes_default
10757int 12230int
10758main () 12231main ()
@@ -10766,209 +12239,328 @@ if (sizeof (long long int))
10766} 12239}
10767_ACEOF 12240_ACEOF
10768rm -f conftest.$ac_objext 12241rm -f conftest.$ac_objext
10769if { (eval echo "$as_me:10769: \"$ac_compile\"") >&5 12242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10770 (eval $ac_compile) 2>&5 12243 (eval $ac_compile) 2>&5
10771 ac_status=$? 12244 ac_status=$?
10772 echo "$as_me:10772: \$? = $ac_status" >&5 12245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10773 (exit $ac_status); } && 12246 (exit $ac_status); } &&
10774 { ac_try='test -s conftest.$ac_objext' 12247 { ac_try='test -s conftest.$ac_objext'
10775 { (eval echo "$as_me:10775: \"$ac_try\"") >&5 12248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10776 (eval $ac_try) 2>&5 12249 (eval $ac_try) 2>&5
10777 ac_status=$? 12250 ac_status=$?
10778 echo "$as_me:10778: \$? = $ac_status" >&5 12251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10779 (exit $ac_status); }; }; then 12252 (exit $ac_status); }; }; then
10780 ac_cv_type_long_long_int=yes 12253 ac_cv_type_long_long_int=yes
10781else 12254else
10782 echo "$as_me: failed program was:" >&5 12255 echo "$as_me: failed program was:" >&5
10783cat conftest.$ac_ext >&5 12256sed 's/^/| /' conftest.$ac_ext >&5
12257
10784ac_cv_type_long_long_int=no 12258ac_cv_type_long_long_int=no
10785fi 12259fi
10786rm -f conftest.$ac_objext conftest.$ac_ext 12260rm -f conftest.$ac_objext conftest.$ac_ext
10787fi 12261fi
10788echo "$as_me:10788: result: $ac_cv_type_long_long_int" >&5 12262echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
10789echo "${ECHO_T}$ac_cv_type_long_long_int" >&6 12263echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
10790 12264
10791echo "$as_me:10791: checking size of long long int" >&5 12265echo "$as_me:$LINENO: checking size of long long int" >&5
10792echo $ECHO_N "checking size of long long int... $ECHO_C" >&6 12266echo $ECHO_N "checking size of long long int... $ECHO_C" >&6
10793if test "${ac_cv_sizeof_long_long_int+set}" = set; then 12267if test "${ac_cv_sizeof_long_long_int+set}" = set; then
10794 echo $ECHO_N "(cached) $ECHO_C" >&6 12268 echo $ECHO_N "(cached) $ECHO_C" >&6
10795else 12269else
10796 if test "$ac_cv_type_long_long_int" = yes; then 12270 if test "$ac_cv_type_long_long_int" = yes; then
12271 # The cast to unsigned long works around a bug in the HP C Compiler
12272 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12273 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12274 # This bug is HP SR number 8606223364.
10797 if test "$cross_compiling" = yes; then 12275 if test "$cross_compiling" = yes; then
10798 # Depending upon the size, compute the lo and hi bounds. 12276 # Depending upon the size, compute the lo and hi bounds.
10799cat >conftest.$ac_ext <<_ACEOF 12277cat >conftest.$ac_ext <<_ACEOF
10800#line 10800 "configure" 12278#line $LINENO "configure"
10801#include "confdefs.h" 12279/* confdefs.h. */
12280_ACEOF
12281cat confdefs.h >>conftest.$ac_ext
12282cat >>conftest.$ac_ext <<_ACEOF
12283/* end confdefs.h. */
10802$ac_includes_default 12284$ac_includes_default
10803int 12285int
10804main () 12286main ()
10805{ 12287{
10806int _array_ [1 - 2 * !((sizeof (long long int)) >= 0)] 12288static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= 0)];
12289test_array [0] = 0
12290
10807 ; 12291 ;
10808 return 0; 12292 return 0;
10809} 12293}
10810_ACEOF 12294_ACEOF
10811rm -f conftest.$ac_objext 12295rm -f conftest.$ac_objext
10812if { (eval echo "$as_me:10812: \"$ac_compile\"") >&5 12296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10813 (eval $ac_compile) 2>&5 12297 (eval $ac_compile) 2>&5
10814 ac_status=$? 12298 ac_status=$?
10815 echo "$as_me:10815: \$? = $ac_status" >&5 12299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 (exit $ac_status); } && 12300 (exit $ac_status); } &&
10817 { ac_try='test -s conftest.$ac_objext' 12301 { ac_try='test -s conftest.$ac_objext'
10818 { (eval echo "$as_me:10818: \"$ac_try\"") >&5 12302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10819 (eval $ac_try) 2>&5 12303 (eval $ac_try) 2>&5
10820 ac_status=$? 12304 ac_status=$?
10821 echo "$as_me:10821: \$? = $ac_status" >&5 12305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10822 (exit $ac_status); }; }; then 12306 (exit $ac_status); }; }; then
10823 ac_lo=0 ac_mid=0 12307 ac_lo=0 ac_mid=0
10824 while :; do 12308 while :; do
10825 cat >conftest.$ac_ext <<_ACEOF 12309 cat >conftest.$ac_ext <<_ACEOF
10826#line 10826 "configure" 12310#line $LINENO "configure"
10827#include "confdefs.h" 12311/* confdefs.h. */
12312_ACEOF
12313cat confdefs.h >>conftest.$ac_ext
12314cat >>conftest.$ac_ext <<_ACEOF
12315/* end confdefs.h. */
10828$ac_includes_default 12316$ac_includes_default
10829int 12317int
10830main () 12318main ()
10831{ 12319{
10832int _array_ [1 - 2 * !((sizeof (long long int)) <= $ac_mid)] 12320static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)];
12321test_array [0] = 0
12322
10833 ; 12323 ;
10834 return 0; 12324 return 0;
10835} 12325}
10836_ACEOF 12326_ACEOF
10837rm -f conftest.$ac_objext 12327rm -f conftest.$ac_objext
10838if { (eval echo "$as_me:10838: \"$ac_compile\"") >&5 12328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10839 (eval $ac_compile) 2>&5 12329 (eval $ac_compile) 2>&5
10840 ac_status=$? 12330 ac_status=$?
10841 echo "$as_me:10841: \$? = $ac_status" >&5 12331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10842 (exit $ac_status); } && 12332 (exit $ac_status); } &&
10843 { ac_try='test -s conftest.$ac_objext' 12333 { ac_try='test -s conftest.$ac_objext'
10844 { (eval echo "$as_me:10844: \"$ac_try\"") >&5 12334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10845 (eval $ac_try) 2>&5 12335 (eval $ac_try) 2>&5
10846 ac_status=$? 12336 ac_status=$?
10847 echo "$as_me:10847: \$? = $ac_status" >&5 12337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10848 (exit $ac_status); }; }; then 12338 (exit $ac_status); }; }; then
10849 ac_hi=$ac_mid; break 12339 ac_hi=$ac_mid; break
10850else 12340else
10851 echo "$as_me: failed program was:" >&5 12341 echo "$as_me: failed program was:" >&5
10852cat conftest.$ac_ext >&5 12342sed 's/^/| /' conftest.$ac_ext >&5
10853ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1` 12343
12344ac_lo=`expr $ac_mid + 1`
12345 if test $ac_lo -le $ac_mid; then
12346 ac_lo= ac_hi=
12347 break
12348 fi
12349 ac_mid=`expr 2 '*' $ac_mid + 1`
10854fi 12350fi
10855rm -f conftest.$ac_objext conftest.$ac_ext 12351rm -f conftest.$ac_objext conftest.$ac_ext
10856 done 12352 done
10857else 12353else
10858 echo "$as_me: failed program was:" >&5 12354 echo "$as_me: failed program was:" >&5
10859cat conftest.$ac_ext >&5 12355sed 's/^/| /' conftest.$ac_ext >&5
10860ac_hi=-1 ac_mid=-1 12356
12357cat >conftest.$ac_ext <<_ACEOF
12358#line $LINENO "configure"
12359/* confdefs.h. */
12360_ACEOF
12361cat confdefs.h >>conftest.$ac_ext
12362cat >>conftest.$ac_ext <<_ACEOF
12363/* end confdefs.h. */
12364$ac_includes_default
12365int
12366main ()
12367{
12368static int test_array [1 - 2 * !(((long) (sizeof (long long int))) < 0)];
12369test_array [0] = 0
12370
12371 ;
12372 return 0;
12373}
12374_ACEOF
12375rm -f conftest.$ac_objext
12376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12377 (eval $ac_compile) 2>&5
12378 ac_status=$?
12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12380 (exit $ac_status); } &&
12381 { ac_try='test -s conftest.$ac_objext'
12382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12383 (eval $ac_try) 2>&5
12384 ac_status=$?
12385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12386 (exit $ac_status); }; }; then
12387 ac_hi=-1 ac_mid=-1
10861 while :; do 12388 while :; do
10862 cat >conftest.$ac_ext <<_ACEOF 12389 cat >conftest.$ac_ext <<_ACEOF
10863#line 10863 "configure" 12390#line $LINENO "configure"
10864#include "confdefs.h" 12391/* confdefs.h. */
12392_ACEOF
12393cat confdefs.h >>conftest.$ac_ext
12394cat >>conftest.$ac_ext <<_ACEOF
12395/* end confdefs.h. */
10865$ac_includes_default 12396$ac_includes_default
10866int 12397int
10867main () 12398main ()
10868{ 12399{
10869int _array_ [1 - 2 * !((sizeof (long long int)) >= $ac_mid)] 12400static int test_array [1 - 2 * !(((long) (sizeof (long long int))) >= $ac_mid)];
12401test_array [0] = 0
12402
10870 ; 12403 ;
10871 return 0; 12404 return 0;
10872} 12405}
10873_ACEOF 12406_ACEOF
10874rm -f conftest.$ac_objext 12407rm -f conftest.$ac_objext
10875if { (eval echo "$as_me:10875: \"$ac_compile\"") >&5 12408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10876 (eval $ac_compile) 2>&5 12409 (eval $ac_compile) 2>&5
10877 ac_status=$? 12410 ac_status=$?
10878 echo "$as_me:10878: \$? = $ac_status" >&5 12411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10879 (exit $ac_status); } && 12412 (exit $ac_status); } &&
10880 { ac_try='test -s conftest.$ac_objext' 12413 { ac_try='test -s conftest.$ac_objext'
10881 { (eval echo "$as_me:10881: \"$ac_try\"") >&5 12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10882 (eval $ac_try) 2>&5 12415 (eval $ac_try) 2>&5
10883 ac_status=$? 12416 ac_status=$?
10884 echo "$as_me:10884: \$? = $ac_status" >&5 12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10885 (exit $ac_status); }; }; then 12418 (exit $ac_status); }; }; then
10886 ac_lo=$ac_mid; break 12419 ac_lo=$ac_mid; break
10887else 12420else
10888 echo "$as_me: failed program was:" >&5 12421 echo "$as_me: failed program was:" >&5
10889cat conftest.$ac_ext >&5 12422sed 's/^/| /' conftest.$ac_ext >&5
10890ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid` 12423
12424ac_hi=`expr '(' $ac_mid ')' - 1`
12425 if test $ac_mid -le $ac_hi; then
12426 ac_lo= ac_hi=
12427 break
12428 fi
12429 ac_mid=`expr 2 '*' $ac_mid`
10891fi 12430fi
10892rm -f conftest.$ac_objext conftest.$ac_ext 12431rm -f conftest.$ac_objext conftest.$ac_ext
10893 done 12432 done
12433else
12434 echo "$as_me: failed program was:" >&5
12435sed 's/^/| /' conftest.$ac_ext >&5
12436
12437ac_lo= ac_hi=
12438fi
12439rm -f conftest.$ac_objext conftest.$ac_ext
10894fi 12440fi
10895rm -f conftest.$ac_objext conftest.$ac_ext 12441rm -f conftest.$ac_objext conftest.$ac_ext
10896# Binary search between lo and hi bounds. 12442# Binary search between lo and hi bounds.
10897while test "x$ac_lo" != "x$ac_hi"; do 12443while test "x$ac_lo" != "x$ac_hi"; do
10898 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` 12444 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10899 cat >conftest.$ac_ext <<_ACEOF 12445 cat >conftest.$ac_ext <<_ACEOF
10900#line 10900 "configure" 12446#line $LINENO "configure"
10901#include "confdefs.h" 12447/* confdefs.h. */
12448_ACEOF
12449cat confdefs.h >>conftest.$ac_ext
12450cat >>conftest.$ac_ext <<_ACEOF
12451/* end confdefs.h. */
10902$ac_includes_default 12452$ac_includes_default
10903int 12453int
10904main () 12454main ()
10905{ 12455{
10906int _array_ [1 - 2 * !((sizeof (long long int)) <= $ac_mid)] 12456static int test_array [1 - 2 * !(((long) (sizeof (long long int))) <= $ac_mid)];
12457test_array [0] = 0
12458
10907 ; 12459 ;
10908 return 0; 12460 return 0;
10909} 12461}
10910_ACEOF 12462_ACEOF
10911rm -f conftest.$ac_objext 12463rm -f conftest.$ac_objext
10912if { (eval echo "$as_me:10912: \"$ac_compile\"") >&5 12464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10913 (eval $ac_compile) 2>&5 12465 (eval $ac_compile) 2>&5
10914 ac_status=$? 12466 ac_status=$?
10915 echo "$as_me:10915: \$? = $ac_status" >&5 12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10916 (exit $ac_status); } && 12468 (exit $ac_status); } &&
10917 { ac_try='test -s conftest.$ac_objext' 12469 { ac_try='test -s conftest.$ac_objext'
10918 { (eval echo "$as_me:10918: \"$ac_try\"") >&5 12470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10919 (eval $ac_try) 2>&5 12471 (eval $ac_try) 2>&5
10920 ac_status=$? 12472 ac_status=$?
10921 echo "$as_me:10921: \$? = $ac_status" >&5 12473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10922 (exit $ac_status); }; }; then 12474 (exit $ac_status); }; }; then
10923 ac_hi=$ac_mid 12475 ac_hi=$ac_mid
10924else 12476else
10925 echo "$as_me: failed program was:" >&5 12477 echo "$as_me: failed program was:" >&5
10926cat conftest.$ac_ext >&5 12478sed 's/^/| /' conftest.$ac_ext >&5
10927ac_lo=`expr $ac_mid + 1` 12479
12480ac_lo=`expr '(' $ac_mid ')' + 1`
10928fi 12481fi
10929rm -f conftest.$ac_objext conftest.$ac_ext 12482rm -f conftest.$ac_objext conftest.$ac_ext
10930done 12483done
10931ac_cv_sizeof_long_long_int=$ac_lo 12484case $ac_lo in
12485?*) ac_cv_sizeof_long_long_int=$ac_lo;;
12486'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
12487See \`config.log' for more details." >&5
12488echo "$as_me: error: cannot compute sizeof (long long int), 77
12489See \`config.log' for more details." >&2;}
12490 { (exit 1); exit 1; }; } ;;
12491esac
10932else 12492else
10933 if test "$cross_compiling" = yes; then 12493 if test "$cross_compiling" = yes; then
10934 { { echo "$as_me:10934: error: cannot run test program while cross compiling" >&5 12494 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10935echo "$as_me: error: cannot run test program while cross compiling" >&2;} 12495See \`config.log' for more details." >&5
12496echo "$as_me: error: cannot run test program while cross compiling
12497See \`config.log' for more details." >&2;}
10936 { (exit 1); exit 1; }; } 12498 { (exit 1); exit 1; }; }
10937else 12499else
10938 cat >conftest.$ac_ext <<_ACEOF 12500 cat >conftest.$ac_ext <<_ACEOF
10939#line 10939 "configure" 12501#line $LINENO "configure"
10940#include "confdefs.h" 12502/* confdefs.h. */
12503_ACEOF
12504cat confdefs.h >>conftest.$ac_ext
12505cat >>conftest.$ac_ext <<_ACEOF
12506/* end confdefs.h. */
10941$ac_includes_default 12507$ac_includes_default
12508long longval () { return (long) (sizeof (long long int)); }
12509unsigned long ulongval () { return (long) (sizeof (long long int)); }
12510#include <stdio.h>
12511#include <stdlib.h>
10942int 12512int
10943main () 12513main ()
10944{ 12514{
10945FILE *f = fopen ("conftest.val", "w"); 12515
10946if (!f) 12516 FILE *f = fopen ("conftest.val", "w");
10947 exit (1); 12517 if (! f)
10948fprintf (f, "%d", (sizeof (long long int))); 12518 exit (1);
10949fclose (f); 12519 if (((long) (sizeof (long long int))) < 0)
12520 {
12521 long i = longval ();
12522 if (i != ((long) (sizeof (long long int))))
12523 exit (1);
12524 fprintf (f, "%ld\n", i);
12525 }
12526 else
12527 {
12528 unsigned long i = ulongval ();
12529 if (i != ((long) (sizeof (long long int))))
12530 exit (1);
12531 fprintf (f, "%lu\n", i);
12532 }
12533 exit (ferror (f) || fclose (f) != 0);
12534
10950 ; 12535 ;
10951 return 0; 12536 return 0;
10952} 12537}
10953_ACEOF 12538_ACEOF
10954rm -f conftest$ac_exeext 12539rm -f conftest$ac_exeext
10955if { (eval echo "$as_me:10955: \"$ac_link\"") >&5 12540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10956 (eval $ac_link) 2>&5 12541 (eval $ac_link) 2>&5
10957 ac_status=$? 12542 ac_status=$?
10958 echo "$as_me:10958: \$? = $ac_status" >&5 12543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 12544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10960 { (eval echo "$as_me:10960: \"$ac_try\"") >&5 12545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10961 (eval $ac_try) 2>&5 12546 (eval $ac_try) 2>&5
10962 ac_status=$? 12547 ac_status=$?
10963 echo "$as_me:10963: \$? = $ac_status" >&5 12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10964 (exit $ac_status); }; }; then 12549 (exit $ac_status); }; }; then
10965 ac_cv_sizeof_long_long_int=`cat conftest.val` 12550 ac_cv_sizeof_long_long_int=`cat conftest.val`
10966else 12551else
10967 echo "$as_me: program exited with status $ac_status" >&5 12552 echo "$as_me: program exited with status $ac_status" >&5
10968echo "$as_me: failed program was:" >&5 12553echo "$as_me: failed program was:" >&5
10969cat conftest.$ac_ext >&5 12554sed 's/^/| /' conftest.$ac_ext >&5
12555
12556( exit $ac_status )
12557{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int), 77
12558See \`config.log' for more details." >&5
12559echo "$as_me: error: cannot compute sizeof (long long int), 77
12560See \`config.log' for more details." >&2;}
12561 { (exit 1); exit 1; }; }
10970fi 12562fi
10971rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 12563rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10972fi 12564fi
10973fi 12565fi
10974rm -f conftest.val 12566rm -f conftest.val
@@ -10976,11 +12568,13 @@ else
10976 ac_cv_sizeof_long_long_int=0 12568 ac_cv_sizeof_long_long_int=0
10977fi 12569fi
10978fi 12570fi
10979echo "$as_me:10979: result: $ac_cv_sizeof_long_long_int" >&5 12571echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5
10980echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6 12572echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6
10981cat >>confdefs.h <<EOF 12573cat >>confdefs.h <<_ACEOF
10982#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int 12574#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
10983EOF 12575_ACEOF
12576
12577
10984 12578
10985# Sanity check long long for some platforms (AIX) 12579# Sanity check long long for some platforms (AIX)
10986if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then 12580if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
@@ -10988,15 +12582,19 @@ if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
10988fi 12582fi
10989 12583
10990# More checks for data types 12584# More checks for data types
10991echo "$as_me:10991: checking for u_int type" >&5 12585echo "$as_me:$LINENO: checking for u_int type" >&5
10992echo $ECHO_N "checking for u_int type... $ECHO_C" >&6 12586echo $ECHO_N "checking for u_int type... $ECHO_C" >&6
10993if test "${ac_cv_have_u_int+set}" = set; then 12587if test "${ac_cv_have_u_int+set}" = set; then
10994 echo $ECHO_N "(cached) $ECHO_C" >&6 12588 echo $ECHO_N "(cached) $ECHO_C" >&6
10995else 12589else
10996 12590
10997 cat >conftest.$ac_ext <<_ACEOF 12591 cat >conftest.$ac_ext <<_ACEOF
10998#line 10998 "configure" 12592#line $LINENO "configure"
10999#include "confdefs.h" 12593/* confdefs.h. */
12594_ACEOF
12595cat confdefs.h >>conftest.$ac_ext
12596cat >>conftest.$ac_ext <<_ACEOF
12597/* end confdefs.h. */
11000 #include <sys/types.h> 12598 #include <sys/types.h>
11001int 12599int
11002main () 12600main ()
@@ -11007,46 +12605,51 @@ main ()
11007} 12605}
11008_ACEOF 12606_ACEOF
11009rm -f conftest.$ac_objext 12607rm -f conftest.$ac_objext
11010if { (eval echo "$as_me:11010: \"$ac_compile\"") >&5 12608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11011 (eval $ac_compile) 2>&5 12609 (eval $ac_compile) 2>&5
11012 ac_status=$? 12610 ac_status=$?
11013 echo "$as_me:11013: \$? = $ac_status" >&5 12611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11014 (exit $ac_status); } && 12612 (exit $ac_status); } &&
11015 { ac_try='test -s conftest.$ac_objext' 12613 { ac_try='test -s conftest.$ac_objext'
11016 { (eval echo "$as_me:11016: \"$ac_try\"") >&5 12614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11017 (eval $ac_try) 2>&5 12615 (eval $ac_try) 2>&5
11018 ac_status=$? 12616 ac_status=$?
11019 echo "$as_me:11019: \$? = $ac_status" >&5 12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11020 (exit $ac_status); }; }; then 12618 (exit $ac_status); }; }; then
11021 ac_cv_have_u_int="yes" 12619 ac_cv_have_u_int="yes"
11022else 12620else
11023 echo "$as_me: failed program was:" >&5 12621 echo "$as_me: failed program was:" >&5
11024cat conftest.$ac_ext >&5 12622sed 's/^/| /' conftest.$ac_ext >&5
12623
11025 ac_cv_have_u_int="no" 12624 ac_cv_have_u_int="no"
11026 12625
11027fi 12626fi
11028rm -f conftest.$ac_objext conftest.$ac_ext 12627rm -f conftest.$ac_objext conftest.$ac_ext
11029 12628
11030fi 12629fi
11031echo "$as_me:11031: result: $ac_cv_have_u_int" >&5 12630echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5
11032echo "${ECHO_T}$ac_cv_have_u_int" >&6 12631echo "${ECHO_T}$ac_cv_have_u_int" >&6
11033if test "x$ac_cv_have_u_int" = "xyes" ; then 12632if test "x$ac_cv_have_u_int" = "xyes" ; then
11034 cat >>confdefs.h <<\EOF 12633 cat >>confdefs.h <<\_ACEOF
11035#define HAVE_U_INT 1 12634#define HAVE_U_INT 1
11036EOF 12635_ACEOF
11037 12636
11038 have_u_int=1 12637 have_u_int=1
11039fi 12638fi
11040 12639
11041echo "$as_me:11041: checking for intXX_t types" >&5 12640echo "$as_me:$LINENO: checking for intXX_t types" >&5
11042echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6 12641echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6
11043if test "${ac_cv_have_intxx_t+set}" = set; then 12642if test "${ac_cv_have_intxx_t+set}" = set; then
11044 echo $ECHO_N "(cached) $ECHO_C" >&6 12643 echo $ECHO_N "(cached) $ECHO_C" >&6
11045else 12644else
11046 12645
11047 cat >conftest.$ac_ext <<_ACEOF 12646 cat >conftest.$ac_ext <<_ACEOF
11048#line 11048 "configure" 12647#line $LINENO "configure"
11049#include "confdefs.h" 12648/* confdefs.h. */
12649_ACEOF
12650cat confdefs.h >>conftest.$ac_ext
12651cat >>conftest.$ac_ext <<_ACEOF
12652/* end confdefs.h. */
11050 #include <sys/types.h> 12653 #include <sys/types.h>
11051int 12654int
11052main () 12655main ()
@@ -11057,33 +12660,34 @@ main ()
11057} 12660}
11058_ACEOF 12661_ACEOF
11059rm -f conftest.$ac_objext 12662rm -f conftest.$ac_objext
11060if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5 12663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11061 (eval $ac_compile) 2>&5 12664 (eval $ac_compile) 2>&5
11062 ac_status=$? 12665 ac_status=$?
11063 echo "$as_me:11063: \$? = $ac_status" >&5 12666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11064 (exit $ac_status); } && 12667 (exit $ac_status); } &&
11065 { ac_try='test -s conftest.$ac_objext' 12668 { ac_try='test -s conftest.$ac_objext'
11066 { (eval echo "$as_me:11066: \"$ac_try\"") >&5 12669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11067 (eval $ac_try) 2>&5 12670 (eval $ac_try) 2>&5
11068 ac_status=$? 12671 ac_status=$?
11069 echo "$as_me:11069: \$? = $ac_status" >&5 12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11070 (exit $ac_status); }; }; then 12673 (exit $ac_status); }; }; then
11071 ac_cv_have_intxx_t="yes" 12674 ac_cv_have_intxx_t="yes"
11072else 12675else
11073 echo "$as_me: failed program was:" >&5 12676 echo "$as_me: failed program was:" >&5
11074cat conftest.$ac_ext >&5 12677sed 's/^/| /' conftest.$ac_ext >&5
12678
11075 ac_cv_have_intxx_t="no" 12679 ac_cv_have_intxx_t="no"
11076 12680
11077fi 12681fi
11078rm -f conftest.$ac_objext conftest.$ac_ext 12682rm -f conftest.$ac_objext conftest.$ac_ext
11079 12683
11080fi 12684fi
11081echo "$as_me:11081: result: $ac_cv_have_intxx_t" >&5 12685echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5
11082echo "${ECHO_T}$ac_cv_have_intxx_t" >&6 12686echo "${ECHO_T}$ac_cv_have_intxx_t" >&6
11083if test "x$ac_cv_have_intxx_t" = "xyes" ; then 12687if test "x$ac_cv_have_intxx_t" = "xyes" ; then
11084 cat >>confdefs.h <<\EOF 12688 cat >>confdefs.h <<\_ACEOF
11085#define HAVE_INTXX_T 1 12689#define HAVE_INTXX_T 1
11086EOF 12690_ACEOF
11087 12691
11088 have_intxx_t=1 12692 have_intxx_t=1
11089fi 12693fi
@@ -11091,11 +12695,15 @@ fi
11091if (test -z "$have_intxx_t" && \ 12695if (test -z "$have_intxx_t" && \
11092 test "x$ac_cv_header_stdint_h" = "xyes") 12696 test "x$ac_cv_header_stdint_h" = "xyes")
11093then 12697then
11094 echo "$as_me:11094: checking for intXX_t types in stdint.h" >&5 12698 echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5
11095echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6 12699echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6
11096 cat >conftest.$ac_ext <<_ACEOF 12700 cat >conftest.$ac_ext <<_ACEOF
11097#line 11097 "configure" 12701#line $LINENO "configure"
11098#include "confdefs.h" 12702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
11099 #include <stdint.h> 12707 #include <stdint.h>
11100int 12708int
11101main () 12709main ()
@@ -11106,44 +12714,49 @@ main ()
11106} 12714}
11107_ACEOF 12715_ACEOF
11108rm -f conftest.$ac_objext 12716rm -f conftest.$ac_objext
11109if { (eval echo "$as_me:11109: \"$ac_compile\"") >&5 12717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11110 (eval $ac_compile) 2>&5 12718 (eval $ac_compile) 2>&5
11111 ac_status=$? 12719 ac_status=$?
11112 echo "$as_me:11112: \$? = $ac_status" >&5 12720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11113 (exit $ac_status); } && 12721 (exit $ac_status); } &&
11114 { ac_try='test -s conftest.$ac_objext' 12722 { ac_try='test -s conftest.$ac_objext'
11115 { (eval echo "$as_me:11115: \"$ac_try\"") >&5 12723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11116 (eval $ac_try) 2>&5 12724 (eval $ac_try) 2>&5
11117 ac_status=$? 12725 ac_status=$?
11118 echo "$as_me:11118: \$? = $ac_status" >&5 12726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11119 (exit $ac_status); }; }; then 12727 (exit $ac_status); }; }; then
11120 12728
11121 cat >>confdefs.h <<\EOF 12729 cat >>confdefs.h <<\_ACEOF
11122#define HAVE_INTXX_T 1 12730#define HAVE_INTXX_T 1
11123EOF 12731_ACEOF
11124 12732
11125 echo "$as_me:11125: result: yes" >&5 12733 echo "$as_me:$LINENO: result: yes" >&5
11126echo "${ECHO_T}yes" >&6 12734echo "${ECHO_T}yes" >&6
11127 12735
11128else 12736else
11129 echo "$as_me: failed program was:" >&5 12737 echo "$as_me: failed program was:" >&5
11130cat conftest.$ac_ext >&5 12738sed 's/^/| /' conftest.$ac_ext >&5
11131 echo "$as_me:11131: result: no" >&5 12739
12740 echo "$as_me:$LINENO: result: no" >&5
11132echo "${ECHO_T}no" >&6 12741echo "${ECHO_T}no" >&6
11133 12742
11134fi 12743fi
11135rm -f conftest.$ac_objext conftest.$ac_ext 12744rm -f conftest.$ac_objext conftest.$ac_ext
11136fi 12745fi
11137 12746
11138echo "$as_me:11138: checking for int64_t type" >&5 12747echo "$as_me:$LINENO: checking for int64_t type" >&5
11139echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6 12748echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6
11140if test "${ac_cv_have_int64_t+set}" = set; then 12749if test "${ac_cv_have_int64_t+set}" = set; then
11141 echo $ECHO_N "(cached) $ECHO_C" >&6 12750 echo $ECHO_N "(cached) $ECHO_C" >&6
11142else 12751else
11143 12752
11144 cat >conftest.$ac_ext <<_ACEOF 12753 cat >conftest.$ac_ext <<_ACEOF
11145#line 11145 "configure" 12754#line $LINENO "configure"
11146#include "confdefs.h" 12755/* confdefs.h. */
12756_ACEOF
12757cat confdefs.h >>conftest.$ac_ext
12758cat >>conftest.$ac_ext <<_ACEOF
12759/* end confdefs.h. */
11147 12760
11148#include <sys/types.h> 12761#include <sys/types.h>
11149#ifdef HAVE_STDINT_H 12762#ifdef HAVE_STDINT_H
@@ -11163,45 +12776,50 @@ main ()
11163} 12776}
11164_ACEOF 12777_ACEOF
11165rm -f conftest.$ac_objext 12778rm -f conftest.$ac_objext
11166if { (eval echo "$as_me:11166: \"$ac_compile\"") >&5 12779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11167 (eval $ac_compile) 2>&5 12780 (eval $ac_compile) 2>&5
11168 ac_status=$? 12781 ac_status=$?
11169 echo "$as_me:11169: \$? = $ac_status" >&5 12782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170 (exit $ac_status); } && 12783 (exit $ac_status); } &&
11171 { ac_try='test -s conftest.$ac_objext' 12784 { ac_try='test -s conftest.$ac_objext'
11172 { (eval echo "$as_me:11172: \"$ac_try\"") >&5 12785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11173 (eval $ac_try) 2>&5 12786 (eval $ac_try) 2>&5
11174 ac_status=$? 12787 ac_status=$?
11175 echo "$as_me:11175: \$? = $ac_status" >&5 12788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11176 (exit $ac_status); }; }; then 12789 (exit $ac_status); }; }; then
11177 ac_cv_have_int64_t="yes" 12790 ac_cv_have_int64_t="yes"
11178else 12791else
11179 echo "$as_me: failed program was:" >&5 12792 echo "$as_me: failed program was:" >&5
11180cat conftest.$ac_ext >&5 12793sed 's/^/| /' conftest.$ac_ext >&5
12794
11181 ac_cv_have_int64_t="no" 12795 ac_cv_have_int64_t="no"
11182 12796
11183fi 12797fi
11184rm -f conftest.$ac_objext conftest.$ac_ext 12798rm -f conftest.$ac_objext conftest.$ac_ext
11185 12799
11186fi 12800fi
11187echo "$as_me:11187: result: $ac_cv_have_int64_t" >&5 12801echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5
11188echo "${ECHO_T}$ac_cv_have_int64_t" >&6 12802echo "${ECHO_T}$ac_cv_have_int64_t" >&6
11189if test "x$ac_cv_have_int64_t" = "xyes" ; then 12803if test "x$ac_cv_have_int64_t" = "xyes" ; then
11190 cat >>confdefs.h <<\EOF 12804 cat >>confdefs.h <<\_ACEOF
11191#define HAVE_INT64_T 1 12805#define HAVE_INT64_T 1
11192EOF 12806_ACEOF
11193 12807
11194fi 12808fi
11195 12809
11196echo "$as_me:11196: checking for u_intXX_t types" >&5 12810echo "$as_me:$LINENO: checking for u_intXX_t types" >&5
11197echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6 12811echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6
11198if test "${ac_cv_have_u_intxx_t+set}" = set; then 12812if test "${ac_cv_have_u_intxx_t+set}" = set; then
11199 echo $ECHO_N "(cached) $ECHO_C" >&6 12813 echo $ECHO_N "(cached) $ECHO_C" >&6
11200else 12814else
11201 12815
11202 cat >conftest.$ac_ext <<_ACEOF 12816 cat >conftest.$ac_ext <<_ACEOF
11203#line 11203 "configure" 12817#line $LINENO "configure"
11204#include "confdefs.h" 12818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
11205 #include <sys/types.h> 12823 #include <sys/types.h>
11206int 12824int
11207main () 12825main ()
@@ -11212,43 +12830,48 @@ main ()
11212} 12830}
11213_ACEOF 12831_ACEOF
11214rm -f conftest.$ac_objext 12832rm -f conftest.$ac_objext
11215if { (eval echo "$as_me:11215: \"$ac_compile\"") >&5 12833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11216 (eval $ac_compile) 2>&5 12834 (eval $ac_compile) 2>&5
11217 ac_status=$? 12835 ac_status=$?
11218 echo "$as_me:11218: \$? = $ac_status" >&5 12836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219 (exit $ac_status); } && 12837 (exit $ac_status); } &&
11220 { ac_try='test -s conftest.$ac_objext' 12838 { ac_try='test -s conftest.$ac_objext'
11221 { (eval echo "$as_me:11221: \"$ac_try\"") >&5 12839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11222 (eval $ac_try) 2>&5 12840 (eval $ac_try) 2>&5
11223 ac_status=$? 12841 ac_status=$?
11224 echo "$as_me:11224: \$? = $ac_status" >&5 12842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11225 (exit $ac_status); }; }; then 12843 (exit $ac_status); }; }; then
11226 ac_cv_have_u_intxx_t="yes" 12844 ac_cv_have_u_intxx_t="yes"
11227else 12845else
11228 echo "$as_me: failed program was:" >&5 12846 echo "$as_me: failed program was:" >&5
11229cat conftest.$ac_ext >&5 12847sed 's/^/| /' conftest.$ac_ext >&5
12848
11230 ac_cv_have_u_intxx_t="no" 12849 ac_cv_have_u_intxx_t="no"
11231 12850
11232fi 12851fi
11233rm -f conftest.$ac_objext conftest.$ac_ext 12852rm -f conftest.$ac_objext conftest.$ac_ext
11234 12853
11235fi 12854fi
11236echo "$as_me:11236: result: $ac_cv_have_u_intxx_t" >&5 12855echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5
11237echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6 12856echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6
11238if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 12857if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
11239 cat >>confdefs.h <<\EOF 12858 cat >>confdefs.h <<\_ACEOF
11240#define HAVE_U_INTXX_T 1 12859#define HAVE_U_INTXX_T 1
11241EOF 12860_ACEOF
11242 12861
11243 have_u_intxx_t=1 12862 have_u_intxx_t=1
11244fi 12863fi
11245 12864
11246if test -z "$have_u_intxx_t" ; then 12865if test -z "$have_u_intxx_t" ; then
11247 echo "$as_me:11247: checking for u_intXX_t types in sys/socket.h" >&5 12866 echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5
11248echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6 12867echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6
11249 cat >conftest.$ac_ext <<_ACEOF 12868 cat >conftest.$ac_ext <<_ACEOF
11250#line 11250 "configure" 12869#line $LINENO "configure"
11251#include "confdefs.h" 12870/* confdefs.h. */
12871_ACEOF
12872cat confdefs.h >>conftest.$ac_ext
12873cat >>conftest.$ac_ext <<_ACEOF
12874/* end confdefs.h. */
11252 #include <sys/socket.h> 12875 #include <sys/socket.h>
11253int 12876int
11254main () 12877main ()
@@ -11259,44 +12882,49 @@ main ()
11259} 12882}
11260_ACEOF 12883_ACEOF
11261rm -f conftest.$ac_objext 12884rm -f conftest.$ac_objext
11262if { (eval echo "$as_me:11262: \"$ac_compile\"") >&5 12885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11263 (eval $ac_compile) 2>&5 12886 (eval $ac_compile) 2>&5
11264 ac_status=$? 12887 ac_status=$?
11265 echo "$as_me:11265: \$? = $ac_status" >&5 12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); } && 12889 (exit $ac_status); } &&
11267 { ac_try='test -s conftest.$ac_objext' 12890 { ac_try='test -s conftest.$ac_objext'
11268 { (eval echo "$as_me:11268: \"$ac_try\"") >&5 12891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11269 (eval $ac_try) 2>&5 12892 (eval $ac_try) 2>&5
11270 ac_status=$? 12893 ac_status=$?
11271 echo "$as_me:11271: \$? = $ac_status" >&5 12894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11272 (exit $ac_status); }; }; then 12895 (exit $ac_status); }; }; then
11273 12896
11274 cat >>confdefs.h <<\EOF 12897 cat >>confdefs.h <<\_ACEOF
11275#define HAVE_U_INTXX_T 1 12898#define HAVE_U_INTXX_T 1
11276EOF 12899_ACEOF
11277 12900
11278 echo "$as_me:11278: result: yes" >&5 12901 echo "$as_me:$LINENO: result: yes" >&5
11279echo "${ECHO_T}yes" >&6 12902echo "${ECHO_T}yes" >&6
11280 12903
11281else 12904else
11282 echo "$as_me: failed program was:" >&5 12905 echo "$as_me: failed program was:" >&5
11283cat conftest.$ac_ext >&5 12906sed 's/^/| /' conftest.$ac_ext >&5
11284 echo "$as_me:11284: result: no" >&5 12907
12908 echo "$as_me:$LINENO: result: no" >&5
11285echo "${ECHO_T}no" >&6 12909echo "${ECHO_T}no" >&6
11286 12910
11287fi 12911fi
11288rm -f conftest.$ac_objext conftest.$ac_ext 12912rm -f conftest.$ac_objext conftest.$ac_ext
11289fi 12913fi
11290 12914
11291echo "$as_me:11291: checking for u_int64_t types" >&5 12915echo "$as_me:$LINENO: checking for u_int64_t types" >&5
11292echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6 12916echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6
11293if test "${ac_cv_have_u_int64_t+set}" = set; then 12917if test "${ac_cv_have_u_int64_t+set}" = set; then
11294 echo $ECHO_N "(cached) $ECHO_C" >&6 12918 echo $ECHO_N "(cached) $ECHO_C" >&6
11295else 12919else
11296 12920
11297 cat >conftest.$ac_ext <<_ACEOF 12921 cat >conftest.$ac_ext <<_ACEOF
11298#line 11298 "configure" 12922#line $LINENO "configure"
11299#include "confdefs.h" 12923/* confdefs.h. */
12924_ACEOF
12925cat confdefs.h >>conftest.$ac_ext
12926cat >>conftest.$ac_ext <<_ACEOF
12927/* end confdefs.h. */
11300 #include <sys/types.h> 12928 #include <sys/types.h>
11301int 12929int
11302main () 12930main ()
@@ -11307,43 +12935,48 @@ main ()
11307} 12935}
11308_ACEOF 12936_ACEOF
11309rm -f conftest.$ac_objext 12937rm -f conftest.$ac_objext
11310if { (eval echo "$as_me:11310: \"$ac_compile\"") >&5 12938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11311 (eval $ac_compile) 2>&5 12939 (eval $ac_compile) 2>&5
11312 ac_status=$? 12940 ac_status=$?
11313 echo "$as_me:11313: \$? = $ac_status" >&5 12941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11314 (exit $ac_status); } && 12942 (exit $ac_status); } &&
11315 { ac_try='test -s conftest.$ac_objext' 12943 { ac_try='test -s conftest.$ac_objext'
11316 { (eval echo "$as_me:11316: \"$ac_try\"") >&5 12944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11317 (eval $ac_try) 2>&5 12945 (eval $ac_try) 2>&5
11318 ac_status=$? 12946 ac_status=$?
11319 echo "$as_me:11319: \$? = $ac_status" >&5 12947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11320 (exit $ac_status); }; }; then 12948 (exit $ac_status); }; }; then
11321 ac_cv_have_u_int64_t="yes" 12949 ac_cv_have_u_int64_t="yes"
11322else 12950else
11323 echo "$as_me: failed program was:" >&5 12951 echo "$as_me: failed program was:" >&5
11324cat conftest.$ac_ext >&5 12952sed 's/^/| /' conftest.$ac_ext >&5
12953
11325 ac_cv_have_u_int64_t="no" 12954 ac_cv_have_u_int64_t="no"
11326 12955
11327fi 12956fi
11328rm -f conftest.$ac_objext conftest.$ac_ext 12957rm -f conftest.$ac_objext conftest.$ac_ext
11329 12958
11330fi 12959fi
11331echo "$as_me:11331: result: $ac_cv_have_u_int64_t" >&5 12960echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5
11332echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6 12961echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6
11333if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 12962if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
11334 cat >>confdefs.h <<\EOF 12963 cat >>confdefs.h <<\_ACEOF
11335#define HAVE_U_INT64_T 1 12964#define HAVE_U_INT64_T 1
11336EOF 12965_ACEOF
11337 12966
11338 have_u_int64_t=1 12967 have_u_int64_t=1
11339fi 12968fi
11340 12969
11341if test -z "$have_u_int64_t" ; then 12970if test -z "$have_u_int64_t" ; then
11342 echo "$as_me:11342: checking for u_int64_t type in sys/bitypes.h" >&5 12971 echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5
11343echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6 12972echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6
11344 cat >conftest.$ac_ext <<_ACEOF 12973 cat >conftest.$ac_ext <<_ACEOF
11345#line 11345 "configure" 12974#line $LINENO "configure"
11346#include "confdefs.h" 12975/* confdefs.h. */
12976_ACEOF
12977cat confdefs.h >>conftest.$ac_ext
12978cat >>conftest.$ac_ext <<_ACEOF
12979/* end confdefs.h. */
11347 #include <sys/bitypes.h> 12980 #include <sys/bitypes.h>
11348int 12981int
11349main () 12982main ()
@@ -11354,29 +12987,30 @@ main ()
11354} 12987}
11355_ACEOF 12988_ACEOF
11356rm -f conftest.$ac_objext 12989rm -f conftest.$ac_objext
11357if { (eval echo "$as_me:11357: \"$ac_compile\"") >&5 12990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11358 (eval $ac_compile) 2>&5 12991 (eval $ac_compile) 2>&5
11359 ac_status=$? 12992 ac_status=$?
11360 echo "$as_me:11360: \$? = $ac_status" >&5 12993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11361 (exit $ac_status); } && 12994 (exit $ac_status); } &&
11362 { ac_try='test -s conftest.$ac_objext' 12995 { ac_try='test -s conftest.$ac_objext'
11363 { (eval echo "$as_me:11363: \"$ac_try\"") >&5 12996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11364 (eval $ac_try) 2>&5 12997 (eval $ac_try) 2>&5
11365 ac_status=$? 12998 ac_status=$?
11366 echo "$as_me:11366: \$? = $ac_status" >&5 12999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367 (exit $ac_status); }; }; then 13000 (exit $ac_status); }; }; then
11368 13001
11369 cat >>confdefs.h <<\EOF 13002 cat >>confdefs.h <<\_ACEOF
11370#define HAVE_U_INT64_T 1 13003#define HAVE_U_INT64_T 1
11371EOF 13004_ACEOF
11372 13005
11373 echo "$as_me:11373: result: yes" >&5 13006 echo "$as_me:$LINENO: result: yes" >&5
11374echo "${ECHO_T}yes" >&6 13007echo "${ECHO_T}yes" >&6
11375 13008
11376else 13009else
11377 echo "$as_me: failed program was:" >&5 13010 echo "$as_me: failed program was:" >&5
11378cat conftest.$ac_ext >&5 13011sed 's/^/| /' conftest.$ac_ext >&5
11379 echo "$as_me:11379: result: no" >&5 13012
13013 echo "$as_me:$LINENO: result: no" >&5
11380echo "${ECHO_T}no" >&6 13014echo "${ECHO_T}no" >&6
11381 13015
11382fi 13016fi
@@ -11384,15 +13018,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
11384fi 13018fi
11385 13019
11386if test -z "$have_u_intxx_t" ; then 13020if test -z "$have_u_intxx_t" ; then
11387 echo "$as_me:11387: checking for uintXX_t types" >&5 13021 echo "$as_me:$LINENO: checking for uintXX_t types" >&5
11388echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6 13022echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6
11389if test "${ac_cv_have_uintxx_t+set}" = set; then 13023if test "${ac_cv_have_uintxx_t+set}" = set; then
11390 echo $ECHO_N "(cached) $ECHO_C" >&6 13024 echo $ECHO_N "(cached) $ECHO_C" >&6
11391else 13025else
11392 13026
11393 cat >conftest.$ac_ext <<_ACEOF 13027 cat >conftest.$ac_ext <<_ACEOF
11394#line 11394 "configure" 13028#line $LINENO "configure"
11395#include "confdefs.h" 13029/* confdefs.h. */
13030_ACEOF
13031cat confdefs.h >>conftest.$ac_ext
13032cat >>conftest.$ac_ext <<_ACEOF
13033/* end confdefs.h. */
11396 13034
11397#include <sys/types.h> 13035#include <sys/types.h>
11398 13036
@@ -11405,43 +13043,48 @@ main ()
11405} 13043}
11406_ACEOF 13044_ACEOF
11407rm -f conftest.$ac_objext 13045rm -f conftest.$ac_objext
11408if { (eval echo "$as_me:11408: \"$ac_compile\"") >&5 13046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11409 (eval $ac_compile) 2>&5 13047 (eval $ac_compile) 2>&5
11410 ac_status=$? 13048 ac_status=$?
11411 echo "$as_me:11411: \$? = $ac_status" >&5 13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); } && 13050 (exit $ac_status); } &&
11413 { ac_try='test -s conftest.$ac_objext' 13051 { ac_try='test -s conftest.$ac_objext'
11414 { (eval echo "$as_me:11414: \"$ac_try\"") >&5 13052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11415 (eval $ac_try) 2>&5 13053 (eval $ac_try) 2>&5
11416 ac_status=$? 13054 ac_status=$?
11417 echo "$as_me:11417: \$? = $ac_status" >&5 13055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); }; }; then 13056 (exit $ac_status); }; }; then
11419 ac_cv_have_uintxx_t="yes" 13057 ac_cv_have_uintxx_t="yes"
11420else 13058else
11421 echo "$as_me: failed program was:" >&5 13059 echo "$as_me: failed program was:" >&5
11422cat conftest.$ac_ext >&5 13060sed 's/^/| /' conftest.$ac_ext >&5
13061
11423 ac_cv_have_uintxx_t="no" 13062 ac_cv_have_uintxx_t="no"
11424 13063
11425fi 13064fi
11426rm -f conftest.$ac_objext conftest.$ac_ext 13065rm -f conftest.$ac_objext conftest.$ac_ext
11427 13066
11428fi 13067fi
11429echo "$as_me:11429: result: $ac_cv_have_uintxx_t" >&5 13068echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5
11430echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6 13069echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6
11431 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 13070 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
11432 cat >>confdefs.h <<\EOF 13071 cat >>confdefs.h <<\_ACEOF
11433#define HAVE_UINTXX_T 1 13072#define HAVE_UINTXX_T 1
11434EOF 13073_ACEOF
11435 13074
11436 fi 13075 fi
11437fi 13076fi
11438 13077
11439if test -z "$have_uintxx_t" ; then 13078if test -z "$have_uintxx_t" ; then
11440 echo "$as_me:11440: checking for uintXX_t types in stdint.h" >&5 13079 echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5
11441echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6 13080echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6
11442 cat >conftest.$ac_ext <<_ACEOF 13081 cat >conftest.$ac_ext <<_ACEOF
11443#line 11443 "configure" 13082#line $LINENO "configure"
11444#include "confdefs.h" 13083/* confdefs.h. */
13084_ACEOF
13085cat confdefs.h >>conftest.$ac_ext
13086cat >>conftest.$ac_ext <<_ACEOF
13087/* end confdefs.h. */
11445 #include <stdint.h> 13088 #include <stdint.h>
11446int 13089int
11447main () 13090main ()
@@ -11452,29 +13095,30 @@ main ()
11452} 13095}
11453_ACEOF 13096_ACEOF
11454rm -f conftest.$ac_objext 13097rm -f conftest.$ac_objext
11455if { (eval echo "$as_me:11455: \"$ac_compile\"") >&5 13098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11456 (eval $ac_compile) 2>&5 13099 (eval $ac_compile) 2>&5
11457 ac_status=$? 13100 ac_status=$?
11458 echo "$as_me:11458: \$? = $ac_status" >&5 13101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11459 (exit $ac_status); } && 13102 (exit $ac_status); } &&
11460 { ac_try='test -s conftest.$ac_objext' 13103 { ac_try='test -s conftest.$ac_objext'
11461 { (eval echo "$as_me:11461: \"$ac_try\"") >&5 13104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11462 (eval $ac_try) 2>&5 13105 (eval $ac_try) 2>&5
11463 ac_status=$? 13106 ac_status=$?
11464 echo "$as_me:11464: \$? = $ac_status" >&5 13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11465 (exit $ac_status); }; }; then 13108 (exit $ac_status); }; }; then
11466 13109
11467 cat >>confdefs.h <<\EOF 13110 cat >>confdefs.h <<\_ACEOF
11468#define HAVE_UINTXX_T 1 13111#define HAVE_UINTXX_T 1
11469EOF 13112_ACEOF
11470 13113
11471 echo "$as_me:11471: result: yes" >&5 13114 echo "$as_me:$LINENO: result: yes" >&5
11472echo "${ECHO_T}yes" >&6 13115echo "${ECHO_T}yes" >&6
11473 13116
11474else 13117else
11475 echo "$as_me: failed program was:" >&5 13118 echo "$as_me: failed program was:" >&5
11476cat conftest.$ac_ext >&5 13119sed 's/^/| /' conftest.$ac_ext >&5
11477 echo "$as_me:11477: result: no" >&5 13120
13121 echo "$as_me:$LINENO: result: no" >&5
11478echo "${ECHO_T}no" >&6 13122echo "${ECHO_T}no" >&6
11479 13123
11480fi 13124fi
@@ -11484,11 +13128,15 @@ fi
11484if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ 13128if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
11485 test "x$ac_cv_header_sys_bitypes_h" = "xyes") 13129 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
11486then 13130then
11487 echo "$as_me:11487: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 13131 echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
11488echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6 13132echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6
11489 cat >conftest.$ac_ext <<_ACEOF 13133 cat >conftest.$ac_ext <<_ACEOF
11490#line 11490 "configure" 13134#line $LINENO "configure"
11491#include "confdefs.h" 13135/* confdefs.h. */
13136_ACEOF
13137cat confdefs.h >>conftest.$ac_ext
13138cat >>conftest.$ac_ext <<_ACEOF
13139/* end confdefs.h. */
11492 13140
11493#include <sys/bitypes.h> 13141#include <sys/bitypes.h>
11494 13142
@@ -11505,48 +13153,54 @@ main ()
11505} 13153}
11506_ACEOF 13154_ACEOF
11507rm -f conftest.$ac_objext 13155rm -f conftest.$ac_objext
11508if { (eval echo "$as_me:11508: \"$ac_compile\"") >&5 13156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11509 (eval $ac_compile) 2>&5 13157 (eval $ac_compile) 2>&5
11510 ac_status=$? 13158 ac_status=$?
11511 echo "$as_me:11511: \$? = $ac_status" >&5 13159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11512 (exit $ac_status); } && 13160 (exit $ac_status); } &&
11513 { ac_try='test -s conftest.$ac_objext' 13161 { ac_try='test -s conftest.$ac_objext'
11514 { (eval echo "$as_me:11514: \"$ac_try\"") >&5 13162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11515 (eval $ac_try) 2>&5 13163 (eval $ac_try) 2>&5
11516 ac_status=$? 13164 ac_status=$?
11517 echo "$as_me:11517: \$? = $ac_status" >&5 13165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11518 (exit $ac_status); }; }; then 13166 (exit $ac_status); }; }; then
11519 13167
11520 cat >>confdefs.h <<\EOF 13168 cat >>confdefs.h <<\_ACEOF
11521#define HAVE_U_INTXX_T 1 13169#define HAVE_U_INTXX_T 1
11522EOF 13170_ACEOF
11523 13171
11524 cat >>confdefs.h <<\EOF 13172 cat >>confdefs.h <<\_ACEOF
11525#define HAVE_INTXX_T 1 13173#define HAVE_INTXX_T 1
11526EOF 13174_ACEOF
11527 13175
11528 echo "$as_me:11528: result: yes" >&5 13176 echo "$as_me:$LINENO: result: yes" >&5
11529echo "${ECHO_T}yes" >&6 13177echo "${ECHO_T}yes" >&6
11530 13178
11531else 13179else
11532 echo "$as_me: failed program was:" >&5 13180 echo "$as_me: failed program was:" >&5
11533cat conftest.$ac_ext >&5 13181sed 's/^/| /' conftest.$ac_ext >&5
11534echo "$as_me:11534: result: no" >&5 13182
13183echo "$as_me:$LINENO: result: no" >&5
11535echo "${ECHO_T}no" >&6 13184echo "${ECHO_T}no" >&6
11536 13185
11537fi 13186fi
11538rm -f conftest.$ac_objext conftest.$ac_ext 13187rm -f conftest.$ac_objext conftest.$ac_ext
11539fi 13188fi
11540 13189
11541echo "$as_me:11541: checking for u_char" >&5 13190
13191echo "$as_me:$LINENO: checking for u_char" >&5
11542echo $ECHO_N "checking for u_char... $ECHO_C" >&6 13192echo $ECHO_N "checking for u_char... $ECHO_C" >&6
11543if test "${ac_cv_have_u_char+set}" = set; then 13193if test "${ac_cv_have_u_char+set}" = set; then
11544 echo $ECHO_N "(cached) $ECHO_C" >&6 13194 echo $ECHO_N "(cached) $ECHO_C" >&6
11545else 13195else
11546 13196
11547 cat >conftest.$ac_ext <<_ACEOF 13197 cat >conftest.$ac_ext <<_ACEOF
11548#line 11548 "configure" 13198#line $LINENO "configure"
11549#include "confdefs.h" 13199/* confdefs.h. */
13200_ACEOF
13201cat confdefs.h >>conftest.$ac_ext
13202cat >>conftest.$ac_ext <<_ACEOF
13203/* end confdefs.h. */
11550 13204
11551#include <sys/types.h> 13205#include <sys/types.h>
11552 13206
@@ -11559,44 +13213,50 @@ main ()
11559} 13213}
11560_ACEOF 13214_ACEOF
11561rm -f conftest.$ac_objext 13215rm -f conftest.$ac_objext
11562if { (eval echo "$as_me:11562: \"$ac_compile\"") >&5 13216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11563 (eval $ac_compile) 2>&5 13217 (eval $ac_compile) 2>&5
11564 ac_status=$? 13218 ac_status=$?
11565 echo "$as_me:11565: \$? = $ac_status" >&5 13219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11566 (exit $ac_status); } && 13220 (exit $ac_status); } &&
11567 { ac_try='test -s conftest.$ac_objext' 13221 { ac_try='test -s conftest.$ac_objext'
11568 { (eval echo "$as_me:11568: \"$ac_try\"") >&5 13222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11569 (eval $ac_try) 2>&5 13223 (eval $ac_try) 2>&5
11570 ac_status=$? 13224 ac_status=$?
11571 echo "$as_me:11571: \$? = $ac_status" >&5 13225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11572 (exit $ac_status); }; }; then 13226 (exit $ac_status); }; }; then
11573 ac_cv_have_u_char="yes" 13227 ac_cv_have_u_char="yes"
11574else 13228else
11575 echo "$as_me: failed program was:" >&5 13229 echo "$as_me: failed program was:" >&5
11576cat conftest.$ac_ext >&5 13230sed 's/^/| /' conftest.$ac_ext >&5
13231
11577 ac_cv_have_u_char="no" 13232 ac_cv_have_u_char="no"
11578 13233
11579fi 13234fi
11580rm -f conftest.$ac_objext conftest.$ac_ext 13235rm -f conftest.$ac_objext conftest.$ac_ext
11581 13236
11582fi 13237fi
11583echo "$as_me:11583: result: $ac_cv_have_u_char" >&5 13238echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5
11584echo "${ECHO_T}$ac_cv_have_u_char" >&6 13239echo "${ECHO_T}$ac_cv_have_u_char" >&6
11585if test "x$ac_cv_have_u_char" = "xyes" ; then 13240if test "x$ac_cv_have_u_char" = "xyes" ; then
11586 cat >>confdefs.h <<\EOF 13241 cat >>confdefs.h <<\_ACEOF
11587#define HAVE_U_CHAR 1 13242#define HAVE_U_CHAR 1
11588EOF 13243_ACEOF
11589 13244
11590fi 13245fi
11591 13246
11592 echo "$as_me:11592: checking for socklen_t" >&5 13247
13248 echo "$as_me:$LINENO: checking for socklen_t" >&5
11593echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 13249echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
11594if test "${ac_cv_type_socklen_t+set}" = set; then 13250if test "${ac_cv_type_socklen_t+set}" = set; then
11595 echo $ECHO_N "(cached) $ECHO_C" >&6 13251 echo $ECHO_N "(cached) $ECHO_C" >&6
11596else 13252else
11597 cat >conftest.$ac_ext <<_ACEOF 13253 cat >conftest.$ac_ext <<_ACEOF
11598#line 11598 "configure" 13254#line $LINENO "configure"
11599#include "confdefs.h" 13255/* confdefs.h. */
13256_ACEOF
13257cat confdefs.h >>conftest.$ac_ext
13258cat >>conftest.$ac_ext <<_ACEOF
13259/* end confdefs.h. */
11600#include <sys/types.h> 13260#include <sys/types.h>
11601#include <sys/socket.h> 13261#include <sys/socket.h>
11602 13262
@@ -11612,32 +13272,33 @@ if (sizeof (socklen_t))
11612} 13272}
11613_ACEOF 13273_ACEOF
11614rm -f conftest.$ac_objext 13274rm -f conftest.$ac_objext
11615if { (eval echo "$as_me:11615: \"$ac_compile\"") >&5 13275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11616 (eval $ac_compile) 2>&5 13276 (eval $ac_compile) 2>&5
11617 ac_status=$? 13277 ac_status=$?
11618 echo "$as_me:11618: \$? = $ac_status" >&5 13278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11619 (exit $ac_status); } && 13279 (exit $ac_status); } &&
11620 { ac_try='test -s conftest.$ac_objext' 13280 { ac_try='test -s conftest.$ac_objext'
11621 { (eval echo "$as_me:11621: \"$ac_try\"") >&5 13281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11622 (eval $ac_try) 2>&5 13282 (eval $ac_try) 2>&5
11623 ac_status=$? 13283 ac_status=$?
11624 echo "$as_me:11624: \$? = $ac_status" >&5 13284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11625 (exit $ac_status); }; }; then 13285 (exit $ac_status); }; }; then
11626 ac_cv_type_socklen_t=yes 13286 ac_cv_type_socklen_t=yes
11627else 13287else
11628 echo "$as_me: failed program was:" >&5 13288 echo "$as_me: failed program was:" >&5
11629cat conftest.$ac_ext >&5 13289sed 's/^/| /' conftest.$ac_ext >&5
13290
11630ac_cv_type_socklen_t=no 13291ac_cv_type_socklen_t=no
11631fi 13292fi
11632rm -f conftest.$ac_objext conftest.$ac_ext 13293rm -f conftest.$ac_objext conftest.$ac_ext
11633fi 13294fi
11634echo "$as_me:11634: result: $ac_cv_type_socklen_t" >&5 13295echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
11635echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 13296echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
11636if test $ac_cv_type_socklen_t = yes; then 13297if test $ac_cv_type_socklen_t = yes; then
11637 : 13298 :
11638else 13299else
11639 13300
11640 echo "$as_me:11640: checking for socklen_t equivalent" >&5 13301 echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5
11641echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 13302echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6
11642 if test "${curl_cv_socklen_t_equiv+set}" = set; then 13303 if test "${curl_cv_socklen_t_equiv+set}" = set; then
11643 echo $ECHO_N "(cached) $ECHO_C" >&6 13304 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11649,8 +13310,12 @@ else
11649 for arg2 in "struct sockaddr" void; do 13310 for arg2 in "struct sockaddr" void; do
11650 for t in int size_t unsigned long "unsigned long"; do 13311 for t in int size_t unsigned long "unsigned long"; do
11651 cat >conftest.$ac_ext <<_ACEOF 13312 cat >conftest.$ac_ext <<_ACEOF
11652#line 11652 "configure" 13313#line $LINENO "configure"
11653#include "confdefs.h" 13314/* confdefs.h. */
13315_ACEOF
13316cat confdefs.h >>conftest.$ac_ext
13317cat >>conftest.$ac_ext <<_ACEOF
13318/* end confdefs.h. */
11654 13319
11655 #include <sys/types.h> 13320 #include <sys/types.h>
11656 #include <sys/socket.h> 13321 #include <sys/socket.h>
@@ -11669,16 +13334,16 @@ main ()
11669} 13334}
11670_ACEOF 13335_ACEOF
11671rm -f conftest.$ac_objext 13336rm -f conftest.$ac_objext
11672if { (eval echo "$as_me:11672: \"$ac_compile\"") >&5 13337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11673 (eval $ac_compile) 2>&5 13338 (eval $ac_compile) 2>&5
11674 ac_status=$? 13339 ac_status=$?
11675 echo "$as_me:11675: \$? = $ac_status" >&5 13340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676 (exit $ac_status); } && 13341 (exit $ac_status); } &&
11677 { ac_try='test -s conftest.$ac_objext' 13342 { ac_try='test -s conftest.$ac_objext'
11678 { (eval echo "$as_me:11678: \"$ac_try\"") >&5 13343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11679 (eval $ac_try) 2>&5 13344 (eval $ac_try) 2>&5
11680 ac_status=$? 13345 ac_status=$?
11681 echo "$as_me:11681: \$? = $ac_status" >&5 13346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11682 (exit $ac_status); }; }; then 13347 (exit $ac_status); }; }; then
11683 13348
11684 curl_cv_socklen_t_equiv="$t" 13349 curl_cv_socklen_t_equiv="$t"
@@ -11686,37 +13351,44 @@ if { (eval echo "$as_me:11672: \"$ac_compile\"") >&5
11686 13351
11687else 13352else
11688 echo "$as_me: failed program was:" >&5 13353 echo "$as_me: failed program was:" >&5
11689cat conftest.$ac_ext >&5 13354sed 's/^/| /' conftest.$ac_ext >&5
13355
11690fi 13356fi
11691rm -f conftest.$ac_objext conftest.$ac_ext 13357rm -f conftest.$ac_objext conftest.$ac_ext
11692 done 13358 done
11693 done 13359 done
11694 13360
11695 if test "x$curl_cv_socklen_t_equiv" = x; then 13361 if test "x$curl_cv_socklen_t_equiv" = x; then
11696 { { echo "$as_me:11696: error: Cannot find a type to use in place of socklen_t" >&5 13362 { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5
11697echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} 13363echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
11698 { (exit 1); exit 1; }; } 13364 { (exit 1); exit 1; }; }
11699 fi 13365 fi
11700 13366
11701fi 13367fi
11702 13368
11703 echo "$as_me:11703: result: $curl_cv_socklen_t_equiv" >&5 13369 echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5
11704echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6 13370echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6
11705 13371
11706cat >>confdefs.h <<EOF 13372cat >>confdefs.h <<_ACEOF
11707#define socklen_t $curl_cv_socklen_t_equiv 13373#define socklen_t $curl_cv_socklen_t_equiv
11708EOF 13374_ACEOF
11709 13375
11710fi 13376fi
11711 13377
11712echo "$as_me:11712: checking for sig_atomic_t" >&5 13378
13379
13380echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
11713echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6 13381echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
11714if test "${ac_cv_type_sig_atomic_t+set}" = set; then 13382if test "${ac_cv_type_sig_atomic_t+set}" = set; then
11715 echo $ECHO_N "(cached) $ECHO_C" >&6 13383 echo $ECHO_N "(cached) $ECHO_C" >&6
11716else 13384else
11717 cat >conftest.$ac_ext <<_ACEOF 13385 cat >conftest.$ac_ext <<_ACEOF
11718#line 11718 "configure" 13386#line $LINENO "configure"
11719#include "confdefs.h" 13387/* confdefs.h. */
13388_ACEOF
13389cat confdefs.h >>conftest.$ac_ext
13390cat >>conftest.$ac_ext <<_ACEOF
13391/* end confdefs.h. */
11720#include <signal.h> 13392#include <signal.h>
11721 13393
11722int 13394int
@@ -11731,44 +13403,51 @@ if (sizeof (sig_atomic_t))
11731} 13403}
11732_ACEOF 13404_ACEOF
11733rm -f conftest.$ac_objext 13405rm -f conftest.$ac_objext
11734if { (eval echo "$as_me:11734: \"$ac_compile\"") >&5 13406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11735 (eval $ac_compile) 2>&5 13407 (eval $ac_compile) 2>&5
11736 ac_status=$? 13408 ac_status=$?
11737 echo "$as_me:11737: \$? = $ac_status" >&5 13409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11738 (exit $ac_status); } && 13410 (exit $ac_status); } &&
11739 { ac_try='test -s conftest.$ac_objext' 13411 { ac_try='test -s conftest.$ac_objext'
11740 { (eval echo "$as_me:11740: \"$ac_try\"") >&5 13412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11741 (eval $ac_try) 2>&5 13413 (eval $ac_try) 2>&5
11742 ac_status=$? 13414 ac_status=$?
11743 echo "$as_me:11743: \$? = $ac_status" >&5 13415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); }; }; then 13416 (exit $ac_status); }; }; then
11745 ac_cv_type_sig_atomic_t=yes 13417 ac_cv_type_sig_atomic_t=yes
11746else 13418else
11747 echo "$as_me: failed program was:" >&5 13419 echo "$as_me: failed program was:" >&5
11748cat conftest.$ac_ext >&5 13420sed 's/^/| /' conftest.$ac_ext >&5
13421
11749ac_cv_type_sig_atomic_t=no 13422ac_cv_type_sig_atomic_t=no
11750fi 13423fi
11751rm -f conftest.$ac_objext conftest.$ac_ext 13424rm -f conftest.$ac_objext conftest.$ac_ext
11752fi 13425fi
11753echo "$as_me:11753: result: $ac_cv_type_sig_atomic_t" >&5 13426echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
11754echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6 13427echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
11755if test $ac_cv_type_sig_atomic_t = yes; then 13428if test $ac_cv_type_sig_atomic_t = yes; then
11756 13429
11757cat >>confdefs.h <<EOF 13430cat >>confdefs.h <<_ACEOF
11758#define HAVE_SIG_ATOMIC_T 1 13431#define HAVE_SIG_ATOMIC_T 1
11759EOF 13432_ACEOF
13433
11760 13434
11761fi 13435fi
11762 13436
11763echo "$as_me:11763: checking for size_t" >&5 13437
13438echo "$as_me:$LINENO: checking for size_t" >&5
11764echo $ECHO_N "checking for size_t... $ECHO_C" >&6 13439echo $ECHO_N "checking for size_t... $ECHO_C" >&6
11765if test "${ac_cv_have_size_t+set}" = set; then 13440if test "${ac_cv_have_size_t+set}" = set; then
11766 echo $ECHO_N "(cached) $ECHO_C" >&6 13441 echo $ECHO_N "(cached) $ECHO_C" >&6
11767else 13442else
11768 13443
11769 cat >conftest.$ac_ext <<_ACEOF 13444 cat >conftest.$ac_ext <<_ACEOF
11770#line 11770 "configure" 13445#line $LINENO "configure"
11771#include "confdefs.h" 13446/* confdefs.h. */
13447_ACEOF
13448cat confdefs.h >>conftest.$ac_ext
13449cat >>conftest.$ac_ext <<_ACEOF
13450/* end confdefs.h. */
11772 13451
11773#include <sys/types.h> 13452#include <sys/types.h>
11774 13453
@@ -11781,45 +13460,50 @@ main ()
11781} 13460}
11782_ACEOF 13461_ACEOF
11783rm -f conftest.$ac_objext 13462rm -f conftest.$ac_objext
11784if { (eval echo "$as_me:11784: \"$ac_compile\"") >&5 13463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11785 (eval $ac_compile) 2>&5 13464 (eval $ac_compile) 2>&5
11786 ac_status=$? 13465 ac_status=$?
11787 echo "$as_me:11787: \$? = $ac_status" >&5 13466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11788 (exit $ac_status); } && 13467 (exit $ac_status); } &&
11789 { ac_try='test -s conftest.$ac_objext' 13468 { ac_try='test -s conftest.$ac_objext'
11790 { (eval echo "$as_me:11790: \"$ac_try\"") >&5 13469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11791 (eval $ac_try) 2>&5 13470 (eval $ac_try) 2>&5
11792 ac_status=$? 13471 ac_status=$?
11793 echo "$as_me:11793: \$? = $ac_status" >&5 13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); }; }; then 13473 (exit $ac_status); }; }; then
11795 ac_cv_have_size_t="yes" 13474 ac_cv_have_size_t="yes"
11796else 13475else
11797 echo "$as_me: failed program was:" >&5 13476 echo "$as_me: failed program was:" >&5
11798cat conftest.$ac_ext >&5 13477sed 's/^/| /' conftest.$ac_ext >&5
13478
11799 ac_cv_have_size_t="no" 13479 ac_cv_have_size_t="no"
11800 13480
11801fi 13481fi
11802rm -f conftest.$ac_objext conftest.$ac_ext 13482rm -f conftest.$ac_objext conftest.$ac_ext
11803 13483
11804fi 13484fi
11805echo "$as_me:11805: result: $ac_cv_have_size_t" >&5 13485echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5
11806echo "${ECHO_T}$ac_cv_have_size_t" >&6 13486echo "${ECHO_T}$ac_cv_have_size_t" >&6
11807if test "x$ac_cv_have_size_t" = "xyes" ; then 13487if test "x$ac_cv_have_size_t" = "xyes" ; then
11808 cat >>confdefs.h <<\EOF 13488 cat >>confdefs.h <<\_ACEOF
11809#define HAVE_SIZE_T 1 13489#define HAVE_SIZE_T 1
11810EOF 13490_ACEOF
11811 13491
11812fi 13492fi
11813 13493
11814echo "$as_me:11814: checking for ssize_t" >&5 13494echo "$as_me:$LINENO: checking for ssize_t" >&5
11815echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 13495echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
11816if test "${ac_cv_have_ssize_t+set}" = set; then 13496if test "${ac_cv_have_ssize_t+set}" = set; then
11817 echo $ECHO_N "(cached) $ECHO_C" >&6 13497 echo $ECHO_N "(cached) $ECHO_C" >&6
11818else 13498else
11819 13499
11820 cat >conftest.$ac_ext <<_ACEOF 13500 cat >conftest.$ac_ext <<_ACEOF
11821#line 11821 "configure" 13501#line $LINENO "configure"
11822#include "confdefs.h" 13502/* confdefs.h. */
13503_ACEOF
13504cat confdefs.h >>conftest.$ac_ext
13505cat >>conftest.$ac_ext <<_ACEOF
13506/* end confdefs.h. */
11823 13507
11824#include <sys/types.h> 13508#include <sys/types.h>
11825 13509
@@ -11832,45 +13516,50 @@ main ()
11832} 13516}
11833_ACEOF 13517_ACEOF
11834rm -f conftest.$ac_objext 13518rm -f conftest.$ac_objext
11835if { (eval echo "$as_me:11835: \"$ac_compile\"") >&5 13519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11836 (eval $ac_compile) 2>&5 13520 (eval $ac_compile) 2>&5
11837 ac_status=$? 13521 ac_status=$?
11838 echo "$as_me:11838: \$? = $ac_status" >&5 13522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); } && 13523 (exit $ac_status); } &&
11840 { ac_try='test -s conftest.$ac_objext' 13524 { ac_try='test -s conftest.$ac_objext'
11841 { (eval echo "$as_me:11841: \"$ac_try\"") >&5 13525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5 13526 (eval $ac_try) 2>&5
11843 ac_status=$? 13527 ac_status=$?
11844 echo "$as_me:11844: \$? = $ac_status" >&5 13528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then 13529 (exit $ac_status); }; }; then
11846 ac_cv_have_ssize_t="yes" 13530 ac_cv_have_ssize_t="yes"
11847else 13531else
11848 echo "$as_me: failed program was:" >&5 13532 echo "$as_me: failed program was:" >&5
11849cat conftest.$ac_ext >&5 13533sed 's/^/| /' conftest.$ac_ext >&5
13534
11850 ac_cv_have_ssize_t="no" 13535 ac_cv_have_ssize_t="no"
11851 13536
11852fi 13537fi
11853rm -f conftest.$ac_objext conftest.$ac_ext 13538rm -f conftest.$ac_objext conftest.$ac_ext
11854 13539
11855fi 13540fi
11856echo "$as_me:11856: result: $ac_cv_have_ssize_t" >&5 13541echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5
11857echo "${ECHO_T}$ac_cv_have_ssize_t" >&6 13542echo "${ECHO_T}$ac_cv_have_ssize_t" >&6
11858if test "x$ac_cv_have_ssize_t" = "xyes" ; then 13543if test "x$ac_cv_have_ssize_t" = "xyes" ; then
11859 cat >>confdefs.h <<\EOF 13544 cat >>confdefs.h <<\_ACEOF
11860#define HAVE_SSIZE_T 1 13545#define HAVE_SSIZE_T 1
11861EOF 13546_ACEOF
11862 13547
11863fi 13548fi
11864 13549
11865echo "$as_me:11865: checking for clock_t" >&5 13550echo "$as_me:$LINENO: checking for clock_t" >&5
11866echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 13551echo $ECHO_N "checking for clock_t... $ECHO_C" >&6
11867if test "${ac_cv_have_clock_t+set}" = set; then 13552if test "${ac_cv_have_clock_t+set}" = set; then
11868 echo $ECHO_N "(cached) $ECHO_C" >&6 13553 echo $ECHO_N "(cached) $ECHO_C" >&6
11869else 13554else
11870 13555
11871 cat >conftest.$ac_ext <<_ACEOF 13556 cat >conftest.$ac_ext <<_ACEOF
11872#line 11872 "configure" 13557#line $LINENO "configure"
11873#include "confdefs.h" 13558/* confdefs.h. */
13559_ACEOF
13560cat confdefs.h >>conftest.$ac_ext
13561cat >>conftest.$ac_ext <<_ACEOF
13562/* end confdefs.h. */
11874 13563
11875#include <time.h> 13564#include <time.h>
11876 13565
@@ -11883,45 +13572,50 @@ main ()
11883} 13572}
11884_ACEOF 13573_ACEOF
11885rm -f conftest.$ac_objext 13574rm -f conftest.$ac_objext
11886if { (eval echo "$as_me:11886: \"$ac_compile\"") >&5 13575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11887 (eval $ac_compile) 2>&5 13576 (eval $ac_compile) 2>&5
11888 ac_status=$? 13577 ac_status=$?
11889 echo "$as_me:11889: \$? = $ac_status" >&5 13578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11890 (exit $ac_status); } && 13579 (exit $ac_status); } &&
11891 { ac_try='test -s conftest.$ac_objext' 13580 { ac_try='test -s conftest.$ac_objext'
11892 { (eval echo "$as_me:11892: \"$ac_try\"") >&5 13581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11893 (eval $ac_try) 2>&5 13582 (eval $ac_try) 2>&5
11894 ac_status=$? 13583 ac_status=$?
11895 echo "$as_me:11895: \$? = $ac_status" >&5 13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896 (exit $ac_status); }; }; then 13585 (exit $ac_status); }; }; then
11897 ac_cv_have_clock_t="yes" 13586 ac_cv_have_clock_t="yes"
11898else 13587else
11899 echo "$as_me: failed program was:" >&5 13588 echo "$as_me: failed program was:" >&5
11900cat conftest.$ac_ext >&5 13589sed 's/^/| /' conftest.$ac_ext >&5
13590
11901 ac_cv_have_clock_t="no" 13591 ac_cv_have_clock_t="no"
11902 13592
11903fi 13593fi
11904rm -f conftest.$ac_objext conftest.$ac_ext 13594rm -f conftest.$ac_objext conftest.$ac_ext
11905 13595
11906fi 13596fi
11907echo "$as_me:11907: result: $ac_cv_have_clock_t" >&5 13597echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5
11908echo "${ECHO_T}$ac_cv_have_clock_t" >&6 13598echo "${ECHO_T}$ac_cv_have_clock_t" >&6
11909if test "x$ac_cv_have_clock_t" = "xyes" ; then 13599if test "x$ac_cv_have_clock_t" = "xyes" ; then
11910 cat >>confdefs.h <<\EOF 13600 cat >>confdefs.h <<\_ACEOF
11911#define HAVE_CLOCK_T 1 13601#define HAVE_CLOCK_T 1
11912EOF 13602_ACEOF
11913 13603
11914fi 13604fi
11915 13605
11916echo "$as_me:11916: checking for sa_family_t" >&5 13606echo "$as_me:$LINENO: checking for sa_family_t" >&5
11917echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6 13607echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6
11918if test "${ac_cv_have_sa_family_t+set}" = set; then 13608if test "${ac_cv_have_sa_family_t+set}" = set; then
11919 echo $ECHO_N "(cached) $ECHO_C" >&6 13609 echo $ECHO_N "(cached) $ECHO_C" >&6
11920else 13610else
11921 13611
11922 cat >conftest.$ac_ext <<_ACEOF 13612 cat >conftest.$ac_ext <<_ACEOF
11923#line 11923 "configure" 13613#line $LINENO "configure"
11924#include "confdefs.h" 13614/* confdefs.h. */
13615_ACEOF
13616cat confdefs.h >>conftest.$ac_ext
13617cat >>conftest.$ac_ext <<_ACEOF
13618/* end confdefs.h. */
11925 13619
11926#include <sys/types.h> 13620#include <sys/types.h>
11927#include <sys/socket.h> 13621#include <sys/socket.h>
@@ -11935,24 +13629,29 @@ main ()
11935} 13629}
11936_ACEOF 13630_ACEOF
11937rm -f conftest.$ac_objext 13631rm -f conftest.$ac_objext
11938if { (eval echo "$as_me:11938: \"$ac_compile\"") >&5 13632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11939 (eval $ac_compile) 2>&5 13633 (eval $ac_compile) 2>&5
11940 ac_status=$? 13634 ac_status=$?
11941 echo "$as_me:11941: \$? = $ac_status" >&5 13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11942 (exit $ac_status); } && 13636 (exit $ac_status); } &&
11943 { ac_try='test -s conftest.$ac_objext' 13637 { ac_try='test -s conftest.$ac_objext'
11944 { (eval echo "$as_me:11944: \"$ac_try\"") >&5 13638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11945 (eval $ac_try) 2>&5 13639 (eval $ac_try) 2>&5
11946 ac_status=$? 13640 ac_status=$?
11947 echo "$as_me:11947: \$? = $ac_status" >&5 13641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11948 (exit $ac_status); }; }; then 13642 (exit $ac_status); }; }; then
11949 ac_cv_have_sa_family_t="yes" 13643 ac_cv_have_sa_family_t="yes"
11950else 13644else
11951 echo "$as_me: failed program was:" >&5 13645 echo "$as_me: failed program was:" >&5
11952cat conftest.$ac_ext >&5 13646sed 's/^/| /' conftest.$ac_ext >&5
13647
11953 cat >conftest.$ac_ext <<_ACEOF 13648 cat >conftest.$ac_ext <<_ACEOF
11954#line 11954 "configure" 13649#line $LINENO "configure"
11955#include "confdefs.h" 13650/* confdefs.h. */
13651_ACEOF
13652cat confdefs.h >>conftest.$ac_ext
13653cat >>conftest.$ac_ext <<_ACEOF
13654/* end confdefs.h. */
11956 13655
11957#include <sys/types.h> 13656#include <sys/types.h>
11958#include <sys/socket.h> 13657#include <sys/socket.h>
@@ -11967,21 +13666,22 @@ main ()
11967} 13666}
11968_ACEOF 13667_ACEOF
11969rm -f conftest.$ac_objext 13668rm -f conftest.$ac_objext
11970if { (eval echo "$as_me:11970: \"$ac_compile\"") >&5 13669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11971 (eval $ac_compile) 2>&5 13670 (eval $ac_compile) 2>&5
11972 ac_status=$? 13671 ac_status=$?
11973 echo "$as_me:11973: \$? = $ac_status" >&5 13672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11974 (exit $ac_status); } && 13673 (exit $ac_status); } &&
11975 { ac_try='test -s conftest.$ac_objext' 13674 { ac_try='test -s conftest.$ac_objext'
11976 { (eval echo "$as_me:11976: \"$ac_try\"") >&5 13675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11977 (eval $ac_try) 2>&5 13676 (eval $ac_try) 2>&5
11978 ac_status=$? 13677 ac_status=$?
11979 echo "$as_me:11979: \$? = $ac_status" >&5 13678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11980 (exit $ac_status); }; }; then 13679 (exit $ac_status); }; }; then
11981 ac_cv_have_sa_family_t="yes" 13680 ac_cv_have_sa_family_t="yes"
11982else 13681else
11983 echo "$as_me: failed program was:" >&5 13682 echo "$as_me: failed program was:" >&5
11984cat conftest.$ac_ext >&5 13683sed 's/^/| /' conftest.$ac_ext >&5
13684
11985 ac_cv_have_sa_family_t="no" 13685 ac_cv_have_sa_family_t="no"
11986 13686
11987fi 13687fi
@@ -11991,24 +13691,28 @@ fi
11991rm -f conftest.$ac_objext conftest.$ac_ext 13691rm -f conftest.$ac_objext conftest.$ac_ext
11992 13692
11993fi 13693fi
11994echo "$as_me:11994: result: $ac_cv_have_sa_family_t" >&5 13694echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5
11995echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6 13695echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6
11996if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 13696if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
11997 cat >>confdefs.h <<\EOF 13697 cat >>confdefs.h <<\_ACEOF
11998#define HAVE_SA_FAMILY_T 1 13698#define HAVE_SA_FAMILY_T 1
11999EOF 13699_ACEOF
12000 13700
12001fi 13701fi
12002 13702
12003echo "$as_me:12003: checking for pid_t" >&5 13703echo "$as_me:$LINENO: checking for pid_t" >&5
12004echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 13704echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
12005if test "${ac_cv_have_pid_t+set}" = set; then 13705if test "${ac_cv_have_pid_t+set}" = set; then
12006 echo $ECHO_N "(cached) $ECHO_C" >&6 13706 echo $ECHO_N "(cached) $ECHO_C" >&6
12007else 13707else
12008 13708
12009 cat >conftest.$ac_ext <<_ACEOF 13709 cat >conftest.$ac_ext <<_ACEOF
12010#line 12010 "configure" 13710#line $LINENO "configure"
12011#include "confdefs.h" 13711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
12012 13716
12013#include <sys/types.h> 13717#include <sys/types.h>
12014 13718
@@ -12021,45 +13725,50 @@ main ()
12021} 13725}
12022_ACEOF 13726_ACEOF
12023rm -f conftest.$ac_objext 13727rm -f conftest.$ac_objext
12024if { (eval echo "$as_me:12024: \"$ac_compile\"") >&5 13728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12025 (eval $ac_compile) 2>&5 13729 (eval $ac_compile) 2>&5
12026 ac_status=$? 13730 ac_status=$?
12027 echo "$as_me:12027: \$? = $ac_status" >&5 13731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12028 (exit $ac_status); } && 13732 (exit $ac_status); } &&
12029 { ac_try='test -s conftest.$ac_objext' 13733 { ac_try='test -s conftest.$ac_objext'
12030 { (eval echo "$as_me:12030: \"$ac_try\"") >&5 13734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12031 (eval $ac_try) 2>&5 13735 (eval $ac_try) 2>&5
12032 ac_status=$? 13736 ac_status=$?
12033 echo "$as_me:12033: \$? = $ac_status" >&5 13737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12034 (exit $ac_status); }; }; then 13738 (exit $ac_status); }; }; then
12035 ac_cv_have_pid_t="yes" 13739 ac_cv_have_pid_t="yes"
12036else 13740else
12037 echo "$as_me: failed program was:" >&5 13741 echo "$as_me: failed program was:" >&5
12038cat conftest.$ac_ext >&5 13742sed 's/^/| /' conftest.$ac_ext >&5
13743
12039 ac_cv_have_pid_t="no" 13744 ac_cv_have_pid_t="no"
12040 13745
12041fi 13746fi
12042rm -f conftest.$ac_objext conftest.$ac_ext 13747rm -f conftest.$ac_objext conftest.$ac_ext
12043 13748
12044fi 13749fi
12045echo "$as_me:12045: result: $ac_cv_have_pid_t" >&5 13750echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5
12046echo "${ECHO_T}$ac_cv_have_pid_t" >&6 13751echo "${ECHO_T}$ac_cv_have_pid_t" >&6
12047if test "x$ac_cv_have_pid_t" = "xyes" ; then 13752if test "x$ac_cv_have_pid_t" = "xyes" ; then
12048 cat >>confdefs.h <<\EOF 13753 cat >>confdefs.h <<\_ACEOF
12049#define HAVE_PID_T 1 13754#define HAVE_PID_T 1
12050EOF 13755_ACEOF
12051 13756
12052fi 13757fi
12053 13758
12054echo "$as_me:12054: checking for mode_t" >&5 13759echo "$as_me:$LINENO: checking for mode_t" >&5
12055echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 13760echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
12056if test "${ac_cv_have_mode_t+set}" = set; then 13761if test "${ac_cv_have_mode_t+set}" = set; then
12057 echo $ECHO_N "(cached) $ECHO_C" >&6 13762 echo $ECHO_N "(cached) $ECHO_C" >&6
12058else 13763else
12059 13764
12060 cat >conftest.$ac_ext <<_ACEOF 13765 cat >conftest.$ac_ext <<_ACEOF
12061#line 12061 "configure" 13766#line $LINENO "configure"
12062#include "confdefs.h" 13767/* confdefs.h. */
13768_ACEOF
13769cat confdefs.h >>conftest.$ac_ext
13770cat >>conftest.$ac_ext <<_ACEOF
13771/* end confdefs.h. */
12063 13772
12064#include <sys/types.h> 13773#include <sys/types.h>
12065 13774
@@ -12072,45 +13781,51 @@ main ()
12072} 13781}
12073_ACEOF 13782_ACEOF
12074rm -f conftest.$ac_objext 13783rm -f conftest.$ac_objext
12075if { (eval echo "$as_me:12075: \"$ac_compile\"") >&5 13784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12076 (eval $ac_compile) 2>&5 13785 (eval $ac_compile) 2>&5
12077 ac_status=$? 13786 ac_status=$?
12078 echo "$as_me:12078: \$? = $ac_status" >&5 13787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12079 (exit $ac_status); } && 13788 (exit $ac_status); } &&
12080 { ac_try='test -s conftest.$ac_objext' 13789 { ac_try='test -s conftest.$ac_objext'
12081 { (eval echo "$as_me:12081: \"$ac_try\"") >&5 13790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12082 (eval $ac_try) 2>&5 13791 (eval $ac_try) 2>&5
12083 ac_status=$? 13792 ac_status=$?
12084 echo "$as_me:12084: \$? = $ac_status" >&5 13793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12085 (exit $ac_status); }; }; then 13794 (exit $ac_status); }; }; then
12086 ac_cv_have_mode_t="yes" 13795 ac_cv_have_mode_t="yes"
12087else 13796else
12088 echo "$as_me: failed program was:" >&5 13797 echo "$as_me: failed program was:" >&5
12089cat conftest.$ac_ext >&5 13798sed 's/^/| /' conftest.$ac_ext >&5
13799
12090 ac_cv_have_mode_t="no" 13800 ac_cv_have_mode_t="no"
12091 13801
12092fi 13802fi
12093rm -f conftest.$ac_objext conftest.$ac_ext 13803rm -f conftest.$ac_objext conftest.$ac_ext
12094 13804
12095fi 13805fi
12096echo "$as_me:12096: result: $ac_cv_have_mode_t" >&5 13806echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5
12097echo "${ECHO_T}$ac_cv_have_mode_t" >&6 13807echo "${ECHO_T}$ac_cv_have_mode_t" >&6
12098if test "x$ac_cv_have_mode_t" = "xyes" ; then 13808if test "x$ac_cv_have_mode_t" = "xyes" ; then
12099 cat >>confdefs.h <<\EOF 13809 cat >>confdefs.h <<\_ACEOF
12100#define HAVE_MODE_T 1 13810#define HAVE_MODE_T 1
12101EOF 13811_ACEOF
12102 13812
12103fi 13813fi
12104 13814
12105echo "$as_me:12105: checking for struct sockaddr_storage" >&5 13815
13816echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
12106echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6 13817echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
12107if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then 13818if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then
12108 echo $ECHO_N "(cached) $ECHO_C" >&6 13819 echo $ECHO_N "(cached) $ECHO_C" >&6
12109else 13820else
12110 13821
12111 cat >conftest.$ac_ext <<_ACEOF 13822 cat >conftest.$ac_ext <<_ACEOF
12112#line 12112 "configure" 13823#line $LINENO "configure"
12113#include "confdefs.h" 13824/* confdefs.h. */
13825_ACEOF
13826cat confdefs.h >>conftest.$ac_ext
13827cat >>conftest.$ac_ext <<_ACEOF
13828/* end confdefs.h. */
12114 13829
12115#include <sys/types.h> 13830#include <sys/types.h>
12116#include <sys/socket.h> 13831#include <sys/socket.h>
@@ -12124,45 +13839,50 @@ main ()
12124} 13839}
12125_ACEOF 13840_ACEOF
12126rm -f conftest.$ac_objext 13841rm -f conftest.$ac_objext
12127if { (eval echo "$as_me:12127: \"$ac_compile\"") >&5 13842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12128 (eval $ac_compile) 2>&5 13843 (eval $ac_compile) 2>&5
12129 ac_status=$? 13844 ac_status=$?
12130 echo "$as_me:12130: \$? = $ac_status" >&5 13845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12131 (exit $ac_status); } && 13846 (exit $ac_status); } &&
12132 { ac_try='test -s conftest.$ac_objext' 13847 { ac_try='test -s conftest.$ac_objext'
12133 { (eval echo "$as_me:12133: \"$ac_try\"") >&5 13848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12134 (eval $ac_try) 2>&5 13849 (eval $ac_try) 2>&5
12135 ac_status=$? 13850 ac_status=$?
12136 echo "$as_me:12136: \$? = $ac_status" >&5 13851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12137 (exit $ac_status); }; }; then 13852 (exit $ac_status); }; }; then
12138 ac_cv_have_struct_sockaddr_storage="yes" 13853 ac_cv_have_struct_sockaddr_storage="yes"
12139else 13854else
12140 echo "$as_me: failed program was:" >&5 13855 echo "$as_me: failed program was:" >&5
12141cat conftest.$ac_ext >&5 13856sed 's/^/| /' conftest.$ac_ext >&5
13857
12142 ac_cv_have_struct_sockaddr_storage="no" 13858 ac_cv_have_struct_sockaddr_storage="no"
12143 13859
12144fi 13860fi
12145rm -f conftest.$ac_objext conftest.$ac_ext 13861rm -f conftest.$ac_objext conftest.$ac_ext
12146 13862
12147fi 13863fi
12148echo "$as_me:12148: result: $ac_cv_have_struct_sockaddr_storage" >&5 13864echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5
12149echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6 13865echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6
12150if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 13866if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
12151 cat >>confdefs.h <<\EOF 13867 cat >>confdefs.h <<\_ACEOF
12152#define HAVE_STRUCT_SOCKADDR_STORAGE 1 13868#define HAVE_STRUCT_SOCKADDR_STORAGE 1
12153EOF 13869_ACEOF
12154 13870
12155fi 13871fi
12156 13872
12157echo "$as_me:12157: checking for struct sockaddr_in6" >&5 13873echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
12158echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 13874echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
12159if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then 13875if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then
12160 echo $ECHO_N "(cached) $ECHO_C" >&6 13876 echo $ECHO_N "(cached) $ECHO_C" >&6
12161else 13877else
12162 13878
12163 cat >conftest.$ac_ext <<_ACEOF 13879 cat >conftest.$ac_ext <<_ACEOF
12164#line 12164 "configure" 13880#line $LINENO "configure"
12165#include "confdefs.h" 13881/* confdefs.h. */
13882_ACEOF
13883cat confdefs.h >>conftest.$ac_ext
13884cat >>conftest.$ac_ext <<_ACEOF
13885/* end confdefs.h. */
12166 13886
12167#include <sys/types.h> 13887#include <sys/types.h>
12168#include <netinet/in.h> 13888#include <netinet/in.h>
@@ -12176,45 +13896,50 @@ main ()
12176} 13896}
12177_ACEOF 13897_ACEOF
12178rm -f conftest.$ac_objext 13898rm -f conftest.$ac_objext
12179if { (eval echo "$as_me:12179: \"$ac_compile\"") >&5 13899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12180 (eval $ac_compile) 2>&5 13900 (eval $ac_compile) 2>&5
12181 ac_status=$? 13901 ac_status=$?
12182 echo "$as_me:12182: \$? = $ac_status" >&5 13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183 (exit $ac_status); } && 13903 (exit $ac_status); } &&
12184 { ac_try='test -s conftest.$ac_objext' 13904 { ac_try='test -s conftest.$ac_objext'
12185 { (eval echo "$as_me:12185: \"$ac_try\"") >&5 13905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12186 (eval $ac_try) 2>&5 13906 (eval $ac_try) 2>&5
12187 ac_status=$? 13907 ac_status=$?
12188 echo "$as_me:12188: \$? = $ac_status" >&5 13908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12189 (exit $ac_status); }; }; then 13909 (exit $ac_status); }; }; then
12190 ac_cv_have_struct_sockaddr_in6="yes" 13910 ac_cv_have_struct_sockaddr_in6="yes"
12191else 13911else
12192 echo "$as_me: failed program was:" >&5 13912 echo "$as_me: failed program was:" >&5
12193cat conftest.$ac_ext >&5 13913sed 's/^/| /' conftest.$ac_ext >&5
13914
12194 ac_cv_have_struct_sockaddr_in6="no" 13915 ac_cv_have_struct_sockaddr_in6="no"
12195 13916
12196fi 13917fi
12197rm -f conftest.$ac_objext conftest.$ac_ext 13918rm -f conftest.$ac_objext conftest.$ac_ext
12198 13919
12199fi 13920fi
12200echo "$as_me:12200: result: $ac_cv_have_struct_sockaddr_in6" >&5 13921echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5
12201echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6 13922echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6
12202if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 13923if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
12203 cat >>confdefs.h <<\EOF 13924 cat >>confdefs.h <<\_ACEOF
12204#define HAVE_STRUCT_SOCKADDR_IN6 1 13925#define HAVE_STRUCT_SOCKADDR_IN6 1
12205EOF 13926_ACEOF
12206 13927
12207fi 13928fi
12208 13929
12209echo "$as_me:12209: checking for struct in6_addr" >&5 13930echo "$as_me:$LINENO: checking for struct in6_addr" >&5
12210echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6 13931echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6
12211if test "${ac_cv_have_struct_in6_addr+set}" = set; then 13932if test "${ac_cv_have_struct_in6_addr+set}" = set; then
12212 echo $ECHO_N "(cached) $ECHO_C" >&6 13933 echo $ECHO_N "(cached) $ECHO_C" >&6
12213else 13934else
12214 13935
12215 cat >conftest.$ac_ext <<_ACEOF 13936 cat >conftest.$ac_ext <<_ACEOF
12216#line 12216 "configure" 13937#line $LINENO "configure"
12217#include "confdefs.h" 13938/* confdefs.h. */
13939_ACEOF
13940cat confdefs.h >>conftest.$ac_ext
13941cat >>conftest.$ac_ext <<_ACEOF
13942/* end confdefs.h. */
12218 13943
12219#include <sys/types.h> 13944#include <sys/types.h>
12220#include <netinet/in.h> 13945#include <netinet/in.h>
@@ -12228,45 +13953,50 @@ main ()
12228} 13953}
12229_ACEOF 13954_ACEOF
12230rm -f conftest.$ac_objext 13955rm -f conftest.$ac_objext
12231if { (eval echo "$as_me:12231: \"$ac_compile\"") >&5 13956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12232 (eval $ac_compile) 2>&5 13957 (eval $ac_compile) 2>&5
12233 ac_status=$? 13958 ac_status=$?
12234 echo "$as_me:12234: \$? = $ac_status" >&5 13959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235 (exit $ac_status); } && 13960 (exit $ac_status); } &&
12236 { ac_try='test -s conftest.$ac_objext' 13961 { ac_try='test -s conftest.$ac_objext'
12237 { (eval echo "$as_me:12237: \"$ac_try\"") >&5 13962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5 13963 (eval $ac_try) 2>&5
12239 ac_status=$? 13964 ac_status=$?
12240 echo "$as_me:12240: \$? = $ac_status" >&5 13965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241 (exit $ac_status); }; }; then 13966 (exit $ac_status); }; }; then
12242 ac_cv_have_struct_in6_addr="yes" 13967 ac_cv_have_struct_in6_addr="yes"
12243else 13968else
12244 echo "$as_me: failed program was:" >&5 13969 echo "$as_me: failed program was:" >&5
12245cat conftest.$ac_ext >&5 13970sed 's/^/| /' conftest.$ac_ext >&5
13971
12246 ac_cv_have_struct_in6_addr="no" 13972 ac_cv_have_struct_in6_addr="no"
12247 13973
12248fi 13974fi
12249rm -f conftest.$ac_objext conftest.$ac_ext 13975rm -f conftest.$ac_objext conftest.$ac_ext
12250 13976
12251fi 13977fi
12252echo "$as_me:12252: result: $ac_cv_have_struct_in6_addr" >&5 13978echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5
12253echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6 13979echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6
12254if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 13980if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
12255 cat >>confdefs.h <<\EOF 13981 cat >>confdefs.h <<\_ACEOF
12256#define HAVE_STRUCT_IN6_ADDR 1 13982#define HAVE_STRUCT_IN6_ADDR 1
12257EOF 13983_ACEOF
12258 13984
12259fi 13985fi
12260 13986
12261echo "$as_me:12261: checking for struct addrinfo" >&5 13987echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12262echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6 13988echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12263if test "${ac_cv_have_struct_addrinfo+set}" = set; then 13989if test "${ac_cv_have_struct_addrinfo+set}" = set; then
12264 echo $ECHO_N "(cached) $ECHO_C" >&6 13990 echo $ECHO_N "(cached) $ECHO_C" >&6
12265else 13991else
12266 13992
12267 cat >conftest.$ac_ext <<_ACEOF 13993 cat >conftest.$ac_ext <<_ACEOF
12268#line 12268 "configure" 13994#line $LINENO "configure"
12269#include "confdefs.h" 13995/* confdefs.h. */
13996_ACEOF
13997cat confdefs.h >>conftest.$ac_ext
13998cat >>conftest.$ac_ext <<_ACEOF
13999/* end confdefs.h. */
12270 14000
12271#include <sys/types.h> 14001#include <sys/types.h>
12272#include <sys/socket.h> 14002#include <sys/socket.h>
@@ -12281,45 +14011,50 @@ main ()
12281} 14011}
12282_ACEOF 14012_ACEOF
12283rm -f conftest.$ac_objext 14013rm -f conftest.$ac_objext
12284if { (eval echo "$as_me:12284: \"$ac_compile\"") >&5 14014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12285 (eval $ac_compile) 2>&5 14015 (eval $ac_compile) 2>&5
12286 ac_status=$? 14016 ac_status=$?
12287 echo "$as_me:12287: \$? = $ac_status" >&5 14017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12288 (exit $ac_status); } && 14018 (exit $ac_status); } &&
12289 { ac_try='test -s conftest.$ac_objext' 14019 { ac_try='test -s conftest.$ac_objext'
12290 { (eval echo "$as_me:12290: \"$ac_try\"") >&5 14020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12291 (eval $ac_try) 2>&5 14021 (eval $ac_try) 2>&5
12292 ac_status=$? 14022 ac_status=$?
12293 echo "$as_me:12293: \$? = $ac_status" >&5 14023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294 (exit $ac_status); }; }; then 14024 (exit $ac_status); }; }; then
12295 ac_cv_have_struct_addrinfo="yes" 14025 ac_cv_have_struct_addrinfo="yes"
12296else 14026else
12297 echo "$as_me: failed program was:" >&5 14027 echo "$as_me: failed program was:" >&5
12298cat conftest.$ac_ext >&5 14028sed 's/^/| /' conftest.$ac_ext >&5
14029
12299 ac_cv_have_struct_addrinfo="no" 14030 ac_cv_have_struct_addrinfo="no"
12300 14031
12301fi 14032fi
12302rm -f conftest.$ac_objext conftest.$ac_ext 14033rm -f conftest.$ac_objext conftest.$ac_ext
12303 14034
12304fi 14035fi
12305echo "$as_me:12305: result: $ac_cv_have_struct_addrinfo" >&5 14036echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5
12306echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6 14037echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6
12307if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 14038if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
12308 cat >>confdefs.h <<\EOF 14039 cat >>confdefs.h <<\_ACEOF
12309#define HAVE_STRUCT_ADDRINFO 1 14040#define HAVE_STRUCT_ADDRINFO 1
12310EOF 14041_ACEOF
12311 14042
12312fi 14043fi
12313 14044
12314echo "$as_me:12314: checking for struct timeval" >&5 14045echo "$as_me:$LINENO: checking for struct timeval" >&5
12315echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6 14046echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6
12316if test "${ac_cv_have_struct_timeval+set}" = set; then 14047if test "${ac_cv_have_struct_timeval+set}" = set; then
12317 echo $ECHO_N "(cached) $ECHO_C" >&6 14048 echo $ECHO_N "(cached) $ECHO_C" >&6
12318else 14049else
12319 14050
12320 cat >conftest.$ac_ext <<_ACEOF 14051 cat >conftest.$ac_ext <<_ACEOF
12321#line 12321 "configure" 14052#line $LINENO "configure"
12322#include "confdefs.h" 14053/* confdefs.h. */
14054_ACEOF
14055cat confdefs.h >>conftest.$ac_ext
14056cat >>conftest.$ac_ext <<_ACEOF
14057/* end confdefs.h. */
12323 #include <sys/time.h> 14058 #include <sys/time.h>
12324int 14059int
12325main () 14060main ()
@@ -12330,45 +14065,50 @@ main ()
12330} 14065}
12331_ACEOF 14066_ACEOF
12332rm -f conftest.$ac_objext 14067rm -f conftest.$ac_objext
12333if { (eval echo "$as_me:12333: \"$ac_compile\"") >&5 14068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12334 (eval $ac_compile) 2>&5 14069 (eval $ac_compile) 2>&5
12335 ac_status=$? 14070 ac_status=$?
12336 echo "$as_me:12336: \$? = $ac_status" >&5 14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12337 (exit $ac_status); } && 14072 (exit $ac_status); } &&
12338 { ac_try='test -s conftest.$ac_objext' 14073 { ac_try='test -s conftest.$ac_objext'
12339 { (eval echo "$as_me:12339: \"$ac_try\"") >&5 14074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12340 (eval $ac_try) 2>&5 14075 (eval $ac_try) 2>&5
12341 ac_status=$? 14076 ac_status=$?
12342 echo "$as_me:12342: \$? = $ac_status" >&5 14077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343 (exit $ac_status); }; }; then 14078 (exit $ac_status); }; }; then
12344 ac_cv_have_struct_timeval="yes" 14079 ac_cv_have_struct_timeval="yes"
12345else 14080else
12346 echo "$as_me: failed program was:" >&5 14081 echo "$as_me: failed program was:" >&5
12347cat conftest.$ac_ext >&5 14082sed 's/^/| /' conftest.$ac_ext >&5
14083
12348 ac_cv_have_struct_timeval="no" 14084 ac_cv_have_struct_timeval="no"
12349 14085
12350fi 14086fi
12351rm -f conftest.$ac_objext conftest.$ac_ext 14087rm -f conftest.$ac_objext conftest.$ac_ext
12352 14088
12353fi 14089fi
12354echo "$as_me:12354: result: $ac_cv_have_struct_timeval" >&5 14090echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5
12355echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6 14091echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6
12356if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 14092if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
12357 cat >>confdefs.h <<\EOF 14093 cat >>confdefs.h <<\_ACEOF
12358#define HAVE_STRUCT_TIMEVAL 1 14094#define HAVE_STRUCT_TIMEVAL 1
12359EOF 14095_ACEOF
12360 14096
12361 have_struct_timeval=1 14097 have_struct_timeval=1
12362fi 14098fi
12363 14099
12364echo "$as_me:12364: checking for struct timespec" >&5 14100echo "$as_me:$LINENO: checking for struct timespec" >&5
12365echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6 14101echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6
12366if test "${ac_cv_type_struct_timespec+set}" = set; then 14102if test "${ac_cv_type_struct_timespec+set}" = set; then
12367 echo $ECHO_N "(cached) $ECHO_C" >&6 14103 echo $ECHO_N "(cached) $ECHO_C" >&6
12368else 14104else
12369 cat >conftest.$ac_ext <<_ACEOF 14105 cat >conftest.$ac_ext <<_ACEOF
12370#line 12370 "configure" 14106#line $LINENO "configure"
12371#include "confdefs.h" 14107/* confdefs.h. */
14108_ACEOF
14109cat confdefs.h >>conftest.$ac_ext
14110cat >>conftest.$ac_ext <<_ACEOF
14111/* end confdefs.h. */
12372$ac_includes_default 14112$ac_includes_default
12373int 14113int
12374main () 14114main ()
@@ -12382,35 +14122,38 @@ if (sizeof (struct timespec))
12382} 14122}
12383_ACEOF 14123_ACEOF
12384rm -f conftest.$ac_objext 14124rm -f conftest.$ac_objext
12385if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5 14125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12386 (eval $ac_compile) 2>&5 14126 (eval $ac_compile) 2>&5
12387 ac_status=$? 14127 ac_status=$?
12388 echo "$as_me:12388: \$? = $ac_status" >&5 14128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389 (exit $ac_status); } && 14129 (exit $ac_status); } &&
12390 { ac_try='test -s conftest.$ac_objext' 14130 { ac_try='test -s conftest.$ac_objext'
12391 { (eval echo "$as_me:12391: \"$ac_try\"") >&5 14131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12392 (eval $ac_try) 2>&5 14132 (eval $ac_try) 2>&5
12393 ac_status=$? 14133 ac_status=$?
12394 echo "$as_me:12394: \$? = $ac_status" >&5 14134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12395 (exit $ac_status); }; }; then 14135 (exit $ac_status); }; }; then
12396 ac_cv_type_struct_timespec=yes 14136 ac_cv_type_struct_timespec=yes
12397else 14137else
12398 echo "$as_me: failed program was:" >&5 14138 echo "$as_me: failed program was:" >&5
12399cat conftest.$ac_ext >&5 14139sed 's/^/| /' conftest.$ac_ext >&5
14140
12400ac_cv_type_struct_timespec=no 14141ac_cv_type_struct_timespec=no
12401fi 14142fi
12402rm -f conftest.$ac_objext conftest.$ac_ext 14143rm -f conftest.$ac_objext conftest.$ac_ext
12403fi 14144fi
12404echo "$as_me:12404: result: $ac_cv_type_struct_timespec" >&5 14145echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5
12405echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6 14146echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6
12406if test $ac_cv_type_struct_timespec = yes; then 14147if test $ac_cv_type_struct_timespec = yes; then
12407 14148
12408cat >>confdefs.h <<EOF 14149cat >>confdefs.h <<_ACEOF
12409#define HAVE_STRUCT_TIMESPEC 1 14150#define HAVE_STRUCT_TIMESPEC 1
12410EOF 14151_ACEOF
14152
12411 14153
12412fi 14154fi
12413 14155
14156
12414# We need int64_t or else certian parts of the compile will fail. 14157# We need int64_t or else certian parts of the compile will fail.
12415if test "x$ac_cv_have_int64_t" = "xno" -a \ 14158if test "x$ac_cv_have_int64_t" = "xno" -a \
12416 "x$ac_cv_sizeof_long_int" != "x8" -a \ 14159 "x$ac_cv_sizeof_long_int" != "x8" -a \
@@ -12421,13 +14164,19 @@ if test "x$ac_cv_have_int64_t" = "xno" -a \
12421 exit 1; 14164 exit 1;
12422else 14165else
12423 if test "$cross_compiling" = yes; then 14166 if test "$cross_compiling" = yes; then
12424 { { echo "$as_me:12424: error: cannot run test program while cross compiling" >&5 14167 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12425echo "$as_me: error: cannot run test program while cross compiling" >&2;} 14168See \`config.log' for more details." >&5
14169echo "$as_me: error: cannot run test program while cross compiling
14170See \`config.log' for more details." >&2;}
12426 { (exit 1); exit 1; }; } 14171 { (exit 1); exit 1; }; }
12427else 14172else
12428 cat >conftest.$ac_ext <<_ACEOF 14173 cat >conftest.$ac_ext <<_ACEOF
12429#line 12429 "configure" 14174#line $LINENO "configure"
12430#include "confdefs.h" 14175/* confdefs.h. */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h. */
12431 14180
12432#include <stdio.h> 14181#include <stdio.h>
12433#include <string.h> 14182#include <string.h>
@@ -12454,47 +14203,55 @@ main() { exit(0); }
12454 14203
12455_ACEOF 14204_ACEOF
12456rm -f conftest$ac_exeext 14205rm -f conftest$ac_exeext
12457if { (eval echo "$as_me:12457: \"$ac_link\"") >&5 14206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12458 (eval $ac_link) 2>&5 14207 (eval $ac_link) 2>&5
12459 ac_status=$? 14208 ac_status=$?
12460 echo "$as_me:12460: \$? = $ac_status" >&5 14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 14210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12462 { (eval echo "$as_me:12462: \"$ac_try\"") >&5 14211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12463 (eval $ac_try) 2>&5 14212 (eval $ac_try) 2>&5
12464 ac_status=$? 14213 ac_status=$?
12465 echo "$as_me:12465: \$? = $ac_status" >&5 14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12466 (exit $ac_status); }; }; then 14215 (exit $ac_status); }; }; then
12467 true 14216 true
12468else 14217else
12469 echo "$as_me: program exited with status $ac_status" >&5 14218 echo "$as_me: program exited with status $ac_status" >&5
12470echo "$as_me: failed program was:" >&5 14219echo "$as_me: failed program was:" >&5
12471cat conftest.$ac_ext >&5 14220sed 's/^/| /' conftest.$ac_ext >&5
12472 cat >>confdefs.h <<\EOF 14221
14222( exit $ac_status )
14223 cat >>confdefs.h <<\_ACEOF
12473#define BROKEN_SNPRINTF 1 14224#define BROKEN_SNPRINTF 1
12474EOF 14225_ACEOF
14226
12475 14227
12476fi 14228fi
12477rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 14229rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12478fi 14230fi
12479fi 14231fi
12480 14232
14233
12481# look for field 'ut_host' in header 'utmp.h' 14234# look for field 'ut_host' in header 'utmp.h'
12482 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14235 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
12483 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 14236 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
12484 echo "$as_me:12484: checking for ut_host field in utmp.h" >&5 14237 echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5
12485echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6 14238echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6
12486 if eval "test \"\${$ossh_varname+set}\" = set"; then 14239 if eval "test \"\${$ossh_varname+set}\" = set"; then
12487 echo $ECHO_N "(cached) $ECHO_C" >&6 14240 echo $ECHO_N "(cached) $ECHO_C" >&6
12488else 14241else
12489 14242
12490 cat >conftest.$ac_ext <<_ACEOF 14243 cat >conftest.$ac_ext <<_ACEOF
12491#line 12491 "configure" 14244#line $LINENO "configure"
12492#include "confdefs.h" 14245/* confdefs.h. */
14246_ACEOF
14247cat confdefs.h >>conftest.$ac_ext
14248cat >>conftest.$ac_ext <<_ACEOF
14249/* end confdefs.h. */
12493#include <utmp.h> 14250#include <utmp.h>
12494 14251
12495_ACEOF 14252_ACEOF
12496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12497 egrep "ut_host" >/dev/null 2>&1; then 14254 $EGREP "ut_host" >/dev/null 2>&1; then
12498 eval "$ossh_varname=yes" 14255 eval "$ossh_varname=yes"
12499else 14256else
12500 eval "$ossh_varname=no" 14257 eval "$ossh_varname=no"
@@ -12505,36 +14262,41 @@ fi
12505 14262
12506 ossh_result=`eval 'echo $'"$ossh_varname"` 14263 ossh_result=`eval 'echo $'"$ossh_varname"`
12507 if test -n "`echo $ossh_varname`"; then 14264 if test -n "`echo $ossh_varname`"; then
12508 echo "$as_me:12508: result: $ossh_result" >&5 14265 echo "$as_me:$LINENO: result: $ossh_result" >&5
12509echo "${ECHO_T}$ossh_result" >&6 14266echo "${ECHO_T}$ossh_result" >&6
12510 if test "x$ossh_result" = "xyes"; then 14267 if test "x$ossh_result" = "xyes"; then
12511 cat >>confdefs.h <<\EOF 14268 cat >>confdefs.h <<\_ACEOF
12512#define HAVE_HOST_IN_UTMP 1 14269#define HAVE_HOST_IN_UTMP 1
12513EOF 14270_ACEOF
12514 14271
12515 fi 14272 fi
12516 else 14273 else
12517 echo "$as_me:12517: result: no" >&5 14274 echo "$as_me:$LINENO: result: no" >&5
12518echo "${ECHO_T}no" >&6 14275echo "${ECHO_T}no" >&6
12519 fi 14276 fi
12520 14277
14278
12521# look for field 'ut_host' in header 'utmpx.h' 14279# look for field 'ut_host' in header 'utmpx.h'
12522 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14280 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
12523 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 14281 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
12524 echo "$as_me:12524: checking for ut_host field in utmpx.h" >&5 14282 echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5
12525echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6 14283echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6
12526 if eval "test \"\${$ossh_varname+set}\" = set"; then 14284 if eval "test \"\${$ossh_varname+set}\" = set"; then
12527 echo $ECHO_N "(cached) $ECHO_C" >&6 14285 echo $ECHO_N "(cached) $ECHO_C" >&6
12528else 14286else
12529 14287
12530 cat >conftest.$ac_ext <<_ACEOF 14288 cat >conftest.$ac_ext <<_ACEOF
12531#line 12531 "configure" 14289#line $LINENO "configure"
12532#include "confdefs.h" 14290/* confdefs.h. */
14291_ACEOF
14292cat confdefs.h >>conftest.$ac_ext
14293cat >>conftest.$ac_ext <<_ACEOF
14294/* end confdefs.h. */
12533#include <utmpx.h> 14295#include <utmpx.h>
12534 14296
12535_ACEOF 14297_ACEOF
12536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12537 egrep "ut_host" >/dev/null 2>&1; then 14299 $EGREP "ut_host" >/dev/null 2>&1; then
12538 eval "$ossh_varname=yes" 14300 eval "$ossh_varname=yes"
12539else 14301else
12540 eval "$ossh_varname=no" 14302 eval "$ossh_varname=no"
@@ -12545,36 +14307,41 @@ fi
12545 14307
12546 ossh_result=`eval 'echo $'"$ossh_varname"` 14308 ossh_result=`eval 'echo $'"$ossh_varname"`
12547 if test -n "`echo $ossh_varname`"; then 14309 if test -n "`echo $ossh_varname`"; then
12548 echo "$as_me:12548: result: $ossh_result" >&5 14310 echo "$as_me:$LINENO: result: $ossh_result" >&5
12549echo "${ECHO_T}$ossh_result" >&6 14311echo "${ECHO_T}$ossh_result" >&6
12550 if test "x$ossh_result" = "xyes"; then 14312 if test "x$ossh_result" = "xyes"; then
12551 cat >>confdefs.h <<\EOF 14313 cat >>confdefs.h <<\_ACEOF
12552#define HAVE_HOST_IN_UTMPX 1 14314#define HAVE_HOST_IN_UTMPX 1
12553EOF 14315_ACEOF
12554 14316
12555 fi 14317 fi
12556 else 14318 else
12557 echo "$as_me:12557: result: no" >&5 14319 echo "$as_me:$LINENO: result: no" >&5
12558echo "${ECHO_T}no" >&6 14320echo "${ECHO_T}no" >&6
12559 fi 14321 fi
12560 14322
14323
12561# look for field 'syslen' in header 'utmpx.h' 14324# look for field 'syslen' in header 'utmpx.h'
12562 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14325 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
12563 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen 14326 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
12564 echo "$as_me:12564: checking for syslen field in utmpx.h" >&5 14327 echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5
12565echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6 14328echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6
12566 if eval "test \"\${$ossh_varname+set}\" = set"; then 14329 if eval "test \"\${$ossh_varname+set}\" = set"; then
12567 echo $ECHO_N "(cached) $ECHO_C" >&6 14330 echo $ECHO_N "(cached) $ECHO_C" >&6
12568else 14331else
12569 14332
12570 cat >conftest.$ac_ext <<_ACEOF 14333 cat >conftest.$ac_ext <<_ACEOF
12571#line 12571 "configure" 14334#line $LINENO "configure"
12572#include "confdefs.h" 14335/* confdefs.h. */
14336_ACEOF
14337cat confdefs.h >>conftest.$ac_ext
14338cat >>conftest.$ac_ext <<_ACEOF
14339/* end confdefs.h. */
12573#include <utmpx.h> 14340#include <utmpx.h>
12574 14341
12575_ACEOF 14342_ACEOF
12576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12577 egrep "syslen" >/dev/null 2>&1; then 14344 $EGREP "syslen" >/dev/null 2>&1; then
12578 eval "$ossh_varname=yes" 14345 eval "$ossh_varname=yes"
12579else 14346else
12580 eval "$ossh_varname=no" 14347 eval "$ossh_varname=no"
@@ -12585,36 +14352,41 @@ fi
12585 14352
12586 ossh_result=`eval 'echo $'"$ossh_varname"` 14353 ossh_result=`eval 'echo $'"$ossh_varname"`
12587 if test -n "`echo $ossh_varname`"; then 14354 if test -n "`echo $ossh_varname`"; then
12588 echo "$as_me:12588: result: $ossh_result" >&5 14355 echo "$as_me:$LINENO: result: $ossh_result" >&5
12589echo "${ECHO_T}$ossh_result" >&6 14356echo "${ECHO_T}$ossh_result" >&6
12590 if test "x$ossh_result" = "xyes"; then 14357 if test "x$ossh_result" = "xyes"; then
12591 cat >>confdefs.h <<\EOF 14358 cat >>confdefs.h <<\_ACEOF
12592#define HAVE_SYSLEN_IN_UTMPX 1 14359#define HAVE_SYSLEN_IN_UTMPX 1
12593EOF 14360_ACEOF
12594 14361
12595 fi 14362 fi
12596 else 14363 else
12597 echo "$as_me:12597: result: no" >&5 14364 echo "$as_me:$LINENO: result: no" >&5
12598echo "${ECHO_T}no" >&6 14365echo "${ECHO_T}no" >&6
12599 fi 14366 fi
12600 14367
14368
12601# look for field 'ut_pid' in header 'utmp.h' 14369# look for field 'ut_pid' in header 'utmp.h'
12602 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14370 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
12603 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid 14371 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
12604 echo "$as_me:12604: checking for ut_pid field in utmp.h" >&5 14372 echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5
12605echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6 14373echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6
12606 if eval "test \"\${$ossh_varname+set}\" = set"; then 14374 if eval "test \"\${$ossh_varname+set}\" = set"; then
12607 echo $ECHO_N "(cached) $ECHO_C" >&6 14375 echo $ECHO_N "(cached) $ECHO_C" >&6
12608else 14376else
12609 14377
12610 cat >conftest.$ac_ext <<_ACEOF 14378 cat >conftest.$ac_ext <<_ACEOF
12611#line 12611 "configure" 14379#line $LINENO "configure"
12612#include "confdefs.h" 14380/* confdefs.h. */
14381_ACEOF
14382cat confdefs.h >>conftest.$ac_ext
14383cat >>conftest.$ac_ext <<_ACEOF
14384/* end confdefs.h. */
12613#include <utmp.h> 14385#include <utmp.h>
12614 14386
12615_ACEOF 14387_ACEOF
12616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12617 egrep "ut_pid" >/dev/null 2>&1; then 14389 $EGREP "ut_pid" >/dev/null 2>&1; then
12618 eval "$ossh_varname=yes" 14390 eval "$ossh_varname=yes"
12619else 14391else
12620 eval "$ossh_varname=no" 14392 eval "$ossh_varname=no"
@@ -12625,36 +14397,41 @@ fi
12625 14397
12626 ossh_result=`eval 'echo $'"$ossh_varname"` 14398 ossh_result=`eval 'echo $'"$ossh_varname"`
12627 if test -n "`echo $ossh_varname`"; then 14399 if test -n "`echo $ossh_varname`"; then
12628 echo "$as_me:12628: result: $ossh_result" >&5 14400 echo "$as_me:$LINENO: result: $ossh_result" >&5
12629echo "${ECHO_T}$ossh_result" >&6 14401echo "${ECHO_T}$ossh_result" >&6
12630 if test "x$ossh_result" = "xyes"; then 14402 if test "x$ossh_result" = "xyes"; then
12631 cat >>confdefs.h <<\EOF 14403 cat >>confdefs.h <<\_ACEOF
12632#define HAVE_PID_IN_UTMP 1 14404#define HAVE_PID_IN_UTMP 1
12633EOF 14405_ACEOF
12634 14406
12635 fi 14407 fi
12636 else 14408 else
12637 echo "$as_me:12637: result: no" >&5 14409 echo "$as_me:$LINENO: result: no" >&5
12638echo "${ECHO_T}no" >&6 14410echo "${ECHO_T}no" >&6
12639 fi 14411 fi
12640 14412
14413
12641# look for field 'ut_type' in header 'utmp.h' 14414# look for field 'ut_type' in header 'utmp.h'
12642 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14415 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
12643 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 14416 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
12644 echo "$as_me:12644: checking for ut_type field in utmp.h" >&5 14417 echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5
12645echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6 14418echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6
12646 if eval "test \"\${$ossh_varname+set}\" = set"; then 14419 if eval "test \"\${$ossh_varname+set}\" = set"; then
12647 echo $ECHO_N "(cached) $ECHO_C" >&6 14420 echo $ECHO_N "(cached) $ECHO_C" >&6
12648else 14421else
12649 14422
12650 cat >conftest.$ac_ext <<_ACEOF 14423 cat >conftest.$ac_ext <<_ACEOF
12651#line 12651 "configure" 14424#line $LINENO "configure"
12652#include "confdefs.h" 14425/* confdefs.h. */
14426_ACEOF
14427cat confdefs.h >>conftest.$ac_ext
14428cat >>conftest.$ac_ext <<_ACEOF
14429/* end confdefs.h. */
12653#include <utmp.h> 14430#include <utmp.h>
12654 14431
12655_ACEOF 14432_ACEOF
12656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12657 egrep "ut_type" >/dev/null 2>&1; then 14434 $EGREP "ut_type" >/dev/null 2>&1; then
12658 eval "$ossh_varname=yes" 14435 eval "$ossh_varname=yes"
12659else 14436else
12660 eval "$ossh_varname=no" 14437 eval "$ossh_varname=no"
@@ -12665,36 +14442,41 @@ fi
12665 14442
12666 ossh_result=`eval 'echo $'"$ossh_varname"` 14443 ossh_result=`eval 'echo $'"$ossh_varname"`
12667 if test -n "`echo $ossh_varname`"; then 14444 if test -n "`echo $ossh_varname`"; then
12668 echo "$as_me:12668: result: $ossh_result" >&5 14445 echo "$as_me:$LINENO: result: $ossh_result" >&5
12669echo "${ECHO_T}$ossh_result" >&6 14446echo "${ECHO_T}$ossh_result" >&6
12670 if test "x$ossh_result" = "xyes"; then 14447 if test "x$ossh_result" = "xyes"; then
12671 cat >>confdefs.h <<\EOF 14448 cat >>confdefs.h <<\_ACEOF
12672#define HAVE_TYPE_IN_UTMP 1 14449#define HAVE_TYPE_IN_UTMP 1
12673EOF 14450_ACEOF
12674 14451
12675 fi 14452 fi
12676 else 14453 else
12677 echo "$as_me:12677: result: no" >&5 14454 echo "$as_me:$LINENO: result: no" >&5
12678echo "${ECHO_T}no" >&6 14455echo "${ECHO_T}no" >&6
12679 fi 14456 fi
12680 14457
14458
12681# look for field 'ut_type' in header 'utmpx.h' 14459# look for field 'ut_type' in header 'utmpx.h'
12682 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14460 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
12683 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 14461 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
12684 echo "$as_me:12684: checking for ut_type field in utmpx.h" >&5 14462 echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5
12685echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6 14463echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6
12686 if eval "test \"\${$ossh_varname+set}\" = set"; then 14464 if eval "test \"\${$ossh_varname+set}\" = set"; then
12687 echo $ECHO_N "(cached) $ECHO_C" >&6 14465 echo $ECHO_N "(cached) $ECHO_C" >&6
12688else 14466else
12689 14467
12690 cat >conftest.$ac_ext <<_ACEOF 14468 cat >conftest.$ac_ext <<_ACEOF
12691#line 12691 "configure" 14469#line $LINENO "configure"
12692#include "confdefs.h" 14470/* confdefs.h. */
14471_ACEOF
14472cat confdefs.h >>conftest.$ac_ext
14473cat >>conftest.$ac_ext <<_ACEOF
14474/* end confdefs.h. */
12693#include <utmpx.h> 14475#include <utmpx.h>
12694 14476
12695_ACEOF 14477_ACEOF
12696if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12697 egrep "ut_type" >/dev/null 2>&1; then 14479 $EGREP "ut_type" >/dev/null 2>&1; then
12698 eval "$ossh_varname=yes" 14480 eval "$ossh_varname=yes"
12699else 14481else
12700 eval "$ossh_varname=no" 14482 eval "$ossh_varname=no"
@@ -12705,36 +14487,41 @@ fi
12705 14487
12706 ossh_result=`eval 'echo $'"$ossh_varname"` 14488 ossh_result=`eval 'echo $'"$ossh_varname"`
12707 if test -n "`echo $ossh_varname`"; then 14489 if test -n "`echo $ossh_varname`"; then
12708 echo "$as_me:12708: result: $ossh_result" >&5 14490 echo "$as_me:$LINENO: result: $ossh_result" >&5
12709echo "${ECHO_T}$ossh_result" >&6 14491echo "${ECHO_T}$ossh_result" >&6
12710 if test "x$ossh_result" = "xyes"; then 14492 if test "x$ossh_result" = "xyes"; then
12711 cat >>confdefs.h <<\EOF 14493 cat >>confdefs.h <<\_ACEOF
12712#define HAVE_TYPE_IN_UTMPX 1 14494#define HAVE_TYPE_IN_UTMPX 1
12713EOF 14495_ACEOF
12714 14496
12715 fi 14497 fi
12716 else 14498 else
12717 echo "$as_me:12717: result: no" >&5 14499 echo "$as_me:$LINENO: result: no" >&5
12718echo "${ECHO_T}no" >&6 14500echo "${ECHO_T}no" >&6
12719 fi 14501 fi
12720 14502
14503
12721# look for field 'ut_tv' in header 'utmp.h' 14504# look for field 'ut_tv' in header 'utmp.h'
12722 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14505 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
12723 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 14506 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
12724 echo "$as_me:12724: checking for ut_tv field in utmp.h" >&5 14507 echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5
12725echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6 14508echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6
12726 if eval "test \"\${$ossh_varname+set}\" = set"; then 14509 if eval "test \"\${$ossh_varname+set}\" = set"; then
12727 echo $ECHO_N "(cached) $ECHO_C" >&6 14510 echo $ECHO_N "(cached) $ECHO_C" >&6
12728else 14511else
12729 14512
12730 cat >conftest.$ac_ext <<_ACEOF 14513 cat >conftest.$ac_ext <<_ACEOF
12731#line 12731 "configure" 14514#line $LINENO "configure"
12732#include "confdefs.h" 14515/* confdefs.h. */
14516_ACEOF
14517cat confdefs.h >>conftest.$ac_ext
14518cat >>conftest.$ac_ext <<_ACEOF
14519/* end confdefs.h. */
12733#include <utmp.h> 14520#include <utmp.h>
12734 14521
12735_ACEOF 14522_ACEOF
12736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12737 egrep "ut_tv" >/dev/null 2>&1; then 14524 $EGREP "ut_tv" >/dev/null 2>&1; then
12738 eval "$ossh_varname=yes" 14525 eval "$ossh_varname=yes"
12739else 14526else
12740 eval "$ossh_varname=no" 14527 eval "$ossh_varname=no"
@@ -12745,36 +14532,41 @@ fi
12745 14532
12746 ossh_result=`eval 'echo $'"$ossh_varname"` 14533 ossh_result=`eval 'echo $'"$ossh_varname"`
12747 if test -n "`echo $ossh_varname`"; then 14534 if test -n "`echo $ossh_varname`"; then
12748 echo "$as_me:12748: result: $ossh_result" >&5 14535 echo "$as_me:$LINENO: result: $ossh_result" >&5
12749echo "${ECHO_T}$ossh_result" >&6 14536echo "${ECHO_T}$ossh_result" >&6
12750 if test "x$ossh_result" = "xyes"; then 14537 if test "x$ossh_result" = "xyes"; then
12751 cat >>confdefs.h <<\EOF 14538 cat >>confdefs.h <<\_ACEOF
12752#define HAVE_TV_IN_UTMP 1 14539#define HAVE_TV_IN_UTMP 1
12753EOF 14540_ACEOF
12754 14541
12755 fi 14542 fi
12756 else 14543 else
12757 echo "$as_me:12757: result: no" >&5 14544 echo "$as_me:$LINENO: result: no" >&5
12758echo "${ECHO_T}no" >&6 14545echo "${ECHO_T}no" >&6
12759 fi 14546 fi
12760 14547
14548
12761# look for field 'ut_id' in header 'utmp.h' 14549# look for field 'ut_id' in header 'utmp.h'
12762 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14550 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
12763 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 14551 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
12764 echo "$as_me:12764: checking for ut_id field in utmp.h" >&5 14552 echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5
12765echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6 14553echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6
12766 if eval "test \"\${$ossh_varname+set}\" = set"; then 14554 if eval "test \"\${$ossh_varname+set}\" = set"; then
12767 echo $ECHO_N "(cached) $ECHO_C" >&6 14555 echo $ECHO_N "(cached) $ECHO_C" >&6
12768else 14556else
12769 14557
12770 cat >conftest.$ac_ext <<_ACEOF 14558 cat >conftest.$ac_ext <<_ACEOF
12771#line 12771 "configure" 14559#line $LINENO "configure"
12772#include "confdefs.h" 14560/* confdefs.h. */
14561_ACEOF
14562cat confdefs.h >>conftest.$ac_ext
14563cat >>conftest.$ac_ext <<_ACEOF
14564/* end confdefs.h. */
12773#include <utmp.h> 14565#include <utmp.h>
12774 14566
12775_ACEOF 14567_ACEOF
12776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12777 egrep "ut_id" >/dev/null 2>&1; then 14569 $EGREP "ut_id" >/dev/null 2>&1; then
12778 eval "$ossh_varname=yes" 14570 eval "$ossh_varname=yes"
12779else 14571else
12780 eval "$ossh_varname=no" 14572 eval "$ossh_varname=no"
@@ -12785,36 +14577,41 @@ fi
12785 14577
12786 ossh_result=`eval 'echo $'"$ossh_varname"` 14578 ossh_result=`eval 'echo $'"$ossh_varname"`
12787 if test -n "`echo $ossh_varname`"; then 14579 if test -n "`echo $ossh_varname`"; then
12788 echo "$as_me:12788: result: $ossh_result" >&5 14580 echo "$as_me:$LINENO: result: $ossh_result" >&5
12789echo "${ECHO_T}$ossh_result" >&6 14581echo "${ECHO_T}$ossh_result" >&6
12790 if test "x$ossh_result" = "xyes"; then 14582 if test "x$ossh_result" = "xyes"; then
12791 cat >>confdefs.h <<\EOF 14583 cat >>confdefs.h <<\_ACEOF
12792#define HAVE_ID_IN_UTMP 1 14584#define HAVE_ID_IN_UTMP 1
12793EOF 14585_ACEOF
12794 14586
12795 fi 14587 fi
12796 else 14588 else
12797 echo "$as_me:12797: result: no" >&5 14589 echo "$as_me:$LINENO: result: no" >&5
12798echo "${ECHO_T}no" >&6 14590echo "${ECHO_T}no" >&6
12799 fi 14591 fi
12800 14592
14593
12801# look for field 'ut_id' in header 'utmpx.h' 14594# look for field 'ut_id' in header 'utmpx.h'
12802 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14595 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
12803 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 14596 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
12804 echo "$as_me:12804: checking for ut_id field in utmpx.h" >&5 14597 echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5
12805echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6 14598echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6
12806 if eval "test \"\${$ossh_varname+set}\" = set"; then 14599 if eval "test \"\${$ossh_varname+set}\" = set"; then
12807 echo $ECHO_N "(cached) $ECHO_C" >&6 14600 echo $ECHO_N "(cached) $ECHO_C" >&6
12808else 14601else
12809 14602
12810 cat >conftest.$ac_ext <<_ACEOF 14603 cat >conftest.$ac_ext <<_ACEOF
12811#line 12811 "configure" 14604#line $LINENO "configure"
12812#include "confdefs.h" 14605/* confdefs.h. */
14606_ACEOF
14607cat confdefs.h >>conftest.$ac_ext
14608cat >>conftest.$ac_ext <<_ACEOF
14609/* end confdefs.h. */
12813#include <utmpx.h> 14610#include <utmpx.h>
12814 14611
12815_ACEOF 14612_ACEOF
12816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12817 egrep "ut_id" >/dev/null 2>&1; then 14614 $EGREP "ut_id" >/dev/null 2>&1; then
12818 eval "$ossh_varname=yes" 14615 eval "$ossh_varname=yes"
12819else 14616else
12820 eval "$ossh_varname=no" 14617 eval "$ossh_varname=no"
@@ -12825,36 +14622,41 @@ fi
12825 14622
12826 ossh_result=`eval 'echo $'"$ossh_varname"` 14623 ossh_result=`eval 'echo $'"$ossh_varname"`
12827 if test -n "`echo $ossh_varname`"; then 14624 if test -n "`echo $ossh_varname`"; then
12828 echo "$as_me:12828: result: $ossh_result" >&5 14625 echo "$as_me:$LINENO: result: $ossh_result" >&5
12829echo "${ECHO_T}$ossh_result" >&6 14626echo "${ECHO_T}$ossh_result" >&6
12830 if test "x$ossh_result" = "xyes"; then 14627 if test "x$ossh_result" = "xyes"; then
12831 cat >>confdefs.h <<\EOF 14628 cat >>confdefs.h <<\_ACEOF
12832#define HAVE_ID_IN_UTMPX 1 14629#define HAVE_ID_IN_UTMPX 1
12833EOF 14630_ACEOF
12834 14631
12835 fi 14632 fi
12836 else 14633 else
12837 echo "$as_me:12837: result: no" >&5 14634 echo "$as_me:$LINENO: result: no" >&5
12838echo "${ECHO_T}no" >&6 14635echo "${ECHO_T}no" >&6
12839 fi 14636 fi
12840 14637
14638
12841# look for field 'ut_addr' in header 'utmp.h' 14639# look for field 'ut_addr' in header 'utmp.h'
12842 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14640 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
12843 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 14641 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
12844 echo "$as_me:12844: checking for ut_addr field in utmp.h" >&5 14642 echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5
12845echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6 14643echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6
12846 if eval "test \"\${$ossh_varname+set}\" = set"; then 14644 if eval "test \"\${$ossh_varname+set}\" = set"; then
12847 echo $ECHO_N "(cached) $ECHO_C" >&6 14645 echo $ECHO_N "(cached) $ECHO_C" >&6
12848else 14646else
12849 14647
12850 cat >conftest.$ac_ext <<_ACEOF 14648 cat >conftest.$ac_ext <<_ACEOF
12851#line 12851 "configure" 14649#line $LINENO "configure"
12852#include "confdefs.h" 14650/* confdefs.h. */
14651_ACEOF
14652cat confdefs.h >>conftest.$ac_ext
14653cat >>conftest.$ac_ext <<_ACEOF
14654/* end confdefs.h. */
12853#include <utmp.h> 14655#include <utmp.h>
12854 14656
12855_ACEOF 14657_ACEOF
12856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12857 egrep "ut_addr" >/dev/null 2>&1; then 14659 $EGREP "ut_addr" >/dev/null 2>&1; then
12858 eval "$ossh_varname=yes" 14660 eval "$ossh_varname=yes"
12859else 14661else
12860 eval "$ossh_varname=no" 14662 eval "$ossh_varname=no"
@@ -12865,36 +14667,41 @@ fi
12865 14667
12866 ossh_result=`eval 'echo $'"$ossh_varname"` 14668 ossh_result=`eval 'echo $'"$ossh_varname"`
12867 if test -n "`echo $ossh_varname`"; then 14669 if test -n "`echo $ossh_varname`"; then
12868 echo "$as_me:12868: result: $ossh_result" >&5 14670 echo "$as_me:$LINENO: result: $ossh_result" >&5
12869echo "${ECHO_T}$ossh_result" >&6 14671echo "${ECHO_T}$ossh_result" >&6
12870 if test "x$ossh_result" = "xyes"; then 14672 if test "x$ossh_result" = "xyes"; then
12871 cat >>confdefs.h <<\EOF 14673 cat >>confdefs.h <<\_ACEOF
12872#define HAVE_ADDR_IN_UTMP 1 14674#define HAVE_ADDR_IN_UTMP 1
12873EOF 14675_ACEOF
12874 14676
12875 fi 14677 fi
12876 else 14678 else
12877 echo "$as_me:12877: result: no" >&5 14679 echo "$as_me:$LINENO: result: no" >&5
12878echo "${ECHO_T}no" >&6 14680echo "${ECHO_T}no" >&6
12879 fi 14681 fi
12880 14682
14683
12881# look for field 'ut_addr' in header 'utmpx.h' 14684# look for field 'ut_addr' in header 'utmpx.h'
12882 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14685 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
12883 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 14686 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
12884 echo "$as_me:12884: checking for ut_addr field in utmpx.h" >&5 14687 echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5
12885echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6 14688echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6
12886 if eval "test \"\${$ossh_varname+set}\" = set"; then 14689 if eval "test \"\${$ossh_varname+set}\" = set"; then
12887 echo $ECHO_N "(cached) $ECHO_C" >&6 14690 echo $ECHO_N "(cached) $ECHO_C" >&6
12888else 14691else
12889 14692
12890 cat >conftest.$ac_ext <<_ACEOF 14693 cat >conftest.$ac_ext <<_ACEOF
12891#line 12891 "configure" 14694#line $LINENO "configure"
12892#include "confdefs.h" 14695/* confdefs.h. */
14696_ACEOF
14697cat confdefs.h >>conftest.$ac_ext
14698cat >>conftest.$ac_ext <<_ACEOF
14699/* end confdefs.h. */
12893#include <utmpx.h> 14700#include <utmpx.h>
12894 14701
12895_ACEOF 14702_ACEOF
12896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12897 egrep "ut_addr" >/dev/null 2>&1; then 14704 $EGREP "ut_addr" >/dev/null 2>&1; then
12898 eval "$ossh_varname=yes" 14705 eval "$ossh_varname=yes"
12899else 14706else
12900 eval "$ossh_varname=no" 14707 eval "$ossh_varname=no"
@@ -12905,36 +14712,41 @@ fi
12905 14712
12906 ossh_result=`eval 'echo $'"$ossh_varname"` 14713 ossh_result=`eval 'echo $'"$ossh_varname"`
12907 if test -n "`echo $ossh_varname`"; then 14714 if test -n "`echo $ossh_varname`"; then
12908 echo "$as_me:12908: result: $ossh_result" >&5 14715 echo "$as_me:$LINENO: result: $ossh_result" >&5
12909echo "${ECHO_T}$ossh_result" >&6 14716echo "${ECHO_T}$ossh_result" >&6
12910 if test "x$ossh_result" = "xyes"; then 14717 if test "x$ossh_result" = "xyes"; then
12911 cat >>confdefs.h <<\EOF 14718 cat >>confdefs.h <<\_ACEOF
12912#define HAVE_ADDR_IN_UTMPX 1 14719#define HAVE_ADDR_IN_UTMPX 1
12913EOF 14720_ACEOF
12914 14721
12915 fi 14722 fi
12916 else 14723 else
12917 echo "$as_me:12917: result: no" >&5 14724 echo "$as_me:$LINENO: result: no" >&5
12918echo "${ECHO_T}no" >&6 14725echo "${ECHO_T}no" >&6
12919 fi 14726 fi
12920 14727
14728
12921# look for field 'ut_addr_v6' in header 'utmp.h' 14729# look for field 'ut_addr_v6' in header 'utmp.h'
12922 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14730 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
12923 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 14731 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
12924 echo "$as_me:12924: checking for ut_addr_v6 field in utmp.h" >&5 14732 echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5
12925echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6 14733echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6
12926 if eval "test \"\${$ossh_varname+set}\" = set"; then 14734 if eval "test \"\${$ossh_varname+set}\" = set"; then
12927 echo $ECHO_N "(cached) $ECHO_C" >&6 14735 echo $ECHO_N "(cached) $ECHO_C" >&6
12928else 14736else
12929 14737
12930 cat >conftest.$ac_ext <<_ACEOF 14738 cat >conftest.$ac_ext <<_ACEOF
12931#line 12931 "configure" 14739#line $LINENO "configure"
12932#include "confdefs.h" 14740/* confdefs.h. */
14741_ACEOF
14742cat confdefs.h >>conftest.$ac_ext
14743cat >>conftest.$ac_ext <<_ACEOF
14744/* end confdefs.h. */
12933#include <utmp.h> 14745#include <utmp.h>
12934 14746
12935_ACEOF 14747_ACEOF
12936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12937 egrep "ut_addr_v6" >/dev/null 2>&1; then 14749 $EGREP "ut_addr_v6" >/dev/null 2>&1; then
12938 eval "$ossh_varname=yes" 14750 eval "$ossh_varname=yes"
12939else 14751else
12940 eval "$ossh_varname=no" 14752 eval "$ossh_varname=no"
@@ -12945,36 +14757,41 @@ fi
12945 14757
12946 ossh_result=`eval 'echo $'"$ossh_varname"` 14758 ossh_result=`eval 'echo $'"$ossh_varname"`
12947 if test -n "`echo $ossh_varname`"; then 14759 if test -n "`echo $ossh_varname`"; then
12948 echo "$as_me:12948: result: $ossh_result" >&5 14760 echo "$as_me:$LINENO: result: $ossh_result" >&5
12949echo "${ECHO_T}$ossh_result" >&6 14761echo "${ECHO_T}$ossh_result" >&6
12950 if test "x$ossh_result" = "xyes"; then 14762 if test "x$ossh_result" = "xyes"; then
12951 cat >>confdefs.h <<\EOF 14763 cat >>confdefs.h <<\_ACEOF
12952#define HAVE_ADDR_V6_IN_UTMP 1 14764#define HAVE_ADDR_V6_IN_UTMP 1
12953EOF 14765_ACEOF
12954 14766
12955 fi 14767 fi
12956 else 14768 else
12957 echo "$as_me:12957: result: no" >&5 14769 echo "$as_me:$LINENO: result: no" >&5
12958echo "${ECHO_T}no" >&6 14770echo "${ECHO_T}no" >&6
12959 fi 14771 fi
12960 14772
14773
12961# look for field 'ut_addr_v6' in header 'utmpx.h' 14774# look for field 'ut_addr_v6' in header 'utmpx.h'
12962 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14775 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
12963 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 14776 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
12964 echo "$as_me:12964: checking for ut_addr_v6 field in utmpx.h" >&5 14777 echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5
12965echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6 14778echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6
12966 if eval "test \"\${$ossh_varname+set}\" = set"; then 14779 if eval "test \"\${$ossh_varname+set}\" = set"; then
12967 echo $ECHO_N "(cached) $ECHO_C" >&6 14780 echo $ECHO_N "(cached) $ECHO_C" >&6
12968else 14781else
12969 14782
12970 cat >conftest.$ac_ext <<_ACEOF 14783 cat >conftest.$ac_ext <<_ACEOF
12971#line 12971 "configure" 14784#line $LINENO "configure"
12972#include "confdefs.h" 14785/* confdefs.h. */
14786_ACEOF
14787cat confdefs.h >>conftest.$ac_ext
14788cat >>conftest.$ac_ext <<_ACEOF
14789/* end confdefs.h. */
12973#include <utmpx.h> 14790#include <utmpx.h>
12974 14791
12975_ACEOF 14792_ACEOF
12976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12977 egrep "ut_addr_v6" >/dev/null 2>&1; then 14794 $EGREP "ut_addr_v6" >/dev/null 2>&1; then
12978 eval "$ossh_varname=yes" 14795 eval "$ossh_varname=yes"
12979else 14796else
12980 eval "$ossh_varname=no" 14797 eval "$ossh_varname=no"
@@ -12985,36 +14802,41 @@ fi
12985 14802
12986 ossh_result=`eval 'echo $'"$ossh_varname"` 14803 ossh_result=`eval 'echo $'"$ossh_varname"`
12987 if test -n "`echo $ossh_varname`"; then 14804 if test -n "`echo $ossh_varname`"; then
12988 echo "$as_me:12988: result: $ossh_result" >&5 14805 echo "$as_me:$LINENO: result: $ossh_result" >&5
12989echo "${ECHO_T}$ossh_result" >&6 14806echo "${ECHO_T}$ossh_result" >&6
12990 if test "x$ossh_result" = "xyes"; then 14807 if test "x$ossh_result" = "xyes"; then
12991 cat >>confdefs.h <<\EOF 14808 cat >>confdefs.h <<\_ACEOF
12992#define HAVE_ADDR_V6_IN_UTMPX 1 14809#define HAVE_ADDR_V6_IN_UTMPX 1
12993EOF 14810_ACEOF
12994 14811
12995 fi 14812 fi
12996 else 14813 else
12997 echo "$as_me:12997: result: no" >&5 14814 echo "$as_me:$LINENO: result: no" >&5
12998echo "${ECHO_T}no" >&6 14815echo "${ECHO_T}no" >&6
12999 fi 14816 fi
13000 14817
14818
13001# look for field 'ut_exit' in header 'utmp.h' 14819# look for field 'ut_exit' in header 'utmp.h'
13002 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14820 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
13003 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit 14821 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
13004 echo "$as_me:13004: checking for ut_exit field in utmp.h" >&5 14822 echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5
13005echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6 14823echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6
13006 if eval "test \"\${$ossh_varname+set}\" = set"; then 14824 if eval "test \"\${$ossh_varname+set}\" = set"; then
13007 echo $ECHO_N "(cached) $ECHO_C" >&6 14825 echo $ECHO_N "(cached) $ECHO_C" >&6
13008else 14826else
13009 14827
13010 cat >conftest.$ac_ext <<_ACEOF 14828 cat >conftest.$ac_ext <<_ACEOF
13011#line 13011 "configure" 14829#line $LINENO "configure"
13012#include "confdefs.h" 14830/* confdefs.h. */
14831_ACEOF
14832cat confdefs.h >>conftest.$ac_ext
14833cat >>conftest.$ac_ext <<_ACEOF
14834/* end confdefs.h. */
13013#include <utmp.h> 14835#include <utmp.h>
13014 14836
13015_ACEOF 14837_ACEOF
13016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13017 egrep "ut_exit" >/dev/null 2>&1; then 14839 $EGREP "ut_exit" >/dev/null 2>&1; then
13018 eval "$ossh_varname=yes" 14840 eval "$ossh_varname=yes"
13019else 14841else
13020 eval "$ossh_varname=no" 14842 eval "$ossh_varname=no"
@@ -13025,36 +14847,41 @@ fi
13025 14847
13026 ossh_result=`eval 'echo $'"$ossh_varname"` 14848 ossh_result=`eval 'echo $'"$ossh_varname"`
13027 if test -n "`echo $ossh_varname`"; then 14849 if test -n "`echo $ossh_varname`"; then
13028 echo "$as_me:13028: result: $ossh_result" >&5 14850 echo "$as_me:$LINENO: result: $ossh_result" >&5
13029echo "${ECHO_T}$ossh_result" >&6 14851echo "${ECHO_T}$ossh_result" >&6
13030 if test "x$ossh_result" = "xyes"; then 14852 if test "x$ossh_result" = "xyes"; then
13031 cat >>confdefs.h <<\EOF 14853 cat >>confdefs.h <<\_ACEOF
13032#define HAVE_EXIT_IN_UTMP 1 14854#define HAVE_EXIT_IN_UTMP 1
13033EOF 14855_ACEOF
13034 14856
13035 fi 14857 fi
13036 else 14858 else
13037 echo "$as_me:13037: result: no" >&5 14859 echo "$as_me:$LINENO: result: no" >&5
13038echo "${ECHO_T}no" >&6 14860echo "${ECHO_T}no" >&6
13039 fi 14861 fi
13040 14862
14863
13041# look for field 'ut_time' in header 'utmp.h' 14864# look for field 'ut_time' in header 'utmp.h'
13042 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 14865 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
13043 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 14866 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
13044 echo "$as_me:13044: checking for ut_time field in utmp.h" >&5 14867 echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5
13045echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6 14868echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6
13046 if eval "test \"\${$ossh_varname+set}\" = set"; then 14869 if eval "test \"\${$ossh_varname+set}\" = set"; then
13047 echo $ECHO_N "(cached) $ECHO_C" >&6 14870 echo $ECHO_N "(cached) $ECHO_C" >&6
13048else 14871else
13049 14872
13050 cat >conftest.$ac_ext <<_ACEOF 14873 cat >conftest.$ac_ext <<_ACEOF
13051#line 13051 "configure" 14874#line $LINENO "configure"
13052#include "confdefs.h" 14875/* confdefs.h. */
14876_ACEOF
14877cat confdefs.h >>conftest.$ac_ext
14878cat >>conftest.$ac_ext <<_ACEOF
14879/* end confdefs.h. */
13053#include <utmp.h> 14880#include <utmp.h>
13054 14881
13055_ACEOF 14882_ACEOF
13056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13057 egrep "ut_time" >/dev/null 2>&1; then 14884 $EGREP "ut_time" >/dev/null 2>&1; then
13058 eval "$ossh_varname=yes" 14885 eval "$ossh_varname=yes"
13059else 14886else
13060 eval "$ossh_varname=no" 14887 eval "$ossh_varname=no"
@@ -13065,36 +14892,41 @@ fi
13065 14892
13066 ossh_result=`eval 'echo $'"$ossh_varname"` 14893 ossh_result=`eval 'echo $'"$ossh_varname"`
13067 if test -n "`echo $ossh_varname`"; then 14894 if test -n "`echo $ossh_varname`"; then
13068 echo "$as_me:13068: result: $ossh_result" >&5 14895 echo "$as_me:$LINENO: result: $ossh_result" >&5
13069echo "${ECHO_T}$ossh_result" >&6 14896echo "${ECHO_T}$ossh_result" >&6
13070 if test "x$ossh_result" = "xyes"; then 14897 if test "x$ossh_result" = "xyes"; then
13071 cat >>confdefs.h <<\EOF 14898 cat >>confdefs.h <<\_ACEOF
13072#define HAVE_TIME_IN_UTMP 1 14899#define HAVE_TIME_IN_UTMP 1
13073EOF 14900_ACEOF
13074 14901
13075 fi 14902 fi
13076 else 14903 else
13077 echo "$as_me:13077: result: no" >&5 14904 echo "$as_me:$LINENO: result: no" >&5
13078echo "${ECHO_T}no" >&6 14905echo "${ECHO_T}no" >&6
13079 fi 14906 fi
13080 14907
14908
13081# look for field 'ut_time' in header 'utmpx.h' 14909# look for field 'ut_time' in header 'utmpx.h'
13082 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14910 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
13083 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 14911 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
13084 echo "$as_me:13084: checking for ut_time field in utmpx.h" >&5 14912 echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5
13085echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6 14913echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6
13086 if eval "test \"\${$ossh_varname+set}\" = set"; then 14914 if eval "test \"\${$ossh_varname+set}\" = set"; then
13087 echo $ECHO_N "(cached) $ECHO_C" >&6 14915 echo $ECHO_N "(cached) $ECHO_C" >&6
13088else 14916else
13089 14917
13090 cat >conftest.$ac_ext <<_ACEOF 14918 cat >conftest.$ac_ext <<_ACEOF
13091#line 13091 "configure" 14919#line $LINENO "configure"
13092#include "confdefs.h" 14920/* confdefs.h. */
14921_ACEOF
14922cat confdefs.h >>conftest.$ac_ext
14923cat >>conftest.$ac_ext <<_ACEOF
14924/* end confdefs.h. */
13093#include <utmpx.h> 14925#include <utmpx.h>
13094 14926
13095_ACEOF 14927_ACEOF
13096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13097 egrep "ut_time" >/dev/null 2>&1; then 14929 $EGREP "ut_time" >/dev/null 2>&1; then
13098 eval "$ossh_varname=yes" 14930 eval "$ossh_varname=yes"
13099else 14931else
13100 eval "$ossh_varname=no" 14932 eval "$ossh_varname=no"
@@ -13105,36 +14937,41 @@ fi
13105 14937
13106 ossh_result=`eval 'echo $'"$ossh_varname"` 14938 ossh_result=`eval 'echo $'"$ossh_varname"`
13107 if test -n "`echo $ossh_varname`"; then 14939 if test -n "`echo $ossh_varname`"; then
13108 echo "$as_me:13108: result: $ossh_result" >&5 14940 echo "$as_me:$LINENO: result: $ossh_result" >&5
13109echo "${ECHO_T}$ossh_result" >&6 14941echo "${ECHO_T}$ossh_result" >&6
13110 if test "x$ossh_result" = "xyes"; then 14942 if test "x$ossh_result" = "xyes"; then
13111 cat >>confdefs.h <<\EOF 14943 cat >>confdefs.h <<\_ACEOF
13112#define HAVE_TIME_IN_UTMPX 1 14944#define HAVE_TIME_IN_UTMPX 1
13113EOF 14945_ACEOF
13114 14946
13115 fi 14947 fi
13116 else 14948 else
13117 echo "$as_me:13117: result: no" >&5 14949 echo "$as_me:$LINENO: result: no" >&5
13118echo "${ECHO_T}no" >&6 14950echo "${ECHO_T}no" >&6
13119 fi 14951 fi
13120 14952
14953
13121# look for field 'ut_tv' in header 'utmpx.h' 14954# look for field 'ut_tv' in header 'utmpx.h'
13122 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 14955 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
13123 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 14956 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
13124 echo "$as_me:13124: checking for ut_tv field in utmpx.h" >&5 14957 echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5
13125echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6 14958echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6
13126 if eval "test \"\${$ossh_varname+set}\" = set"; then 14959 if eval "test \"\${$ossh_varname+set}\" = set"; then
13127 echo $ECHO_N "(cached) $ECHO_C" >&6 14960 echo $ECHO_N "(cached) $ECHO_C" >&6
13128else 14961else
13129 14962
13130 cat >conftest.$ac_ext <<_ACEOF 14963 cat >conftest.$ac_ext <<_ACEOF
13131#line 13131 "configure" 14964#line $LINENO "configure"
13132#include "confdefs.h" 14965/* confdefs.h. */
14966_ACEOF
14967cat confdefs.h >>conftest.$ac_ext
14968cat >>conftest.$ac_ext <<_ACEOF
14969/* end confdefs.h. */
13133#include <utmpx.h> 14970#include <utmpx.h>
13134 14971
13135_ACEOF 14972_ACEOF
13136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13137 egrep "ut_tv" >/dev/null 2>&1; then 14974 $EGREP "ut_tv" >/dev/null 2>&1; then
13138 eval "$ossh_varname=yes" 14975 eval "$ossh_varname=yes"
13139else 14976else
13140 eval "$ossh_varname=no" 14977 eval "$ossh_varname=no"
@@ -13145,27 +14982,32 @@ fi
13145 14982
13146 ossh_result=`eval 'echo $'"$ossh_varname"` 14983 ossh_result=`eval 'echo $'"$ossh_varname"`
13147 if test -n "`echo $ossh_varname`"; then 14984 if test -n "`echo $ossh_varname`"; then
13148 echo "$as_me:13148: result: $ossh_result" >&5 14985 echo "$as_me:$LINENO: result: $ossh_result" >&5
13149echo "${ECHO_T}$ossh_result" >&6 14986echo "${ECHO_T}$ossh_result" >&6
13150 if test "x$ossh_result" = "xyes"; then 14987 if test "x$ossh_result" = "xyes"; then
13151 cat >>confdefs.h <<\EOF 14988 cat >>confdefs.h <<\_ACEOF
13152#define HAVE_TV_IN_UTMPX 1 14989#define HAVE_TV_IN_UTMPX 1
13153EOF 14990_ACEOF
13154 14991
13155 fi 14992 fi
13156 else 14993 else
13157 echo "$as_me:13157: result: no" >&5 14994 echo "$as_me:$LINENO: result: no" >&5
13158echo "${ECHO_T}no" >&6 14995echo "${ECHO_T}no" >&6
13159 fi 14996 fi
13160 14997
13161echo "$as_me:13161: checking for struct stat.st_blksize" >&5 14998
14999echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13162echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 15000echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13163if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then 15001if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13164 echo $ECHO_N "(cached) $ECHO_C" >&6 15002 echo $ECHO_N "(cached) $ECHO_C" >&6
13165else 15003else
13166 cat >conftest.$ac_ext <<_ACEOF 15004 cat >conftest.$ac_ext <<_ACEOF
13167#line 13167 "configure" 15005#line $LINENO "configure"
13168#include "confdefs.h" 15006/* confdefs.h. */
15007_ACEOF
15008cat confdefs.h >>conftest.$ac_ext
15009cat >>conftest.$ac_ext <<_ACEOF
15010/* end confdefs.h. */
13169$ac_includes_default 15011$ac_includes_default
13170int 15012int
13171main () 15013main ()
@@ -13178,44 +15020,88 @@ return 0;
13178} 15020}
13179_ACEOF 15021_ACEOF
13180rm -f conftest.$ac_objext 15022rm -f conftest.$ac_objext
13181if { (eval echo "$as_me:13181: \"$ac_compile\"") >&5 15023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15024 (eval $ac_compile) 2>&5
15025 ac_status=$?
15026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15027 (exit $ac_status); } &&
15028 { ac_try='test -s conftest.$ac_objext'
15029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15030 (eval $ac_try) 2>&5
15031 ac_status=$?
15032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); }; }; then
15034 ac_cv_member_struct_stat_st_blksize=yes
15035else
15036 echo "$as_me: failed program was:" >&5
15037sed 's/^/| /' conftest.$ac_ext >&5
15038
15039cat >conftest.$ac_ext <<_ACEOF
15040#line $LINENO "configure"
15041/* confdefs.h. */
15042_ACEOF
15043cat confdefs.h >>conftest.$ac_ext
15044cat >>conftest.$ac_ext <<_ACEOF
15045/* end confdefs.h. */
15046$ac_includes_default
15047int
15048main ()
15049{
15050static struct stat ac_aggr;
15051if (sizeof ac_aggr.st_blksize)
15052return 0;
15053 ;
15054 return 0;
15055}
15056_ACEOF
15057rm -f conftest.$ac_objext
15058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13182 (eval $ac_compile) 2>&5 15059 (eval $ac_compile) 2>&5
13183 ac_status=$? 15060 ac_status=$?
13184 echo "$as_me:13184: \$? = $ac_status" >&5 15061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13185 (exit $ac_status); } && 15062 (exit $ac_status); } &&
13186 { ac_try='test -s conftest.$ac_objext' 15063 { ac_try='test -s conftest.$ac_objext'
13187 { (eval echo "$as_me:13187: \"$ac_try\"") >&5 15064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13188 (eval $ac_try) 2>&5 15065 (eval $ac_try) 2>&5
13189 ac_status=$? 15066 ac_status=$?
13190 echo "$as_me:13190: \$? = $ac_status" >&5 15067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13191 (exit $ac_status); }; }; then 15068 (exit $ac_status); }; }; then
13192 ac_cv_member_struct_stat_st_blksize=yes 15069 ac_cv_member_struct_stat_st_blksize=yes
13193else 15070else
13194 echo "$as_me: failed program was:" >&5 15071 echo "$as_me: failed program was:" >&5
13195cat conftest.$ac_ext >&5 15072sed 's/^/| /' conftest.$ac_ext >&5
15073
13196ac_cv_member_struct_stat_st_blksize=no 15074ac_cv_member_struct_stat_st_blksize=no
13197fi 15075fi
13198rm -f conftest.$ac_objext conftest.$ac_ext 15076rm -f conftest.$ac_objext conftest.$ac_ext
13199fi 15077fi
13200echo "$as_me:13200: result: $ac_cv_member_struct_stat_st_blksize" >&5 15078rm -f conftest.$ac_objext conftest.$ac_ext
15079fi
15080echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13201echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 15081echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13202if test $ac_cv_member_struct_stat_st_blksize = yes; then 15082if test $ac_cv_member_struct_stat_st_blksize = yes; then
13203 15083
13204cat >>confdefs.h <<EOF 15084cat >>confdefs.h <<_ACEOF
13205#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 15085#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13206EOF 15086_ACEOF
15087
13207 15088
13208fi 15089fi
13209 15090
13210echo "$as_me:13210: checking for ss_family field in struct sockaddr_storage" >&5 15091
15092echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5
13211echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6 15093echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6
13212if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then 15094if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then
13213 echo $ECHO_N "(cached) $ECHO_C" >&6 15095 echo $ECHO_N "(cached) $ECHO_C" >&6
13214else 15096else
13215 15097
13216 cat >conftest.$ac_ext <<_ACEOF 15098 cat >conftest.$ac_ext <<_ACEOF
13217#line 13217 "configure" 15099#line $LINENO "configure"
13218#include "confdefs.h" 15100/* confdefs.h. */
15101_ACEOF
15102cat confdefs.h >>conftest.$ac_ext
15103cat >>conftest.$ac_ext <<_ACEOF
15104/* end confdefs.h. */
13219 15105
13220#include <sys/types.h> 15106#include <sys/types.h>
13221#include <sys/socket.h> 15107#include <sys/socket.h>
@@ -13229,44 +15115,49 @@ main ()
13229} 15115}
13230_ACEOF 15116_ACEOF
13231rm -f conftest.$ac_objext 15117rm -f conftest.$ac_objext
13232if { (eval echo "$as_me:13232: \"$ac_compile\"") >&5 15118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13233 (eval $ac_compile) 2>&5 15119 (eval $ac_compile) 2>&5
13234 ac_status=$? 15120 ac_status=$?
13235 echo "$as_me:13235: \$? = $ac_status" >&5 15121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13236 (exit $ac_status); } && 15122 (exit $ac_status); } &&
13237 { ac_try='test -s conftest.$ac_objext' 15123 { ac_try='test -s conftest.$ac_objext'
13238 { (eval echo "$as_me:13238: \"$ac_try\"") >&5 15124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13239 (eval $ac_try) 2>&5 15125 (eval $ac_try) 2>&5
13240 ac_status=$? 15126 ac_status=$?
13241 echo "$as_me:13241: \$? = $ac_status" >&5 15127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242 (exit $ac_status); }; }; then 15128 (exit $ac_status); }; }; then
13243 ac_cv_have_ss_family_in_struct_ss="yes" 15129 ac_cv_have_ss_family_in_struct_ss="yes"
13244else 15130else
13245 echo "$as_me: failed program was:" >&5 15131 echo "$as_me: failed program was:" >&5
13246cat conftest.$ac_ext >&5 15132sed 's/^/| /' conftest.$ac_ext >&5
15133
13247 ac_cv_have_ss_family_in_struct_ss="no" 15134 ac_cv_have_ss_family_in_struct_ss="no"
13248fi 15135fi
13249rm -f conftest.$ac_objext conftest.$ac_ext 15136rm -f conftest.$ac_objext conftest.$ac_ext
13250 15137
13251fi 15138fi
13252echo "$as_me:13252: result: $ac_cv_have_ss_family_in_struct_ss" >&5 15139echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5
13253echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6 15140echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6
13254if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then 15141if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
13255 cat >>confdefs.h <<\EOF 15142 cat >>confdefs.h <<\_ACEOF
13256#define HAVE_SS_FAMILY_IN_SS 1 15143#define HAVE_SS_FAMILY_IN_SS 1
13257EOF 15144_ACEOF
13258 15145
13259fi 15146fi
13260 15147
13261echo "$as_me:13261: checking for __ss_family field in struct sockaddr_storage" >&5 15148echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5
13262echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6 15149echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6
13263if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then 15150if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then
13264 echo $ECHO_N "(cached) $ECHO_C" >&6 15151 echo $ECHO_N "(cached) $ECHO_C" >&6
13265else 15152else
13266 15153
13267 cat >conftest.$ac_ext <<_ACEOF 15154 cat >conftest.$ac_ext <<_ACEOF
13268#line 13268 "configure" 15155#line $LINENO "configure"
13269#include "confdefs.h" 15156/* confdefs.h. */
15157_ACEOF
15158cat confdefs.h >>conftest.$ac_ext
15159cat >>conftest.$ac_ext <<_ACEOF
15160/* end confdefs.h. */
13270 15161
13271#include <sys/types.h> 15162#include <sys/types.h>
13272#include <sys/socket.h> 15163#include <sys/socket.h>
@@ -13280,45 +15171,50 @@ main ()
13280} 15171}
13281_ACEOF 15172_ACEOF
13282rm -f conftest.$ac_objext 15173rm -f conftest.$ac_objext
13283if { (eval echo "$as_me:13283: \"$ac_compile\"") >&5 15174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13284 (eval $ac_compile) 2>&5 15175 (eval $ac_compile) 2>&5
13285 ac_status=$? 15176 ac_status=$?
13286 echo "$as_me:13286: \$? = $ac_status" >&5 15177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13287 (exit $ac_status); } && 15178 (exit $ac_status); } &&
13288 { ac_try='test -s conftest.$ac_objext' 15179 { ac_try='test -s conftest.$ac_objext'
13289 { (eval echo "$as_me:13289: \"$ac_try\"") >&5 15180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13290 (eval $ac_try) 2>&5 15181 (eval $ac_try) 2>&5
13291 ac_status=$? 15182 ac_status=$?
13292 echo "$as_me:13292: \$? = $ac_status" >&5 15183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13293 (exit $ac_status); }; }; then 15184 (exit $ac_status); }; }; then
13294 ac_cv_have___ss_family_in_struct_ss="yes" 15185 ac_cv_have___ss_family_in_struct_ss="yes"
13295else 15186else
13296 echo "$as_me: failed program was:" >&5 15187 echo "$as_me: failed program was:" >&5
13297cat conftest.$ac_ext >&5 15188sed 's/^/| /' conftest.$ac_ext >&5
15189
13298 ac_cv_have___ss_family_in_struct_ss="no" 15190 ac_cv_have___ss_family_in_struct_ss="no"
13299 15191
13300fi 15192fi
13301rm -f conftest.$ac_objext conftest.$ac_ext 15193rm -f conftest.$ac_objext conftest.$ac_ext
13302 15194
13303fi 15195fi
13304echo "$as_me:13304: result: $ac_cv_have___ss_family_in_struct_ss" >&5 15196echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5
13305echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6 15197echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6
13306if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 15198if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
13307 cat >>confdefs.h <<\EOF 15199 cat >>confdefs.h <<\_ACEOF
13308#define HAVE___SS_FAMILY_IN_SS 1 15200#define HAVE___SS_FAMILY_IN_SS 1
13309EOF 15201_ACEOF
13310 15202
13311fi 15203fi
13312 15204
13313echo "$as_me:13313: checking for pw_class field in struct passwd" >&5 15205echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5
13314echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6 15206echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6
13315if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then 15207if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then
13316 echo $ECHO_N "(cached) $ECHO_C" >&6 15208 echo $ECHO_N "(cached) $ECHO_C" >&6
13317else 15209else
13318 15210
13319 cat >conftest.$ac_ext <<_ACEOF 15211 cat >conftest.$ac_ext <<_ACEOF
13320#line 13320 "configure" 15212#line $LINENO "configure"
13321#include "confdefs.h" 15213/* confdefs.h. */
15214_ACEOF
15215cat confdefs.h >>conftest.$ac_ext
15216cat >>conftest.$ac_ext <<_ACEOF
15217/* end confdefs.h. */
13322 15218
13323#include <pwd.h> 15219#include <pwd.h>
13324 15220
@@ -13331,45 +15227,50 @@ main ()
13331} 15227}
13332_ACEOF 15228_ACEOF
13333rm -f conftest.$ac_objext 15229rm -f conftest.$ac_objext
13334if { (eval echo "$as_me:13334: \"$ac_compile\"") >&5 15230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13335 (eval $ac_compile) 2>&5 15231 (eval $ac_compile) 2>&5
13336 ac_status=$? 15232 ac_status=$?
13337 echo "$as_me:13337: \$? = $ac_status" >&5 15233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13338 (exit $ac_status); } && 15234 (exit $ac_status); } &&
13339 { ac_try='test -s conftest.$ac_objext' 15235 { ac_try='test -s conftest.$ac_objext'
13340 { (eval echo "$as_me:13340: \"$ac_try\"") >&5 15236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13341 (eval $ac_try) 2>&5 15237 (eval $ac_try) 2>&5
13342 ac_status=$? 15238 ac_status=$?
13343 echo "$as_me:13343: \$? = $ac_status" >&5 15239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13344 (exit $ac_status); }; }; then 15240 (exit $ac_status); }; }; then
13345 ac_cv_have_pw_class_in_struct_passwd="yes" 15241 ac_cv_have_pw_class_in_struct_passwd="yes"
13346else 15242else
13347 echo "$as_me: failed program was:" >&5 15243 echo "$as_me: failed program was:" >&5
13348cat conftest.$ac_ext >&5 15244sed 's/^/| /' conftest.$ac_ext >&5
15245
13349 ac_cv_have_pw_class_in_struct_passwd="no" 15246 ac_cv_have_pw_class_in_struct_passwd="no"
13350 15247
13351fi 15248fi
13352rm -f conftest.$ac_objext conftest.$ac_ext 15249rm -f conftest.$ac_objext conftest.$ac_ext
13353 15250
13354fi 15251fi
13355echo "$as_me:13355: result: $ac_cv_have_pw_class_in_struct_passwd" >&5 15252echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
13356echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6 15253echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6
13357if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 15254if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
13358 cat >>confdefs.h <<\EOF 15255 cat >>confdefs.h <<\_ACEOF
13359#define HAVE_PW_CLASS_IN_PASSWD 1 15256#define HAVE_PW_CLASS_IN_PASSWD 1
13360EOF 15257_ACEOF
13361 15258
13362fi 15259fi
13363 15260
13364echo "$as_me:13364: checking for pw_expire field in struct passwd" >&5 15261echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5
13365echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6 15262echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6
13366if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then 15263if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then
13367 echo $ECHO_N "(cached) $ECHO_C" >&6 15264 echo $ECHO_N "(cached) $ECHO_C" >&6
13368else 15265else
13369 15266
13370 cat >conftest.$ac_ext <<_ACEOF 15267 cat >conftest.$ac_ext <<_ACEOF
13371#line 13371 "configure" 15268#line $LINENO "configure"
13372#include "confdefs.h" 15269/* confdefs.h. */
15270_ACEOF
15271cat confdefs.h >>conftest.$ac_ext
15272cat >>conftest.$ac_ext <<_ACEOF
15273/* end confdefs.h. */
13373 15274
13374#include <pwd.h> 15275#include <pwd.h>
13375 15276
@@ -13382,45 +15283,50 @@ main ()
13382} 15283}
13383_ACEOF 15284_ACEOF
13384rm -f conftest.$ac_objext 15285rm -f conftest.$ac_objext
13385if { (eval echo "$as_me:13385: \"$ac_compile\"") >&5 15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13386 (eval $ac_compile) 2>&5 15287 (eval $ac_compile) 2>&5
13387 ac_status=$? 15288 ac_status=$?
13388 echo "$as_me:13388: \$? = $ac_status" >&5 15289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389 (exit $ac_status); } && 15290 (exit $ac_status); } &&
13390 { ac_try='test -s conftest.$ac_objext' 15291 { ac_try='test -s conftest.$ac_objext'
13391 { (eval echo "$as_me:13391: \"$ac_try\"") >&5 15292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13392 (eval $ac_try) 2>&5 15293 (eval $ac_try) 2>&5
13393 ac_status=$? 15294 ac_status=$?
13394 echo "$as_me:13394: \$? = $ac_status" >&5 15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395 (exit $ac_status); }; }; then 15296 (exit $ac_status); }; }; then
13396 ac_cv_have_pw_expire_in_struct_passwd="yes" 15297 ac_cv_have_pw_expire_in_struct_passwd="yes"
13397else 15298else
13398 echo "$as_me: failed program was:" >&5 15299 echo "$as_me: failed program was:" >&5
13399cat conftest.$ac_ext >&5 15300sed 's/^/| /' conftest.$ac_ext >&5
15301
13400 ac_cv_have_pw_expire_in_struct_passwd="no" 15302 ac_cv_have_pw_expire_in_struct_passwd="no"
13401 15303
13402fi 15304fi
13403rm -f conftest.$ac_objext conftest.$ac_ext 15305rm -f conftest.$ac_objext conftest.$ac_ext
13404 15306
13405fi 15307fi
13406echo "$as_me:13406: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5 15308echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
13407echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6 15309echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6
13408if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 15310if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
13409 cat >>confdefs.h <<\EOF 15311 cat >>confdefs.h <<\_ACEOF
13410#define HAVE_PW_EXPIRE_IN_PASSWD 1 15312#define HAVE_PW_EXPIRE_IN_PASSWD 1
13411EOF 15313_ACEOF
13412 15314
13413fi 15315fi
13414 15316
13415echo "$as_me:13415: checking for pw_change field in struct passwd" >&5 15317echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5
13416echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6 15318echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6
13417if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then 15319if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then
13418 echo $ECHO_N "(cached) $ECHO_C" >&6 15320 echo $ECHO_N "(cached) $ECHO_C" >&6
13419else 15321else
13420 15322
13421 cat >conftest.$ac_ext <<_ACEOF 15323 cat >conftest.$ac_ext <<_ACEOF
13422#line 13422 "configure" 15324#line $LINENO "configure"
13423#include "confdefs.h" 15325/* confdefs.h. */
15326_ACEOF
15327cat confdefs.h >>conftest.$ac_ext
15328cat >>conftest.$ac_ext <<_ACEOF
15329/* end confdefs.h. */
13424 15330
13425#include <pwd.h> 15331#include <pwd.h>
13426 15332
@@ -13433,50 +15339,57 @@ main ()
13433} 15339}
13434_ACEOF 15340_ACEOF
13435rm -f conftest.$ac_objext 15341rm -f conftest.$ac_objext
13436if { (eval echo "$as_me:13436: \"$ac_compile\"") >&5 15342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13437 (eval $ac_compile) 2>&5 15343 (eval $ac_compile) 2>&5
13438 ac_status=$? 15344 ac_status=$?
13439 echo "$as_me:13439: \$? = $ac_status" >&5 15345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13440 (exit $ac_status); } && 15346 (exit $ac_status); } &&
13441 { ac_try='test -s conftest.$ac_objext' 15347 { ac_try='test -s conftest.$ac_objext'
13442 { (eval echo "$as_me:13442: \"$ac_try\"") >&5 15348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13443 (eval $ac_try) 2>&5 15349 (eval $ac_try) 2>&5
13444 ac_status=$? 15350 ac_status=$?
13445 echo "$as_me:13445: \$? = $ac_status" >&5 15351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446 (exit $ac_status); }; }; then 15352 (exit $ac_status); }; }; then
13447 ac_cv_have_pw_change_in_struct_passwd="yes" 15353 ac_cv_have_pw_change_in_struct_passwd="yes"
13448else 15354else
13449 echo "$as_me: failed program was:" >&5 15355 echo "$as_me: failed program was:" >&5
13450cat conftest.$ac_ext >&5 15356sed 's/^/| /' conftest.$ac_ext >&5
15357
13451 ac_cv_have_pw_change_in_struct_passwd="no" 15358 ac_cv_have_pw_change_in_struct_passwd="no"
13452 15359
13453fi 15360fi
13454rm -f conftest.$ac_objext conftest.$ac_ext 15361rm -f conftest.$ac_objext conftest.$ac_ext
13455 15362
13456fi 15363fi
13457echo "$as_me:13457: result: $ac_cv_have_pw_change_in_struct_passwd" >&5 15364echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
13458echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6 15365echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6
13459if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 15366if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
13460 cat >>confdefs.h <<\EOF 15367 cat >>confdefs.h <<\_ACEOF
13461#define HAVE_PW_CHANGE_IN_PASSWD 1 15368#define HAVE_PW_CHANGE_IN_PASSWD 1
13462EOF 15369_ACEOF
13463 15370
13464fi 15371fi
13465 15372
13466echo "$as_me:13466: checking for msg_accrights field in struct msghdr" >&5 15373echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
13467echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6 15374echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6
13468if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then 15375if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
13469 echo $ECHO_N "(cached) $ECHO_C" >&6 15376 echo $ECHO_N "(cached) $ECHO_C" >&6
13470else 15377else
13471 15378
13472 if test "$cross_compiling" = yes; then 15379 if test "$cross_compiling" = yes; then
13473 { { echo "$as_me:13473: error: cannot run test program while cross compiling" >&5 15380 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13474echo "$as_me: error: cannot run test program while cross compiling" >&2;} 15381See \`config.log' for more details." >&5
15382echo "$as_me: error: cannot run test program while cross compiling
15383See \`config.log' for more details." >&2;}
13475 { (exit 1); exit 1; }; } 15384 { (exit 1); exit 1; }; }
13476else 15385else
13477 cat >conftest.$ac_ext <<_ACEOF 15386 cat >conftest.$ac_ext <<_ACEOF
13478#line 13478 "configure" 15387#line $LINENO "configure"
13479#include "confdefs.h" 15388/* confdefs.h. */
15389_ACEOF
15390cat confdefs.h >>conftest.$ac_ext
15391cat >>conftest.$ac_ext <<_ACEOF
15392/* end confdefs.h. */
13480 15393
13481#include <sys/types.h> 15394#include <sys/types.h>
13482#include <sys/socket.h> 15395#include <sys/socket.h>
@@ -13492,51 +15405,59 @@ exit(0);
13492 15405
13493_ACEOF 15406_ACEOF
13494rm -f conftest$ac_exeext 15407rm -f conftest$ac_exeext
13495if { (eval echo "$as_me:13495: \"$ac_link\"") >&5 15408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13496 (eval $ac_link) 2>&5 15409 (eval $ac_link) 2>&5
13497 ac_status=$? 15410 ac_status=$?
13498 echo "$as_me:13498: \$? = $ac_status" >&5 15411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13500 { (eval echo "$as_me:13500: \"$ac_try\"") >&5 15413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13501 (eval $ac_try) 2>&5 15414 (eval $ac_try) 2>&5
13502 ac_status=$? 15415 ac_status=$?
13503 echo "$as_me:13503: \$? = $ac_status" >&5 15416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13504 (exit $ac_status); }; }; then 15417 (exit $ac_status); }; }; then
13505 ac_cv_have_accrights_in_msghdr="yes" 15418 ac_cv_have_accrights_in_msghdr="yes"
13506else 15419else
13507 echo "$as_me: program exited with status $ac_status" >&5 15420 echo "$as_me: program exited with status $ac_status" >&5
13508echo "$as_me: failed program was:" >&5 15421echo "$as_me: failed program was:" >&5
13509cat conftest.$ac_ext >&5 15422sed 's/^/| /' conftest.$ac_ext >&5
15423
15424( exit $ac_status )
13510 ac_cv_have_accrights_in_msghdr="no" 15425 ac_cv_have_accrights_in_msghdr="no"
13511 15426
13512fi 15427fi
13513rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15428rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13514fi 15429fi
13515 15430
13516fi 15431fi
13517echo "$as_me:13517: result: $ac_cv_have_accrights_in_msghdr" >&5 15432echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
13518echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6 15433echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6
13519if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 15434if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
13520 cat >>confdefs.h <<\EOF 15435 cat >>confdefs.h <<\_ACEOF
13521#define HAVE_ACCRIGHTS_IN_MSGHDR 1 15436#define HAVE_ACCRIGHTS_IN_MSGHDR 1
13522EOF 15437_ACEOF
13523 15438
13524fi 15439fi
13525 15440
13526echo "$as_me:13526: checking for msg_control field in struct msghdr" >&5 15441echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
13527echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6 15442echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6
13528if test "${ac_cv_have_control_in_msghdr+set}" = set; then 15443if test "${ac_cv_have_control_in_msghdr+set}" = set; then
13529 echo $ECHO_N "(cached) $ECHO_C" >&6 15444 echo $ECHO_N "(cached) $ECHO_C" >&6
13530else 15445else
13531 15446
13532 if test "$cross_compiling" = yes; then 15447 if test "$cross_compiling" = yes; then
13533 { { echo "$as_me:13533: error: cannot run test program while cross compiling" >&5 15448 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13534echo "$as_me: error: cannot run test program while cross compiling" >&2;} 15449See \`config.log' for more details." >&5
15450echo "$as_me: error: cannot run test program while cross compiling
15451See \`config.log' for more details." >&2;}
13535 { (exit 1); exit 1; }; } 15452 { (exit 1); exit 1; }; }
13536else 15453else
13537 cat >conftest.$ac_ext <<_ACEOF 15454 cat >conftest.$ac_ext <<_ACEOF
13538#line 13538 "configure" 15455#line $LINENO "configure"
13539#include "confdefs.h" 15456/* confdefs.h. */
15457_ACEOF
15458cat confdefs.h >>conftest.$ac_ext
15459cat >>conftest.$ac_ext <<_ACEOF
15460/* end confdefs.h. */
13540 15461
13541#include <sys/types.h> 15462#include <sys/types.h>
13542#include <sys/socket.h> 15463#include <sys/socket.h>
@@ -13552,46 +15473,52 @@ exit(0);
13552 15473
13553_ACEOF 15474_ACEOF
13554rm -f conftest$ac_exeext 15475rm -f conftest$ac_exeext
13555if { (eval echo "$as_me:13555: \"$ac_link\"") >&5 15476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13556 (eval $ac_link) 2>&5 15477 (eval $ac_link) 2>&5
13557 ac_status=$? 15478 ac_status=$?
13558 echo "$as_me:13558: \$? = $ac_status" >&5 15479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 15480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13560 { (eval echo "$as_me:13560: \"$ac_try\"") >&5 15481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13561 (eval $ac_try) 2>&5 15482 (eval $ac_try) 2>&5
13562 ac_status=$? 15483 ac_status=$?
13563 echo "$as_me:13563: \$? = $ac_status" >&5 15484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564 (exit $ac_status); }; }; then 15485 (exit $ac_status); }; }; then
13565 ac_cv_have_control_in_msghdr="yes" 15486 ac_cv_have_control_in_msghdr="yes"
13566else 15487else
13567 echo "$as_me: program exited with status $ac_status" >&5 15488 echo "$as_me: program exited with status $ac_status" >&5
13568echo "$as_me: failed program was:" >&5 15489echo "$as_me: failed program was:" >&5
13569cat conftest.$ac_ext >&5 15490sed 's/^/| /' conftest.$ac_ext >&5
15491
15492( exit $ac_status )
13570 ac_cv_have_control_in_msghdr="no" 15493 ac_cv_have_control_in_msghdr="no"
13571 15494
13572fi 15495fi
13573rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15496rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13574fi 15497fi
13575 15498
13576fi 15499fi
13577echo "$as_me:13577: result: $ac_cv_have_control_in_msghdr" >&5 15500echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
13578echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6 15501echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6
13579if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 15502if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
13580 cat >>confdefs.h <<\EOF 15503 cat >>confdefs.h <<\_ACEOF
13581#define HAVE_CONTROL_IN_MSGHDR 1 15504#define HAVE_CONTROL_IN_MSGHDR 1
13582EOF 15505_ACEOF
13583 15506
13584fi 15507fi
13585 15508
13586echo "$as_me:13586: checking if libc defines __progname" >&5 15509echo "$as_me:$LINENO: checking if libc defines __progname" >&5
13587echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6 15510echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6
13588if test "${ac_cv_libc_defines___progname+set}" = set; then 15511if test "${ac_cv_libc_defines___progname+set}" = set; then
13589 echo $ECHO_N "(cached) $ECHO_C" >&6 15512 echo $ECHO_N "(cached) $ECHO_C" >&6
13590else 15513else
13591 15514
13592 cat >conftest.$ac_ext <<_ACEOF 15515 cat >conftest.$ac_ext <<_ACEOF
13593#line 13593 "configure" 15516#line $LINENO "configure"
13594#include "confdefs.h" 15517/* confdefs.h. */
15518_ACEOF
15519cat confdefs.h >>conftest.$ac_ext
15520cat >>conftest.$ac_ext <<_ACEOF
15521/* end confdefs.h. */
13595 15522
13596int 15523int
13597main () 15524main ()
@@ -13602,45 +15529,50 @@ main ()
13602} 15529}
13603_ACEOF 15530_ACEOF
13604rm -f conftest.$ac_objext conftest$ac_exeext 15531rm -f conftest.$ac_objext conftest$ac_exeext
13605if { (eval echo "$as_me:13605: \"$ac_link\"") >&5 15532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13606 (eval $ac_link) 2>&5 15533 (eval $ac_link) 2>&5
13607 ac_status=$? 15534 ac_status=$?
13608 echo "$as_me:13608: \$? = $ac_status" >&5 15535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609 (exit $ac_status); } && 15536 (exit $ac_status); } &&
13610 { ac_try='test -s conftest$ac_exeext' 15537 { ac_try='test -s conftest$ac_exeext'
13611 { (eval echo "$as_me:13611: \"$ac_try\"") >&5 15538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13612 (eval $ac_try) 2>&5 15539 (eval $ac_try) 2>&5
13613 ac_status=$? 15540 ac_status=$?
13614 echo "$as_me:13614: \$? = $ac_status" >&5 15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13615 (exit $ac_status); }; }; then 15542 (exit $ac_status); }; }; then
13616 ac_cv_libc_defines___progname="yes" 15543 ac_cv_libc_defines___progname="yes"
13617else 15544else
13618 echo "$as_me: failed program was:" >&5 15545 echo "$as_me: failed program was:" >&5
13619cat conftest.$ac_ext >&5 15546sed 's/^/| /' conftest.$ac_ext >&5
15547
13620 ac_cv_libc_defines___progname="no" 15548 ac_cv_libc_defines___progname="no"
13621 15549
13622fi 15550fi
13623rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 15551rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13624 15552
13625fi 15553fi
13626echo "$as_me:13626: result: $ac_cv_libc_defines___progname" >&5 15554echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
13627echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6 15555echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6
13628if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 15556if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
13629 cat >>confdefs.h <<\EOF 15557 cat >>confdefs.h <<\_ACEOF
13630#define HAVE___PROGNAME 1 15558#define HAVE___PROGNAME 1
13631EOF 15559_ACEOF
13632 15560
13633fi 15561fi
13634 15562
13635echo "$as_me:13635: checking whether $CC implements __FUNCTION__" >&5 15563echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
13636echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6 15564echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6
13637if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then 15565if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then
13638 echo $ECHO_N "(cached) $ECHO_C" >&6 15566 echo $ECHO_N "(cached) $ECHO_C" >&6
13639else 15567else
13640 15568
13641 cat >conftest.$ac_ext <<_ACEOF 15569 cat >conftest.$ac_ext <<_ACEOF
13642#line 13642 "configure" 15570#line $LINENO "configure"
13643#include "confdefs.h" 15571/* confdefs.h. */
15572_ACEOF
15573cat confdefs.h >>conftest.$ac_ext
15574cat >>conftest.$ac_ext <<_ACEOF
15575/* end confdefs.h. */
13644 15576
13645#include <stdio.h> 15577#include <stdio.h>
13646 15578
@@ -13653,45 +15585,50 @@ main ()
13653} 15585}
13654_ACEOF 15586_ACEOF
13655rm -f conftest.$ac_objext conftest$ac_exeext 15587rm -f conftest.$ac_objext conftest$ac_exeext
13656if { (eval echo "$as_me:13656: \"$ac_link\"") >&5 15588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13657 (eval $ac_link) 2>&5 15589 (eval $ac_link) 2>&5
13658 ac_status=$? 15590 ac_status=$?
13659 echo "$as_me:13659: \$? = $ac_status" >&5 15591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } && 15592 (exit $ac_status); } &&
13661 { ac_try='test -s conftest$ac_exeext' 15593 { ac_try='test -s conftest$ac_exeext'
13662 { (eval echo "$as_me:13662: \"$ac_try\"") >&5 15594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13663 (eval $ac_try) 2>&5 15595 (eval $ac_try) 2>&5
13664 ac_status=$? 15596 ac_status=$?
13665 echo "$as_me:13665: \$? = $ac_status" >&5 15597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666 (exit $ac_status); }; }; then 15598 (exit $ac_status); }; }; then
13667 ac_cv_cc_implements___FUNCTION__="yes" 15599 ac_cv_cc_implements___FUNCTION__="yes"
13668else 15600else
13669 echo "$as_me: failed program was:" >&5 15601 echo "$as_me: failed program was:" >&5
13670cat conftest.$ac_ext >&5 15602sed 's/^/| /' conftest.$ac_ext >&5
15603
13671 ac_cv_cc_implements___FUNCTION__="no" 15604 ac_cv_cc_implements___FUNCTION__="no"
13672 15605
13673fi 15606fi
13674rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 15607rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13675 15608
13676fi 15609fi
13677echo "$as_me:13677: result: $ac_cv_cc_implements___FUNCTION__" >&5 15610echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5
13678echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6 15611echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6
13679if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 15612if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
13680 cat >>confdefs.h <<\EOF 15613 cat >>confdefs.h <<\_ACEOF
13681#define HAVE___FUNCTION__ 1 15614#define HAVE___FUNCTION__ 1
13682EOF 15615_ACEOF
13683 15616
13684fi 15617fi
13685 15618
13686echo "$as_me:13686: checking whether $CC implements __func__" >&5 15619echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
13687echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6 15620echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6
13688if test "${ac_cv_cc_implements___func__+set}" = set; then 15621if test "${ac_cv_cc_implements___func__+set}" = set; then
13689 echo $ECHO_N "(cached) $ECHO_C" >&6 15622 echo $ECHO_N "(cached) $ECHO_C" >&6
13690else 15623else
13691 15624
13692 cat >conftest.$ac_ext <<_ACEOF 15625 cat >conftest.$ac_ext <<_ACEOF
13693#line 13693 "configure" 15626#line $LINENO "configure"
13694#include "confdefs.h" 15627/* confdefs.h. */
15628_ACEOF
15629cat confdefs.h >>conftest.$ac_ext
15630cat >>conftest.$ac_ext <<_ACEOF
15631/* end confdefs.h. */
13695 15632
13696#include <stdio.h> 15633#include <stdio.h>
13697 15634
@@ -13704,45 +15641,50 @@ main ()
13704} 15641}
13705_ACEOF 15642_ACEOF
13706rm -f conftest.$ac_objext conftest$ac_exeext 15643rm -f conftest.$ac_objext conftest$ac_exeext
13707if { (eval echo "$as_me:13707: \"$ac_link\"") >&5 15644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13708 (eval $ac_link) 2>&5 15645 (eval $ac_link) 2>&5
13709 ac_status=$? 15646 ac_status=$?
13710 echo "$as_me:13710: \$? = $ac_status" >&5 15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711 (exit $ac_status); } && 15648 (exit $ac_status); } &&
13712 { ac_try='test -s conftest$ac_exeext' 15649 { ac_try='test -s conftest$ac_exeext'
13713 { (eval echo "$as_me:13713: \"$ac_try\"") >&5 15650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13714 (eval $ac_try) 2>&5 15651 (eval $ac_try) 2>&5
13715 ac_status=$? 15652 ac_status=$?
13716 echo "$as_me:13716: \$? = $ac_status" >&5 15653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13717 (exit $ac_status); }; }; then 15654 (exit $ac_status); }; }; then
13718 ac_cv_cc_implements___func__="yes" 15655 ac_cv_cc_implements___func__="yes"
13719else 15656else
13720 echo "$as_me: failed program was:" >&5 15657 echo "$as_me: failed program was:" >&5
13721cat conftest.$ac_ext >&5 15658sed 's/^/| /' conftest.$ac_ext >&5
15659
13722 ac_cv_cc_implements___func__="no" 15660 ac_cv_cc_implements___func__="no"
13723 15661
13724fi 15662fi
13725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 15663rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13726 15664
13727fi 15665fi
13728echo "$as_me:13728: result: $ac_cv_cc_implements___func__" >&5 15666echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5
13729echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6 15667echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6
13730if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 15668if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
13731 cat >>confdefs.h <<\EOF 15669 cat >>confdefs.h <<\_ACEOF
13732#define HAVE___func__ 1 15670#define HAVE___func__ 1
13733EOF 15671_ACEOF
13734 15672
13735fi 15673fi
13736 15674
13737echo "$as_me:13737: checking whether getopt has optreset support" >&5 15675echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5
13738echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6 15676echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6
13739if test "${ac_cv_have_getopt_optreset+set}" = set; then 15677if test "${ac_cv_have_getopt_optreset+set}" = set; then
13740 echo $ECHO_N "(cached) $ECHO_C" >&6 15678 echo $ECHO_N "(cached) $ECHO_C" >&6
13741else 15679else
13742 15680
13743 cat >conftest.$ac_ext <<_ACEOF 15681 cat >conftest.$ac_ext <<_ACEOF
13744#line 13744 "configure" 15682#line $LINENO "configure"
13745#include "confdefs.h" 15683/* confdefs.h. */
15684_ACEOF
15685cat confdefs.h >>conftest.$ac_ext
15686cat >>conftest.$ac_ext <<_ACEOF
15687/* end confdefs.h. */
13746 15688
13747#include <getopt.h> 15689#include <getopt.h>
13748 15690
@@ -13755,45 +15697,50 @@ main ()
13755} 15697}
13756_ACEOF 15698_ACEOF
13757rm -f conftest.$ac_objext conftest$ac_exeext 15699rm -f conftest.$ac_objext conftest$ac_exeext
13758if { (eval echo "$as_me:13758: \"$ac_link\"") >&5 15700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13759 (eval $ac_link) 2>&5 15701 (eval $ac_link) 2>&5
13760 ac_status=$? 15702 ac_status=$?
13761 echo "$as_me:13761: \$? = $ac_status" >&5 15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762 (exit $ac_status); } && 15704 (exit $ac_status); } &&
13763 { ac_try='test -s conftest$ac_exeext' 15705 { ac_try='test -s conftest$ac_exeext'
13764 { (eval echo "$as_me:13764: \"$ac_try\"") >&5 15706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13765 (eval $ac_try) 2>&5 15707 (eval $ac_try) 2>&5
13766 ac_status=$? 15708 ac_status=$?
13767 echo "$as_me:13767: \$? = $ac_status" >&5 15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13768 (exit $ac_status); }; }; then 15710 (exit $ac_status); }; }; then
13769 ac_cv_have_getopt_optreset="yes" 15711 ac_cv_have_getopt_optreset="yes"
13770else 15712else
13771 echo "$as_me: failed program was:" >&5 15713 echo "$as_me: failed program was:" >&5
13772cat conftest.$ac_ext >&5 15714sed 's/^/| /' conftest.$ac_ext >&5
15715
13773 ac_cv_have_getopt_optreset="no" 15716 ac_cv_have_getopt_optreset="no"
13774 15717
13775fi 15718fi
13776rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 15719rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13777 15720
13778fi 15721fi
13779echo "$as_me:13779: result: $ac_cv_have_getopt_optreset" >&5 15722echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5
13780echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6 15723echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6
13781if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 15724if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
13782 cat >>confdefs.h <<\EOF 15725 cat >>confdefs.h <<\_ACEOF
13783#define HAVE_GETOPT_OPTRESET 1 15726#define HAVE_GETOPT_OPTRESET 1
13784EOF 15727_ACEOF
13785 15728
13786fi 15729fi
13787 15730
13788echo "$as_me:13788: checking if libc defines sys_errlist" >&5 15731echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5
13789echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6 15732echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6
13790if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then 15733if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then
13791 echo $ECHO_N "(cached) $ECHO_C" >&6 15734 echo $ECHO_N "(cached) $ECHO_C" >&6
13792else 15735else
13793 15736
13794 cat >conftest.$ac_ext <<_ACEOF 15737 cat >conftest.$ac_ext <<_ACEOF
13795#line 13795 "configure" 15738#line $LINENO "configure"
13796#include "confdefs.h" 15739/* confdefs.h. */
15740_ACEOF
15741cat confdefs.h >>conftest.$ac_ext
15742cat >>conftest.$ac_ext <<_ACEOF
15743/* end confdefs.h. */
13797 15744
13798int 15745int
13799main () 15746main ()
@@ -13804,45 +15751,51 @@ main ()
13804} 15751}
13805_ACEOF 15752_ACEOF
13806rm -f conftest.$ac_objext conftest$ac_exeext 15753rm -f conftest.$ac_objext conftest$ac_exeext
13807if { (eval echo "$as_me:13807: \"$ac_link\"") >&5 15754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13808 (eval $ac_link) 2>&5 15755 (eval $ac_link) 2>&5
13809 ac_status=$? 15756 ac_status=$?
13810 echo "$as_me:13810: \$? = $ac_status" >&5 15757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13811 (exit $ac_status); } && 15758 (exit $ac_status); } &&
13812 { ac_try='test -s conftest$ac_exeext' 15759 { ac_try='test -s conftest$ac_exeext'
13813 { (eval echo "$as_me:13813: \"$ac_try\"") >&5 15760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13814 (eval $ac_try) 2>&5 15761 (eval $ac_try) 2>&5
13815 ac_status=$? 15762 ac_status=$?
13816 echo "$as_me:13816: \$? = $ac_status" >&5 15763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817 (exit $ac_status); }; }; then 15764 (exit $ac_status); }; }; then
13818 ac_cv_libc_defines_sys_errlist="yes" 15765 ac_cv_libc_defines_sys_errlist="yes"
13819else 15766else
13820 echo "$as_me: failed program was:" >&5 15767 echo "$as_me: failed program was:" >&5
13821cat conftest.$ac_ext >&5 15768sed 's/^/| /' conftest.$ac_ext >&5
15769
13822 ac_cv_libc_defines_sys_errlist="no" 15770 ac_cv_libc_defines_sys_errlist="no"
13823 15771
13824fi 15772fi
13825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 15773rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13826 15774
13827fi 15775fi
13828echo "$as_me:13828: result: $ac_cv_libc_defines_sys_errlist" >&5 15776echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5
13829echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6 15777echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6
13830if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 15778if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
13831 cat >>confdefs.h <<\EOF 15779 cat >>confdefs.h <<\_ACEOF
13832#define HAVE_SYS_ERRLIST 1 15780#define HAVE_SYS_ERRLIST 1
13833EOF 15781_ACEOF
13834 15782
13835fi 15783fi
13836 15784
13837echo "$as_me:13837: checking if libc defines sys_nerr" >&5 15785
15786echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5
13838echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6 15787echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6
13839if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then 15788if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then
13840 echo $ECHO_N "(cached) $ECHO_C" >&6 15789 echo $ECHO_N "(cached) $ECHO_C" >&6
13841else 15790else
13842 15791
13843 cat >conftest.$ac_ext <<_ACEOF 15792 cat >conftest.$ac_ext <<_ACEOF
13844#line 13844 "configure" 15793#line $LINENO "configure"
13845#include "confdefs.h" 15794/* confdefs.h. */
15795_ACEOF
15796cat confdefs.h >>conftest.$ac_ext
15797cat >>conftest.$ac_ext <<_ACEOF
15798/* end confdefs.h. */
13846 15799
13847int 15800int
13848main () 15801main ()
@@ -13853,37 +15806,39 @@ main ()
13853} 15806}
13854_ACEOF 15807_ACEOF
13855rm -f conftest.$ac_objext conftest$ac_exeext 15808rm -f conftest.$ac_objext conftest$ac_exeext
13856if { (eval echo "$as_me:13856: \"$ac_link\"") >&5 15809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13857 (eval $ac_link) 2>&5 15810 (eval $ac_link) 2>&5
13858 ac_status=$? 15811 ac_status=$?
13859 echo "$as_me:13859: \$? = $ac_status" >&5 15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13860 (exit $ac_status); } && 15813 (exit $ac_status); } &&
13861 { ac_try='test -s conftest$ac_exeext' 15814 { ac_try='test -s conftest$ac_exeext'
13862 { (eval echo "$as_me:13862: \"$ac_try\"") >&5 15815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13863 (eval $ac_try) 2>&5 15816 (eval $ac_try) 2>&5
13864 ac_status=$? 15817 ac_status=$?
13865 echo "$as_me:13865: \$? = $ac_status" >&5 15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13866 (exit $ac_status); }; }; then 15819 (exit $ac_status); }; }; then
13867 ac_cv_libc_defines_sys_nerr="yes" 15820 ac_cv_libc_defines_sys_nerr="yes"
13868else 15821else
13869 echo "$as_me: failed program was:" >&5 15822 echo "$as_me: failed program was:" >&5
13870cat conftest.$ac_ext >&5 15823sed 's/^/| /' conftest.$ac_ext >&5
15824
13871 ac_cv_libc_defines_sys_nerr="no" 15825 ac_cv_libc_defines_sys_nerr="no"
13872 15826
13873fi 15827fi
13874rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 15828rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13875 15829
13876fi 15830fi
13877echo "$as_me:13877: result: $ac_cv_libc_defines_sys_nerr" >&5 15831echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5
13878echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6 15832echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6
13879if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 15833if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
13880 cat >>confdefs.h <<\EOF 15834 cat >>confdefs.h <<\_ACEOF
13881#define HAVE_SYS_NERR 1 15835#define HAVE_SYS_NERR 1
13882EOF 15836_ACEOF
13883 15837
13884fi 15838fi
13885 15839
13886SCARD_MSG="no" 15840SCARD_MSG="no"
15841
13887# Check whether user wants sectok support 15842# Check whether user wants sectok support
13888 15843
13889# Check whether --with-sectok or --without-sectok was given. 15844# Check whether --with-sectok or --without-sectok was given.
@@ -13905,23 +15860,70 @@ if test "${with_sectok+set}" = set; then
13905for ac_header in sectok.h 15860for ac_header in sectok.h
13906do 15861do
13907as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 15862as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13908echo "$as_me:13908: checking for $ac_header" >&5 15863if eval "test \"\${$as_ac_Header+set}\" = set"; then
15864 echo "$as_me:$LINENO: checking for $ac_header" >&5
13909echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 15865echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13910if eval "test \"\${$as_ac_Header+set}\" = set"; then 15866if eval "test \"\${$as_ac_Header+set}\" = set"; then
13911 echo $ECHO_N "(cached) $ECHO_C" >&6 15867 echo $ECHO_N "(cached) $ECHO_C" >&6
15868fi
15869echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15870echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13912else 15871else
13913 cat >conftest.$ac_ext <<_ACEOF 15872 # Is the header compilable?
13914#line 13914 "configure" 15873echo "$as_me:$LINENO: checking $ac_header usability" >&5
13915#include "confdefs.h" 15874echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15875cat >conftest.$ac_ext <<_ACEOF
15876#line $LINENO "configure"
15877/* confdefs.h. */
15878_ACEOF
15879cat confdefs.h >>conftest.$ac_ext
15880cat >>conftest.$ac_ext <<_ACEOF
15881/* end confdefs.h. */
15882$ac_includes_default
15883#include <$ac_header>
15884_ACEOF
15885rm -f conftest.$ac_objext
15886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15887 (eval $ac_compile) 2>&5
15888 ac_status=$?
15889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15890 (exit $ac_status); } &&
15891 { ac_try='test -s conftest.$ac_objext'
15892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15893 (eval $ac_try) 2>&5
15894 ac_status=$?
15895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15896 (exit $ac_status); }; }; then
15897 ac_header_compiler=yes
15898else
15899 echo "$as_me: failed program was:" >&5
15900sed 's/^/| /' conftest.$ac_ext >&5
15901
15902ac_header_compiler=no
15903fi
15904rm -f conftest.$ac_objext conftest.$ac_ext
15905echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15906echo "${ECHO_T}$ac_header_compiler" >&6
15907
15908# Is the header present?
15909echo "$as_me:$LINENO: checking $ac_header presence" >&5
15910echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15911cat >conftest.$ac_ext <<_ACEOF
15912#line $LINENO "configure"
15913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
13916#include <$ac_header> 15918#include <$ac_header>
13917_ACEOF 15919_ACEOF
13918if { (eval echo "$as_me:13918: \"$ac_cpp conftest.$ac_ext\"") >&5 15920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13919 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 15921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13920 ac_status=$? 15922 ac_status=$?
13921 egrep -v '^ *\+' conftest.er1 >conftest.err 15923 grep -v '^ *+' conftest.er1 >conftest.err
13922 rm -f conftest.er1 15924 rm -f conftest.er1
13923 cat conftest.err >&5 15925 cat conftest.err >&5
13924 echo "$as_me:13924: \$? = $ac_status" >&5 15926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13925 (exit $ac_status); } >/dev/null; then 15927 (exit $ac_status); } >/dev/null; then
13926 if test -s conftest.err; then 15928 if test -s conftest.err; then
13927 ac_cpp_err=$ac_c_preproc_warn_flag 15929 ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13932,31 +15934,77 @@ else
13932 ac_cpp_err=yes 15934 ac_cpp_err=yes
13933fi 15935fi
13934if test -z "$ac_cpp_err"; then 15936if test -z "$ac_cpp_err"; then
13935 eval "$as_ac_Header=yes" 15937 ac_header_preproc=yes
13936else 15938else
13937 echo "$as_me: failed program was:" >&5 15939 echo "$as_me: failed program was:" >&5
13938 cat conftest.$ac_ext >&5 15940sed 's/^/| /' conftest.$ac_ext >&5
13939 eval "$as_ac_Header=no" 15941
15942 ac_header_preproc=no
13940fi 15943fi
13941rm -f conftest.err conftest.$ac_ext 15944rm -f conftest.err conftest.$ac_ext
15945echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15946echo "${ECHO_T}$ac_header_preproc" >&6
15947
15948# So? What about this header?
15949case $ac_header_compiler:$ac_header_preproc in
15950 yes:no )
15951 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15952echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15953 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15954echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15955 (
15956 cat <<\_ASBOX
15957## ------------------------------------ ##
15958## Report this to bug-autoconf@gnu.org. ##
15959## ------------------------------------ ##
15960_ASBOX
15961 ) |
15962 sed "s/^/$as_me: WARNING: /" >&2
15963 ;;
15964 no:yes )
15965 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15966echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15967 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15968echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15969 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15970echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15971 (
15972 cat <<\_ASBOX
15973## ------------------------------------ ##
15974## Report this to bug-autoconf@gnu.org. ##
15975## ------------------------------------ ##
15976_ASBOX
15977 ) |
15978 sed "s/^/$as_me: WARNING: /" >&2
15979 ;;
15980esac
15981echo "$as_me:$LINENO: checking for $ac_header" >&5
15982echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15983if eval "test \"\${$as_ac_Header+set}\" = set"; then
15984 echo $ECHO_N "(cached) $ECHO_C" >&6
15985else
15986 eval "$as_ac_Header=$ac_header_preproc"
13942fi 15987fi
13943echo "$as_me:13943: result: `eval echo '${'$as_ac_Header'}'`" >&5 15988echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13944echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 15989echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15990
15991fi
13945if test `eval echo '${'$as_ac_Header'}'` = yes; then 15992if test `eval echo '${'$as_ac_Header'}'` = yes; then
13946 cat >>confdefs.h <<EOF 15993 cat >>confdefs.h <<_ACEOF
13947#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 15994#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13948EOF 15995_ACEOF
13949 15996
13950fi 15997fi
15998
13951done 15999done
13952 16000
13953 if test "$ac_cv_header_sectok_h" != yes; then 16001 if test "$ac_cv_header_sectok_h" != yes; then
13954 { { echo "$as_me:13954: error: Can't find sectok.h" >&5 16002 { { echo "$as_me:$LINENO: error: Can't find sectok.h" >&5
13955echo "$as_me: error: Can't find sectok.h" >&2;} 16003echo "$as_me: error: Can't find sectok.h" >&2;}
13956 { (exit 1); exit 1; }; } 16004 { (exit 1); exit 1; }; }
13957 fi 16005 fi
13958 16006
13959echo "$as_me:13959: checking for sectok_open in -lsectok" >&5 16007echo "$as_me:$LINENO: checking for sectok_open in -lsectok" >&5
13960echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6 16008echo $ECHO_N "checking for sectok_open in -lsectok... $ECHO_C" >&6
13961if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then 16009if test "${ac_cv_lib_sectok_sectok_open+set}" = set; then
13962 echo $ECHO_N "(cached) $ECHO_C" >&6 16010 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13964,8 +16012,12 @@ else
13964 ac_check_lib_save_LIBS=$LIBS 16012 ac_check_lib_save_LIBS=$LIBS
13965LIBS="-lsectok $LIBS" 16013LIBS="-lsectok $LIBS"
13966cat >conftest.$ac_ext <<_ACEOF 16014cat >conftest.$ac_ext <<_ACEOF
13967#line 13967 "configure" 16015#line $LINENO "configure"
13968#include "confdefs.h" 16016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
13969 16021
13970/* Override any gcc2 internal prototype to avoid an error. */ 16022/* Override any gcc2 internal prototype to avoid an error. */
13971#ifdef __cplusplus 16023#ifdef __cplusplus
@@ -13983,53 +16035,55 @@ sectok_open ();
13983} 16035}
13984_ACEOF 16036_ACEOF
13985rm -f conftest.$ac_objext conftest$ac_exeext 16037rm -f conftest.$ac_objext conftest$ac_exeext
13986if { (eval echo "$as_me:13986: \"$ac_link\"") >&5 16038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13987 (eval $ac_link) 2>&5 16039 (eval $ac_link) 2>&5
13988 ac_status=$? 16040 ac_status=$?
13989 echo "$as_me:13989: \$? = $ac_status" >&5 16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990 (exit $ac_status); } && 16042 (exit $ac_status); } &&
13991 { ac_try='test -s conftest$ac_exeext' 16043 { ac_try='test -s conftest$ac_exeext'
13992 { (eval echo "$as_me:13992: \"$ac_try\"") >&5 16044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13993 (eval $ac_try) 2>&5 16045 (eval $ac_try) 2>&5
13994 ac_status=$? 16046 ac_status=$?
13995 echo "$as_me:13995: \$? = $ac_status" >&5 16047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13996 (exit $ac_status); }; }; then 16048 (exit $ac_status); }; }; then
13997 ac_cv_lib_sectok_sectok_open=yes 16049 ac_cv_lib_sectok_sectok_open=yes
13998else 16050else
13999 echo "$as_me: failed program was:" >&5 16051 echo "$as_me: failed program was:" >&5
14000cat conftest.$ac_ext >&5 16052sed 's/^/| /' conftest.$ac_ext >&5
16053
14001ac_cv_lib_sectok_sectok_open=no 16054ac_cv_lib_sectok_sectok_open=no
14002fi 16055fi
14003rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14004LIBS=$ac_check_lib_save_LIBS 16057LIBS=$ac_check_lib_save_LIBS
14005fi 16058fi
14006echo "$as_me:14006: result: $ac_cv_lib_sectok_sectok_open" >&5 16059echo "$as_me:$LINENO: result: $ac_cv_lib_sectok_sectok_open" >&5
14007echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6 16060echo "${ECHO_T}$ac_cv_lib_sectok_sectok_open" >&6
14008if test $ac_cv_lib_sectok_sectok_open = yes; then 16061if test $ac_cv_lib_sectok_sectok_open = yes; then
14009 cat >>confdefs.h <<EOF 16062 cat >>confdefs.h <<_ACEOF
14010#define HAVE_LIBSECTOK 1 16063#define HAVE_LIBSECTOK 1
14011EOF 16064_ACEOF
14012 16065
14013 LIBS="-lsectok $LIBS" 16066 LIBS="-lsectok $LIBS"
14014 16067
14015fi 16068fi
14016 16069
14017 if test "$ac_cv_lib_sectok_sectok_open" != yes; then 16070 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
14018 { { echo "$as_me:14018: error: Can't find libsectok" >&5 16071 { { echo "$as_me:$LINENO: error: Can't find libsectok" >&5
14019echo "$as_me: error: Can't find libsectok" >&2;} 16072echo "$as_me: error: Can't find libsectok" >&2;}
14020 { (exit 1); exit 1; }; } 16073 { (exit 1); exit 1; }; }
14021 fi 16074 fi
14022 cat >>confdefs.h <<\EOF 16075 cat >>confdefs.h <<\_ACEOF
14023#define SMARTCARD 1 16076#define SMARTCARD 1
14024EOF 16077_ACEOF
14025 16078
14026 cat >>confdefs.h <<\EOF 16079 cat >>confdefs.h <<\_ACEOF
14027#define USE_SECTOK 1 16080#define USE_SECTOK 1
14028EOF 16081_ACEOF
14029 16082
14030 SCARD_MSG="yes, using sectok" 16083 SCARD_MSG="yes, using sectok"
14031 fi 16084 fi
14032 16085
16086
14033fi; 16087fi;
14034 16088
14035# Check whether user wants OpenSC support 16089# Check whether user wants OpenSC support
@@ -14045,7 +16099,7 @@ if test x$opensc_config_prefix != x ; then
14045 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config 16099 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
14046 # Extract the first word of "opensc-config", so it can be a program name with args. 16100 # Extract the first word of "opensc-config", so it can be a program name with args.
14047set dummy opensc-config; ac_word=$2 16101set dummy opensc-config; ac_word=$2
14048echo "$as_me:14048: checking for $ac_word" >&5 16102echo "$as_me:$LINENO: checking for $ac_word" >&5
14049echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 16103echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14050if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then 16104if test "${ac_cv_path_OPENSC_CONFIG+set}" = set; then
14051 echo $ECHO_N "(cached) $ECHO_C" >&6 16105 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14055,16 +16109,18 @@ else
14055 ac_cv_path_OPENSC_CONFIG="$OPENSC_CONFIG" # Let the user override the test with a path. 16109 ac_cv_path_OPENSC_CONFIG="$OPENSC_CONFIG" # Let the user override the test with a path.
14056 ;; 16110 ;;
14057 *) 16111 *)
14058 ac_save_IFS=$IFS; IFS=$ac_path_separator 16112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14059ac_dummy="$PATH" 16113for as_dir in $PATH
14060for ac_dir in $ac_dummy; do 16114do
14061 IFS=$ac_save_IFS 16115 IFS=$as_save_IFS
14062 test -z "$ac_dir" && ac_dir=. 16116 test -z "$as_dir" && as_dir=.
14063 if $as_executable_p "$ac_dir/$ac_word"; then 16117 for ac_exec_ext in '' $ac_executable_extensions; do
14064 ac_cv_path_OPENSC_CONFIG="$ac_dir/$ac_word" 16118 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14065 echo "$as_me:14065: found $ac_dir/$ac_word" >&5 16119 ac_cv_path_OPENSC_CONFIG="$as_dir/$ac_word$ac_exec_ext"
14066 break 16120 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14067fi 16121 break 2
16122 fi
16123done
14068done 16124done
14069 16125
14070 test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no" 16126 test -z "$ac_cv_path_OPENSC_CONFIG" && ac_cv_path_OPENSC_CONFIG="no"
@@ -14074,10 +16130,10 @@ fi
14074OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG 16130OPENSC_CONFIG=$ac_cv_path_OPENSC_CONFIG
14075 16131
14076if test -n "$OPENSC_CONFIG"; then 16132if test -n "$OPENSC_CONFIG"; then
14077 echo "$as_me:14077: result: $OPENSC_CONFIG" >&5 16133 echo "$as_me:$LINENO: result: $OPENSC_CONFIG" >&5
14078echo "${ECHO_T}$OPENSC_CONFIG" >&6 16134echo "${ECHO_T}$OPENSC_CONFIG" >&6
14079else 16135else
14080 echo "$as_me:14080: result: no" >&5 16136 echo "$as_me:$LINENO: result: no" >&5
14081echo "${ECHO_T}no" >&6 16137echo "${ECHO_T}no" >&6
14082fi 16138fi
14083 16139
@@ -14086,81 +16142,108 @@ fi
14086 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs` 16142 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
14087 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 16143 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
14088 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 16144 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
14089 cat >>confdefs.h <<\EOF 16145 cat >>confdefs.h <<\_ACEOF
14090#define SMARTCARD 1 16146#define SMARTCARD 1
14091EOF 16147_ACEOF
14092 16148
14093 cat >>confdefs.h <<\EOF 16149 cat >>confdefs.h <<\_ACEOF
14094#define USE_OPENSC 1 16150#define USE_OPENSC 1
14095EOF 16151_ACEOF
14096 16152
14097 SCARD_MSG="yes, using OpenSC" 16153 SCARD_MSG="yes, using OpenSC"
14098 fi 16154 fi
14099fi 16155fi
14100 16156
14101# Check whether user wants DNS support 16157# Check whether user wants Kerberos 5 support
14102DNS_MSG="no" 16158KRB5_MSG="no"
14103 16159
14104# Check whether --with-dns or --without-dns was given. 16160# Check whether --with-kerberos5 or --without-kerberos5 was given.
14105if test "${with_dns+set}" = set; then 16161if test "${with_kerberos5+set}" = set; then
14106 withval="$with_dns" 16162 withval="$with_kerberos5"
14107 16163
14108 if test "x$withval" != "xno" ; then 16164 if test "x$withval" != "xno" ; then
14109 DNS_MSG="yes" 16165 if test "x$withval" = "xyes" ; then
14110 cat >>confdefs.h <<\EOF 16166 KRB5ROOT="/usr/local"
14111#define DNS 1 16167 else
14112EOF 16168 KRB5ROOT=${withval}
14113 16169 fi
14114 echo "$as_me:14114: checking for library containing getrrsetbyname" >&5 16170 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
14115echo $ECHO_N "checking for library containing getrrsetbyname... $ECHO_C" >&6 16171 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
14116if test "${ac_cv_search_getrrsetbyname+set}" = set; then 16172 cat >>confdefs.h <<\_ACEOF
14117 echo $ECHO_N "(cached) $ECHO_C" >&6 16173#define KRB5 1
14118else 16174_ACEOF
14119 ac_func_search_save_LIBS=$LIBS
14120ac_cv_search_getrrsetbyname=no
14121cat >conftest.$ac_ext <<_ACEOF
14122#line 14122 "configure"
14123#include "confdefs.h"
14124 16175
14125/* Override any gcc2 internal prototype to avoid an error. */ 16176 KRB5_MSG="yes"
14126#ifdef __cplusplus 16177 echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
14127extern "C" 16178echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6
14128#endif 16179 cat >conftest.$ac_ext <<_ACEOF
14129/* We use char because int might match the return type of a gcc2 16180#line $LINENO "configure"
14130 builtin and then its argument prototype would still apply. */ 16181/* confdefs.h. */
14131char getrrsetbyname (); 16182_ACEOF
16183cat confdefs.h >>conftest.$ac_ext
16184cat >>conftest.$ac_ext <<_ACEOF
16185/* end confdefs.h. */
16186 #include <krb5.h>
14132int 16187int
14133main () 16188main ()
14134{ 16189{
14135getrrsetbyname (); 16190 char *tmp = heimdal_version;
14136 ; 16191 ;
14137 return 0; 16192 return 0;
14138} 16193}
14139_ACEOF 16194_ACEOF
14140rm -f conftest.$ac_objext conftest$ac_exeext 16195rm -f conftest.$ac_objext
14141if { (eval echo "$as_me:14141: \"$ac_link\"") >&5 16196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14142 (eval $ac_link) 2>&5 16197 (eval $ac_compile) 2>&5
14143 ac_status=$? 16198 ac_status=$?
14144 echo "$as_me:14144: \$? = $ac_status" >&5 16199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); } && 16200 (exit $ac_status); } &&
14146 { ac_try='test -s conftest$ac_exeext' 16201 { ac_try='test -s conftest.$ac_objext'
14147 { (eval echo "$as_me:14147: \"$ac_try\"") >&5 16202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14148 (eval $ac_try) 2>&5 16203 (eval $ac_try) 2>&5
14149 ac_status=$? 16204 ac_status=$?
14150 echo "$as_me:14150: \$? = $ac_status" >&5 16205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14151 (exit $ac_status); }; }; then 16206 (exit $ac_status); }; }; then
14152 ac_cv_search_getrrsetbyname="none required" 16207 echo "$as_me:$LINENO: result: yes" >&5
16208echo "${ECHO_T}yes" >&6
16209 cat >>confdefs.h <<\_ACEOF
16210#define HEIMDAL 1
16211_ACEOF
16212
16213 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
16214
14153else 16215else
14154 echo "$as_me: failed program was:" >&5 16216 echo "$as_me: failed program was:" >&5
14155cat conftest.$ac_ext >&5 16217sed 's/^/| /' conftest.$ac_ext >&5
16218
16219 echo "$as_me:$LINENO: result: no" >&5
16220echo "${ECHO_T}no" >&6
16221 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
16222
16223
14156fi 16224fi
14157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16225rm -f conftest.$ac_objext conftest.$ac_ext
14158if test "$ac_cv_search_getrrsetbyname" = no; then 16226 if test ! -z "$need_dash_r" ; then
14159 for ac_lib in resolv; do 16227 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
14160 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 16228 fi
14161 cat >conftest.$ac_ext <<_ACEOF 16229 if test ! -z "$blibpath" ; then
14162#line 14162 "configure" 16230 blibpath="$blibpath:${KRB5ROOT}/lib"
14163#include "confdefs.h" 16231 fi
16232
16233echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
16234echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
16235if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
16236 echo $ECHO_N "(cached) $ECHO_C" >&6
16237else
16238 ac_check_lib_save_LIBS=$LIBS
16239LIBS="-lresolv $LIBS"
16240cat >conftest.$ac_ext <<_ACEOF
16241#line $LINENO "configure"
16242/* confdefs.h. */
16243_ACEOF
16244cat confdefs.h >>conftest.$ac_ext
16245cat >>conftest.$ac_ext <<_ACEOF
16246/* end confdefs.h. */
14164 16247
14165/* Override any gcc2 internal prototype to avoid an error. */ 16248/* Override any gcc2 internal prototype to avoid an error. */
14166#ifdef __cplusplus 16249#ifdef __cplusplus
@@ -14168,484 +16251,364 @@ extern "C"
14168#endif 16251#endif
14169/* We use char because int might match the return type of a gcc2 16252/* We use char because int might match the return type of a gcc2
14170 builtin and then its argument prototype would still apply. */ 16253 builtin and then its argument prototype would still apply. */
14171char getrrsetbyname (); 16254char dn_expand ();
14172int 16255int
14173main () 16256main ()
14174{ 16257{
14175getrrsetbyname (); 16258dn_expand ();
14176 ; 16259 ;
14177 return 0; 16260 return 0;
14178} 16261}
14179_ACEOF 16262_ACEOF
14180rm -f conftest.$ac_objext conftest$ac_exeext 16263rm -f conftest.$ac_objext conftest$ac_exeext
14181if { (eval echo "$as_me:14181: \"$ac_link\"") >&5 16264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14182 (eval $ac_link) 2>&5 16265 (eval $ac_link) 2>&5
14183 ac_status=$? 16266 ac_status=$?
14184 echo "$as_me:14184: \$? = $ac_status" >&5 16267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185 (exit $ac_status); } && 16268 (exit $ac_status); } &&
14186 { ac_try='test -s conftest$ac_exeext' 16269 { ac_try='test -s conftest$ac_exeext'
14187 { (eval echo "$as_me:14187: \"$ac_try\"") >&5 16270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14188 (eval $ac_try) 2>&5 16271 (eval $ac_try) 2>&5
14189 ac_status=$? 16272 ac_status=$?
14190 echo "$as_me:14190: \$? = $ac_status" >&5 16273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14191 (exit $ac_status); }; }; then 16274 (exit $ac_status); }; }; then
14192 ac_cv_search_getrrsetbyname="-l$ac_lib" 16275 ac_cv_lib_resolv_dn_expand=yes
14193break
14194else 16276else
14195 echo "$as_me: failed program was:" >&5 16277 echo "$as_me: failed program was:" >&5
14196cat conftest.$ac_ext >&5 16278sed 's/^/| /' conftest.$ac_ext >&5
16279
16280ac_cv_lib_resolv_dn_expand=no
14197fi 16281fi
14198rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14199 done 16283LIBS=$ac_check_lib_save_LIBS
14200fi 16284fi
14201LIBS=$ac_func_search_save_LIBS 16285echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
16286echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
16287if test $ac_cv_lib_resolv_dn_expand = yes; then
16288 cat >>confdefs.h <<_ACEOF
16289#define HAVE_LIBRESOLV 1
16290_ACEOF
16291
16292 LIBS="-lresolv $LIBS"
16293
14202fi 16294fi
14203echo "$as_me:14203: result: $ac_cv_search_getrrsetbyname" >&5
14204echo "${ECHO_T}$ac_cv_search_getrrsetbyname" >&6
14205if test "$ac_cv_search_getrrsetbyname" != no; then
14206 test "$ac_cv_search_getrrsetbyname" = "none required" || LIBS="$ac_cv_search_getrrsetbyname $LIBS"
14207 cat >>confdefs.h <<\EOF
14208#define HAVE_GETRRSETBYNAME 1
14209EOF
14210 16295
14211else
14212 16296
14213 # Needed by our getrrsetbyname() 16297 KRB5=yes
14214 echo "$as_me:14214: checking for library containing res_query" >&5 16298 fi
14215echo $ECHO_N "checking for library containing res_query... $ECHO_C" >&6 16299
14216if test "${ac_cv_search_res_query+set}" = set; then 16300
16301fi;
16302# Check whether user wants Kerberos 4 support
16303KRB4_MSG="no"
16304
16305# Check whether --with-kerberos4 or --without-kerberos4 was given.
16306if test "${with_kerberos4+set}" = set; then
16307 withval="$with_kerberos4"
16308
16309 if test "x$withval" != "xno" ; then
16310 if test "x$withval" != "xyes" ; then
16311 CPPFLAGS="$CPPFLAGS -I${withval}/include"
16312 LDFLAGS="$LDFLAGS -L${withval}/lib"
16313 if test ! -z "$need_dash_r" ; then
16314 LDFLAGS="$LDFLAGS -R${withval}/lib"
16315 fi
16316 if test ! -z "$blibpath" ; then
16317 blibpath="$blibpath:${withval}/lib"
16318 fi
16319 else
16320 if test -d /usr/include/kerberosIV ; then
16321 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
16322 fi
16323 fi
16324
16325
16326for ac_header in krb.h
16327do
16328as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16329if eval "test \"\${$as_ac_Header+set}\" = set"; then
16330 echo "$as_me:$LINENO: checking for $ac_header" >&5
16331echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16332if eval "test \"\${$as_ac_Header+set}\" = set"; then
14217 echo $ECHO_N "(cached) $ECHO_C" >&6 16333 echo $ECHO_N "(cached) $ECHO_C" >&6
16334fi
16335echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16336echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14218else 16337else
14219 ac_func_search_save_LIBS=$LIBS 16338 # Is the header compilable?
14220ac_cv_search_res_query=no 16339echo "$as_me:$LINENO: checking $ac_header usability" >&5
16340echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14221cat >conftest.$ac_ext <<_ACEOF 16341cat >conftest.$ac_ext <<_ACEOF
14222#line 14222 "configure" 16342#line $LINENO "configure"
14223#include "confdefs.h" 16343/* confdefs.h. */
14224
14225/* Override any gcc2 internal prototype to avoid an error. */
14226#ifdef __cplusplus
14227extern "C"
14228#endif
14229/* We use char because int might match the return type of a gcc2
14230 builtin and then its argument prototype would still apply. */
14231char res_query ();
14232int
14233main ()
14234{
14235res_query ();
14236 ;
14237 return 0;
14238}
14239_ACEOF 16344_ACEOF
14240rm -f conftest.$ac_objext conftest$ac_exeext 16345cat confdefs.h >>conftest.$ac_ext
14241if { (eval echo "$as_me:14241: \"$ac_link\"") >&5 16346cat >>conftest.$ac_ext <<_ACEOF
14242 (eval $ac_link) 2>&5 16347/* end confdefs.h. */
16348$ac_includes_default
16349#include <$ac_header>
16350_ACEOF
16351rm -f conftest.$ac_objext
16352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16353 (eval $ac_compile) 2>&5
14243 ac_status=$? 16354 ac_status=$?
14244 echo "$as_me:14244: \$? = $ac_status" >&5 16355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14245 (exit $ac_status); } && 16356 (exit $ac_status); } &&
14246 { ac_try='test -s conftest$ac_exeext' 16357 { ac_try='test -s conftest.$ac_objext'
14247 { (eval echo "$as_me:14247: \"$ac_try\"") >&5 16358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14248 (eval $ac_try) 2>&5 16359 (eval $ac_try) 2>&5
14249 ac_status=$? 16360 ac_status=$?
14250 echo "$as_me:14250: \$? = $ac_status" >&5 16361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14251 (exit $ac_status); }; }; then 16362 (exit $ac_status); }; }; then
14252 ac_cv_search_res_query="none required" 16363 ac_header_compiler=yes
14253else 16364else
14254 echo "$as_me: failed program was:" >&5 16365 echo "$as_me: failed program was:" >&5
14255cat conftest.$ac_ext >&5 16366sed 's/^/| /' conftest.$ac_ext >&5
16367
16368ac_header_compiler=no
14256fi 16369fi
14257rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16370rm -f conftest.$ac_objext conftest.$ac_ext
14258if test "$ac_cv_search_res_query" = no; then 16371echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14259 for ac_lib in resolv; do 16372echo "${ECHO_T}$ac_header_compiler" >&6
14260 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14261 cat >conftest.$ac_ext <<_ACEOF
14262#line 14262 "configure"
14263#include "confdefs.h"
14264 16373
14265/* Override any gcc2 internal prototype to avoid an error. */ 16374# Is the header present?
14266#ifdef __cplusplus 16375echo "$as_me:$LINENO: checking $ac_header presence" >&5
14267extern "C" 16376echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14268#endif 16377cat >conftest.$ac_ext <<_ACEOF
14269/* We use char because int might match the return type of a gcc2 16378#line $LINENO "configure"
14270 builtin and then its argument prototype would still apply. */ 16379/* confdefs.h. */
14271char res_query ();
14272int
14273main ()
14274{
14275res_query ();
14276 ;
14277 return 0;
14278}
14279_ACEOF 16380_ACEOF
14280rm -f conftest.$ac_objext conftest$ac_exeext 16381cat confdefs.h >>conftest.$ac_ext
14281if { (eval echo "$as_me:14281: \"$ac_link\"") >&5 16382cat >>conftest.$ac_ext <<_ACEOF
14282 (eval $ac_link) 2>&5 16383/* end confdefs.h. */
14283 ac_status=$? 16384#include <$ac_header>
14284 echo "$as_me:14284: \$? = $ac_status" >&5 16385_ACEOF
14285 (exit $ac_status); } && 16386if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14286 { ac_try='test -s conftest$ac_exeext' 16387 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14287 { (eval echo "$as_me:14287: \"$ac_try\"") >&5
14288 (eval $ac_try) 2>&5
14289 ac_status=$? 16388 ac_status=$?
14290 echo "$as_me:14290: \$? = $ac_status" >&5 16389 grep -v '^ *+' conftest.er1 >conftest.err
14291 (exit $ac_status); }; }; then 16390 rm -f conftest.er1
14292 ac_cv_search_res_query="-l$ac_lib" 16391 cat conftest.err >&5
14293break 16392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16393 (exit $ac_status); } >/dev/null; then
16394 if test -s conftest.err; then
16395 ac_cpp_err=$ac_c_preproc_warn_flag
16396 else
16397 ac_cpp_err=
16398 fi
16399else
16400 ac_cpp_err=yes
16401fi
16402if test -z "$ac_cpp_err"; then
16403 ac_header_preproc=yes
14294else 16404else
14295 echo "$as_me: failed program was:" >&5 16405 echo "$as_me: failed program was:" >&5
14296cat conftest.$ac_ext >&5 16406sed 's/^/| /' conftest.$ac_ext >&5
16407
16408 ac_header_preproc=no
14297fi 16409fi
14298rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16410rm -f conftest.err conftest.$ac_ext
14299 done 16411echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16412echo "${ECHO_T}$ac_header_preproc" >&6
16413
16414# So? What about this header?
16415case $ac_header_compiler:$ac_header_preproc in
16416 yes:no )
16417 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16418echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16419 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16420echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16421 (
16422 cat <<\_ASBOX
16423## ------------------------------------ ##
16424## Report this to bug-autoconf@gnu.org. ##
16425## ------------------------------------ ##
16426_ASBOX
16427 ) |
16428 sed "s/^/$as_me: WARNING: /" >&2
16429 ;;
16430 no:yes )
16431 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16432echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16433 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16434echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16435 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16436echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16437 (
16438 cat <<\_ASBOX
16439## ------------------------------------ ##
16440## Report this to bug-autoconf@gnu.org. ##
16441## ------------------------------------ ##
16442_ASBOX
16443 ) |
16444 sed "s/^/$as_me: WARNING: /" >&2
16445 ;;
16446esac
16447echo "$as_me:$LINENO: checking for $ac_header" >&5
16448echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16449if eval "test \"\${$as_ac_Header+set}\" = set"; then
16450 echo $ECHO_N "(cached) $ECHO_C" >&6
16451else
16452 eval "$as_ac_Header=$ac_header_preproc"
14300fi 16453fi
14301LIBS=$ac_func_search_save_LIBS 16454echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16455echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16456
14302fi 16457fi
14303echo "$as_me:14303: result: $ac_cv_search_res_query" >&5 16458if test `eval echo '${'$as_ac_Header'}'` = yes; then
14304echo "${ECHO_T}$ac_cv_search_res_query" >&6 16459 cat >>confdefs.h <<_ACEOF
14305if test "$ac_cv_search_res_query" != no; then 16460#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14306 test "$ac_cv_search_res_query" = "none required" || LIBS="$ac_cv_search_res_query $LIBS" 16461_ACEOF
14307 16462
14308fi 16463fi
14309 16464
14310 echo "$as_me:14310: checking for library containing dn_expand" >&5 16465done
14311echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6 16466
14312if test "${ac_cv_search_dn_expand+set}" = set; then 16467 if test "$ac_cv_header_krb_h" != yes; then
16468 { echo "$as_me:$LINENO: WARNING: Cannot find krb.h, build may fail" >&5
16469echo "$as_me: WARNING: Cannot find krb.h, build may fail" >&2;}
16470 fi
16471
16472echo "$as_me:$LINENO: checking for main in -lkrb" >&5
16473echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
16474if test "${ac_cv_lib_krb_main+set}" = set; then
14313 echo $ECHO_N "(cached) $ECHO_C" >&6 16475 echo $ECHO_N "(cached) $ECHO_C" >&6
14314else 16476else
14315 ac_func_search_save_LIBS=$LIBS 16477 ac_check_lib_save_LIBS=$LIBS
14316ac_cv_search_dn_expand=no 16478LIBS="-lkrb $LIBS"
14317cat >conftest.$ac_ext <<_ACEOF 16479cat >conftest.$ac_ext <<_ACEOF
14318#line 14318 "configure" 16480#line $LINENO "configure"
14319#include "confdefs.h" 16481/* confdefs.h. */
14320
14321/* Override any gcc2 internal prototype to avoid an error. */
14322#ifdef __cplusplus
14323extern "C"
14324#endif
14325/* We use char because int might match the return type of a gcc2
14326 builtin and then its argument prototype would still apply. */
14327char dn_expand ();
14328int
14329main ()
14330{
14331dn_expand ();
14332 ;
14333 return 0;
14334}
14335_ACEOF 16482_ACEOF
14336rm -f conftest.$ac_objext conftest$ac_exeext 16483cat confdefs.h >>conftest.$ac_ext
14337if { (eval echo "$as_me:14337: \"$ac_link\"") >&5 16484cat >>conftest.$ac_ext <<_ACEOF
14338 (eval $ac_link) 2>&5 16485/* end confdefs.h. */
14339 ac_status=$? 16486
14340 echo "$as_me:14340: \$? = $ac_status" >&5
14341 (exit $ac_status); } &&
14342 { ac_try='test -s conftest$ac_exeext'
14343 { (eval echo "$as_me:14343: \"$ac_try\"") >&5
14344 (eval $ac_try) 2>&5
14345 ac_status=$?
14346 echo "$as_me:14346: \$? = $ac_status" >&5
14347 (exit $ac_status); }; }; then
14348 ac_cv_search_dn_expand="none required"
14349else
14350 echo "$as_me: failed program was:" >&5
14351cat conftest.$ac_ext >&5
14352fi
14353rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14354if test "$ac_cv_search_dn_expand" = no; then
14355 for ac_lib in resolv; do
14356 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14357 cat >conftest.$ac_ext <<_ACEOF
14358#line 14358 "configure"
14359#include "confdefs.h"
14360 16487
14361/* Override any gcc2 internal prototype to avoid an error. */
14362#ifdef __cplusplus
14363extern "C"
14364#endif
14365/* We use char because int might match the return type of a gcc2
14366 builtin and then its argument prototype would still apply. */
14367char dn_expand ();
14368int 16488int
14369main () 16489main ()
14370{ 16490{
14371dn_expand (); 16491main ();
14372 ; 16492 ;
14373 return 0; 16493 return 0;
14374} 16494}
14375_ACEOF 16495_ACEOF
14376rm -f conftest.$ac_objext conftest$ac_exeext 16496rm -f conftest.$ac_objext conftest$ac_exeext
14377if { (eval echo "$as_me:14377: \"$ac_link\"") >&5 16497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14378 (eval $ac_link) 2>&5 16498 (eval $ac_link) 2>&5
14379 ac_status=$? 16499 ac_status=$?
14380 echo "$as_me:14380: \$? = $ac_status" >&5 16500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); } && 16501 (exit $ac_status); } &&
14382 { ac_try='test -s conftest$ac_exeext' 16502 { ac_try='test -s conftest$ac_exeext'
14383 { (eval echo "$as_me:14383: \"$ac_try\"") >&5 16503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5 16504 (eval $ac_try) 2>&5
14385 ac_status=$? 16505 ac_status=$?
14386 echo "$as_me:14386: \$? = $ac_status" >&5 16506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }; then 16507 (exit $ac_status); }; }; then
14388 ac_cv_search_dn_expand="-l$ac_lib" 16508 ac_cv_lib_krb_main=yes
14389break
14390else 16509else
14391 echo "$as_me: failed program was:" >&5 16510 echo "$as_me: failed program was:" >&5
14392cat conftest.$ac_ext >&5 16511sed 's/^/| /' conftest.$ac_ext >&5
16512
16513ac_cv_lib_krb_main=no
14393fi 16514fi
14394rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14395 done 16516LIBS=$ac_check_lib_save_LIBS
14396fi
14397LIBS=$ac_func_search_save_LIBS
14398fi 16517fi
14399echo "$as_me:14399: result: $ac_cv_search_dn_expand" >&5 16518echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
14400echo "${ECHO_T}$ac_cv_search_dn_expand" >&6 16519echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
14401if test "$ac_cv_search_dn_expand" != no; then 16520if test $ac_cv_lib_krb_main = yes; then
14402 test "$ac_cv_search_dn_expand" = "none required" || LIBS="$ac_cv_search_dn_expand $LIBS" 16521 cat >>confdefs.h <<_ACEOF
16522#define HAVE_LIBKRB 1
16523_ACEOF
16524
16525 LIBS="-lkrb $LIBS"
14403 16526
14404fi 16527fi
14405 16528
14406for ac_func in _getshort _getlong 16529 if test "$ac_cv_lib_krb_main" != yes; then
14407do 16530
14408as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 16531echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
14409echo "$as_me:14409: checking for $ac_func" >&5 16532echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
14410echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 16533if test "${ac_cv_lib_krb4_main+set}" = set; then
14411if eval "test \"\${$as_ac_var+set}\" = set"; then
14412 echo $ECHO_N "(cached) $ECHO_C" >&6 16534 echo $ECHO_N "(cached) $ECHO_C" >&6
14413else 16535else
14414 cat >conftest.$ac_ext <<_ACEOF 16536 ac_check_lib_save_LIBS=$LIBS
14415#line 14415 "configure" 16537LIBS="-lkrb4 $LIBS"
14416#include "confdefs.h" 16538cat >conftest.$ac_ext <<_ACEOF
14417/* System header to define __stub macros and hopefully few prototypes, 16539#line $LINENO "configure"
14418 which can conflict with char $ac_func (); below. */ 16540/* confdefs.h. */
14419#include <assert.h> 16541_ACEOF
14420/* Override any gcc2 internal prototype to avoid an error. */ 16542cat confdefs.h >>conftest.$ac_ext
14421#ifdef __cplusplus 16543cat >>conftest.$ac_ext <<_ACEOF
14422extern "C" 16544/* end confdefs.h. */
14423#endif 16545
14424/* We use char because int might match the return type of a gcc2
14425 builtin and then its argument prototype would still apply. */
14426char $ac_func ();
14427char (*f) ();
14428 16546
14429int 16547int
14430main () 16548main ()
14431{ 16549{
14432/* The GNU C library defines this for functions which it implements 16550main ();
14433 to always fail with ENOSYS. Some functions are actually named
14434 something starting with __ and the normal name is an alias. */
14435#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14436choke me
14437#else
14438f = $ac_func;
14439#endif
14440
14441 ; 16551 ;
14442 return 0; 16552 return 0;
14443} 16553}
14444_ACEOF 16554_ACEOF
14445rm -f conftest.$ac_objext conftest$ac_exeext 16555rm -f conftest.$ac_objext conftest$ac_exeext
14446if { (eval echo "$as_me:14446: \"$ac_link\"") >&5 16556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14447 (eval $ac_link) 2>&5 16557 (eval $ac_link) 2>&5
14448 ac_status=$? 16558 ac_status=$?
14449 echo "$as_me:14449: \$? = $ac_status" >&5 16559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450 (exit $ac_status); } && 16560 (exit $ac_status); } &&
14451 { ac_try='test -s conftest$ac_exeext' 16561 { ac_try='test -s conftest$ac_exeext'
14452 { (eval echo "$as_me:14452: \"$ac_try\"") >&5 16562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14453 (eval $ac_try) 2>&5 16563 (eval $ac_try) 2>&5
14454 ac_status=$? 16564 ac_status=$?
14455 echo "$as_me:14455: \$? = $ac_status" >&5 16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14456 (exit $ac_status); }; }; then 16566 (exit $ac_status); }; }; then
14457 eval "$as_ac_var=yes" 16567 ac_cv_lib_krb4_main=yes
14458else 16568else
14459 echo "$as_me: failed program was:" >&5 16569 echo "$as_me: failed program was:" >&5
14460cat conftest.$ac_ext >&5 16570sed 's/^/| /' conftest.$ac_ext >&5
14461eval "$as_ac_var=no" 16571
16572ac_cv_lib_krb4_main=no
14462fi 16573fi
14463rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16574rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16575LIBS=$ac_check_lib_save_LIBS
14464fi 16576fi
14465echo "$as_me:14465: result: `eval echo '${'$as_ac_var'}'`" >&5 16577echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
14466echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 16578echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
14467if test `eval echo '${'$as_ac_var'}'` = yes; then 16579if test $ac_cv_lib_krb4_main = yes; then
14468 cat >>confdefs.h <<EOF 16580 cat >>confdefs.h <<_ACEOF
14469#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 16581#define HAVE_LIBKRB4 1
14470EOF
14471
14472fi
14473done
14474
14475 echo "$as_me:14475: checking for HEADER.ad" >&5
14476echo $ECHO_N "checking for HEADER.ad... $ECHO_C" >&6
14477if test "${ac_cv_member_HEADER_ad+set}" = set; then
14478 echo $ECHO_N "(cached) $ECHO_C" >&6
14479else
14480 cat >conftest.$ac_ext <<_ACEOF
14481#line 14481 "configure"
14482#include "confdefs.h"
14483#include <arpa/nameser.h>
14484
14485int
14486main ()
14487{
14488static HEADER ac_aggr;
14489if (ac_aggr.ad)
14490return 0;
14491 ;
14492 return 0;
14493}
14494_ACEOF 16582_ACEOF
14495rm -f conftest.$ac_objext
14496if { (eval echo "$as_me:14496: \"$ac_compile\"") >&5
14497 (eval $ac_compile) 2>&5
14498 ac_status=$?
14499 echo "$as_me:14499: \$? = $ac_status" >&5
14500 (exit $ac_status); } &&
14501 { ac_try='test -s conftest.$ac_objext'
14502 { (eval echo "$as_me:14502: \"$ac_try\"") >&5
14503 (eval $ac_try) 2>&5
14504 ac_status=$?
14505 echo "$as_me:14505: \$? = $ac_status" >&5
14506 (exit $ac_status); }; }; then
14507 ac_cv_member_HEADER_ad=yes
14508else
14509 echo "$as_me: failed program was:" >&5
14510cat conftest.$ac_ext >&5
14511ac_cv_member_HEADER_ad=no
14512fi
14513rm -f conftest.$ac_objext conftest.$ac_ext
14514fi
14515echo "$as_me:14515: result: $ac_cv_member_HEADER_ad" >&5
14516echo "${ECHO_T}$ac_cv_member_HEADER_ad" >&6
14517if test $ac_cv_member_HEADER_ad = yes; then
14518 cat >>confdefs.h <<\EOF
14519#define HAVE_HEADER_AD 1
14520EOF
14521 16583
14522fi 16584 LIBS="-lkrb4 $LIBS"
14523 16585
14524fi 16586fi
14525 16587
14526 fi 16588 if test "$ac_cv_lib_krb4_main" != yes; then
14527 16589 { echo "$as_me:$LINENO: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&5
14528fi; 16590echo "$as_me: WARNING: Cannot find libkrb nor libkrb4, build may fail" >&2;}
14529 16591 else
14530# Check whether user wants Kerberos 5 support 16592 KLIBS="-lkrb4"
14531KRB5_MSG="no" 16593 fi
14532 16594 else
14533# Check whether --with-kerberos5 or --without-kerberos5 was given. 16595 KLIBS="-lkrb"
14534if test "${with_kerberos5+set}" = set; then 16596 fi
14535 withval="$with_kerberos5"
14536
14537 if test "x$withval" != "xno" ; then
14538 if test "x$withval" = "xyes" ; then
14539 KRB5ROOT="/usr/local"
14540 else
14541 KRB5ROOT=${withval}
14542 fi
14543 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
14544 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
14545 cat >>confdefs.h <<\EOF
14546#define KRB5 1
14547EOF
14548
14549 KRB5_MSG="yes"
14550 echo "$as_me:14550: checking whether we are using Heimdal" >&5
14551echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6
14552 cat >conftest.$ac_ext <<_ACEOF
14553#line 14553 "configure"
14554#include "confdefs.h"
14555 #include <krb5.h>
14556int
14557main ()
14558{
14559 char *tmp = heimdal_version;
14560 ;
14561 return 0;
14562}
14563_ACEOF
14564rm -f conftest.$ac_objext
14565if { (eval echo "$as_me:14565: \"$ac_compile\"") >&5
14566 (eval $ac_compile) 2>&5
14567 ac_status=$?
14568 echo "$as_me:14568: \$? = $ac_status" >&5
14569 (exit $ac_status); } &&
14570 { ac_try='test -s conftest.$ac_objext'
14571 { (eval echo "$as_me:14571: \"$ac_try\"") >&5
14572 (eval $ac_try) 2>&5
14573 ac_status=$?
14574 echo "$as_me:14574: \$? = $ac_status" >&5
14575 (exit $ac_status); }; }; then
14576 echo "$as_me:14576: result: yes" >&5
14577echo "${ECHO_T}yes" >&6
14578 cat >>confdefs.h <<\EOF
14579#define HEIMDAL 1
14580EOF
14581
14582 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
14583
14584else
14585 echo "$as_me: failed program was:" >&5
14586cat conftest.$ac_ext >&5
14587 echo "$as_me:14587: result: no" >&5
14588echo "${ECHO_T}no" >&6
14589 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
14590 16597
14591fi 16598echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
14592rm -f conftest.$ac_objext conftest.$ac_ext 16599echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6
14593 if test ! -z "$need_dash_r" ; then 16600if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
14594 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
14595 fi
14596 if test ! -z "$blibpath" ; then
14597 blibpath="$blibpath:${KRB5ROOT}/lib"
14598 fi
14599 echo "$as_me:14599: checking for library containing dn_expand" >&5
14600echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6
14601if test "${ac_cv_search_dn_expand+set}" = set; then
14602 echo $ECHO_N "(cached) $ECHO_C" >&6 16601 echo $ECHO_N "(cached) $ECHO_C" >&6
14603else 16602else
14604 ac_func_search_save_LIBS=$LIBS 16603 ac_check_lib_save_LIBS=$LIBS
14605ac_cv_search_dn_expand=no 16604LIBS="-ldes $LIBS"
14606cat >conftest.$ac_ext <<_ACEOF 16605cat >conftest.$ac_ext <<_ACEOF
14607#line 14607 "configure" 16606#line $LINENO "configure"
14608#include "confdefs.h" 16607/* confdefs.h. */
14609
14610/* Override any gcc2 internal prototype to avoid an error. */
14611#ifdef __cplusplus
14612extern "C"
14613#endif
14614/* We use char because int might match the return type of a gcc2
14615 builtin and then its argument prototype would still apply. */
14616char dn_expand ();
14617int
14618main ()
14619{
14620dn_expand ();
14621 ;
14622 return 0;
14623}
14624_ACEOF 16608_ACEOF
14625rm -f conftest.$ac_objext conftest$ac_exeext 16609cat confdefs.h >>conftest.$ac_ext
14626if { (eval echo "$as_me:14626: \"$ac_link\"") >&5 16610cat >>conftest.$ac_ext <<_ACEOF
14627 (eval $ac_link) 2>&5 16611/* end confdefs.h. */
14628 ac_status=$?
14629 echo "$as_me:14629: \$? = $ac_status" >&5
14630 (exit $ac_status); } &&
14631 { ac_try='test -s conftest$ac_exeext'
14632 { (eval echo "$as_me:14632: \"$ac_try\"") >&5
14633 (eval $ac_try) 2>&5
14634 ac_status=$?
14635 echo "$as_me:14635: \$? = $ac_status" >&5
14636 (exit $ac_status); }; }; then
14637 ac_cv_search_dn_expand="none required"
14638else
14639 echo "$as_me: failed program was:" >&5
14640cat conftest.$ac_ext >&5
14641fi
14642rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14643if test "$ac_cv_search_dn_expand" = no; then
14644 for ac_lib in resolv; do
14645 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14646 cat >conftest.$ac_ext <<_ACEOF
14647#line 14647 "configure"
14648#include "confdefs.h"
14649 16612
14650/* Override any gcc2 internal prototype to avoid an error. */ 16613/* Override any gcc2 internal prototype to avoid an error. */
14651#ifdef __cplusplus 16614#ifdef __cplusplus
@@ -14653,55 +16616,64 @@ extern "C"
14653#endif 16616#endif
14654/* We use char because int might match the return type of a gcc2 16617/* We use char because int might match the return type of a gcc2
14655 builtin and then its argument prototype would still apply. */ 16618 builtin and then its argument prototype would still apply. */
14656char dn_expand (); 16619char des_cbc_encrypt ();
14657int 16620int
14658main () 16621main ()
14659{ 16622{
14660dn_expand (); 16623des_cbc_encrypt ();
14661 ; 16624 ;
14662 return 0; 16625 return 0;
14663} 16626}
14664_ACEOF 16627_ACEOF
14665rm -f conftest.$ac_objext conftest$ac_exeext 16628rm -f conftest.$ac_objext conftest$ac_exeext
14666if { (eval echo "$as_me:14666: \"$ac_link\"") >&5 16629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14667 (eval $ac_link) 2>&5 16630 (eval $ac_link) 2>&5
14668 ac_status=$? 16631 ac_status=$?
14669 echo "$as_me:14669: \$? = $ac_status" >&5 16632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14670 (exit $ac_status); } && 16633 (exit $ac_status); } &&
14671 { ac_try='test -s conftest$ac_exeext' 16634 { ac_try='test -s conftest$ac_exeext'
14672 { (eval echo "$as_me:14672: \"$ac_try\"") >&5 16635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14673 (eval $ac_try) 2>&5 16636 (eval $ac_try) 2>&5
14674 ac_status=$? 16637 ac_status=$?
14675 echo "$as_me:14675: \$? = $ac_status" >&5 16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14676 (exit $ac_status); }; }; then 16639 (exit $ac_status); }; }; then
14677 ac_cv_search_dn_expand="-l$ac_lib" 16640 ac_cv_lib_des_des_cbc_encrypt=yes
14678break
14679else 16641else
14680 echo "$as_me: failed program was:" >&5 16642 echo "$as_me: failed program was:" >&5
14681cat conftest.$ac_ext >&5 16643sed 's/^/| /' conftest.$ac_ext >&5
16644
16645ac_cv_lib_des_des_cbc_encrypt=no
14682fi 16646fi
14683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16647rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14684 done 16648LIBS=$ac_check_lib_save_LIBS
14685fi
14686LIBS=$ac_func_search_save_LIBS
14687fi 16649fi
14688echo "$as_me:14688: result: $ac_cv_search_dn_expand" >&5 16650echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14689echo "${ECHO_T}$ac_cv_search_dn_expand" >&6 16651echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6
14690if test "$ac_cv_search_dn_expand" != no; then 16652if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
14691 test "$ac_cv_search_dn_expand" = "none required" || LIBS="$ac_cv_search_dn_expand $LIBS" 16653 cat >>confdefs.h <<_ACEOF
16654#define HAVE_LIBDES 1
16655_ACEOF
16656
16657 LIBS="-ldes $LIBS"
14692 16658
14693fi 16659fi
14694 16660
14695 echo "$as_me:14695: checking for gss_init_sec_context in -lgssapi" >&5 16661 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
14696echo $ECHO_N "checking for gss_init_sec_context in -lgssapi... $ECHO_C" >&6 16662
14697if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then 16663echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
16664echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6
16665if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
14698 echo $ECHO_N "(cached) $ECHO_C" >&6 16666 echo $ECHO_N "(cached) $ECHO_C" >&6
14699else 16667else
14700 ac_check_lib_save_LIBS=$LIBS 16668 ac_check_lib_save_LIBS=$LIBS
14701LIBS="-lgssapi $K5LIBS $LIBS" 16669LIBS="-ldes425 $LIBS"
14702cat >conftest.$ac_ext <<_ACEOF 16670cat >conftest.$ac_ext <<_ACEOF
14703#line 14703 "configure" 16671#line $LINENO "configure"
14704#include "confdefs.h" 16672/* confdefs.h. */
16673_ACEOF
16674cat confdefs.h >>conftest.$ac_ext
16675cat >>conftest.$ac_ext <<_ACEOF
16676/* end confdefs.h. */
14705 16677
14706/* Override any gcc2 internal prototype to avoid an error. */ 16678/* Override any gcc2 internal prototype to avoid an error. */
14707#ifdef __cplusplus 16679#ifdef __cplusplus
@@ -14709,55 +16681,72 @@ extern "C"
14709#endif 16681#endif
14710/* We use char because int might match the return type of a gcc2 16682/* We use char because int might match the return type of a gcc2
14711 builtin and then its argument prototype would still apply. */ 16683 builtin and then its argument prototype would still apply. */
14712char gss_init_sec_context (); 16684char des_cbc_encrypt ();
14713int 16685int
14714main () 16686main ()
14715{ 16687{
14716gss_init_sec_context (); 16688des_cbc_encrypt ();
14717 ; 16689 ;
14718 return 0; 16690 return 0;
14719} 16691}
14720_ACEOF 16692_ACEOF
14721rm -f conftest.$ac_objext conftest$ac_exeext 16693rm -f conftest.$ac_objext conftest$ac_exeext
14722if { (eval echo "$as_me:14722: \"$ac_link\"") >&5 16694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14723 (eval $ac_link) 2>&5 16695 (eval $ac_link) 2>&5
14724 ac_status=$? 16696 ac_status=$?
14725 echo "$as_me:14725: \$? = $ac_status" >&5 16697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); } && 16698 (exit $ac_status); } &&
14727 { ac_try='test -s conftest$ac_exeext' 16699 { ac_try='test -s conftest$ac_exeext'
14728 { (eval echo "$as_me:14728: \"$ac_try\"") >&5 16700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14729 (eval $ac_try) 2>&5 16701 (eval $ac_try) 2>&5
14730 ac_status=$? 16702 ac_status=$?
14731 echo "$as_me:14731: \$? = $ac_status" >&5 16703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14732 (exit $ac_status); }; }; then 16704 (exit $ac_status); }; }; then
14733 ac_cv_lib_gssapi_gss_init_sec_context=yes 16705 ac_cv_lib_des425_des_cbc_encrypt=yes
14734else 16706else
14735 echo "$as_me: failed program was:" >&5 16707 echo "$as_me: failed program was:" >&5
14736cat conftest.$ac_ext >&5 16708sed 's/^/| /' conftest.$ac_ext >&5
14737ac_cv_lib_gssapi_gss_init_sec_context=no 16709
16710ac_cv_lib_des425_des_cbc_encrypt=no
14738fi 16711fi
14739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14740LIBS=$ac_check_lib_save_LIBS 16713LIBS=$ac_check_lib_save_LIBS
14741fi 16714fi
14742echo "$as_me:14742: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5 16715echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14743echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6 16716echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6
14744if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then 16717if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
14745 cat >>confdefs.h <<\EOF 16718 cat >>confdefs.h <<_ACEOF
14746#define GSSAPI 1 16719#define HAVE_LIBDES425 1
14747EOF 16720_ACEOF
14748 16721
14749 K5LIBS="-lgssapi $K5LIBS" 16722 LIBS="-ldes425 $LIBS"
14750else 16723
14751 echo "$as_me:14751: checking for gss_init_sec_context in -lgssapi_krb5" >&5 16724fi
14752echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6 16725
14753if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then 16726 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
16727 { echo "$as_me:$LINENO: WARNING: Cannot find libdes nor libdes425, build may fail" >&5
16728echo "$as_me: WARNING: Cannot find libdes nor libdes425, build may fail" >&2;}
16729 else
16730 KLIBS="-ldes425"
16731 fi
16732 else
16733 KLIBS="-ldes"
16734 fi
16735
16736echo "$as_me:$LINENO: checking for dn_expand in -lresolv" >&5
16737echo $ECHO_N "checking for dn_expand in -lresolv... $ECHO_C" >&6
16738if test "${ac_cv_lib_resolv_dn_expand+set}" = set; then
14754 echo $ECHO_N "(cached) $ECHO_C" >&6 16739 echo $ECHO_N "(cached) $ECHO_C" >&6
14755else 16740else
14756 ac_check_lib_save_LIBS=$LIBS 16741 ac_check_lib_save_LIBS=$LIBS
14757LIBS="-lgssapi_krb5 $K5LIBS $LIBS" 16742LIBS="-lresolv $LIBS"
14758cat >conftest.$ac_ext <<_ACEOF 16743cat >conftest.$ac_ext <<_ACEOF
14759#line 14759 "configure" 16744#line $LINENO "configure"
14760#include "confdefs.h" 16745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
14761 16750
14762/* Override any gcc2 internal prototype to avoid an error. */ 16751/* Override any gcc2 internal prototype to avoid an error. */
14763#ifdef __cplusplus 16752#ifdef __cplusplus
@@ -14765,198 +16754,92 @@ extern "C"
14765#endif 16754#endif
14766/* We use char because int might match the return type of a gcc2 16755/* We use char because int might match the return type of a gcc2
14767 builtin and then its argument prototype would still apply. */ 16756 builtin and then its argument prototype would still apply. */
14768char gss_init_sec_context (); 16757char dn_expand ();
14769int 16758int
14770main () 16759main ()
14771{ 16760{
14772gss_init_sec_context (); 16761dn_expand ();
14773 ; 16762 ;
14774 return 0; 16763 return 0;
14775} 16764}
14776_ACEOF 16765_ACEOF
14777rm -f conftest.$ac_objext conftest$ac_exeext 16766rm -f conftest.$ac_objext conftest$ac_exeext
14778if { (eval echo "$as_me:14778: \"$ac_link\"") >&5 16767if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14779 (eval $ac_link) 2>&5 16768 (eval $ac_link) 2>&5
14780 ac_status=$? 16769 ac_status=$?
14781 echo "$as_me:14781: \$? = $ac_status" >&5 16770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782 (exit $ac_status); } && 16771 (exit $ac_status); } &&
14783 { ac_try='test -s conftest$ac_exeext' 16772 { ac_try='test -s conftest$ac_exeext'
14784 { (eval echo "$as_me:14784: \"$ac_try\"") >&5 16773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14785 (eval $ac_try) 2>&5 16774 (eval $ac_try) 2>&5
14786 ac_status=$? 16775 ac_status=$?
14787 echo "$as_me:14787: \$? = $ac_status" >&5 16776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14788 (exit $ac_status); }; }; then 16777 (exit $ac_status); }; }; then
14789 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes 16778 ac_cv_lib_resolv_dn_expand=yes
14790else 16779else
14791 echo "$as_me: failed program was:" >&5 16780 echo "$as_me: failed program was:" >&5
14792cat conftest.$ac_ext >&5 16781sed 's/^/| /' conftest.$ac_ext >&5
14793ac_cv_lib_gssapi_krb5_gss_init_sec_context=no 16782
16783ac_cv_lib_resolv_dn_expand=no
14794fi 16784fi
14795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 16785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14796LIBS=$ac_check_lib_save_LIBS 16786LIBS=$ac_check_lib_save_LIBS
14797fi 16787fi
14798echo "$as_me:14798: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5 16788echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_dn_expand" >&5
14799echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6 16789echo "${ECHO_T}$ac_cv_lib_resolv_dn_expand" >&6
14800if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then 16790if test $ac_cv_lib_resolv_dn_expand = yes; then
14801 cat >>confdefs.h <<\EOF 16791 cat >>confdefs.h <<_ACEOF
14802#define GSSAPI 1 16792#define HAVE_LIBRESOLV 1
14803EOF 16793_ACEOF
14804 16794
14805 K5LIBS="-lgssapi_krb5 $K5LIBS" 16795 LIBS="-lresolv $LIBS"
14806else
14807 { echo "$as_me:14807: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
14808echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
14809fi
14810 16796
14811fi 16797fi
14812 16798
14813 echo "$as_me:14813: checking for gssapi.h" >&5 16799 KRB4=yes
14814echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6 16800 KRB4_MSG="yes"
14815if test "${ac_cv_header_gssapi_h+set}" = set; then 16801 cat >>confdefs.h <<\_ACEOF
14816 echo $ECHO_N "(cached) $ECHO_C" >&6 16802#define KRB4 1
14817else
14818 cat >conftest.$ac_ext <<_ACEOF
14819#line 14819 "configure"
14820#include "confdefs.h"
14821#include <gssapi.h>
14822_ACEOF 16803_ACEOF
14823if { (eval echo "$as_me:14823: \"$ac_cpp conftest.$ac_ext\"") >&5
14824 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14825 ac_status=$?
14826 egrep -v '^ *\+' conftest.er1 >conftest.err
14827 rm -f conftest.er1
14828 cat conftest.err >&5
14829 echo "$as_me:14829: \$? = $ac_status" >&5
14830 (exit $ac_status); } >/dev/null; then
14831 if test -s conftest.err; then
14832 ac_cpp_err=$ac_c_preproc_warn_flag
14833 else
14834 ac_cpp_err=
14835 fi
14836else
14837 ac_cpp_err=yes
14838fi
14839if test -z "$ac_cpp_err"; then
14840 ac_cv_header_gssapi_h=yes
14841else
14842 echo "$as_me: failed program was:" >&5
14843 cat conftest.$ac_ext >&5
14844 ac_cv_header_gssapi_h=no
14845fi
14846rm -f conftest.err conftest.$ac_ext
14847fi
14848echo "$as_me:14848: result: $ac_cv_header_gssapi_h" >&5
14849echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6
14850if test $ac_cv_header_gssapi_h = yes; then
14851 :
14852else
14853 unset ac_cv_header_gssapi_h
14854 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
14855 16804
14856for ac_header in gssapi.h 16805 fi
14857do
14858as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14859echo "$as_me:14859: checking for $ac_header" >&5
14860echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14861if eval "test \"\${$as_ac_Header+set}\" = set"; then
14862 echo $ECHO_N "(cached) $ECHO_C" >&6
14863else
14864 cat >conftest.$ac_ext <<_ACEOF
14865#line 14865 "configure"
14866#include "confdefs.h"
14867#include <$ac_header>
14868_ACEOF
14869if { (eval echo "$as_me:14869: \"$ac_cpp conftest.$ac_ext\"") >&5
14870 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14871 ac_status=$?
14872 egrep -v '^ *\+' conftest.er1 >conftest.err
14873 rm -f conftest.er1
14874 cat conftest.err >&5
14875 echo "$as_me:14875: \$? = $ac_status" >&5
14876 (exit $ac_status); } >/dev/null; then
14877 if test -s conftest.err; then
14878 ac_cpp_err=$ac_c_preproc_warn_flag
14879 else
14880 ac_cpp_err=
14881 fi
14882else
14883 ac_cpp_err=yes
14884fi
14885if test -z "$ac_cpp_err"; then
14886 eval "$as_ac_Header=yes"
14887else
14888 echo "$as_me: failed program was:" >&5
14889 cat conftest.$ac_ext >&5
14890 eval "$as_ac_Header=no"
14891fi
14892rm -f conftest.err conftest.$ac_ext
14893fi
14894echo "$as_me:14894: result: `eval echo '${'$as_ac_Header'}'`" >&5
14895echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14896if test `eval echo '${'$as_ac_Header'}'` = yes; then
14897 cat >>confdefs.h <<EOF
14898#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14899EOF
14900 16806
14901else
14902 { echo "$as_me:14902: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
14903echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
14904 16807
14905fi 16808fi;
14906done
14907 16809
14908fi 16810# Check whether user wants AFS support
16811AFS_MSG="no"
14909 16812
14910 oldCPP="$CPPFLAGS" 16813# Check whether --with-afs or --without-afs was given.
14911 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 16814if test "${with_afs+set}" = set; then
14912 echo "$as_me:14912: checking for gssapi_krb5.h" >&5 16815 withval="$with_afs"
14913echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6 16816
14914if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 16817 if test "x$withval" != "xno" ; then
14915 echo $ECHO_N "(cached) $ECHO_C" >&6 16818
14916else 16819 if test "x$withval" != "xyes" ; then
14917 cat >conftest.$ac_ext <<_ACEOF 16820 CPPFLAGS="$CPPFLAGS -I${withval}/include"
14918#line 14918 "configure" 16821 LDFLAGS="$LDFLAGS -L${withval}/lib"
14919#include "confdefs.h" 16822 fi
14920#include <gssapi_krb5.h> 16823
16824 if test -z "$KRB4" ; then
16825 { echo "$as_me:$LINENO: WARNING: AFS requires Kerberos IV support, build may fail" >&5
16826echo "$as_me: WARNING: AFS requires Kerberos IV support, build may fail" >&2;}
16827 fi
16828
16829 LIBS="-lkafs $LIBS"
16830 if test ! -z "$AFS_LIBS" ; then
16831 LIBS="$LIBS $AFS_LIBS"
16832 fi
16833 cat >>confdefs.h <<\_ACEOF
16834#define AFS 1
14921_ACEOF 16835_ACEOF
14922if { (eval echo "$as_me:14922: \"$ac_cpp conftest.$ac_ext\"") >&5
14923 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14924 ac_status=$?
14925 egrep -v '^ *\+' conftest.er1 >conftest.err
14926 rm -f conftest.er1
14927 cat conftest.err >&5
14928 echo "$as_me:14928: \$? = $ac_status" >&5
14929 (exit $ac_status); } >/dev/null; then
14930 if test -s conftest.err; then
14931 ac_cpp_err=$ac_c_preproc_warn_flag
14932 else
14933 ac_cpp_err=
14934 fi
14935else
14936 ac_cpp_err=yes
14937fi
14938if test -z "$ac_cpp_err"; then
14939 ac_cv_header_gssapi_krb5_h=yes
14940else
14941 echo "$as_me: failed program was:" >&5
14942 cat conftest.$ac_ext >&5
14943 ac_cv_header_gssapi_krb5_h=no
14944fi
14945rm -f conftest.err conftest.$ac_ext
14946fi
14947echo "$as_me:14947: result: $ac_cv_header_gssapi_krb5_h" >&5
14948echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6
14949if test $ac_cv_header_gssapi_krb5_h = yes; then
14950 :
14951else
14952 CPPFLAGS="$oldCPP"
14953fi
14954 16836
14955 KRB5=yes 16837 AFS_MSG="yes"
14956 fi 16838 fi
16839
14957 16840
14958fi; 16841fi;
14959LIBS="$LIBS $K5LIBS" 16842LIBS="$LIBS $KLIBS $K5LIBS"
14960 16843
14961# Looking for programs, paths and files 16844# Looking for programs, paths and files
14962 16845
@@ -14970,8 +16853,11 @@ if test "${with_privsep_path+set}" = set; then
14970 PRIVSEP_PATH=$withval 16853 PRIVSEP_PATH=$withval
14971 fi 16854 fi
14972 16855
16856
14973fi; 16857fi;
14974 16858
16859
16860
14975# Check whether --with-xauth or --without-xauth was given. 16861# Check whether --with-xauth or --without-xauth was given.
14976if test "${with_xauth+set}" = set; then 16862if test "${with_xauth+set}" = set; then
14977 withval="$with_xauth" 16863 withval="$with_xauth"
@@ -14989,7 +16875,7 @@ else
14989 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" 16875 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
14990 # Extract the first word of "xauth", so it can be a program name with args. 16876 # Extract the first word of "xauth", so it can be a program name with args.
14991set dummy xauth; ac_word=$2 16877set dummy xauth; ac_word=$2
14992echo "$as_me:14992: checking for $ac_word" >&5 16878echo "$as_me:$LINENO: checking for $ac_word" >&5
14993echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 16879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14994if test "${ac_cv_path_xauth_path+set}" = set; then 16880if test "${ac_cv_path_xauth_path+set}" = set; then
14995 echo $ECHO_N "(cached) $ECHO_C" >&6 16881 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14999,16 +16885,18 @@ else
14999 ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path. 16885 ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
15000 ;; 16886 ;;
15001 *) 16887 *)
15002 ac_save_IFS=$IFS; IFS=$ac_path_separator 16888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15003ac_dummy="$TestPath" 16889for as_dir in $TestPath
15004for ac_dir in $ac_dummy; do 16890do
15005 IFS=$ac_save_IFS 16891 IFS=$as_save_IFS
15006 test -z "$ac_dir" && ac_dir=. 16892 test -z "$as_dir" && as_dir=.
15007 if $as_executable_p "$ac_dir/$ac_word"; then 16893 for ac_exec_ext in '' $ac_executable_extensions; do
15008 ac_cv_path_xauth_path="$ac_dir/$ac_word" 16894 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15009 echo "$as_me:15009: found $ac_dir/$ac_word" >&5 16895 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
15010 break 16896 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15011fi 16897 break 2
16898 fi
16899done
15012done 16900done
15013 16901
15014 ;; 16902 ;;
@@ -15017,10 +16905,10 @@ fi
15017xauth_path=$ac_cv_path_xauth_path 16905xauth_path=$ac_cv_path_xauth_path
15018 16906
15019if test -n "$xauth_path"; then 16907if test -n "$xauth_path"; then
15020 echo "$as_me:15020: result: $xauth_path" >&5 16908 echo "$as_me:$LINENO: result: $xauth_path" >&5
15021echo "${ECHO_T}$xauth_path" >&6 16909echo "${ECHO_T}$xauth_path" >&6
15022else 16910else
15023 echo "$as_me:15023: result: no" >&5 16911 echo "$as_me:$LINENO: result: no" >&5
15024echo "${ECHO_T}no" >&6 16912echo "${ECHO_T}no" >&6
15025fi 16913fi
15026 16914
@@ -15028,6 +16916,7 @@ fi
15028 xauth_path="/usr/openwin/bin/xauth" 16916 xauth_path="/usr/openwin/bin/xauth"
15029 fi 16917 fi
15030 16918
16919
15031fi; 16920fi;
15032 16921
15033STRIP_OPT=-s 16922STRIP_OPT=-s
@@ -15039,15 +16928,17 @@ if test "${enable_strip+set}" = set; then
15039 STRIP_OPT= 16928 STRIP_OPT=
15040 fi 16929 fi
15041 16930
16931
15042fi; 16932fi;
15043 16933
16934
15044if test -z "$xauth_path" ; then 16935if test -z "$xauth_path" ; then
15045 XAUTH_PATH="undefined" 16936 XAUTH_PATH="undefined"
15046 16937
15047else 16938else
15048 cat >>confdefs.h <<EOF 16939 cat >>confdefs.h <<_ACEOF
15049#define XAUTH_PATH "$xauth_path" 16940#define XAUTH_PATH "$xauth_path"
15050EOF 16941_ACEOF
15051 16942
15052 XAUTH_PATH=$xauth_path 16943 XAUTH_PATH=$xauth_path
15053 16944
@@ -15056,21 +16947,21 @@ fi
15056# Check for mail directory (last resort if we cannot get it from headers) 16947# Check for mail directory (last resort if we cannot get it from headers)
15057if test ! -z "$MAIL" ; then 16948if test ! -z "$MAIL" ; then
15058 maildir=`dirname $MAIL` 16949 maildir=`dirname $MAIL`
15059 cat >>confdefs.h <<EOF 16950 cat >>confdefs.h <<_ACEOF
15060#define MAIL_DIRECTORY "$maildir" 16951#define MAIL_DIRECTORY "$maildir"
15061EOF 16952_ACEOF
15062 16953
15063fi 16954fi
15064 16955
15065if test -z "$no_dev_ptmx" ; then 16956if test -z "$no_dev_ptmx" ; then
15066 if test "x$disable_ptmx_check" != "xyes" ; then 16957 if test "x$disable_ptmx_check" != "xyes" ; then
15067 echo "$as_me:15067: checking for \"/dev/ptmx\"" >&5 16958 echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5
15068echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6 16959echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6
15069if test "${ac_cv_file___dev_ptmx_+set}" = set; then 16960if test "${ac_cv_file___dev_ptmx_+set}" = set; then
15070 echo $ECHO_N "(cached) $ECHO_C" >&6 16961 echo $ECHO_N "(cached) $ECHO_C" >&6
15071else 16962else
15072 test "$cross_compiling" = yes && 16963 test "$cross_compiling" = yes &&
15073 { { echo "$as_me:15073: error: cannot check for file existence when cross compiling" >&5 16964 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
15074echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} 16965echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
15075 { (exit 1); exit 1; }; } 16966 { (exit 1); exit 1; }; }
15076if test -r ""/dev/ptmx""; then 16967if test -r ""/dev/ptmx""; then
@@ -15079,27 +16970,28 @@ else
15079 ac_cv_file___dev_ptmx_=no 16970 ac_cv_file___dev_ptmx_=no
15080fi 16971fi
15081fi 16972fi
15082echo "$as_me:15082: result: $ac_cv_file___dev_ptmx_" >&5 16973echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5
15083echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6 16974echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6
15084if test $ac_cv_file___dev_ptmx_ = yes; then 16975if test $ac_cv_file___dev_ptmx_ = yes; then
15085 16976
15086 cat >>confdefs.h <<EOF 16977 cat >>confdefs.h <<_ACEOF
15087#define HAVE_DEV_PTMX 1 16978#define HAVE_DEV_PTMX 1
15088EOF 16979_ACEOF
15089 16980
15090 have_dev_ptmx=1 16981 have_dev_ptmx=1
15091 16982
16983
15092fi 16984fi
15093 16985
15094 fi 16986 fi
15095fi 16987fi
15096echo "$as_me:15096: checking for \"/dev/ptc\"" >&5 16988echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5
15097echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6 16989echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6
15098if test "${ac_cv_file___dev_ptc_+set}" = set; then 16990if test "${ac_cv_file___dev_ptc_+set}" = set; then
15099 echo $ECHO_N "(cached) $ECHO_C" >&6 16991 echo $ECHO_N "(cached) $ECHO_C" >&6
15100else 16992else
15101 test "$cross_compiling" = yes && 16993 test "$cross_compiling" = yes &&
15102 { { echo "$as_me:15102: error: cannot check for file existence when cross compiling" >&5 16994 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
15103echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} 16995echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
15104 { (exit 1); exit 1; }; } 16996 { (exit 1); exit 1; }; }
15105if test -r ""/dev/ptc""; then 16997if test -r ""/dev/ptc""; then
@@ -15108,18 +17000,20 @@ else
15108 ac_cv_file___dev_ptc_=no 17000 ac_cv_file___dev_ptc_=no
15109fi 17001fi
15110fi 17002fi
15111echo "$as_me:15111: result: $ac_cv_file___dev_ptc_" >&5 17003echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5
15112echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6 17004echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6
15113if test $ac_cv_file___dev_ptc_ = yes; then 17005if test $ac_cv_file___dev_ptc_ = yes; then
15114 17006
15115 cat >>confdefs.h <<EOF 17007 cat >>confdefs.h <<_ACEOF
15116#define HAVE_DEV_PTS_AND_PTC 1 17008#define HAVE_DEV_PTS_AND_PTC 1
15117EOF 17009_ACEOF
15118 17010
15119 have_dev_ptc=1 17011 have_dev_ptc=1
15120 17012
17013
15121fi 17014fi
15122 17015
17016
15123# Options from here on. Some of these are preset by platform above 17017# Options from here on. Some of these are preset by platform above
15124 17018
15125# Check whether --with-mantype or --without-mantype was given. 17019# Check whether --with-mantype or --without-mantype was given.
@@ -15131,12 +17025,13 @@ if test "${with_mantype+set}" = set; then
15131 MANTYPE=$withval 17025 MANTYPE=$withval
15132 ;; 17026 ;;
15133 *) 17027 *)
15134 { { echo "$as_me:15134: error: invalid man type: $withval" >&5 17028 { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5
15135echo "$as_me: error: invalid man type: $withval" >&2;} 17029echo "$as_me: error: invalid man type: $withval" >&2;}
15136 { (exit 1); exit 1; }; } 17030 { (exit 1); exit 1; }; }
15137 ;; 17031 ;;
15138 esac 17032 esac
15139 17033
17034
15140fi; 17035fi;
15141if test -z "$MANTYPE"; then 17036if test -z "$MANTYPE"; then
15142 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" 17037 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
@@ -15144,7 +17039,7 @@ if test -z "$MANTYPE"; then
15144do 17039do
15145 # Extract the first word of "$ac_prog", so it can be a program name with args. 17040 # Extract the first word of "$ac_prog", so it can be a program name with args.
15146set dummy $ac_prog; ac_word=$2 17041set dummy $ac_prog; ac_word=$2
15147echo "$as_me:15147: checking for $ac_word" >&5 17042echo "$as_me:$LINENO: checking for $ac_word" >&5
15148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 17043echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15149if test "${ac_cv_path_NROFF+set}" = set; then 17044if test "${ac_cv_path_NROFF+set}" = set; then
15150 echo $ECHO_N "(cached) $ECHO_C" >&6 17045 echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15154,16 +17049,18 @@ else
15154 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. 17049 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
15155 ;; 17050 ;;
15156 *) 17051 *)
15157 ac_save_IFS=$IFS; IFS=$ac_path_separator 17052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15158ac_dummy="$TestPath" 17053for as_dir in $TestPath
15159for ac_dir in $ac_dummy; do 17054do
15160 IFS=$ac_save_IFS 17055 IFS=$as_save_IFS
15161 test -z "$ac_dir" && ac_dir=. 17056 test -z "$as_dir" && as_dir=.
15162 if $as_executable_p "$ac_dir/$ac_word"; then 17057 for ac_exec_ext in '' $ac_executable_extensions; do
15163 ac_cv_path_NROFF="$ac_dir/$ac_word" 17058 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15164 echo "$as_me:15164: found $ac_dir/$ac_word" >&5 17059 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
15165 break 17060 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15166fi 17061 break 2
17062 fi
17063done
15167done 17064done
15168 17065
15169 ;; 17066 ;;
@@ -15172,10 +17069,10 @@ fi
15172NROFF=$ac_cv_path_NROFF 17069NROFF=$ac_cv_path_NROFF
15173 17070
15174if test -n "$NROFF"; then 17071if test -n "$NROFF"; then
15175 echo "$as_me:15175: result: $NROFF" >&5 17072 echo "$as_me:$LINENO: result: $NROFF" >&5
15176echo "${ECHO_T}$NROFF" >&6 17073echo "${ECHO_T}$NROFF" >&6
15177else 17074else
15178 echo "$as_me:15178: result: no" >&5 17075 echo "$as_me:$LINENO: result: no" >&5
15179echo "${ECHO_T}no" >&6 17076echo "${ECHO_T}no" >&6
15180fi 17077fi
15181 17078
@@ -15198,6 +17095,7 @@ else
15198 mansubdir=$MANTYPE; 17095 mansubdir=$MANTYPE;
15199fi 17096fi
15200 17097
17098
15201# Check whether to enable MD5 passwords 17099# Check whether to enable MD5 passwords
15202MD5_MSG="no" 17100MD5_MSG="no"
15203 17101
@@ -15206,13 +17104,14 @@ if test "${with_md5_passwords+set}" = set; then
15206 withval="$with_md5_passwords" 17104 withval="$with_md5_passwords"
15207 17105
15208 if test "x$withval" != "xno" ; then 17106 if test "x$withval" != "xno" ; then
15209 cat >>confdefs.h <<\EOF 17107 cat >>confdefs.h <<\_ACEOF
15210#define HAVE_MD5_PASSWORDS 1 17108#define HAVE_MD5_PASSWORDS 1
15211EOF 17109_ACEOF
15212 17110
15213 MD5_MSG="yes" 17111 MD5_MSG="yes"
15214 fi 17112 fi
15215 17113
17114
15216fi; 17115fi;
15217 17116
15218# Whether to disable shadow password support 17117# Whether to disable shadow password support
@@ -15222,21 +17121,26 @@ if test "${with_shadow+set}" = set; then
15222 withval="$with_shadow" 17121 withval="$with_shadow"
15223 17122
15224 if test "x$withval" = "xno" ; then 17123 if test "x$withval" = "xno" ; then
15225 cat >>confdefs.h <<\EOF 17124 cat >>confdefs.h <<\_ACEOF
15226#define DISABLE_SHADOW 1 17125#define DISABLE_SHADOW 1
15227EOF 17126_ACEOF
15228 17127
15229 disable_shadow=yes 17128 disable_shadow=yes
15230 fi 17129 fi
15231 17130
17131
15232fi; 17132fi;
15233 17133
15234if test -z "$disable_shadow" ; then 17134if test -z "$disable_shadow" ; then
15235 echo "$as_me:15235: checking if the systems has expire shadow information" >&5 17135 echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5
15236echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6 17136echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6
15237 cat >conftest.$ac_ext <<_ACEOF 17137 cat >conftest.$ac_ext <<_ACEOF
15238#line 15238 "configure" 17138#line $LINENO "configure"
15239#include "confdefs.h" 17139/* confdefs.h. */
17140_ACEOF
17141cat confdefs.h >>conftest.$ac_ext
17142cat >>conftest.$ac_ext <<_ACEOF
17143/* end confdefs.h. */
15240 17144
15241#include <sys/types.h> 17145#include <sys/types.h>
15242#include <shadow.h> 17146#include <shadow.h>
@@ -15251,34 +17155,36 @@ main ()
15251} 17155}
15252_ACEOF 17156_ACEOF
15253rm -f conftest.$ac_objext 17157rm -f conftest.$ac_objext
15254if { (eval echo "$as_me:15254: \"$ac_compile\"") >&5 17158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15255 (eval $ac_compile) 2>&5 17159 (eval $ac_compile) 2>&5
15256 ac_status=$? 17160 ac_status=$?
15257 echo "$as_me:15257: \$? = $ac_status" >&5 17161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15258 (exit $ac_status); } && 17162 (exit $ac_status); } &&
15259 { ac_try='test -s conftest.$ac_objext' 17163 { ac_try='test -s conftest.$ac_objext'
15260 { (eval echo "$as_me:15260: \"$ac_try\"") >&5 17164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15261 (eval $ac_try) 2>&5 17165 (eval $ac_try) 2>&5
15262 ac_status=$? 17166 ac_status=$?
15263 echo "$as_me:15263: \$? = $ac_status" >&5 17167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15264 (exit $ac_status); }; }; then 17168 (exit $ac_status); }; }; then
15265 sp_expire_available=yes 17169 sp_expire_available=yes
15266else 17170else
15267 echo "$as_me: failed program was:" >&5 17171 echo "$as_me: failed program was:" >&5
15268cat conftest.$ac_ext >&5 17172sed 's/^/| /' conftest.$ac_ext >&5
17173
17174
15269 17175
15270fi 17176fi
15271rm -f conftest.$ac_objext conftest.$ac_ext 17177rm -f conftest.$ac_objext conftest.$ac_ext
15272 17178
15273 if test "x$sp_expire_available" = "xyes" ; then 17179 if test "x$sp_expire_available" = "xyes" ; then
15274 echo "$as_me:15274: result: yes" >&5 17180 echo "$as_me:$LINENO: result: yes" >&5
15275echo "${ECHO_T}yes" >&6 17181echo "${ECHO_T}yes" >&6
15276 cat >>confdefs.h <<\EOF 17182 cat >>confdefs.h <<\_ACEOF
15277#define HAS_SHADOW_EXPIRE 1 17183#define HAS_SHADOW_EXPIRE 1
15278EOF 17184_ACEOF
15279 17185
15280 else 17186 else
15281 echo "$as_me:15281: result: no" >&5 17187 echo "$as_me:$LINENO: result: no" >&5
15282echo "${ECHO_T}no" >&6 17188echo "${ECHO_T}no" >&6
15283 fi 17189 fi
15284fi 17190fi
@@ -15286,9 +17192,9 @@ fi
15286# Use ip address instead of hostname in $DISPLAY 17192# Use ip address instead of hostname in $DISPLAY
15287if test ! -z "$IPADDR_IN_DISPLAY" ; then 17193if test ! -z "$IPADDR_IN_DISPLAY" ; then
15288 DISPLAY_HACK_MSG="yes" 17194 DISPLAY_HACK_MSG="yes"
15289 cat >>confdefs.h <<\EOF 17195 cat >>confdefs.h <<\_ACEOF
15290#define IPADDR_IN_DISPLAY 1 17196#define IPADDR_IN_DISPLAY 1
15291EOF 17197_ACEOF
15292 17198
15293else 17199else
15294 DISPLAY_HACK_MSG="no" 17200 DISPLAY_HACK_MSG="no"
@@ -15298,50 +17204,21 @@ if test "${with_ipaddr_display+set}" = set; then
15298 withval="$with_ipaddr_display" 17204 withval="$with_ipaddr_display"
15299 17205
15300 if test "x$withval" != "xno" ; then 17206 if test "x$withval" != "xno" ; then
15301 cat >>confdefs.h <<\EOF 17207 cat >>confdefs.h <<\_ACEOF
15302#define IPADDR_IN_DISPLAY 1 17208#define IPADDR_IN_DISPLAY 1
15303EOF 17209_ACEOF
15304 17210
15305 DISPLAY_HACK_MSG="yes" 17211 DISPLAY_HACK_MSG="yes"
15306 fi 17212 fi
15307 17213
15308fi;
15309fi
15310
15311# check for /etc/default/login and use it if present.
15312echo "$as_me:15312: checking for \"/etc/default/login\"" >&5
15313echo $ECHO_N "checking for \"/etc/default/login\"... $ECHO_C" >&6
15314if test "${ac_cv_file___etc_default_login_+set}" = set; then
15315 echo $ECHO_N "(cached) $ECHO_C" >&6
15316else
15317 test "$cross_compiling" = yes &&
15318 { { echo "$as_me:15318: error: cannot check for file existence when cross compiling" >&5
15319echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
15320 { (exit 1); exit 1; }; }
15321if test -r ""/etc/default/login""; then
15322 ac_cv_file___etc_default_login_=yes
15323else
15324 ac_cv_file___etc_default_login_=no
15325fi
15326fi
15327echo "$as_me:15327: result: $ac_cv_file___etc_default_login_" >&5
15328echo "${ECHO_T}$ac_cv_file___etc_default_login_" >&6
15329if test $ac_cv_file___etc_default_login_ = yes; then
15330 external_path_file=/etc/default/login
15331fi
15332
15333if test "x$external_path_file" = "x/etc/default/login"; then
15334 cat >>confdefs.h <<\EOF
15335#define HAVE_ETC_DEFAULT_LOGIN 1
15336EOF
15337 17214
17215fi;
15338fi 17216fi
15339 17217
15340if test $ac_cv_func_login_getcapbool = "yes" -a \ 17218if test $ac_cv_func_login_getcapbool = "yes" -a \
15341 $ac_cv_header_login_cap_h = "yes" ; then 17219 $ac_cv_header_login_cap_h = "yes" ; then
15342 external_path_file=/etc/login.conf 17220 USES_LOGIN_CONF=yes
15343fi 17221fi
15344
15345# Whether to mess with the default path 17222# Whether to mess with the default path
15346SERVER_PATH_MSG="(default)" 17223SERVER_PATH_MSG="(default)"
15347 17224
@@ -15349,46 +17226,34 @@ SERVER_PATH_MSG="(default)"
15349if test "${with_default_path+set}" = set; then 17226if test "${with_default_path+set}" = set; then
15350 withval="$with_default_path" 17227 withval="$with_default_path"
15351 17228
15352 if test "x$external_path_file" = "x/etc/login.conf" ; then 17229 if test "$USES_LOGIN_CONF" = "yes" ; then
15353 { echo "$as_me:15353: WARNING: 17230 { echo "$as_me:$LINENO: WARNING:
15354--with-default-path=PATH has no effect on this system. 17231--with-default-path=PATH has no effect on this system.
15355Edit /etc/login.conf instead." >&5 17232Edit /etc/login.conf instead." >&5
15356echo "$as_me: WARNING: 17233echo "$as_me: WARNING:
15357--with-default-path=PATH has no effect on this system. 17234--with-default-path=PATH has no effect on this system.
15358Edit /etc/login.conf instead." >&2;} 17235Edit /etc/login.conf instead." >&2;}
15359 elif test "x$withval" != "xno" ; then 17236 elif test "x$withval" != "xno" ; then
15360 if test ! -z "$external_path_file" ; then
15361 { echo "$as_me:15361: WARNING:
15362--with-default-path=PATH will only be used if PATH is not defined in
15363$external_path_file ." >&5
15364echo "$as_me: WARNING:
15365--with-default-path=PATH will only be used if PATH is not defined in
15366$external_path_file ." >&2;}
15367 fi
15368 user_path="$withval" 17237 user_path="$withval"
15369 SERVER_PATH_MSG="$withval" 17238 SERVER_PATH_MSG="$withval"
15370 fi 17239 fi
15371 17240
15372else 17241else
15373 if test "x$external_path_file" = "x/etc/login.conf" ; then 17242 if test "$USES_LOGIN_CONF" = "yes" ; then
15374 { echo "$as_me:15374: WARNING: Make sure the path to scp is in /etc/login.conf" >&5 17243 { echo "$as_me:$LINENO: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
15375echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;} 17244echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
15376 else 17245 else
15377 if test ! -z "$external_path_file" ; then 17246 if test "$cross_compiling" = yes; then
15378 { echo "$as_me:15378: WARNING:
15379If PATH is defined in $external_path_file, ensure the path to scp is included,
15380otherwise scp will not work." >&5
15381echo "$as_me: WARNING:
15382If PATH is defined in $external_path_file, ensure the path to scp is included,
15383otherwise scp will not work." >&2;}
15384 fi
15385 if test "$cross_compiling" = yes; then
15386 user_path="/usr/bin:/bin:/usr/sbin:/sbin" 17247 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
15387 17248
15388else 17249else
15389 cat >conftest.$ac_ext <<_ACEOF 17250 cat >conftest.$ac_ext <<_ACEOF
15390#line 15390 "configure" 17251#line $LINENO "configure"
15391#include "confdefs.h" 17252/* confdefs.h. */
17253_ACEOF
17254cat confdefs.h >>conftest.$ac_ext
17255cat >>conftest.$ac_ext <<_ACEOF
17256/* end confdefs.h. */
15392 17257
15393/* find out what STDPATH is */ 17258/* find out what STDPATH is */
15394#include <stdio.h> 17259#include <stdio.h>
@@ -15424,24 +17289,26 @@ main()
15424 17289
15425_ACEOF 17290_ACEOF
15426rm -f conftest$ac_exeext 17291rm -f conftest$ac_exeext
15427if { (eval echo "$as_me:15427: \"$ac_link\"") >&5 17292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15428 (eval $ac_link) 2>&5 17293 (eval $ac_link) 2>&5
15429 ac_status=$? 17294 ac_status=$?
15430 echo "$as_me:15430: \$? = $ac_status" >&5 17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15431 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 17296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15432 { (eval echo "$as_me:15432: \"$ac_try\"") >&5 17297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15433 (eval $ac_try) 2>&5 17298 (eval $ac_try) 2>&5
15434 ac_status=$? 17299 ac_status=$?
15435 echo "$as_me:15435: \$? = $ac_status" >&5 17300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15436 (exit $ac_status); }; }; then 17301 (exit $ac_status); }; }; then
15437 user_path=`cat conftest.stdpath` 17302 user_path=`cat conftest.stdpath`
15438else 17303else
15439 echo "$as_me: program exited with status $ac_status" >&5 17304 echo "$as_me: program exited with status $ac_status" >&5
15440echo "$as_me: failed program was:" >&5 17305echo "$as_me: failed program was:" >&5
15441cat conftest.$ac_ext >&5 17306sed 's/^/| /' conftest.$ac_ext >&5
17307
17308( exit $ac_status )
15442 user_path="/usr/bin:/bin:/usr/sbin:/sbin" 17309 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
15443fi 17310fi
15444rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 17311rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15445fi 17312fi
15446# make sure $bindir is in USER_PATH so scp will work 17313# make sure $bindir is in USER_PATH so scp will work
15447 t_bindir=`eval echo ${bindir}` 17314 t_bindir=`eval echo ${bindir}`
@@ -15456,17 +17323,18 @@ fi
15456 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 17323 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
15457 if test $? -ne 0 ; then 17324 if test $? -ne 0 ; then
15458 user_path=$user_path:$t_bindir 17325 user_path=$user_path:$t_bindir
15459 echo "$as_me:15459: result: Adding $t_bindir to USER_PATH so scp will work" >&5 17326 echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5
15460echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6 17327echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6
15461 fi 17328 fi
15462 fi 17329 fi
15463 fi 17330 fi
15464 17331
15465fi; 17332fi;
15466if test "x$external_path_file" != "x/etc/login.conf" ; then 17333if test "$USES_LOGIN_CONF" != "yes" ; then
15467 cat >>confdefs.h <<EOF 17334 cat >>confdefs.h <<_ACEOF
15468#define USER_PATH "$user_path" 17335#define USER_PATH "$user_path"
15469EOF 17336_ACEOF
17337
15470 17338
15471fi 17339fi
15472 17340
@@ -15477,16 +17345,36 @@ if test "${with_superuser_path+set}" = set; then
15477 withval="$with_superuser_path" 17345 withval="$with_superuser_path"
15478 17346
15479 if test "x$withval" != "xno" ; then 17347 if test "x$withval" != "xno" ; then
15480 cat >>confdefs.h <<EOF 17348 cat >>confdefs.h <<_ACEOF
15481#define SUPERUSER_PATH "$withval" 17349#define SUPERUSER_PATH "$withval"
15482EOF 17350_ACEOF
15483 17351
15484 superuser_path=$withval 17352 superuser_path=$withval
15485 fi 17353 fi
15486 17354
17355
17356fi;
17357
17358
17359# Whether to force IPv4 by default (needed on broken glibc Linux)
17360IPV4_HACK_MSG="no"
17361
17362# Check whether --with-ipv4-default or --without-ipv4-default was given.
17363if test "${with_ipv4_default+set}" = set; then
17364 withval="$with_ipv4_default"
17365
17366 if test "x$withval" != "xno" ; then
17367 cat >>confdefs.h <<\_ACEOF
17368#define IPV4_DEFAULT 1
17369_ACEOF
17370
17371 IPV4_HACK_MSG="yes"
17372 fi
17373
17374
15487fi; 17375fi;
15488 17376
15489echo "$as_me:15489: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5 17377echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
15490echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6 17378echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6
15491IPV4_IN6_HACK_MSG="no" 17379IPV4_IN6_HACK_MSG="no"
15492 17380
@@ -15495,33 +17383,34 @@ if test "${with_4in6+set}" = set; then
15495 withval="$with_4in6" 17383 withval="$with_4in6"
15496 17384
15497 if test "x$withval" != "xno" ; then 17385 if test "x$withval" != "xno" ; then
15498 echo "$as_me:15498: result: yes" >&5 17386 echo "$as_me:$LINENO: result: yes" >&5
15499echo "${ECHO_T}yes" >&6 17387echo "${ECHO_T}yes" >&6
15500 cat >>confdefs.h <<\EOF 17388 cat >>confdefs.h <<\_ACEOF
15501#define IPV4_IN_IPV6 1 17389#define IPV4_IN_IPV6 1
15502EOF 17390_ACEOF
15503 17391
15504 IPV4_IN6_HACK_MSG="yes" 17392 IPV4_IN6_HACK_MSG="yes"
15505 else 17393 else
15506 echo "$as_me:15506: result: no" >&5 17394 echo "$as_me:$LINENO: result: no" >&5
15507echo "${ECHO_T}no" >&6 17395echo "${ECHO_T}no" >&6
15508 fi 17396 fi
15509 17397
15510else 17398else
15511 17399
15512 if test "x$inet6_default_4in6" = "xyes"; then 17400 if test "x$inet6_default_4in6" = "xyes"; then
15513 echo "$as_me:15513: result: yes (default)" >&5 17401 echo "$as_me:$LINENO: result: yes (default)" >&5
15514echo "${ECHO_T}yes (default)" >&6 17402echo "${ECHO_T}yes (default)" >&6
15515 cat >>confdefs.h <<\EOF 17403 cat >>confdefs.h <<\_ACEOF
15516#define IPV4_IN_IPV6 1 17404#define IPV4_IN_IPV6 1
15517EOF 17405_ACEOF
15518 17406
15519 IPV4_IN6_HACK_MSG="yes" 17407 IPV4_IN6_HACK_MSG="yes"
15520 else 17408 else
15521 echo "$as_me:15521: result: no (default)" >&5 17409 echo "$as_me:$LINENO: result: no (default)" >&5
15522echo "${ECHO_T}no (default)" >&6 17410echo "${ECHO_T}no (default)" >&6
15523 fi 17411 fi
15524 17412
17413
15525fi; 17414fi;
15526 17415
15527# Whether to enable BSD auth support 17416# Whether to enable BSD auth support
@@ -15532,13 +17421,14 @@ if test "${with_bsd_auth+set}" = set; then
15532 withval="$with_bsd_auth" 17421 withval="$with_bsd_auth"
15533 17422
15534 if test "x$withval" != "xno" ; then 17423 if test "x$withval" != "xno" ; then
15535 cat >>confdefs.h <<\EOF 17424 cat >>confdefs.h <<\_ACEOF
15536#define BSD_AUTH 1 17425#define BSD_AUTH 1
15537EOF 17426_ACEOF
15538 17427
15539 BSD_AUTH_MSG=yes 17428 BSD_AUTH_MSG=yes
15540 fi 17429 fi
15541 17430
17431
15542fi; 17432fi;
15543 17433
15544# Where to place sshd.pid 17434# Where to place sshd.pid
@@ -15551,6 +17441,7 @@ if test ! -d $piddir ; then
15551 esac 17441 esac
15552fi 17442fi
15553 17443
17444
15554# Check whether --with-pid-dir or --without-pid-dir was given. 17445# Check whether --with-pid-dir or --without-pid-dir was given.
15555if test "${with_pid_dir+set}" = set; then 17446if test "${with_pid_dir+set}" = set; then
15556 withval="$with_pid_dir" 17447 withval="$with_pid_dir"
@@ -15558,111 +17449,90 @@ if test "${with_pid_dir+set}" = set; then
15558 if test "x$withval" != "xno" ; then 17449 if test "x$withval" != "xno" ; then
15559 piddir=$withval 17450 piddir=$withval
15560 if test ! -d $piddir ; then 17451 if test ! -d $piddir ; then
15561 { echo "$as_me:15561: WARNING: ** no $piddir directory on this system **" >&5 17452 { echo "$as_me:$LINENO: WARNING: ** no $piddir directory on this system **" >&5
15562echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;} 17453echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
15563 fi 17454 fi
15564 fi 17455 fi
15565 17456
17457
15566fi; 17458fi;
15567 17459
15568cat >>confdefs.h <<EOF 17460cat >>confdefs.h <<_ACEOF
15569#define _PATH_SSH_PIDDIR "$piddir" 17461#define _PATH_SSH_PIDDIR "$piddir"
15570EOF 17462_ACEOF
17463
17464
15571 17465
15572# Check whether --enable-lastlog or --disable-lastlog was given. 17466# Check whether --enable-lastlog or --disable-lastlog was given.
15573if test "${enable_lastlog+set}" = set; then 17467if test "${enable_lastlog+set}" = set; then
15574 enableval="$enable_lastlog" 17468 enableval="$enable_lastlog"
15575 17469 cat >>confdefs.h <<\_ACEOF
15576 if test "x$enableval" = "xno" ; then
15577 cat >>confdefs.h <<\EOF
15578#define DISABLE_LASTLOG 1 17470#define DISABLE_LASTLOG 1
15579EOF 17471_ACEOF
15580 17472
15581 fi
15582 17473
15583fi; 17474fi;
15584# Check whether --enable-utmp or --disable-utmp was given. 17475# Check whether --enable-utmp or --disable-utmp was given.
15585if test "${enable_utmp+set}" = set; then 17476if test "${enable_utmp+set}" = set; then
15586 enableval="$enable_utmp" 17477 enableval="$enable_utmp"
15587 17478 cat >>confdefs.h <<\_ACEOF
15588 if test "x$enableval" = "xno" ; then
15589 cat >>confdefs.h <<\EOF
15590#define DISABLE_UTMP 1 17479#define DISABLE_UTMP 1
15591EOF 17480_ACEOF
15592 17481
15593 fi
15594 17482
15595fi; 17483fi;
15596# Check whether --enable-utmpx or --disable-utmpx was given. 17484# Check whether --enable-utmpx or --disable-utmpx was given.
15597if test "${enable_utmpx+set}" = set; then 17485if test "${enable_utmpx+set}" = set; then
15598 enableval="$enable_utmpx" 17486 enableval="$enable_utmpx"
15599 17487 cat >>confdefs.h <<\_ACEOF
15600 if test "x$enableval" = "xno" ; then
15601 cat >>confdefs.h <<\EOF
15602#define DISABLE_UTMPX 1 17488#define DISABLE_UTMPX 1
15603EOF 17489_ACEOF
15604 17490
15605 fi
15606 17491
15607fi; 17492fi;
15608# Check whether --enable-wtmp or --disable-wtmp was given. 17493# Check whether --enable-wtmp or --disable-wtmp was given.
15609if test "${enable_wtmp+set}" = set; then 17494if test "${enable_wtmp+set}" = set; then
15610 enableval="$enable_wtmp" 17495 enableval="$enable_wtmp"
15611 17496 cat >>confdefs.h <<\_ACEOF
15612 if test "x$enableval" = "xno" ; then
15613 cat >>confdefs.h <<\EOF
15614#define DISABLE_WTMP 1 17497#define DISABLE_WTMP 1
15615EOF 17498_ACEOF
15616 17499
15617 fi
15618 17500
15619fi; 17501fi;
15620# Check whether --enable-wtmpx or --disable-wtmpx was given. 17502# Check whether --enable-wtmpx or --disable-wtmpx was given.
15621if test "${enable_wtmpx+set}" = set; then 17503if test "${enable_wtmpx+set}" = set; then
15622 enableval="$enable_wtmpx" 17504 enableval="$enable_wtmpx"
15623 17505 cat >>confdefs.h <<\_ACEOF
15624 if test "x$enableval" = "xno" ; then
15625 cat >>confdefs.h <<\EOF
15626#define DISABLE_WTMPX 1 17506#define DISABLE_WTMPX 1
15627EOF 17507_ACEOF
15628 17508
15629 fi
15630 17509
15631fi; 17510fi;
15632# Check whether --enable-libutil or --disable-libutil was given. 17511# Check whether --enable-libutil or --disable-libutil was given.
15633if test "${enable_libutil+set}" = set; then 17512if test "${enable_libutil+set}" = set; then
15634 enableval="$enable_libutil" 17513 enableval="$enable_libutil"
15635 17514 cat >>confdefs.h <<\_ACEOF
15636 if test "x$enableval" = "xno" ; then
15637 cat >>confdefs.h <<\EOF
15638#define DISABLE_LOGIN 1 17515#define DISABLE_LOGIN 1
15639EOF 17516_ACEOF
15640 17517
15641 fi
15642 17518
15643fi; 17519fi;
15644# Check whether --enable-pututline or --disable-pututline was given. 17520# Check whether --enable-pututline or --disable-pututline was given.
15645if test "${enable_pututline+set}" = set; then 17521if test "${enable_pututline+set}" = set; then
15646 enableval="$enable_pututline" 17522 enableval="$enable_pututline"
15647 17523 cat >>confdefs.h <<\_ACEOF
15648 if test "x$enableval" = "xno" ; then
15649 cat >>confdefs.h <<\EOF
15650#define DISABLE_PUTUTLINE 1 17524#define DISABLE_PUTUTLINE 1
15651EOF 17525_ACEOF
15652 17526
15653 fi
15654 17527
15655fi; 17528fi;
15656# Check whether --enable-pututxline or --disable-pututxline was given. 17529# Check whether --enable-pututxline or --disable-pututxline was given.
15657if test "${enable_pututxline+set}" = set; then 17530if test "${enable_pututxline+set}" = set; then
15658 enableval="$enable_pututxline" 17531 enableval="$enable_pututxline"
15659 17532 cat >>confdefs.h <<\_ACEOF
15660 if test "x$enableval" = "xno" ; then
15661 cat >>confdefs.h <<\EOF
15662#define DISABLE_PUTUTXLINE 1 17533#define DISABLE_PUTUTXLINE 1
15663EOF 17534_ACEOF
15664 17535
15665 fi
15666 17536
15667fi; 17537fi;
15668 17538
@@ -15671,21 +17541,27 @@ if test "${with_lastlog+set}" = set; then
15671 withval="$with_lastlog" 17541 withval="$with_lastlog"
15672 17542
15673 if test "x$withval" = "xno" ; then 17543 if test "x$withval" = "xno" ; then
15674 cat >>confdefs.h <<\EOF 17544 cat >>confdefs.h <<\_ACEOF
15675#define DISABLE_LASTLOG 1 17545#define DISABLE_LASTLOG 1
15676EOF 17546_ACEOF
15677 17547
15678 else 17548 else
15679 conf_lastlog_location=$withval 17549 conf_lastlog_location=$withval
15680 fi 17550 fi
15681 17551
17552
15682fi; 17553fi;
15683 17554
15684echo "$as_me:15684: checking if your system defines LASTLOG_FILE" >&5 17555
17556echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5
15685echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6 17557echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6
15686cat >conftest.$ac_ext <<_ACEOF 17558cat >conftest.$ac_ext <<_ACEOF
15687#line 15687 "configure" 17559#line $LINENO "configure"
15688#include "confdefs.h" 17560/* confdefs.h. */
17561_ACEOF
17562cat confdefs.h >>conftest.$ac_ext
17563cat >>conftest.$ac_ext <<_ACEOF
17564/* end confdefs.h. */
15689 17565
15690#include <sys/types.h> 17566#include <sys/types.h>
15691#include <utmp.h> 17567#include <utmp.h>
@@ -15708,30 +17584,35 @@ main ()
15708} 17584}
15709_ACEOF 17585_ACEOF
15710rm -f conftest.$ac_objext 17586rm -f conftest.$ac_objext
15711if { (eval echo "$as_me:15711: \"$ac_compile\"") >&5 17587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15712 (eval $ac_compile) 2>&5 17588 (eval $ac_compile) 2>&5
15713 ac_status=$? 17589 ac_status=$?
15714 echo "$as_me:15714: \$? = $ac_status" >&5 17590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715 (exit $ac_status); } && 17591 (exit $ac_status); } &&
15716 { ac_try='test -s conftest.$ac_objext' 17592 { ac_try='test -s conftest.$ac_objext'
15717 { (eval echo "$as_me:15717: \"$ac_try\"") >&5 17593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15718 (eval $ac_try) 2>&5 17594 (eval $ac_try) 2>&5
15719 ac_status=$? 17595 ac_status=$?
15720 echo "$as_me:15720: \$? = $ac_status" >&5 17596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15721 (exit $ac_status); }; }; then 17597 (exit $ac_status); }; }; then
15722 echo "$as_me:15722: result: yes" >&5 17598 echo "$as_me:$LINENO: result: yes" >&5
15723echo "${ECHO_T}yes" >&6 17599echo "${ECHO_T}yes" >&6
15724else 17600else
15725 echo "$as_me: failed program was:" >&5 17601 echo "$as_me: failed program was:" >&5
15726cat conftest.$ac_ext >&5 17602sed 's/^/| /' conftest.$ac_ext >&5
15727 17603
15728 echo "$as_me:15728: result: no" >&5 17604
17605 echo "$as_me:$LINENO: result: no" >&5
15729echo "${ECHO_T}no" >&6 17606echo "${ECHO_T}no" >&6
15730 echo "$as_me:15730: checking if your system defines _PATH_LASTLOG" >&5 17607 echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5
15731echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6 17608echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6
15732 cat >conftest.$ac_ext <<_ACEOF 17609 cat >conftest.$ac_ext <<_ACEOF
15733#line 15733 "configure" 17610#line $LINENO "configure"
15734#include "confdefs.h" 17611/* confdefs.h. */
17612_ACEOF
17613cat confdefs.h >>conftest.$ac_ext
17614cat >>conftest.$ac_ext <<_ACEOF
17615/* end confdefs.h. */
15735 17616
15736#include <sys/types.h> 17617#include <sys/types.h>
15737#include <utmp.h> 17618#include <utmp.h>
@@ -15751,30 +17632,32 @@ main ()
15751} 17632}
15752_ACEOF 17633_ACEOF
15753rm -f conftest.$ac_objext 17634rm -f conftest.$ac_objext
15754if { (eval echo "$as_me:15754: \"$ac_compile\"") >&5 17635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15755 (eval $ac_compile) 2>&5 17636 (eval $ac_compile) 2>&5
15756 ac_status=$? 17637 ac_status=$?
15757 echo "$as_me:15757: \$? = $ac_status" >&5 17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15758 (exit $ac_status); } && 17639 (exit $ac_status); } &&
15759 { ac_try='test -s conftest.$ac_objext' 17640 { ac_try='test -s conftest.$ac_objext'
15760 { (eval echo "$as_me:15760: \"$ac_try\"") >&5 17641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15761 (eval $ac_try) 2>&5 17642 (eval $ac_try) 2>&5
15762 ac_status=$? 17643 ac_status=$?
15763 echo "$as_me:15763: \$? = $ac_status" >&5 17644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15764 (exit $ac_status); }; }; then 17645 (exit $ac_status); }; }; then
15765 echo "$as_me:15765: result: yes" >&5 17646 echo "$as_me:$LINENO: result: yes" >&5
15766echo "${ECHO_T}yes" >&6 17647echo "${ECHO_T}yes" >&6
15767else 17648else
15768 echo "$as_me: failed program was:" >&5 17649 echo "$as_me: failed program was:" >&5
15769cat conftest.$ac_ext >&5 17650sed 's/^/| /' conftest.$ac_ext >&5
15770 17651
15771 echo "$as_me:15771: result: no" >&5 17652
17653 echo "$as_me:$LINENO: result: no" >&5
15772echo "${ECHO_T}no" >&6 17654echo "${ECHO_T}no" >&6
15773 system_lastlog_path=no 17655 system_lastlog_path=no
15774 17656
15775fi 17657fi
15776rm -f conftest.$ac_objext conftest.$ac_ext 17658rm -f conftest.$ac_objext conftest.$ac_ext
15777 17659
17660
15778fi 17661fi
15779rm -f conftest.$ac_objext conftest.$ac_ext 17662rm -f conftest.$ac_objext conftest.$ac_ext
15780 17663
@@ -15786,24 +17669,28 @@ if test -z "$conf_lastlog_location"; then
15786 fi 17669 fi
15787 done 17670 done
15788 if test -z "$conf_lastlog_location"; then 17671 if test -z "$conf_lastlog_location"; then
15789 { echo "$as_me:15789: WARNING: ** Cannot find lastlog **" >&5 17672 { echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5
15790echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;} 17673echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
15791 fi 17674 fi
15792 fi 17675 fi
15793fi 17676fi
15794 17677
15795if test -n "$conf_lastlog_location"; then 17678if test -n "$conf_lastlog_location"; then
15796 cat >>confdefs.h <<EOF 17679 cat >>confdefs.h <<_ACEOF
15797#define CONF_LASTLOG_FILE "$conf_lastlog_location" 17680#define CONF_LASTLOG_FILE "$conf_lastlog_location"
15798EOF 17681_ACEOF
15799 17682
15800fi 17683fi
15801 17684
15802echo "$as_me:15802: checking if your system defines UTMP_FILE" >&5 17685echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5
15803echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6 17686echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6
15804cat >conftest.$ac_ext <<_ACEOF 17687cat >conftest.$ac_ext <<_ACEOF
15805#line 15805 "configure" 17688#line $LINENO "configure"
15806#include "confdefs.h" 17689/* confdefs.h. */
17690_ACEOF
17691cat confdefs.h >>conftest.$ac_ext
17692cat >>conftest.$ac_ext <<_ACEOF
17693/* end confdefs.h. */
15807 17694
15808#include <sys/types.h> 17695#include <sys/types.h>
15809#include <utmp.h> 17696#include <utmp.h>
@@ -15820,23 +17707,24 @@ main ()
15820} 17707}
15821_ACEOF 17708_ACEOF
15822rm -f conftest.$ac_objext 17709rm -f conftest.$ac_objext
15823if { (eval echo "$as_me:15823: \"$ac_compile\"") >&5 17710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15824 (eval $ac_compile) 2>&5 17711 (eval $ac_compile) 2>&5
15825 ac_status=$? 17712 ac_status=$?
15826 echo "$as_me:15826: \$? = $ac_status" >&5 17713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827 (exit $ac_status); } && 17714 (exit $ac_status); } &&
15828 { ac_try='test -s conftest.$ac_objext' 17715 { ac_try='test -s conftest.$ac_objext'
15829 { (eval echo "$as_me:15829: \"$ac_try\"") >&5 17716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15830 (eval $ac_try) 2>&5 17717 (eval $ac_try) 2>&5
15831 ac_status=$? 17718 ac_status=$?
15832 echo "$as_me:15832: \$? = $ac_status" >&5 17719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15833 (exit $ac_status); }; }; then 17720 (exit $ac_status); }; }; then
15834 echo "$as_me:15834: result: yes" >&5 17721 echo "$as_me:$LINENO: result: yes" >&5
15835echo "${ECHO_T}yes" >&6 17722echo "${ECHO_T}yes" >&6
15836else 17723else
15837 echo "$as_me: failed program was:" >&5 17724 echo "$as_me: failed program was:" >&5
15838cat conftest.$ac_ext >&5 17725sed 's/^/| /' conftest.$ac_ext >&5
15839 echo "$as_me:15839: result: no" >&5 17726
17727 echo "$as_me:$LINENO: result: no" >&5
15840echo "${ECHO_T}no" >&6 17728echo "${ECHO_T}no" >&6
15841 system_utmp_path=no 17729 system_utmp_path=no
15842 17730
@@ -15850,25 +17738,29 @@ if test -z "$conf_utmp_location"; then
15850 fi 17738 fi
15851 done 17739 done
15852 if test -z "$conf_utmp_location"; then 17740 if test -z "$conf_utmp_location"; then
15853 cat >>confdefs.h <<\EOF 17741 cat >>confdefs.h <<\_ACEOF
15854#define DISABLE_UTMP 1 17742#define DISABLE_UTMP 1
15855EOF 17743_ACEOF
15856 17744
15857 fi 17745 fi
15858 fi 17746 fi
15859fi 17747fi
15860if test -n "$conf_utmp_location"; then 17748if test -n "$conf_utmp_location"; then
15861 cat >>confdefs.h <<EOF 17749 cat >>confdefs.h <<_ACEOF
15862#define CONF_UTMP_FILE "$conf_utmp_location" 17750#define CONF_UTMP_FILE "$conf_utmp_location"
15863EOF 17751_ACEOF
15864 17752
15865fi 17753fi
15866 17754
15867echo "$as_me:15867: checking if your system defines WTMP_FILE" >&5 17755echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5
15868echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6 17756echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6
15869cat >conftest.$ac_ext <<_ACEOF 17757cat >conftest.$ac_ext <<_ACEOF
15870#line 15870 "configure" 17758#line $LINENO "configure"
15871#include "confdefs.h" 17759/* confdefs.h. */
17760_ACEOF
17761cat confdefs.h >>conftest.$ac_ext
17762cat >>conftest.$ac_ext <<_ACEOF
17763/* end confdefs.h. */
15872 17764
15873#include <sys/types.h> 17765#include <sys/types.h>
15874#include <utmp.h> 17766#include <utmp.h>
@@ -15885,23 +17777,24 @@ main ()
15885} 17777}
15886_ACEOF 17778_ACEOF
15887rm -f conftest.$ac_objext 17779rm -f conftest.$ac_objext
15888if { (eval echo "$as_me:15888: \"$ac_compile\"") >&5 17780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15889 (eval $ac_compile) 2>&5 17781 (eval $ac_compile) 2>&5
15890 ac_status=$? 17782 ac_status=$?
15891 echo "$as_me:15891: \$? = $ac_status" >&5 17783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15892 (exit $ac_status); } && 17784 (exit $ac_status); } &&
15893 { ac_try='test -s conftest.$ac_objext' 17785 { ac_try='test -s conftest.$ac_objext'
15894 { (eval echo "$as_me:15894: \"$ac_try\"") >&5 17786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15895 (eval $ac_try) 2>&5 17787 (eval $ac_try) 2>&5
15896 ac_status=$? 17788 ac_status=$?
15897 echo "$as_me:15897: \$? = $ac_status" >&5 17789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15898 (exit $ac_status); }; }; then 17790 (exit $ac_status); }; }; then
15899 echo "$as_me:15899: result: yes" >&5 17791 echo "$as_me:$LINENO: result: yes" >&5
15900echo "${ECHO_T}yes" >&6 17792echo "${ECHO_T}yes" >&6
15901else 17793else
15902 echo "$as_me: failed program was:" >&5 17794 echo "$as_me: failed program was:" >&5
15903cat conftest.$ac_ext >&5 17795sed 's/^/| /' conftest.$ac_ext >&5
15904 echo "$as_me:15904: result: no" >&5 17796
17797 echo "$as_me:$LINENO: result: no" >&5
15905echo "${ECHO_T}no" >&6 17798echo "${ECHO_T}no" >&6
15906 system_wtmp_path=no 17799 system_wtmp_path=no
15907 17800
@@ -15915,25 +17808,30 @@ if test -z "$conf_wtmp_location"; then
15915 fi 17808 fi
15916 done 17809 done
15917 if test -z "$conf_wtmp_location"; then 17810 if test -z "$conf_wtmp_location"; then
15918 cat >>confdefs.h <<\EOF 17811 cat >>confdefs.h <<\_ACEOF
15919#define DISABLE_WTMP 1 17812#define DISABLE_WTMP 1
15920EOF 17813_ACEOF
15921 17814
15922 fi 17815 fi
15923 fi 17816 fi
15924fi 17817fi
15925if test -n "$conf_wtmp_location"; then 17818if test -n "$conf_wtmp_location"; then
15926 cat >>confdefs.h <<EOF 17819 cat >>confdefs.h <<_ACEOF
15927#define CONF_WTMP_FILE "$conf_wtmp_location" 17820#define CONF_WTMP_FILE "$conf_wtmp_location"
15928EOF 17821_ACEOF
15929 17822
15930fi 17823fi
15931 17824
15932echo "$as_me:15932: checking if your system defines UTMPX_FILE" >&5 17825
17826echo "$as_me:$LINENO: checking if your system defines UTMPX_FILE" >&5
15933echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6 17827echo $ECHO_N "checking if your system defines UTMPX_FILE... $ECHO_C" >&6
15934cat >conftest.$ac_ext <<_ACEOF 17828cat >conftest.$ac_ext <<_ACEOF
15935#line 15935 "configure" 17829#line $LINENO "configure"
15936#include "confdefs.h" 17830/* confdefs.h. */
17831_ACEOF
17832cat confdefs.h >>conftest.$ac_ext
17833cat >>conftest.$ac_ext <<_ACEOF
17834/* end confdefs.h. */
15937 17835
15938#include <sys/types.h> 17836#include <sys/types.h>
15939#include <utmp.h> 17837#include <utmp.h>
@@ -15953,23 +17851,24 @@ main ()
15953} 17851}
15954_ACEOF 17852_ACEOF
15955rm -f conftest.$ac_objext 17853rm -f conftest.$ac_objext
15956if { (eval echo "$as_me:15956: \"$ac_compile\"") >&5 17854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15957 (eval $ac_compile) 2>&5 17855 (eval $ac_compile) 2>&5
15958 ac_status=$? 17856 ac_status=$?
15959 echo "$as_me:15959: \$? = $ac_status" >&5 17857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15960 (exit $ac_status); } && 17858 (exit $ac_status); } &&
15961 { ac_try='test -s conftest.$ac_objext' 17859 { ac_try='test -s conftest.$ac_objext'
15962 { (eval echo "$as_me:15962: \"$ac_try\"") >&5 17860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15963 (eval $ac_try) 2>&5 17861 (eval $ac_try) 2>&5
15964 ac_status=$? 17862 ac_status=$?
15965 echo "$as_me:15965: \$? = $ac_status" >&5 17863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15966 (exit $ac_status); }; }; then 17864 (exit $ac_status); }; }; then
15967 echo "$as_me:15967: result: yes" >&5 17865 echo "$as_me:$LINENO: result: yes" >&5
15968echo "${ECHO_T}yes" >&6 17866echo "${ECHO_T}yes" >&6
15969else 17867else
15970 echo "$as_me: failed program was:" >&5 17868 echo "$as_me: failed program was:" >&5
15971cat conftest.$ac_ext >&5 17869sed 's/^/| /' conftest.$ac_ext >&5
15972 echo "$as_me:15972: result: no" >&5 17870
17871 echo "$as_me:$LINENO: result: no" >&5
15973echo "${ECHO_T}no" >&6 17872echo "${ECHO_T}no" >&6
15974 system_utmpx_path=no 17873 system_utmpx_path=no
15975 17874
@@ -15977,23 +17876,27 @@ fi
15977rm -f conftest.$ac_objext conftest.$ac_ext 17876rm -f conftest.$ac_objext conftest.$ac_ext
15978if test -z "$conf_utmpx_location"; then 17877if test -z "$conf_utmpx_location"; then
15979 if test x"$system_utmpx_path" = x"no" ; then 17878 if test x"$system_utmpx_path" = x"no" ; then
15980 cat >>confdefs.h <<\EOF 17879 cat >>confdefs.h <<\_ACEOF
15981#define DISABLE_UTMPX 1 17880#define DISABLE_UTMPX 1
15982EOF 17881_ACEOF
15983 17882
15984 fi 17883 fi
15985else 17884else
15986 cat >>confdefs.h <<EOF 17885 cat >>confdefs.h <<_ACEOF
15987#define CONF_UTMPX_FILE "$conf_utmpx_location" 17886#define CONF_UTMPX_FILE "$conf_utmpx_location"
15988EOF 17887_ACEOF
15989 17888
15990fi 17889fi
15991 17890
15992echo "$as_me:15992: checking if your system defines WTMPX_FILE" >&5 17891echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5
15993echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6 17892echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6
15994cat >conftest.$ac_ext <<_ACEOF 17893cat >conftest.$ac_ext <<_ACEOF
15995#line 15995 "configure" 17894#line $LINENO "configure"
15996#include "confdefs.h" 17895/* confdefs.h. */
17896_ACEOF
17897cat confdefs.h >>conftest.$ac_ext
17898cat >>conftest.$ac_ext <<_ACEOF
17899/* end confdefs.h. */
15997 17900
15998#include <sys/types.h> 17901#include <sys/types.h>
15999#include <utmp.h> 17902#include <utmp.h>
@@ -16013,23 +17916,24 @@ main ()
16013} 17916}
16014_ACEOF 17917_ACEOF
16015rm -f conftest.$ac_objext 17918rm -f conftest.$ac_objext
16016if { (eval echo "$as_me:16016: \"$ac_compile\"") >&5 17919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16017 (eval $ac_compile) 2>&5 17920 (eval $ac_compile) 2>&5
16018 ac_status=$? 17921 ac_status=$?
16019 echo "$as_me:16019: \$? = $ac_status" >&5 17922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16020 (exit $ac_status); } && 17923 (exit $ac_status); } &&
16021 { ac_try='test -s conftest.$ac_objext' 17924 { ac_try='test -s conftest.$ac_objext'
16022 { (eval echo "$as_me:16022: \"$ac_try\"") >&5 17925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16023 (eval $ac_try) 2>&5 17926 (eval $ac_try) 2>&5
16024 ac_status=$? 17927 ac_status=$?
16025 echo "$as_me:16025: \$? = $ac_status" >&5 17928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026 (exit $ac_status); }; }; then 17929 (exit $ac_status); }; }; then
16027 echo "$as_me:16027: result: yes" >&5 17930 echo "$as_me:$LINENO: result: yes" >&5
16028echo "${ECHO_T}yes" >&6 17931echo "${ECHO_T}yes" >&6
16029else 17932else
16030 echo "$as_me: failed program was:" >&5 17933 echo "$as_me: failed program was:" >&5
16031cat conftest.$ac_ext >&5 17934sed 's/^/| /' conftest.$ac_ext >&5
16032 echo "$as_me:16032: result: no" >&5 17935
17936 echo "$as_me:$LINENO: result: no" >&5
16033echo "${ECHO_T}no" >&6 17937echo "${ECHO_T}no" >&6
16034 system_wtmpx_path=no 17938 system_wtmpx_path=no
16035 17939
@@ -16037,21 +17941,22 @@ fi
16037rm -f conftest.$ac_objext conftest.$ac_ext 17941rm -f conftest.$ac_objext conftest.$ac_ext
16038if test -z "$conf_wtmpx_location"; then 17942if test -z "$conf_wtmpx_location"; then
16039 if test x"$system_wtmpx_path" = x"no" ; then 17943 if test x"$system_wtmpx_path" = x"no" ; then
16040 cat >>confdefs.h <<\EOF 17944 cat >>confdefs.h <<\_ACEOF
16041#define DISABLE_WTMPX 1 17945#define DISABLE_WTMPX 1
16042EOF 17946_ACEOF
16043 17947
16044 fi 17948 fi
16045else 17949else
16046 cat >>confdefs.h <<EOF 17950 cat >>confdefs.h <<_ACEOF
16047#define CONF_WTMPX_FILE "$conf_wtmpx_location" 17951#define CONF_WTMPX_FILE "$conf_wtmpx_location"
16048EOF 17952_ACEOF
16049 17953
16050fi 17954fi
16051 17955
17956
16052if test ! -z "$blibpath" ; then 17957if test ! -z "$blibpath" ; then
16053 LDFLAGS="$LDFLAGS $blibflags$blibpath" 17958 LDFLAGS="$LDFLAGS $blibflags$blibpath"
16054 { echo "$as_me:16054: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5 17959 { echo "$as_me:$LINENO: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
16055echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;} 17960echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
16056fi 17961fi
16057 17962
@@ -16062,7 +17967,8 @@ if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
16062 LIBS=`echo $LIBS | sed 's/-ldl //'` 17967 LIBS=`echo $LIBS | sed 's/-ldl //'`
16063fi 17968fi
16064 17969
16065ac_config_files="$ac_config_files Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds" 17970
17971 ac_config_files="$ac_config_files Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds"
16066 17972
16067cat >confcache <<\_ACEOF 17973cat >confcache <<\_ACEOF
16068# This file is a shell script that caches the results of configure 17974# This file is a shell script that caches the results of configure
@@ -16074,7 +17980,7 @@ cat >confcache <<\_ACEOF
16074# config.status only pays attention to the cache file if you give it 17980# config.status only pays attention to the cache file if you give it
16075# the --recheck option to rerun configure. 17981# the --recheck option to rerun configure.
16076# 17982#
16077# `ac_cv_env_foo' variables (set or unset) will be overriden when 17983# `ac_cv_env_foo' variables (set or unset) will be overridden when
16078# loading this file, other *unset* `ac_cv_foo' will be assigned the 17984# loading this file, other *unset* `ac_cv_foo' will be assigned the
16079# following values. 17985# following values.
16080 17986
@@ -16109,7 +18015,7 @@ _ACEOF
16109 t end 18015 t end
16110 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 18016 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16111 : end' >>confcache 18017 : end' >>confcache
16112if cmp -s $cache_file confcache; then :; else 18018if diff $cache_file confcache >/dev/null 2>&1; then :; else
16113 if test -w $cache_file; then 18019 if test -w $cache_file; then
16114 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" 18020 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16115 cat confcache >$cache_file 18021 cat confcache >$cache_file
@@ -16140,35 +18046,227 @@ fi
16140 18046
16141DEFS=-DHAVE_CONFIG_H 18047DEFS=-DHAVE_CONFIG_H
16142 18048
18049ac_libobjs=
18050ac_ltlibobjs=
18051for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18052 # 1. Remove the extension, and $U if already installed.
18053 ac_i=`echo "$ac_i" |
18054 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
18055 # 2. Add them.
18056 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18057 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18058done
18059LIBOBJS=$ac_libobjs
18060
18061LTLIBOBJS=$ac_ltlibobjs
18062
18063
18064
16143: ${CONFIG_STATUS=./config.status} 18065: ${CONFIG_STATUS=./config.status}
16144ac_clean_files_save=$ac_clean_files 18066ac_clean_files_save=$ac_clean_files
16145ac_clean_files="$ac_clean_files $CONFIG_STATUS" 18067ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16146{ echo "$as_me:16146: creating $CONFIG_STATUS" >&5 18068{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16147echo "$as_me: creating $CONFIG_STATUS" >&6;} 18069echo "$as_me: creating $CONFIG_STATUS" >&6;}
16148cat >$CONFIG_STATUS <<_ACEOF 18070cat >$CONFIG_STATUS <<_ACEOF
16149#! $SHELL 18071#! $SHELL
16150# Generated automatically by configure. 18072# Generated by $as_me.
16151# Run this file to recreate the current configuration. 18073# Run this file to recreate the current configuration.
16152# Compiler output produced by configure, useful for debugging 18074# Compiler output produced by configure, useful for debugging
16153# configure, is in config.log if it exists. 18075# configure, is in config.log if it exists.
16154 18076
16155debug=false 18077debug=false
18078ac_cs_recheck=false
18079ac_cs_silent=false
16156SHELL=\${CONFIG_SHELL-$SHELL} 18080SHELL=\${CONFIG_SHELL-$SHELL}
16157ac_cs_invocation="\$0 \$@"
16158
16159_ACEOF 18081_ACEOF
16160 18082
16161cat >>$CONFIG_STATUS <<\_ACEOF 18083cat >>$CONFIG_STATUS <<\_ACEOF
18084## --------------------- ##
18085## M4sh Initialization. ##
18086## --------------------- ##
18087
16162# Be Bourne compatible 18088# Be Bourne compatible
16163if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 18089if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16164 emulate sh 18090 emulate sh
16165 NULLCMD=: 18091 NULLCMD=:
18092 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18093 # is contrary to our usage. Disable this feature.
18094 alias -g '${1+"$@"}'='"$@"'
16166elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 18095elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16167 set -o posix 18096 set -o posix
16168fi 18097fi
16169 18098
18099# Support unset when possible.
18100if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18101 as_unset=unset
18102else
18103 as_unset=false
18104fi
18105
18106
18107# Work around bugs in pre-3.0 UWIN ksh.
18108$as_unset ENV MAIL MAILPATH
18109PS1='$ '
18110PS2='> '
18111PS4='+ '
18112
18113# NLS nuisances.
18114for as_var in \
18115 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18116 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18117 LC_TELEPHONE LC_TIME
18118do
18119 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
18120 eval $as_var=C; export $as_var
18121 else
18122 $as_unset $as_var
18123 fi
18124done
18125
18126# Required to use basename.
18127if expr a : '\(a\)' >/dev/null 2>&1; then
18128 as_expr=expr
18129else
18130 as_expr=false
18131fi
18132
18133if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18134 as_basename=basename
18135else
18136 as_basename=false
18137fi
18138
18139
16170# Name of the executable. 18140# Name of the executable.
16171as_me=`echo "$0" |sed 's,.*[\\/],,'` 18141as_me=`$as_basename "$0" ||
18142$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18143 X"$0" : 'X\(//\)$' \| \
18144 X"$0" : 'X\(/\)$' \| \
18145 . : '\(.\)' 2>/dev/null ||
18146echo X/"$0" |
18147 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18148 /^X\/\(\/\/\)$/{ s//\1/; q; }
18149 /^X\/\(\/\).*/{ s//\1/; q; }
18150 s/.*/./; q'`
18151
18152
18153# PATH needs CR, and LINENO needs CR and PATH.
18154# Avoid depending upon Character Ranges.
18155as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18156as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18157as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18158as_cr_digits='0123456789'
18159as_cr_alnum=$as_cr_Letters$as_cr_digits
18160
18161# The user is always right.
18162if test "${PATH_SEPARATOR+set}" != set; then
18163 echo "#! /bin/sh" >conf$$.sh
18164 echo "exit 0" >>conf$$.sh
18165 chmod +x conf$$.sh
18166 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
18167 PATH_SEPARATOR=';'
18168 else
18169 PATH_SEPARATOR=:
18170 fi
18171 rm -f conf$$.sh
18172fi
18173
18174
18175 as_lineno_1=$LINENO
18176 as_lineno_2=$LINENO
18177 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18178 test "x$as_lineno_1" != "x$as_lineno_2" &&
18179 test "x$as_lineno_3" = "x$as_lineno_2" || {
18180 # Find who we are. Look in the path if we contain no path at all
18181 # relative or not.
18182 case $0 in
18183 *[\\/]* ) as_myself=$0 ;;
18184 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18185for as_dir in $PATH
18186do
18187 IFS=$as_save_IFS
18188 test -z "$as_dir" && as_dir=.
18189 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18190done
18191
18192 ;;
18193 esac
18194 # We did not find ourselves, most probably we were run as `sh COMMAND'
18195 # in which case we are not to be found in the path.
18196 if test "x$as_myself" = x; then
18197 as_myself=$0
18198 fi
18199 if test ! -f "$as_myself"; then
18200 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18201echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18202 { (exit 1); exit 1; }; }
18203 fi
18204 case $CONFIG_SHELL in
18205 '')
18206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18207for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18208do
18209 IFS=$as_save_IFS
18210 test -z "$as_dir" && as_dir=.
18211 for as_base in sh bash ksh sh5; do
18212 case $as_dir in
18213 /*)
18214 if ("$as_dir/$as_base" -c '
18215 as_lineno_1=$LINENO
18216 as_lineno_2=$LINENO
18217 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18218 test "x$as_lineno_1" != "x$as_lineno_2" &&
18219 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
18220 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18221 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
18222 CONFIG_SHELL=$as_dir/$as_base
18223 export CONFIG_SHELL
18224 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18225 fi;;
18226 esac
18227 done
18228done
18229;;
18230 esac
18231
18232 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18233 # uniformly replaced by the line number. The first 'sed' inserts a
18234 # line-number line before each line; the second 'sed' does the real
18235 # work. The second script uses 'N' to pair each line-number line
18236 # with the numbered line, and appends trailing '-' during
18237 # substitution so that $LINENO is not a special case at line end.
18238 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18239 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18240 sed '=' <$as_myself |
18241 sed '
18242 N
18243 s,$,-,
18244 : loop
18245 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18246 t loop
18247 s,-$,,
18248 s,^['$as_cr_digits']*\n,,
18249 ' >$as_me.lineno &&
18250 chmod +x $as_me.lineno ||
18251 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18252echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18253 { (exit 1); exit 1; }; }
18254
18255 # Don't try to exec as it changes $[0], causing all sort of problems
18256 # (the dirname of $[0] is not the place where we might find the
18257 # original and so on. Autoconf is especially sensible to this).
18258 . ./$as_me.lineno
18259 # Exit status is that of the last command.
18260 exit
18261}
18262
18263
18264case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18265 *c*,-n*) ECHO_N= ECHO_C='
18266' ECHO_T=' ' ;;
18267 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18268 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18269esac
16172 18270
16173if expr a : '\(a\)' >/dev/null 2>&1; then 18271if expr a : '\(a\)' >/dev/null 2>&1; then
16174 as_expr=expr 18272 as_expr=expr
@@ -16194,24 +18292,20 @@ else
16194fi 18292fi
16195rm -f conf$$ conf$$.exe conf$$.file 18293rm -f conf$$ conf$$.exe conf$$.file
16196 18294
16197as_executable_p="test -f" 18295if mkdir -p . 2>/dev/null; then
16198 18296 as_mkdir_p=:
16199# Support unset when possible.
16200if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16201 as_unset=unset
16202else 18297else
16203 as_unset=false 18298 as_mkdir_p=false
16204fi 18299fi
16205 18300
16206# NLS nuisances. 18301as_executable_p="test -f"
16207$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } 18302
16208$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } 18303# Sed expression to map a string onto a valid CPP name.
16209$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } 18304as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16210$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } 18305
16211$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } 18306# Sed expression to map a string onto a valid variable name.
16212$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } 18307as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16213$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } 18308
16214$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16215 18309
16216# IFS 18310# IFS
16217# We need space, tab and new line, in precisely that order. 18311# We need space, tab and new line, in precisely that order.
@@ -16220,10 +18314,34 @@ as_nl='
16220IFS=" $as_nl" 18314IFS=" $as_nl"
16221 18315
16222# CDPATH. 18316# CDPATH.
16223$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } 18317$as_unset CDPATH
16224 18318
16225exec 6>&1 18319exec 6>&1
16226 18320
18321# Open the log real soon, to keep \$[0] and so on meaningful, and to
18322# report actual input values of CONFIG_FILES etc. instead of their
18323# values after options handling. Logging --version etc. is OK.
18324exec 5>>config.log
18325{
18326 echo
18327 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18328## Running $as_me. ##
18329_ASBOX
18330} >&5
18331cat >&5 <<_CSEOF
18332
18333This file was extended by $as_me, which was
18334generated by GNU Autoconf 2.57. Invocation command line was
18335
18336 CONFIG_FILES = $CONFIG_FILES
18337 CONFIG_HEADERS = $CONFIG_HEADERS
18338 CONFIG_LINKS = $CONFIG_LINKS
18339 CONFIG_COMMANDS = $CONFIG_COMMANDS
18340 $ $0 $@
18341
18342_CSEOF
18343echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18344echo >&5
16227_ACEOF 18345_ACEOF
16228 18346
16229# Files that config.status was made for. 18347# Files that config.status was made for.
@@ -16243,7 +18361,7 @@ if test -n "$ac_config_commands"; then
16243 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS 18361 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16244fi 18362fi
16245 18363
16246cat >>$CONFIG_STATUS <<\EOF 18364cat >>$CONFIG_STATUS <<\_ACEOF
16247 18365
16248ac_cs_usage="\ 18366ac_cs_usage="\
16249\`$as_me' instantiates files from templates according to the 18367\`$as_me' instantiates files from templates according to the
@@ -16253,6 +18371,7 @@ Usage: $0 [OPTIONS] [FILE]...
16253 18371
16254 -h, --help print this help, then exit 18372 -h, --help print this help, then exit
16255 -V, --version print version number, then exit 18373 -V, --version print version number, then exit
18374 -q, --quiet do not print progress messages
16256 -d, --debug don't remove temporary files 18375 -d, --debug don't remove temporary files
16257 --recheck update $as_me by reconfiguring in the same conditions 18376 --recheck update $as_me by reconfiguring in the same conditions
16258 --file=FILE[:TEMPLATE] 18377 --file=FILE[:TEMPLATE]
@@ -16267,12 +18386,12 @@ Configuration headers:
16267$config_headers 18386$config_headers
16268 18387
16269Report bugs to <bug-autoconf@gnu.org>." 18388Report bugs to <bug-autoconf@gnu.org>."
16270EOF 18389_ACEOF
16271 18390
16272cat >>$CONFIG_STATUS <<EOF 18391cat >>$CONFIG_STATUS <<_ACEOF
16273ac_cs_version="\\ 18392ac_cs_version="\\
16274config.status 18393config.status
16275configured by $0, generated by GNU Autoconf 2.52, 18394configured by $0, generated by GNU Autoconf 2.57,
16276 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" 18395 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16277 18396
16278Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 18397Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -16281,9 +18400,9 @@ This config.status script is free software; the Free Software Foundation
16281gives unlimited permission to copy, distribute and modify it." 18400gives unlimited permission to copy, distribute and modify it."
16282srcdir=$srcdir 18401srcdir=$srcdir
16283INSTALL="$INSTALL" 18402INSTALL="$INSTALL"
16284EOF 18403_ACEOF
16285 18404
16286cat >>$CONFIG_STATUS <<\EOF 18405cat >>$CONFIG_STATUS <<\_ACEOF
16287# If no file are specified by the user, then we need to provide default 18406# If no file are specified by the user, then we need to provide default
16288# value. By we need to know if files were specified by the user. 18407# value. By we need to know if files were specified by the user.
16289ac_need_defaults=: 18408ac_need_defaults=:
@@ -16293,30 +18412,30 @@ do
16293 --*=*) 18412 --*=*)
16294 ac_option=`expr "x$1" : 'x\([^=]*\)='` 18413 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16295 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` 18414 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16296 shift 18415 ac_shift=:
16297 set dummy "$ac_option" "$ac_optarg" ${1+"$@"} 18416 ;;
16298 shift 18417 -*)
18418 ac_option=$1
18419 ac_optarg=$2
18420 ac_shift=shift
16299 ;; 18421 ;;
16300 -*);;
16301 *) # This is not an option, so the user has probably given explicit 18422 *) # This is not an option, so the user has probably given explicit
16302 # arguments. 18423 # arguments.
18424 ac_option=$1
16303 ac_need_defaults=false;; 18425 ac_need_defaults=false;;
16304 esac 18426 esac
16305 18427
16306 case $1 in 18428 case $ac_option in
16307 # Handling of the options. 18429 # Handling of the options.
16308EOF 18430_ACEOF
16309cat >>$CONFIG_STATUS <<EOF 18431cat >>$CONFIG_STATUS <<\_ACEOF
16310 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 18432 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16311 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" 18433 ac_cs_recheck=: ;;
16312 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16313EOF
16314cat >>$CONFIG_STATUS <<\EOF
16315 --version | --vers* | -V ) 18434 --version | --vers* | -V )
16316 echo "$ac_cs_version"; exit 0 ;; 18435 echo "$ac_cs_version"; exit 0 ;;
16317 --he | --h) 18436 --he | --h)
16318 # Conflict between --help and --header 18437 # Conflict between --help and --header
16319 { { echo "$as_me:16319: error: ambiguous option: $1 18438 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16320Try \`$0 --help' for more information." >&5 18439Try \`$0 --help' for more information." >&5
16321echo "$as_me: error: ambiguous option: $1 18440echo "$as_me: error: ambiguous option: $1
16322Try \`$0 --help' for more information." >&2;} 18441Try \`$0 --help' for more information." >&2;}
@@ -16326,16 +18445,19 @@ Try \`$0 --help' for more information." >&2;}
16326 --debug | --d* | -d ) 18445 --debug | --d* | -d )
16327 debug=: ;; 18446 debug=: ;;
16328 --file | --fil | --fi | --f ) 18447 --file | --fil | --fi | --f )
16329 shift 18448 $ac_shift
16330 CONFIG_FILES="$CONFIG_FILES $1" 18449 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16331 ac_need_defaults=false;; 18450 ac_need_defaults=false;;
16332 --header | --heade | --head | --hea ) 18451 --header | --heade | --head | --hea )
16333 shift 18452 $ac_shift
16334 CONFIG_HEADERS="$CONFIG_HEADERS $1" 18453 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16335 ac_need_defaults=false;; 18454 ac_need_defaults=false;;
18455 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18456 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18457 ac_cs_silent=: ;;
16336 18458
16337 # This is an error. 18459 # This is an error.
16338 -*) { { echo "$as_me:16338: error: unrecognized option: $1 18460 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16339Try \`$0 --help' for more information." >&5 18461Try \`$0 --help' for more information." >&5
16340echo "$as_me: error: unrecognized option: $1 18462echo "$as_me: error: unrecognized option: $1
16341Try \`$0 --help' for more information." >&2;} 18463Try \`$0 --help' for more information." >&2;}
@@ -16347,25 +18469,27 @@ Try \`$0 --help' for more information." >&2;}
16347 shift 18469 shift
16348done 18470done
16349 18471
16350exec 5>>config.log 18472ac_configure_extra_args=
16351cat >&5 << _ACEOF
16352 18473
16353## ----------------------- ## 18474if $ac_cs_silent; then
16354## Running config.status. ## 18475 exec 6>/dev/null
16355## ----------------------- ## 18476 ac_configure_extra_args="$ac_configure_extra_args --silent"
18477fi
16356 18478
16357This file was extended by $as_me 2.52, executed with 18479_ACEOF
16358 CONFIG_FILES = $CONFIG_FILES 18480cat >>$CONFIG_STATUS <<_ACEOF
16359 CONFIG_HEADERS = $CONFIG_HEADERS 18481if \$ac_cs_recheck; then
16360 CONFIG_LINKS = $CONFIG_LINKS 18482 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16361 CONFIG_COMMANDS = $CONFIG_COMMANDS 18483 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16362 > $ac_cs_invocation 18484fi
16363on `(hostname || uname -n) 2>/dev/null | sed 1q`
16364 18485
16365_ACEOF 18486_ACEOF
16366EOF
16367 18487
16368cat >>$CONFIG_STATUS <<\EOF 18488
18489
18490
18491
18492cat >>$CONFIG_STATUS <<\_ACEOF
16369for ac_config_target in $ac_config_targets 18493for ac_config_target in $ac_config_targets
16370do 18494do
16371 case "$ac_config_target" in 18495 case "$ac_config_target" in
@@ -16375,7 +18499,7 @@ do
16375 "scard/Makefile" ) CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;; 18499 "scard/Makefile" ) CONFIG_FILES="$CONFIG_FILES scard/Makefile" ;;
16376 "ssh_prng_cmds" ) CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;; 18500 "ssh_prng_cmds" ) CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
16377 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; 18501 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
16378 *) { { echo "$as_me:16378: error: invalid argument: $ac_config_target" >&5 18502 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16379echo "$as_me: error: invalid argument: $ac_config_target" >&2;} 18503echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16380 { (exit 1); exit 1; }; };; 18504 { (exit 1); exit 1; }; };;
16381 esac 18505 esac
@@ -16390,6 +18514,9 @@ if $ac_need_defaults; then
16390 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 18514 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16391fi 18515fi
16392 18516
18517# Have a temporary directory for convenience. Make it in the build tree
18518# simply because there is no reason to put it here, and in addition,
18519# creating and moving files from /tmp can sometimes cause problems.
16393# Create a temporary directory, and hook for its removal unless debugging. 18520# Create a temporary directory, and hook for its removal unless debugging.
16394$debug || 18521$debug ||
16395{ 18522{
@@ -16398,23 +18525,23 @@ $debug ||
16398} 18525}
16399 18526
16400# Create a (secure) tmp directory for tmp files. 18527# Create a (secure) tmp directory for tmp files.
16401: ${TMPDIR=/tmp} 18528
16402{ 18529{
16403 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && 18530 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
16404 test -n "$tmp" && test -d "$tmp" 18531 test -n "$tmp" && test -d "$tmp"
16405} || 18532} ||
16406{ 18533{
16407 tmp=$TMPDIR/cs$$-$RANDOM 18534 tmp=./confstat$$-$RANDOM
16408 (umask 077 && mkdir $tmp) 18535 (umask 077 && mkdir $tmp)
16409} || 18536} ||
16410{ 18537{
16411 echo "$me: cannot create a temporary directory in $TMPDIR" >&2 18538 echo "$me: cannot create a temporary directory in ." >&2
16412 { (exit 1); exit 1; } 18539 { (exit 1); exit 1; }
16413} 18540}
16414 18541
16415EOF 18542_ACEOF
16416 18543
16417cat >>$CONFIG_STATUS <<EOF 18544cat >>$CONFIG_STATUS <<_ACEOF
16418 18545
16419# 18546#
16420# CONFIG_FILES section. 18547# CONFIG_FILES section.
@@ -16427,6 +18554,12 @@ if test -n "\$CONFIG_FILES"; then
16427 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; 18554 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16428 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF 18555 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16429s,@SHELL@,$SHELL,;t t 18556s,@SHELL@,$SHELL,;t t
18557s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18558s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18559s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18560s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18561s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18562s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16430s,@exec_prefix@,$exec_prefix,;t t 18563s,@exec_prefix@,$exec_prefix,;t t
16431s,@prefix@,$prefix,;t t 18564s,@prefix@,$prefix,;t t
16432s,@program_transform_name@,$program_transform_name,;t t 18565s,@program_transform_name@,$program_transform_name,;t t
@@ -16442,19 +18575,13 @@ s,@includedir@,$includedir,;t t
16442s,@oldincludedir@,$oldincludedir,;t t 18575s,@oldincludedir@,$oldincludedir,;t t
16443s,@infodir@,$infodir,;t t 18576s,@infodir@,$infodir,;t t
16444s,@mandir@,$mandir,;t t 18577s,@mandir@,$mandir,;t t
16445s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16446s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16447s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16448s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16449s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16450s,@build_alias@,$build_alias,;t t 18578s,@build_alias@,$build_alias,;t t
16451s,@host_alias@,$host_alias,;t t 18579s,@host_alias@,$host_alias,;t t
16452s,@target_alias@,$target_alias,;t t 18580s,@target_alias@,$target_alias,;t t
18581s,@DEFS@,$DEFS,;t t
16453s,@ECHO_C@,$ECHO_C,;t t 18582s,@ECHO_C@,$ECHO_C,;t t
16454s,@ECHO_N@,$ECHO_N,;t t 18583s,@ECHO_N@,$ECHO_N,;t t
16455s,@ECHO_T@,$ECHO_T,;t t 18584s,@ECHO_T@,$ECHO_T,;t t
16456s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16457s,@DEFS@,$DEFS,;t t
16458s,@LIBS@,$LIBS,;t t 18585s,@LIBS@,$LIBS,;t t
16459s,@CC@,$CC,;t t 18586s,@CC@,$CC,;t t
16460s,@CFLAGS@,$CFLAGS,;t t 18587s,@CFLAGS@,$CFLAGS,;t t
@@ -16471,7 +18598,6 @@ s,@host@,$host,;t t
16471s,@host_cpu@,$host_cpu,;t t 18598s,@host_cpu@,$host_cpu,;t t
16472s,@host_vendor@,$host_vendor,;t t 18599s,@host_vendor@,$host_vendor,;t t
16473s,@host_os@,$host_os,;t t 18600s,@host_os@,$host_os,;t t
16474s,@AWK@,$AWK,;t t
16475s,@CPP@,$CPP,;t t 18601s,@CPP@,$CPP,;t t
16476s,@RANLIB@,$RANLIB,;t t 18602s,@RANLIB@,$RANLIB,;t t
16477s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t 18603s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
@@ -16486,6 +18612,7 @@ s,@TEST_MINUS_S_SH@,$TEST_MINUS_S_SH,;t t
16486s,@SH@,$SH,;t t 18612s,@SH@,$SH,;t t
16487s,@LOGIN_PROGRAM_FALLBACK@,$LOGIN_PROGRAM_FALLBACK,;t t 18613s,@LOGIN_PROGRAM_FALLBACK@,$LOGIN_PROGRAM_FALLBACK,;t t
16488s,@LD@,$LD,;t t 18614s,@LD@,$LD,;t t
18615s,@EGREP@,$EGREP,;t t
16489s,@LIBWRAP@,$LIBWRAP,;t t 18616s,@LIBWRAP@,$LIBWRAP,;t t
16490s,@LIBPAM@,$LIBPAM,;t t 18617s,@LIBPAM@,$LIBPAM,;t t
16491s,@INSTALL_SSH_RAND_HELPER@,$INSTALL_SSH_RAND_HELPER,;t t 18618s,@INSTALL_SSH_RAND_HELPER@,$INSTALL_SSH_RAND_HELPER,;t t
@@ -16517,11 +18644,13 @@ s,@MANTYPE@,$MANTYPE,;t t
16517s,@mansubdir@,$mansubdir,;t t 18644s,@mansubdir@,$mansubdir,;t t
16518s,@user_path@,$user_path,;t t 18645s,@user_path@,$user_path,;t t
16519s,@piddir@,$piddir,;t t 18646s,@piddir@,$piddir,;t t
18647s,@LIBOBJS@,$LIBOBJS,;t t
18648s,@LTLIBOBJS@,$LTLIBOBJS,;t t
16520CEOF 18649CEOF
16521 18650
16522EOF 18651_ACEOF
16523 18652
16524 cat >>$CONFIG_STATUS <<\EOF 18653 cat >>$CONFIG_STATUS <<\_ACEOF
16525 # Split the substitutions into bite-sized pieces for seds with 18654 # Split the substitutions into bite-sized pieces for seds with
16526 # small command number limits, like on Digital OSF/1 and HP-UX. 18655 # small command number limits, like on Digital OSF/1 and HP-UX.
16527 ac_max_sed_lines=48 18656 ac_max_sed_lines=48
@@ -16560,8 +18689,8 @@ EOF
16560 fi 18689 fi
16561fi # test -n "$CONFIG_FILES" 18690fi # test -n "$CONFIG_FILES"
16562 18691
16563EOF 18692_ACEOF
16564cat >>$CONFIG_STATUS <<\EOF 18693cat >>$CONFIG_STATUS <<\_ACEOF
16565for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue 18694for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16566 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 18695 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16567 case $ac_file in 18696 case $ac_file in
@@ -16575,7 +18704,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16575 esac 18704 esac
16576 18705
16577 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. 18706 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16578 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 18707 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18708$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16579 X"$ac_file" : 'X\(//\)[^/]' \| \ 18709 X"$ac_file" : 'X\(//\)[^/]' \| \
16580 X"$ac_file" : 'X\(//\)$' \| \ 18710 X"$ac_file" : 'X\(//\)$' \| \
16581 X"$ac_file" : 'X\(/\)' \| \ 18711 X"$ac_file" : 'X\(/\)' \| \
@@ -16586,60 +18716,84 @@ echo X"$ac_file" |
16586 /^X\(\/\/\)$/{ s//\1/; q; } 18716 /^X\(\/\/\)$/{ s//\1/; q; }
16587 /^X\(\/\).*/{ s//\1/; q; } 18717 /^X\(\/\).*/{ s//\1/; q; }
16588 s/.*/./; q'` 18718 s/.*/./; q'`
16589 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 18719 { if $as_mkdir_p; then
16590 { case "$ac_dir" in 18720 mkdir -p "$ac_dir"
16591 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16592 *) as_incr_dir=.;;
16593esac
16594as_dummy="$ac_dir"
16595for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16596 case $as_mkdir_dir in
16597 # Skip DOS drivespec
16598 ?:) as_incr_dir=$as_mkdir_dir ;;
16599 *)
16600 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16601 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16602 ;;
16603 esac
16604done; }
16605
16606 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16607 # A "../" for each directory in $ac_dir_suffix.
16608 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16609 else 18721 else
16610 ac_dir_suffix= ac_dots= 18722 as_dir="$ac_dir"
16611 fi 18723 as_dirs=
18724 while test ! -d "$as_dir"; do
18725 as_dirs="$as_dir $as_dirs"
18726 as_dir=`(dirname "$as_dir") 2>/dev/null ||
18727$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18728 X"$as_dir" : 'X\(//\)[^/]' \| \
18729 X"$as_dir" : 'X\(//\)$' \| \
18730 X"$as_dir" : 'X\(/\)' \| \
18731 . : '\(.\)' 2>/dev/null ||
18732echo X"$as_dir" |
18733 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18734 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18735 /^X\(\/\/\)$/{ s//\1/; q; }
18736 /^X\(\/\).*/{ s//\1/; q; }
18737 s/.*/./; q'`
18738 done
18739 test ! -n "$as_dirs" || mkdir $as_dirs
18740 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
18741echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
18742 { (exit 1); exit 1; }; }; }
16612 18743
16613 case $srcdir in 18744 ac_builddir=.
16614 .) ac_srcdir=. 18745
16615 if test -z "$ac_dots"; then 18746if test "$ac_dir" != .; then
16616 ac_top_srcdir=. 18747 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16617 else 18748 # A "../" for each directory in $ac_dir_suffix.
16618 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` 18749 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16619 fi ;; 18750else
16620 [\\/]* | ?:[\\/]* ) 18751 ac_dir_suffix= ac_top_builddir=
16621 ac_srcdir=$srcdir$ac_dir_suffix; 18752fi
16622 ac_top_srcdir=$srcdir ;; 18753
18754case $srcdir in
18755 .) # No --srcdir option. We are building in place.
18756 ac_srcdir=.
18757 if test -z "$ac_top_builddir"; then
18758 ac_top_srcdir=.
18759 else
18760 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18761 fi ;;
18762 [\\/]* | ?:[\\/]* ) # Absolute path.
18763 ac_srcdir=$srcdir$ac_dir_suffix;
18764 ac_top_srcdir=$srcdir ;;
16623 *) # Relative path. 18765 *) # Relative path.
16624 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix 18766 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16625 ac_top_srcdir=$ac_dots$srcdir ;; 18767 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16626 esac 18768esac
18769# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18770# absolute.
18771ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18772ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
18773ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18774ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18775
16627 18776
16628 case $INSTALL in 18777 case $INSTALL in
16629 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 18778 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16630 *) ac_INSTALL=$ac_dots$INSTALL ;; 18779 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16631 esac 18780 esac
16632 18781
16633 if test x"$ac_file" != x-; then 18782 if test x"$ac_file" != x-; then
16634 { echo "$as_me:16634: creating $ac_file" >&5 18783 { echo "$as_me:$LINENO: creating $ac_file" >&5
16635echo "$as_me: creating $ac_file" >&6;} 18784echo "$as_me: creating $ac_file" >&6;}
16636 rm -f "$ac_file" 18785 rm -f "$ac_file"
16637 fi 18786 fi
16638 # Let's still pretend it is `configure' which instantiates (i.e., don't 18787 # Let's still pretend it is `configure' which instantiates (i.e., don't
16639 # use $as_me), people would be surprised to read: 18788 # use $as_me), people would be surprised to read:
16640 # /* config.h. Generated automatically by config.status. */ 18789 # /* config.h. Generated by config.status. */
16641 configure_input="Generated automatically from `echo $ac_file_in | 18790 if test x"$ac_file" = x-; then
16642 sed 's,.*/,,'` by configure." 18791 configure_input=
18792 else
18793 configure_input="$ac_file. "
18794 fi
18795 configure_input=$configure_input"Generated from `echo $ac_file_in |
18796 sed 's,.*/,,'` by configure."
16643 18797
16644 # First look for the input files in the build tree, otherwise in the 18798 # First look for the input files in the build tree, otherwise in the
16645 # src tree. 18799 # src tree.
@@ -16649,7 +18803,7 @@ echo "$as_me: creating $ac_file" >&6;}
16649 -) echo $tmp/stdin ;; 18803 -) echo $tmp/stdin ;;
16650 [\\/$]*) 18804 [\\/$]*)
16651 # Absolute (can't be DOS-style, as IFS=:) 18805 # Absolute (can't be DOS-style, as IFS=:)
16652 test -f "$f" || { { echo "$as_me:16652: error: cannot find input file: $f" >&5 18806 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16653echo "$as_me: error: cannot find input file: $f" >&2;} 18807echo "$as_me: error: cannot find input file: $f" >&2;}
16654 { (exit 1); exit 1; }; } 18808 { (exit 1); exit 1; }; }
16655 echo $f;; 18809 echo $f;;
@@ -16662,23 +18816,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
16662 echo $srcdir/$f 18816 echo $srcdir/$f
16663 else 18817 else
16664 # /dev/null tree 18818 # /dev/null tree
16665 { { echo "$as_me:16665: error: cannot find input file: $f" >&5 18819 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16666echo "$as_me: error: cannot find input file: $f" >&2;} 18820echo "$as_me: error: cannot find input file: $f" >&2;}
16667 { (exit 1); exit 1; }; } 18821 { (exit 1); exit 1; }; }
16668 fi;; 18822 fi;;
16669 esac 18823 esac
16670 done` || { (exit 1); exit 1; } 18824 done` || { (exit 1); exit 1; }
16671EOF 18825_ACEOF
16672cat >>$CONFIG_STATUS <<EOF 18826cat >>$CONFIG_STATUS <<_ACEOF
16673 sed "$ac_vpsub 18827 sed "$ac_vpsub
16674$extrasub 18828$extrasub
16675EOF 18829_ACEOF
16676cat >>$CONFIG_STATUS <<\EOF 18830cat >>$CONFIG_STATUS <<\_ACEOF
16677:t 18831:t
16678/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 18832/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16679s,@configure_input@,$configure_input,;t t 18833s,@configure_input@,$configure_input,;t t
16680s,@srcdir@,$ac_srcdir,;t t 18834s,@srcdir@,$ac_srcdir,;t t
18835s,@abs_srcdir@,$ac_abs_srcdir,;t t
16681s,@top_srcdir@,$ac_top_srcdir,;t t 18836s,@top_srcdir@,$ac_top_srcdir,;t t
18837s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18838s,@builddir@,$ac_builddir,;t t
18839s,@abs_builddir@,$ac_abs_builddir,;t t
18840s,@top_builddir@,$ac_top_builddir,;t t
18841s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16682s,@INSTALL@,$ac_INSTALL,;t t 18842s,@INSTALL@,$ac_INSTALL,;t t
16683" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out 18843" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16684 rm -f $tmp/stdin 18844 rm -f $tmp/stdin
@@ -16690,8 +18850,8 @@ s,@INSTALL@,$ac_INSTALL,;t t
16690 fi 18850 fi
16691 18851
16692done 18852done
16693EOF 18853_ACEOF
16694cat >>$CONFIG_STATUS <<\EOF 18854cat >>$CONFIG_STATUS <<\_ACEOF
16695 18855
16696# 18856#
16697# CONFIG_HEADER section. 18857# CONFIG_HEADER section.
@@ -16723,7 +18883,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16723 * ) ac_file_in=$ac_file.in ;; 18883 * ) ac_file_in=$ac_file.in ;;
16724 esac 18884 esac
16725 18885
16726 test x"$ac_file" != x- && { echo "$as_me:16726: creating $ac_file" >&5 18886 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16727echo "$as_me: creating $ac_file" >&6;} 18887echo "$as_me: creating $ac_file" >&6;}
16728 18888
16729 # First look for the input files in the build tree, otherwise in the 18889 # First look for the input files in the build tree, otherwise in the
@@ -16734,7 +18894,7 @@ echo "$as_me: creating $ac_file" >&6;}
16734 -) echo $tmp/stdin ;; 18894 -) echo $tmp/stdin ;;
16735 [\\/$]*) 18895 [\\/$]*)
16736 # Absolute (can't be DOS-style, as IFS=:) 18896 # Absolute (can't be DOS-style, as IFS=:)
16737 test -f "$f" || { { echo "$as_me:16737: error: cannot find input file: $f" >&5 18897 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16738echo "$as_me: error: cannot find input file: $f" >&2;} 18898echo "$as_me: error: cannot find input file: $f" >&2;}
16739 { (exit 1); exit 1; }; } 18899 { (exit 1); exit 1; }; }
16740 echo $f;; 18900 echo $f;;
@@ -16747,7 +18907,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
16747 echo $srcdir/$f 18907 echo $srcdir/$f
16748 else 18908 else
16749 # /dev/null tree 18909 # /dev/null tree
16750 { { echo "$as_me:16750: error: cannot find input file: $f" >&5 18910 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16751echo "$as_me: error: cannot find input file: $f" >&2;} 18911echo "$as_me: error: cannot find input file: $f" >&2;}
16752 { (exit 1); exit 1; }; } 18912 { (exit 1); exit 1; }; }
16753 fi;; 18913 fi;;
@@ -16756,7 +18916,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
16756 # Remove the trailing spaces. 18916 # Remove the trailing spaces.
16757 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in 18917 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
16758 18918
16759EOF 18919_ACEOF
16760 18920
16761# Transform confdefs.h into two sed scripts, `conftest.defines' and 18921# Transform confdefs.h into two sed scripts, `conftest.defines' and
16762# `conftest.undefs', that substitutes the proper values into 18922# `conftest.undefs', that substitutes the proper values into
@@ -16772,7 +18932,7 @@ rm -f conftest.defines conftest.undefs
16772# `end' is used to avoid that the second main sed command (meant for 18932# `end' is used to avoid that the second main sed command (meant for
16773# 0-ary CPP macros) applies to n-ary macro definitions. 18933# 0-ary CPP macros) applies to n-ary macro definitions.
16774# See the Autoconf documentation for `clear'. 18934# See the Autoconf documentation for `clear'.
16775cat >confdef2sed.sed <<\EOF 18935cat >confdef2sed.sed <<\_ACEOF
16776s/[\\&,]/\\&/g 18936s/[\\&,]/\\&/g
16777s,[\\$`],\\&,g 18937s,[\\$`],\\&,g
16778t clear 18938t clear
@@ -16781,7 +18941,7 @@ s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1
16781t end 18941t end
16782s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp 18942s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16783: end 18943: end
16784EOF 18944_ACEOF
16785# If some macros were called several times there might be several times 18945# If some macros were called several times there might be several times
16786# the same #defines, which is useless. Nevertheless, we may not want to 18946# the same #defines, which is useless. Nevertheless, we may not want to
16787# sort them, since we want the *last* AC-DEFINE to be honored. 18947# sort them, since we want the *last* AC-DEFINE to be honored.
@@ -16792,14 +18952,14 @@ rm -f confdef2sed.sed
16792# This sed command replaces #undef with comments. This is necessary, for 18952# This sed command replaces #undef with comments. This is necessary, for
16793# example, in the case of _POSIX_SOURCE, which is predefined and required 18953# example, in the case of _POSIX_SOURCE, which is predefined and required
16794# on some systems where configure will not decide to define it. 18954# on some systems where configure will not decide to define it.
16795cat >>conftest.undefs <<\EOF 18955cat >>conftest.undefs <<\_ACEOF
16796s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, 18956s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16797EOF 18957_ACEOF
16798 18958
16799# Break up conftest.defines because some shells have a limit on the size 18959# Break up conftest.defines because some shells have a limit on the size
16800# of here documents, and old seds have small limits too (100 cmds). 18960# of here documents, and old seds have small limits too (100 cmds).
16801echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS 18961echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16802echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS 18962echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16803echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS 18963echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16804echo ' :' >>$CONFIG_STATUS 18964echo ' :' >>$CONFIG_STATUS
16805rm -f conftest.tail 18965rm -f conftest.tail
@@ -16823,7 +18983,7 @@ do
16823 mv conftest.tail conftest.defines 18983 mv conftest.tail conftest.defines
16824done 18984done
16825rm -f conftest.defines 18985rm -f conftest.defines
16826echo ' fi # egrep' >>$CONFIG_STATUS 18986echo ' fi # grep' >>$CONFIG_STATUS
16827echo >>$CONFIG_STATUS 18987echo >>$CONFIG_STATUS
16828 18988
16829# Break up conftest.undefs because some shells have a limit on the size 18989# Break up conftest.undefs because some shells have a limit on the size
@@ -16851,23 +19011,24 @@ do
16851done 19011done
16852rm -f conftest.undefs 19012rm -f conftest.undefs
16853 19013
16854cat >>$CONFIG_STATUS <<\EOF 19014cat >>$CONFIG_STATUS <<\_ACEOF
16855 # Let's still pretend it is `configure' which instantiates (i.e., don't 19015 # Let's still pretend it is `configure' which instantiates (i.e., don't
16856 # use $as_me), people would be surprised to read: 19016 # use $as_me), people would be surprised to read:
16857 # /* config.h. Generated automatically by config.status. */ 19017 # /* config.h. Generated by config.status. */
16858 if test x"$ac_file" = x-; then 19018 if test x"$ac_file" = x-; then
16859 echo "/* Generated automatically by configure. */" >$tmp/config.h 19019 echo "/* Generated by configure. */" >$tmp/config.h
16860 else 19020 else
16861 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h 19021 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
16862 fi 19022 fi
16863 cat $tmp/in >>$tmp/config.h 19023 cat $tmp/in >>$tmp/config.h
16864 rm -f $tmp/in 19024 rm -f $tmp/in
16865 if test x"$ac_file" != x-; then 19025 if test x"$ac_file" != x-; then
16866 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then 19026 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
16867 { echo "$as_me:16867: $ac_file is unchanged" >&5 19027 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16868echo "$as_me: $ac_file is unchanged" >&6;} 19028echo "$as_me: $ac_file is unchanged" >&6;}
16869 else 19029 else
16870 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 19030 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19031$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16871 X"$ac_file" : 'X\(//\)[^/]' \| \ 19032 X"$ac_file" : 'X\(//\)[^/]' \| \
16872 X"$ac_file" : 'X\(//\)$' \| \ 19033 X"$ac_file" : 'X\(//\)$' \| \
16873 X"$ac_file" : 'X\(/\)' \| \ 19034 X"$ac_file" : 'X\(/\)' \| \
@@ -16878,24 +19039,31 @@ echo X"$ac_file" |
16878 /^X\(\/\/\)$/{ s//\1/; q; } 19039 /^X\(\/\/\)$/{ s//\1/; q; }
16879 /^X\(\/\).*/{ s//\1/; q; } 19040 /^X\(\/\).*/{ s//\1/; q; }
16880 s/.*/./; q'` 19041 s/.*/./; q'`
16881 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 19042 { if $as_mkdir_p; then
16882 { case "$ac_dir" in 19043 mkdir -p "$ac_dir"
16883 [\\/]* | ?:[\\/]* ) as_incr_dir=;; 19044 else
16884 *) as_incr_dir=.;; 19045 as_dir="$ac_dir"
16885esac 19046 as_dirs=
16886as_dummy="$ac_dir" 19047 while test ! -d "$as_dir"; do
16887for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do 19048 as_dirs="$as_dir $as_dirs"
16888 case $as_mkdir_dir in 19049 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16889 # Skip DOS drivespec 19050$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16890 ?:) as_incr_dir=$as_mkdir_dir ;; 19051 X"$as_dir" : 'X\(//\)[^/]' \| \
16891 *) 19052 X"$as_dir" : 'X\(//\)$' \| \
16892 as_incr_dir=$as_incr_dir/$as_mkdir_dir 19053 X"$as_dir" : 'X\(/\)' \| \
16893 test -d "$as_incr_dir" || mkdir "$as_incr_dir" 19054 . : '\(.\)' 2>/dev/null ||
16894 ;; 19055echo X"$as_dir" |
16895 esac 19056 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16896done; } 19057 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19058 /^X\(\/\/\)$/{ s//\1/; q; }
19059 /^X\(\/\).*/{ s//\1/; q; }
19060 s/.*/./; q'`
19061 done
19062 test ! -n "$as_dirs" || mkdir $as_dirs
19063 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19064echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19065 { (exit 1); exit 1; }; }; }
16897 19066
16898 fi
16899 rm -f $ac_file 19067 rm -f $ac_file
16900 mv $tmp/config.h $ac_file 19068 mv $tmp/config.h $ac_file
16901 fi 19069 fi
@@ -16904,15 +19072,16 @@ done; }
16904 rm -f $tmp/config.h 19072 rm -f $tmp/config.h
16905 fi 19073 fi
16906done 19074done
16907EOF 19075_ACEOF
16908 19076
16909cat >>$CONFIG_STATUS <<\EOF 19077cat >>$CONFIG_STATUS <<\_ACEOF
16910 19078
16911{ (exit 0); exit 0; } 19079{ (exit 0); exit 0; }
16912EOF 19080_ACEOF
16913chmod +x $CONFIG_STATUS 19081chmod +x $CONFIG_STATUS
16914ac_clean_files=$ac_clean_files_save 19082ac_clean_files=$ac_clean_files_save
16915 19083
19084
16916# configure is writing to config.log, and then calls config.status. 19085# configure is writing to config.log, and then calls config.status.
16917# config.status does its own redirection, appending to config.log. 19086# config.status does its own redirection, appending to config.log.
16918# Unfortunately, on DOS this fails, as config.log is still kept open 19087# Unfortunately, on DOS this fails, as config.log is still kept open
@@ -16923,14 +19092,18 @@ ac_clean_files=$ac_clean_files_save
16923# need to make the FD available again. 19092# need to make the FD available again.
16924if test "$no_create" != yes; then 19093if test "$no_create" != yes; then
16925 ac_cs_success=: 19094 ac_cs_success=:
19095 ac_config_status_args=
19096 test "$silent" = yes &&
19097 ac_config_status_args="$ac_config_status_args --quiet"
16926 exec 5>/dev/null 19098 exec 5>/dev/null
16927 $SHELL $CONFIG_STATUS || ac_cs_success=false 19099 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16928 exec 5>>config.log 19100 exec 5>>config.log
16929 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 19101 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16930 # would make configure fail if this is the last instruction. 19102 # would make configure fail if this is the last instruction.
16931 $ac_cs_success || { (exit 1); exit 1; } 19103 $ac_cs_success || { (exit 1); exit 1; }
16932fi 19104fi
16933 19105
19106
16934# Print summary of options 19107# Print summary of options
16935 19108
16936# Someone please show me a better way :) 19109# Someone please show me a better way :)
@@ -16954,28 +19127,25 @@ echo " Askpass program: $E"
16954echo " Manual pages: $F" 19127echo " Manual pages: $F"
16955echo " PID file: $G" 19128echo " PID file: $G"
16956echo " Privilege separation chroot path: $H" 19129echo " Privilege separation chroot path: $H"
16957if test "x$external_path_file" = "x/etc/login.conf" ; then 19130if test "$USES_LOGIN_CONF" = "yes" ; then
16958echo " At runtime, sshd will use the path defined in $external_path_file" 19131echo " At runtime, sshd will use the path defined in /etc/login.conf"
16959echo " Make sure the path to scp is present, otherwise scp will not work"
16960else 19132else
16961echo " sshd default user PATH: $I" 19133echo " sshd default user PATH: $I"
16962 if test ! -z "$external_path_file"; then
16963echo " (If PATH is set in $external_path_file it will be used instead. If"
16964echo " used, ensure the path to scp is present, otherwise scp will not work.)"
16965 fi
16966fi 19134fi
16967if test ! -z "$superuser_path" ; then 19135if test ! -z "$superuser_path" ; then
16968echo " sshd superuser user PATH: $J" 19136echo " sshd superuser user PATH: $J"
16969fi 19137fi
16970echo " Manpage format: $MANTYPE" 19138echo " Manpage format: $MANTYPE"
16971echo " DNS support: $DNS_MSG" 19139echo " PAM support: ${PAM_MSG}"
16972echo " PAM support: $PAM_MSG" 19140echo " KerberosIV support: $KRB4_MSG"
16973echo " KerberosV support: $KRB5_MSG" 19141echo " KerberosV support: $KRB5_MSG"
16974echo " Smartcard support: $SCARD_MSG" 19142echo " Smartcard support: $SCARD_MSG"
19143echo " AFS support: $AFS_MSG"
16975echo " S/KEY support: $SKEY_MSG" 19144echo " S/KEY support: $SKEY_MSG"
16976echo " TCP Wrappers support: $TCPW_MSG" 19145echo " TCP Wrappers support: $TCPW_MSG"
16977echo " MD5 password support: $MD5_MSG" 19146echo " MD5 password support: $MD5_MSG"
16978echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" 19147echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
19148echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
16979echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 19149echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
16980echo " BSD Auth support: $BSD_AUTH_MSG" 19150echo " BSD Auth support: $BSD_AUTH_MSG"
16981echo " Random number source: $RAND_MSG" 19151echo " Random number source: $RAND_MSG"
diff --git a/configure.ac b/configure.ac
index 7ddcb777f..e5a8d6f05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.154.2.1 2003/09/16 05:48:15 tim Exp $ 1# $Id: configure.ac,v 1.113.2.1 2003/04/29 09:12:08 djm Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -9,7 +9,6 @@ AC_CANONICAL_HOST
9AC_C_BIGENDIAN 9AC_C_BIGENDIAN
10 10
11# Checks for programs. 11# Checks for programs.
12AC_PROG_AWK
13AC_PROG_CPP 12AC_PROG_CPP
14AC_PROG_RANLIB 13AC_PROG_RANLIB
15AC_PROG_INSTALL 14AC_PROG_INSTALL
@@ -55,6 +54,7 @@ fi
55# Check for some target-specific stuff 54# Check for some target-specific stuff
56case "$host" in 55case "$host" in
57*-*-aix*) 56*-*-aix*)
57 AFS_LIBS="-lld"
58 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 58 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
59 LDFLAGS="$LDFLAGS -L/usr/local/lib" 59 LDFLAGS="$LDFLAGS -L/usr/local/lib"
60 AC_MSG_CHECKING([how to specify blibpath for linker ($LD)]) 60 AC_MSG_CHECKING([how to specify blibpath for linker ($LD)])
@@ -75,36 +75,19 @@ case "$host" in
75 AC_MSG_RESULT($blibflags) 75 AC_MSG_RESULT($blibflags)
76 fi 76 fi
77 LDFLAGS="$saved_LDFLAGS" 77 LDFLAGS="$saved_LDFLAGS"
78 dnl Check for authenticate. Might be in libs.a on older AIXes
79 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)], 78 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)],
80 [AC_CHECK_LIB(s,authenticate, 79 [AC_CHECK_LIB(s,authenticate,
81 [ AC_DEFINE(WITH_AIXAUTHENTICATE) 80 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
82 LIBS="$LIBS -ls" 81 LIBS="$LIBS -ls"
83 ]) 82 ])
84 ]) 83 ])
85 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
86 AC_CHECK_DECL(loginfailed,
87 [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
88 AC_TRY_COMPILE(
89 [#include <usersec.h>],
90 [(void)loginfailed("user","host","tty",0);],
91 [AC_MSG_RESULT(yes)
92 AC_DEFINE(AIX_LOGINFAILED_4ARG)],
93 [AC_MSG_RESULT(no)]
94 )],
95 [],
96 [#include <usersec.h>]
97 )
98 AC_CHECK_FUNCS(setauthdb)
99 AC_DEFINE(BROKEN_GETADDRINFO) 84 AC_DEFINE(BROKEN_GETADDRINFO)
100 AC_DEFINE(BROKEN_REALPATH) 85 AC_DEFINE(BROKEN_REALPATH)
101 AC_DEFINE(SETEUID_BREAKS_SETUID)
102 AC_DEFINE(BROKEN_SETREUID)
103 AC_DEFINE(BROKEN_SETREGID)
104 dnl AIX handles lastlog as part of its login message 86 dnl AIX handles lastlog as part of its login message
105 AC_DEFINE(DISABLE_LASTLOG) 87 AC_DEFINE(DISABLE_LASTLOG)
106 AC_DEFINE(LOGIN_NEEDS_UTMPX) 88 AC_DEFINE(LOGIN_NEEDS_UTMPX)
107 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 89 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV)
90 AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0')
108 ;; 91 ;;
109*-*-cygwin*) 92*-*-cygwin*)
110 check_for_libcrypt_later=1 93 check_for_libcrypt_later=1
@@ -112,6 +95,7 @@ case "$host" in
112 AC_DEFINE(HAVE_CYGWIN) 95 AC_DEFINE(HAVE_CYGWIN)
113 AC_DEFINE(USE_PIPES) 96 AC_DEFINE(USE_PIPES)
114 AC_DEFINE(DISABLE_SHADOW) 97 AC_DEFINE(DISABLE_SHADOW)
98 AC_DEFINE(IPV4_DEFAULT)
115 AC_DEFINE(IP_TOS_IS_BROKEN) 99 AC_DEFINE(IP_TOS_IS_BROKEN)
116 AC_DEFINE(NO_X11_UNIX_SOCKETS) 100 AC_DEFINE(NO_X11_UNIX_SOCKETS)
117 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT) 101 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT)
@@ -145,8 +129,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
145 AC_DEFINE(LOGIN_NEEDS_UTMPX) 129 AC_DEFINE(LOGIN_NEEDS_UTMPX)
146 AC_DEFINE(DISABLE_SHADOW) 130 AC_DEFINE(DISABLE_SHADOW)
147 AC_DEFINE(DISABLE_UTMP) 131 AC_DEFINE(DISABLE_UTMP)
148 AC_DEFINE(LOCKED_PASSWD_STRING, "*") 132 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT)
149 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
150 LIBS="$LIBS -lsec -lsecpw" 133 LIBS="$LIBS -lsec -lsecpw"
151 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 134 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
152 disable_ptmx_check=yes 135 disable_ptmx_check=yes
@@ -162,8 +145,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
162 AC_DEFINE(LOGIN_NEEDS_UTMPX) 145 AC_DEFINE(LOGIN_NEEDS_UTMPX)
163 AC_DEFINE(DISABLE_SHADOW) 146 AC_DEFINE(DISABLE_SHADOW)
164 AC_DEFINE(DISABLE_UTMP) 147 AC_DEFINE(DISABLE_UTMP)
165 AC_DEFINE(LOCKED_PASSWD_STRING, "*") 148 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT)
166 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
167 LIBS="$LIBS -lsec" 149 LIBS="$LIBS -lsec"
168 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 150 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
169 ;; 151 ;;
@@ -176,8 +158,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
176 AC_DEFINE(LOGIN_NEEDS_UTMPX) 158 AC_DEFINE(LOGIN_NEEDS_UTMPX)
177 AC_DEFINE(DISABLE_SHADOW) 159 AC_DEFINE(DISABLE_SHADOW)
178 AC_DEFINE(DISABLE_UTMP) 160 AC_DEFINE(DISABLE_UTMP)
179 AC_DEFINE(LOCKED_PASSWD_STRING, "*") 161 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT)
180 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
181 LIBS="$LIBS -lsec" 162 LIBS="$LIBS -lsec"
182 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 163 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
183 ;; 164 ;;
@@ -187,7 +168,6 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
187 PATH="$PATH:/usr/etc" 168 PATH="$PATH:/usr/etc"
188 AC_DEFINE(BROKEN_INET_NTOA) 169 AC_DEFINE(BROKEN_INET_NTOA)
189 AC_DEFINE(WITH_ABBREV_NO_TTY) 170 AC_DEFINE(WITH_ABBREV_NO_TTY)
190 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
191 ;; 171 ;;
192*-*-irix6*) 172*-*-irix6*)
193 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 173 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
@@ -199,22 +179,15 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
199 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) 179 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
200 AC_DEFINE(BROKEN_INET_NTOA) 180 AC_DEFINE(BROKEN_INET_NTOA)
201 AC_DEFINE(WITH_ABBREV_NO_TTY) 181 AC_DEFINE(WITH_ABBREV_NO_TTY)
202 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
203 ;; 182 ;;
204*-*-linux*) 183*-*-linux*)
205 no_dev_ptmx=1 184 no_dev_ptmx=1
206 check_for_libcrypt_later=1 185 check_for_libcrypt_later=1
207 check_for_openpty_ctty_bug=1
208 AC_DEFINE(DONT_TRY_OTHER_AF) 186 AC_DEFINE(DONT_TRY_OTHER_AF)
209 AC_DEFINE(PAM_TTY_KLUDGE) 187 AC_DEFINE(PAM_TTY_KLUDGE)
210 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!!") 188 AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV)
211 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 189 AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0')
212 inet6_default_4in6=yes 190 inet6_default_4in6=yes
213 case `uname -r` in
214 1.*|2.0.*)
215 AC_DEFINE(BROKEN_CMSG_TYPE)
216 ;;
217 esac
218 ;; 191 ;;
219mips-sony-bsd|mips-sony-newsos4) 192mips-sony-bsd|mips-sony-newsos4)
220 AC_DEFINE(HAVE_NEWS4) 193 AC_DEFINE(HAVE_NEWS4)
@@ -247,10 +220,7 @@ mips-sony-bsd|mips-sony-newsos4)
247 AC_DEFINE(LOGIN_NEEDS_UTMPX) 220 AC_DEFINE(LOGIN_NEEDS_UTMPX)
248 AC_DEFINE(LOGIN_NEEDS_TERM) 221 AC_DEFINE(LOGIN_NEEDS_TERM)
249 AC_DEFINE(PAM_TTY_KLUDGE) 222 AC_DEFINE(PAM_TTY_KLUDGE)
250 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 223 AC_DEFINE(STREAMS_PUSH_ACQUIRES_CTTY)
251 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
252 AC_DEFINE(SSHD_ACQUIRES_CTTY)
253 external_path_file=/etc/default/login
254 # hardwire lastlog location (can't detect it on some versions) 224 # hardwire lastlog location (can't detect it on some versions)
255 conf_lastlog_location="/var/adm/lastlog" 225 conf_lastlog_location="/var/adm/lastlog"
256 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) 226 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
@@ -277,7 +247,6 @@ mips-sony-bsd|mips-sony-newsos4)
277 LDFLAGS="$LDFLAGS -L/usr/local/lib" 247 LDFLAGS="$LDFLAGS -L/usr/local/lib"
278 LIBS="$LIBS -lc89" 248 LIBS="$LIBS -lc89"
279 AC_DEFINE(USE_PIPES) 249 AC_DEFINE(USE_PIPES)
280 AC_DEFINE(SSHD_ACQUIRES_CTTY)
281 ;; 250 ;;
282*-sni-sysv*) 251*-sni-sysv*)
283 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 252 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
@@ -286,8 +255,6 @@ mips-sony-bsd|mips-sony-newsos4)
286 IPADDR_IN_DISPLAY=yes 255 IPADDR_IN_DISPLAY=yes
287 AC_DEFINE(USE_PIPES) 256 AC_DEFINE(USE_PIPES)
288 AC_DEFINE(IP_TOS_IS_BROKEN) 257 AC_DEFINE(IP_TOS_IS_BROKEN)
289 AC_DEFINE(SSHD_ACQUIRES_CTTY)
290 external_path_file=/etc/default/login
291 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX 258 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
292 # Attention: always take care to bind libsocket and libnsl before libc, 259 # Attention: always take care to bind libsocket and libnsl before libc,
293 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog 260 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
@@ -296,17 +263,11 @@ mips-sony-bsd|mips-sony-newsos4)
296 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 263 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
297 LDFLAGS="$LDFLAGS -L/usr/local/lib" 264 LDFLAGS="$LDFLAGS -L/usr/local/lib"
298 AC_DEFINE(USE_PIPES) 265 AC_DEFINE(USE_PIPES)
299 AC_DEFINE(SETEUID_BREAKS_SETUID)
300 AC_DEFINE(BROKEN_SETREUID)
301 AC_DEFINE(BROKEN_SETREGID)
302 ;; 266 ;;
303*-*-sysv5*) 267*-*-sysv5*)
304 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 268 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
305 LDFLAGS="$LDFLAGS -L/usr/local/lib" 269 LDFLAGS="$LDFLAGS -L/usr/local/lib"
306 AC_DEFINE(USE_PIPES) 270 AC_DEFINE(USE_PIPES)
307 AC_DEFINE(SETEUID_BREAKS_SETUID)
308 AC_DEFINE(BROKEN_SETREUID)
309 AC_DEFINE(BROKEN_SETREGID)
310 ;; 271 ;;
311*-*-sysv*) 272*-*-sysv*)
312 CPPFLAGS="$CPPFLAGS -I/usr/local/include" 273 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
@@ -323,7 +284,6 @@ mips-sony-bsd|mips-sony-newsos4)
323 AC_DEFINE(HAVE_SECUREWARE) 284 AC_DEFINE(HAVE_SECUREWARE)
324 AC_DEFINE(DISABLE_SHADOW) 285 AC_DEFINE(DISABLE_SHADOW)
325 AC_DEFINE(BROKEN_SAVED_UIDS) 286 AC_DEFINE(BROKEN_SAVED_UIDS)
326 AC_DEFINE(WITH_ABBREV_NO_TTY)
327 AC_CHECK_FUNCS(getluid setluid) 287 AC_CHECK_FUNCS(getluid setluid)
328 MANTYPE=man 288 MANTYPE=man
329 do_sco3_extra_lib_check=yes 289 do_sco3_extra_lib_check=yes
@@ -340,10 +300,6 @@ mips-sony-bsd|mips-sony-newsos4)
340 AC_DEFINE(HAVE_SECUREWARE) 300 AC_DEFINE(HAVE_SECUREWARE)
341 AC_DEFINE(DISABLE_SHADOW) 301 AC_DEFINE(DISABLE_SHADOW)
342 AC_DEFINE(DISABLE_FD_PASSING) 302 AC_DEFINE(DISABLE_FD_PASSING)
343 AC_DEFINE(SETEUID_BREAKS_SETUID)
344 AC_DEFINE(BROKEN_SETREUID)
345 AC_DEFINE(BROKEN_SETREGID)
346 AC_DEFINE(WITH_ABBREV_NO_TTY)
347 AC_CHECK_FUNCS(getluid setluid) 303 AC_CHECK_FUNCS(getluid setluid)
348 MANTYPE=man 304 MANTYPE=man
349 ;; 305 ;;
@@ -354,14 +310,6 @@ mips-sony-bsd|mips-sony-newsos4)
354 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" 310 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
355 MANTYPE=cat 311 MANTYPE=cat
356 ;; 312 ;;
357*-*-unicosmp*)
358 AC_DEFINE(WITH_ABBREV_NO_TTY)
359 AC_DEFINE(USE_PIPES)
360 AC_DEFINE(DISABLE_FD_PASSING)
361 LDFLAGS="$LDFLAGS"
362 LIBS="$LIBS -lgen -lacid"
363 MANTYPE=cat
364 ;;
365*-*-unicos*) 313*-*-unicos*)
366 AC_DEFINE(USE_PIPES) 314 AC_DEFINE(USE_PIPES)
367 AC_DEFINE(DISABLE_FD_PASSING) 315 AC_DEFINE(DISABLE_FD_PASSING)
@@ -394,8 +342,6 @@ mips-sony-bsd|mips-sony-newsos4)
394 fi 342 fi
395 fi 343 fi
396 AC_DEFINE(DISABLE_FD_PASSING) 344 AC_DEFINE(DISABLE_FD_PASSING)
397 AC_DEFINE(BROKEN_GETADDRINFO)
398 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin")
399 ;; 345 ;;
400 346
401*-*-nto-qnx) 347*-*-nto-qnx)
@@ -441,26 +387,14 @@ AC_ARG_WITH(libs,
441 ] 387 ]
442) 388)
443 389
444AC_MSG_CHECKING(compiler and flags for sanity)
445AC_TRY_RUN([
446#include <stdio.h>
447int main(){exit(0);}
448 ],
449 [ AC_MSG_RESULT(yes) ],
450 [
451 AC_MSG_RESULT(no)
452 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
453 ]
454)
455
456# Checks for header files. 390# Checks for header files.
457AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \ 391AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
458 getopt.h glob.h ia.h lastlog.h limits.h login.h \ 392 getopt.h glob.h ia.h lastlog.h libgen.h limits.h login.h \
459 login_cap.h maillock.h netdb.h netgroup.h \ 393 login_cap.h maillock.h netdb.h netgroup.h \
460 netinet/in_systm.h paths.h pty.h readpassphrase.h \ 394 netinet/in_systm.h paths.h pty.h readpassphrase.h \
461 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ 395 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
462 strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \ 396 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
463 sys/cdefs.h sys/mman.h sys/pstat.h sys/select.h sys/stat.h \ 397 sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
464 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \ 398 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
465 sys/un.h time.h tmpdir.h ttyent.h usersec.h \ 399 sys/un.h time.h tmpdir.h ttyent.h usersec.h \
466 util.h utime.h utmp.h utmpx.h) 400 util.h utime.h utmp.h utmpx.h)
@@ -476,46 +410,8 @@ if test "x$with_tcp_wrappers" != "xno" ; then
476 fi 410 fi
477fi 411fi
478 412
479dnl IRIX and Solaris 2.5.1 have dirname() in libgen
480AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
481 AC_CHECK_LIB(gen, dirname,[
482 AC_CACHE_CHECK([for broken dirname],
483 ac_cv_have_broken_dirname, [
484 save_LIBS="$LIBS"
485 LIBS="$LIBS -lgen"
486 AC_TRY_RUN(
487 [
488#include <libgen.h>
489#include <string.h>
490
491int main(int argc, char **argv) {
492 char *s, buf[32];
493
494 strncpy(buf,"/etc", 32);
495 s = dirname(buf);
496 if (!s || strncmp(s, "/", 32) != 0) {
497 exit(1);
498 } else {
499 exit(0);
500 }
501}
502 ],
503 [ ac_cv_have_broken_dirname="no" ],
504 [ ac_cv_have_broken_dirname="yes" ]
505 )
506 LIBS="$save_LIBS"
507 ])
508 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
509 LIBS="$LIBS -lgen"
510 AC_DEFINE(HAVE_DIRNAME)
511 AC_CHECK_HEADERS(libgen.h)
512 fi
513 ])
514])
515
516AC_CHECK_FUNC(getspnam, , 413AC_CHECK_FUNC(getspnam, ,
517 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) 414 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
518AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
519 415
520AC_ARG_WITH(rpath, 416AC_ARG_WITH(rpath,
521 [ --without-rpath Disable auto-added -R linker paths], 417 [ --without-rpath Disable auto-added -R linker paths],
@@ -712,32 +608,61 @@ AC_ARG_WITH(tcp-wrappers,
712 608
713dnl Checks for library functions. Please keep in alphabetical order 609dnl Checks for library functions. Please keep in alphabetical order
714AC_CHECK_FUNCS(\ 610AC_CHECK_FUNCS(\
715 arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename \ 611 arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename bcopy \
716 bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \ 612 bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
717 gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \ 613 gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
718 getpeereid _getpty getrlimit getttyent glob inet_aton \ 614 getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \
719 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ 615 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
720 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ 616 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openpty pstat \
721 pstat readpassphrase realpath recvmsg rresvport_af sendmsg \ 617 readpassphrase realpath recvmsg rresvport_af sendmsg setdtablesize \
722 setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ 618 setegid setenv seteuid setgroups setlogin setpcred setproctitle \
723 setproctitle setregid setresgid setresuid setreuid setrlimit \ 619 setresgid setreuid setrlimit setsid setvbuf sigaction sigvec \
724 setsid setvbuf sigaction sigvec snprintf socketpair strerror \ 620 snprintf socketpair strerror strlcat strlcpy strmode strnvis \
725 strlcat strlcpy strmode strnvis sysconf tcgetpgrp \ 621 sysconf tcgetpgrp truncate utimes vhangup vsnprintf waitpid \
726 truncate utimes vhangup vsnprintf waitpid \
727) 622)
728 623
729AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) 624AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
625AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
730 626
731dnl Make sure prototypes are defined for these before using them. 627dnl Make sure strsep prototype is defined before defining HAVE_STRSEP
732AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)]) 628AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
733AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
734 629
735dnl tcsendbreak might be a macro 630dnl IRIX and Solaris 2.5.1 have dirname() in libgen
736AC_CHECK_DECL(tcsendbreak, 631AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
737 [AC_DEFINE(HAVE_TCSENDBREAK)], 632 AC_CHECK_LIB(gen, dirname,[
738 [AC_CHECK_FUNCS(tcsendbreak)], 633 AC_CACHE_CHECK([for broken dirname],
739 [#include <termios.h>] 634 ac_cv_have_broken_dirname, [
740) 635 save_LIBS="$LIBS"
636 LIBS="$LIBS -lgen"
637 AC_TRY_RUN(
638 [
639#include <libgen.h>
640#include <string.h>
641
642int main(int argc, char **argv) {
643 char *s, buf[32];
644
645 strncpy(buf,"/etc", 32);
646 s = dirname(buf);
647 if (!s || strncmp(s, "/", 32) != 0) {
648 exit(1);
649 } else {
650 exit(0);
651 }
652}
653 ],
654 [ ac_cv_have_broken_dirname="no" ],
655 [ ac_cv_have_broken_dirname="yes" ]
656 )
657 LIBS="$save_LIBS"
658 ])
659 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
660 LIBS="$LIBS -lgen"
661 AC_DEFINE(HAVE_DIRNAME)
662 AC_CHECK_HEADERS(libgen.h)
663 fi
664 ])
665])
741 666
742dnl Checks for time functions 667dnl Checks for time functions
743AC_CHECK_FUNCS(gettimeofday time) 668AC_CHECK_FUNCS(gettimeofday time)
@@ -801,53 +726,6 @@ unlink(template); exit(0);
801) 726)
802fi 727fi
803 728
804dnl make sure that openpty does not reacquire controlling terminal
805if test ! -z "$check_for_openpty_ctty_bug"; then
806 AC_MSG_CHECKING(if openpty correctly handles controlling tty)
807 AC_TRY_RUN(
808 [
809#include <stdio.h>
810#include <sys/fcntl.h>
811#include <sys/types.h>
812#include <sys/wait.h>
813
814int
815main()
816{
817 pid_t pid;
818 int fd, ptyfd, ttyfd, status;
819
820 pid = fork();
821 if (pid < 0) { /* failed */
822 exit(1);
823 } else if (pid > 0) { /* parent */
824 waitpid(pid, &status, 0);
825 if (WIFEXITED(status))
826 exit(WEXITSTATUS(status));
827 else
828 exit(2);
829 } else { /* child */
830 close(0); close(1); close(2);
831 setsid();
832 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
833 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
834 if (fd >= 0)
835 exit(3); /* Acquired ctty: broken */
836 else
837 exit(0); /* Did not acquire ctty: OK */
838 }
839}
840 ],
841 [
842 AC_MSG_RESULT(yes)
843 ],
844 [
845 AC_MSG_RESULT(no)
846 AC_DEFINE(SSHD_ACQUIRES_CTTY)
847 ]
848 )
849fi
850
851AC_FUNC_GETPGRP 729AC_FUNC_GETPGRP
852 730
853# Check for PAM libs 731# Check for PAM libs
@@ -863,7 +741,6 @@ AC_ARG_WITH(pam,
863 AC_CHECK_LIB(dl, dlopen, , ) 741 AC_CHECK_LIB(dl, dlopen, , )
864 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing])) 742 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
865 AC_CHECK_FUNCS(pam_getenvlist) 743 AC_CHECK_FUNCS(pam_getenvlist)
866 AC_CHECK_FUNCS(pam_putenv)
867 744
868 disable_shadow=yes 745 disable_shadow=yes
869 PAM_MSG="yes" 746 PAM_MSG="yes"
@@ -1028,15 +905,13 @@ int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
1028 ], 905 ],
1029 [ 906 [
1030 AC_MSG_RESULT(no) 907 AC_MSG_RESULT(no)
1031 AC_MSG_ERROR([Your OpenSSL headers do not match your library. 908 AC_MSG_ERROR(Your OpenSSL headers do not match your library)
1032Check config.log for details.
1033Also see contrib/findssl.sh for help identifying header/library mismatches.])
1034 ] 909 ]
1035) 910)
1036 911
1037# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 912# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
1038# version in OpenSSL. Skip this for PAM 913# version in OpenSSL. Skip this for PAM
1039if test "x$check_for_libcrypt_later" = "x1"; then 914if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
1040 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") 915 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
1041fi 916fi
1042 917
@@ -1877,6 +1752,7 @@ if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1877fi 1752fi
1878 1753
1879SCARD_MSG="no" 1754SCARD_MSG="no"
1755
1880# Check whether user wants sectok support 1756# Check whether user wants sectok support
1881AC_ARG_WITH(sectok, 1757AC_ARG_WITH(sectok,
1882 [ --with-sectok Enable smartcard support using libsectok], 1758 [ --with-sectok Enable smartcard support using libsectok],
@@ -1926,29 +1802,6 @@ if test x$opensc_config_prefix != x ; then
1926 fi 1802 fi
1927fi 1803fi
1928 1804
1929# Check whether user wants DNS support
1930DNS_MSG="no"
1931AC_ARG_WITH(dns,
1932 [ --with-dns Support for fetching keys from DNS (experimental)],
1933 [
1934 if test "x$withval" != "xno" ; then
1935 DNS_MSG="yes"
1936 AC_DEFINE(DNS)
1937 AC_SEARCH_LIBS(getrrsetbyname, resolv,
1938 [AC_DEFINE(HAVE_GETRRSETBYNAME)],
1939 [
1940 # Needed by our getrrsetbyname()
1941 AC_SEARCH_LIBS(res_query, resolv)
1942 AC_SEARCH_LIBS(dn_expand, resolv)
1943 AC_CHECK_FUNCS(_getshort _getlong)
1944 AC_CHECK_MEMBER(HEADER.ad,
1945 [AC_DEFINE(HAVE_HEADER_AD)],,
1946 [#include <arpa/nameser.h>])
1947 ])
1948 fi
1949 ]
1950)
1951
1952# Check whether user wants Kerberos 5 support 1805# Check whether user wants Kerberos 5 support
1953KRB5_MSG="no" 1806KRB5_MSG="no"
1954AC_ARG_WITH(kerberos5, 1807AC_ARG_WITH(kerberos5,
@@ -1981,38 +1834,93 @@ AC_ARG_WITH(kerberos5,
1981 if test ! -z "$blibpath" ; then 1834 if test ! -z "$blibpath" ; then
1982 blibpath="$blibpath:${KRB5ROOT}/lib" 1835 blibpath="$blibpath:${KRB5ROOT}/lib"
1983 fi 1836 fi
1984 AC_SEARCH_LIBS(dn_expand, resolv) 1837 AC_CHECK_LIB(resolv, dn_expand, , )
1985
1986 AC_CHECK_LIB(gssapi,gss_init_sec_context,
1987 [ AC_DEFINE(GSSAPI)
1988 K5LIBS="-lgssapi $K5LIBS" ],
1989 [ AC_CHECK_LIB(gssapi_krb5,gss_init_sec_context,
1990 [ AC_DEFINE(GSSAPI)
1991 K5LIBS="-lgssapi_krb5 $K5LIBS" ],
1992 AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]),
1993 $K5LIBS)
1994 ],
1995 $K5LIBS)
1996
1997 AC_CHECK_HEADER(gssapi.h, ,
1998 [ unset ac_cv_header_gssapi_h
1999 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
2000 AC_CHECK_HEADERS(gssapi.h, ,
2001 AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail])
2002 )
2003 ]
2004 )
2005
2006 oldCPP="$CPPFLAGS"
2007 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
2008 AC_CHECK_HEADER(gssapi_krb5.h, ,
2009 [ CPPFLAGS="$oldCPP" ])
2010 1838
2011 KRB5=yes 1839 KRB5=yes
2012 fi 1840 fi
2013 ] 1841 ]
2014) 1842)
2015LIBS="$LIBS $K5LIBS" 1843# Check whether user wants Kerberos 4 support
1844KRB4_MSG="no"
1845AC_ARG_WITH(kerberos4,
1846 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1847 [
1848 if test "x$withval" != "xno" ; then
1849 if test "x$withval" != "xyes" ; then
1850 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1851 LDFLAGS="$LDFLAGS -L${withval}/lib"
1852 if test ! -z "$need_dash_r" ; then
1853 LDFLAGS="$LDFLAGS -R${withval}/lib"
1854 fi
1855 if test ! -z "$blibpath" ; then
1856 blibpath="$blibpath:${withval}/lib"
1857 fi
1858 else
1859 if test -d /usr/include/kerberosIV ; then
1860 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1861 fi
1862 fi
1863
1864 AC_CHECK_HEADERS(krb.h)
1865 if test "$ac_cv_header_krb_h" != yes; then
1866 AC_MSG_WARN([Cannot find krb.h, build may fail])
1867 fi
1868 AC_CHECK_LIB(krb, main)
1869 if test "$ac_cv_lib_krb_main" != yes; then
1870 AC_CHECK_LIB(krb4, main)
1871 if test "$ac_cv_lib_krb4_main" != yes; then
1872 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1873 else
1874 KLIBS="-lkrb4"
1875 fi
1876 else
1877 KLIBS="-lkrb"
1878 fi
1879 AC_CHECK_LIB(des, des_cbc_encrypt)
1880 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1881 AC_CHECK_LIB(des425, des_cbc_encrypt)
1882 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1883 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1884 else
1885 KLIBS="-ldes425"
1886 fi
1887 else
1888 KLIBS="-ldes"
1889 fi
1890 AC_CHECK_LIB(resolv, dn_expand, , )
1891 KRB4=yes
1892 KRB4_MSG="yes"
1893 AC_DEFINE(KRB4)
1894 fi
1895 ]
1896)
1897
1898# Check whether user wants AFS support
1899AFS_MSG="no"
1900AC_ARG_WITH(afs,
1901 [ --with-afs=PATH Enable AFS support],
1902 [
1903 if test "x$withval" != "xno" ; then
1904
1905 if test "x$withval" != "xyes" ; then
1906 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1907 LDFLAGS="$LDFLAGS -L${withval}/lib"
1908 fi
1909
1910 if test -z "$KRB4" ; then
1911 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1912 fi
1913
1914 LIBS="-lkafs $LIBS"
1915 if test ! -z "$AFS_LIBS" ; then
1916 LIBS="$LIBS $AFS_LIBS"
1917 fi
1918 AC_DEFINE(AFS)
1919 AFS_MSG="yes"
1920 fi
1921 ]
1922)
1923LIBS="$LIBS $KLIBS $K5LIBS"
2016 1924
2017# Looking for programs, paths and files 1925# Looking for programs, paths and files
2018 1926
@@ -2182,48 +2090,30 @@ else
2182 ) 2090 )
2183fi 2091fi
2184 2092
2185# check for /etc/default/login and use it if present.
2186AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ])
2187
2188if test "x$external_path_file" = "x/etc/default/login"; then
2189 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2190fi
2191
2192dnl BSD systems use /etc/login.conf so --with-default-path= has no effect 2093dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2193if test $ac_cv_func_login_getcapbool = "yes" -a \ 2094if test $ac_cv_func_login_getcapbool = "yes" -a \
2194 $ac_cv_header_login_cap_h = "yes" ; then 2095 $ac_cv_header_login_cap_h = "yes" ; then
2195 external_path_file=/etc/login.conf 2096 USES_LOGIN_CONF=yes
2196fi 2097fi
2197
2198# Whether to mess with the default path 2098# Whether to mess with the default path
2199SERVER_PATH_MSG="(default)" 2099SERVER_PATH_MSG="(default)"
2200AC_ARG_WITH(default-path, 2100AC_ARG_WITH(default-path,
2201 [ --with-default-path= Specify default \$PATH environment for server], 2101 [ --with-default-path= Specify default \$PATH environment for server],
2202 [ 2102 [
2203 if test "x$external_path_file" = "x/etc/login.conf" ; then 2103 if test "$USES_LOGIN_CONF" = "yes" ; then
2204 AC_MSG_WARN([ 2104 AC_MSG_WARN([
2205--with-default-path=PATH has no effect on this system. 2105--with-default-path=PATH has no effect on this system.
2206Edit /etc/login.conf instead.]) 2106Edit /etc/login.conf instead.])
2207 elif test "x$withval" != "xno" ; then 2107 elif test "x$withval" != "xno" ; then
2208 if test ! -z "$external_path_file" ; then
2209 AC_MSG_WARN([
2210--with-default-path=PATH will only be used if PATH is not defined in
2211$external_path_file .])
2212 fi
2213 user_path="$withval" 2108 user_path="$withval"
2214 SERVER_PATH_MSG="$withval" 2109 SERVER_PATH_MSG="$withval"
2215 fi 2110 fi
2216 ], 2111 ],
2217 [ if test "x$external_path_file" = "x/etc/login.conf" ; then 2112 [ if test "$USES_LOGIN_CONF" = "yes" ; then
2218 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf]) 2113 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
2219 else 2114 else
2220 if test ! -z "$external_path_file" ; then 2115 AC_TRY_RUN(
2221 AC_MSG_WARN([ 2116 [
2222If PATH is defined in $external_path_file, ensure the path to scp is included,
2223otherwise scp will not work.])
2224 fi
2225 AC_TRY_RUN(
2226 [
2227/* find out what STDPATH is */ 2117/* find out what STDPATH is */
2228#include <stdio.h> 2118#include <stdio.h>
2229#ifdef HAVE_PATHS_H 2119#ifdef HAVE_PATHS_H
@@ -2277,7 +2167,7 @@ main()
2277 fi 2167 fi
2278 fi ] 2168 fi ]
2279) 2169)
2280if test "x$external_path_file" != "x/etc/login.conf" ; then 2170if test "$USES_LOGIN_CONF" != "yes" ; then
2281 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") 2171 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2282 AC_SUBST(user_path) 2172 AC_SUBST(user_path)
2283fi 2173fi
@@ -2294,6 +2184,18 @@ AC_ARG_WITH(superuser-path,
2294) 2184)
2295 2185
2296 2186
2187# Whether to force IPv4 by default (needed on broken glibc Linux)
2188IPV4_HACK_MSG="no"
2189AC_ARG_WITH(ipv4-default,
2190 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
2191 [
2192 if test "x$withval" != "xno" ; then
2193 AC_DEFINE(IPV4_DEFAULT)
2194 IPV4_HACK_MSG="yes"
2195 fi
2196 ]
2197)
2198
2297AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses]) 2199AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
2298IPV4_IN6_HACK_MSG="no" 2200IPV4_IN6_HACK_MSG="no"
2299AC_ARG_WITH(4in6, 2201AC_ARG_WITH(4in6,
@@ -2357,67 +2259,35 @@ AC_SUBST(piddir)
2357dnl allow user to disable some login recording features 2259dnl allow user to disable some login recording features
2358AC_ARG_ENABLE(lastlog, 2260AC_ARG_ENABLE(lastlog,
2359 [ --disable-lastlog disable use of lastlog even if detected [no]], 2261 [ --disable-lastlog disable use of lastlog even if detected [no]],
2360 [ 2262 [ AC_DEFINE(DISABLE_LASTLOG) ]
2361 if test "x$enableval" = "xno" ; then
2362 AC_DEFINE(DISABLE_LASTLOG)
2363 fi
2364 ]
2365) 2263)
2366AC_ARG_ENABLE(utmp, 2264AC_ARG_ENABLE(utmp,
2367 [ --disable-utmp disable use of utmp even if detected [no]], 2265 [ --disable-utmp disable use of utmp even if detected [no]],
2368 [ 2266 [ AC_DEFINE(DISABLE_UTMP) ]
2369 if test "x$enableval" = "xno" ; then
2370 AC_DEFINE(DISABLE_UTMP)
2371 fi
2372 ]
2373) 2267)
2374AC_ARG_ENABLE(utmpx, 2268AC_ARG_ENABLE(utmpx,
2375 [ --disable-utmpx disable use of utmpx even if detected [no]], 2269 [ --disable-utmpx disable use of utmpx even if detected [no]],
2376 [ 2270 [ AC_DEFINE(DISABLE_UTMPX) ]
2377 if test "x$enableval" = "xno" ; then
2378 AC_DEFINE(DISABLE_UTMPX)
2379 fi
2380 ]
2381) 2271)
2382AC_ARG_ENABLE(wtmp, 2272AC_ARG_ENABLE(wtmp,
2383 [ --disable-wtmp disable use of wtmp even if detected [no]], 2273 [ --disable-wtmp disable use of wtmp even if detected [no]],
2384 [ 2274 [ AC_DEFINE(DISABLE_WTMP) ]
2385 if test "x$enableval" = "xno" ; then
2386 AC_DEFINE(DISABLE_WTMP)
2387 fi
2388 ]
2389) 2275)
2390AC_ARG_ENABLE(wtmpx, 2276AC_ARG_ENABLE(wtmpx,
2391 [ --disable-wtmpx disable use of wtmpx even if detected [no]], 2277 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
2392 [ 2278 [ AC_DEFINE(DISABLE_WTMPX) ]
2393 if test "x$enableval" = "xno" ; then
2394 AC_DEFINE(DISABLE_WTMPX)
2395 fi
2396 ]
2397) 2279)
2398AC_ARG_ENABLE(libutil, 2280AC_ARG_ENABLE(libutil,
2399 [ --disable-libutil disable use of libutil (login() etc.) [no]], 2281 [ --disable-libutil disable use of libutil (login() etc.) [no]],
2400 [ 2282 [ AC_DEFINE(DISABLE_LOGIN) ]
2401 if test "x$enableval" = "xno" ; then
2402 AC_DEFINE(DISABLE_LOGIN)
2403 fi
2404 ]
2405) 2283)
2406AC_ARG_ENABLE(pututline, 2284AC_ARG_ENABLE(pututline,
2407 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], 2285 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
2408 [ 2286 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
2409 if test "x$enableval" = "xno" ; then
2410 AC_DEFINE(DISABLE_PUTUTLINE)
2411 fi
2412 ]
2413) 2287)
2414AC_ARG_ENABLE(pututxline, 2288AC_ARG_ENABLE(pututxline,
2415 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], 2289 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
2416 [ 2290 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
2417 if test "x$enableval" = "xno" ; then
2418 AC_DEFINE(DISABLE_PUTUTXLINE)
2419 fi
2420 ]
2421) 2291)
2422AC_ARG_WITH(lastlog, 2292AC_ARG_WITH(lastlog,
2423 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], 2293 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
@@ -2647,28 +2517,25 @@ echo " Askpass program: $E"
2647echo " Manual pages: $F" 2517echo " Manual pages: $F"
2648echo " PID file: $G" 2518echo " PID file: $G"
2649echo " Privilege separation chroot path: $H" 2519echo " Privilege separation chroot path: $H"
2650if test "x$external_path_file" = "x/etc/login.conf" ; then 2520if test "$USES_LOGIN_CONF" = "yes" ; then
2651echo " At runtime, sshd will use the path defined in $external_path_file" 2521echo " At runtime, sshd will use the path defined in /etc/login.conf"
2652echo " Make sure the path to scp is present, otherwise scp will not work"
2653else 2522else
2654echo " sshd default user PATH: $I" 2523echo " sshd default user PATH: $I"
2655 if test ! -z "$external_path_file"; then
2656echo " (If PATH is set in $external_path_file it will be used instead. If"
2657echo " used, ensure the path to scp is present, otherwise scp will not work.)"
2658 fi
2659fi 2524fi
2660if test ! -z "$superuser_path" ; then 2525if test ! -z "$superuser_path" ; then
2661echo " sshd superuser user PATH: $J" 2526echo " sshd superuser user PATH: $J"
2662fi 2527fi
2663echo " Manpage format: $MANTYPE" 2528echo " Manpage format: $MANTYPE"
2664echo " DNS support: $DNS_MSG" 2529echo " PAM support: ${PAM_MSG}"
2665echo " PAM support: $PAM_MSG" 2530echo " KerberosIV support: $KRB4_MSG"
2666echo " KerberosV support: $KRB5_MSG" 2531echo " KerberosV support: $KRB5_MSG"
2667echo " Smartcard support: $SCARD_MSG" 2532echo " Smartcard support: $SCARD_MSG"
2533echo " AFS support: $AFS_MSG"
2668echo " S/KEY support: $SKEY_MSG" 2534echo " S/KEY support: $SKEY_MSG"
2669echo " TCP Wrappers support: $TCPW_MSG" 2535echo " TCP Wrappers support: $TCPW_MSG"
2670echo " MD5 password support: $MD5_MSG" 2536echo " MD5 password support: $MD5_MSG"
2671echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" 2537echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2538echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2672echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 2539echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2673echo " BSD Auth support: $BSD_AUTH_MSG" 2540echo " BSD Auth support: $BSD_AUTH_MSG"
2674echo " Random number source: $RAND_MSG" 2541echo " Random number source: $RAND_MSG"
diff --git a/contrib/aix/README b/contrib/aix/README
index 2a299350a..82fd8be1b 100644
--- a/contrib/aix/README
+++ b/contrib/aix/README
@@ -26,7 +26,6 @@ and for comparison with the output from this script, however no code
26from lppbuild is included and it is not required for operation. 26from lppbuild is included and it is not required for operation.
27 27
28SRC support based on examples provided by Sandor Sklar and Maarten Kreuger. 28SRC support based on examples provided by Sandor Sklar and Maarten Kreuger.
29PrivSep account handling fixes contributed by W. Earl Allen.
30 29
31 30
32Other notes: 31Other notes:
@@ -46,5 +45,3 @@ you get to keep both pieces.
46 45
47 - Darren Tucker (dtucker at zip dot com dot au) 46 - Darren Tucker (dtucker at zip dot com dot au)
48 2002/03/01 47 2002/03/01
49
50$Id: README,v 1.4 2003/08/25 05:01:04 dtucker Exp $
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh
index 727ac446d..3b3699660 100755
--- a/contrib/aix/buildbff.sh
+++ b/contrib/aix/buildbff.sh
@@ -1,7 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# buildbff.sh: Create AIX SMIT-installable OpenSSH packages 3# buildbff.sh: Create AIX SMIT-installable OpenSSH packages
4# $Id: buildbff.sh,v 1.6 2003/08/25 05:01:04 dtucker Exp $
5# 4#
6# Author: Darren Tucker (dtucker at zip dot com dot au) 5# Author: Darren Tucker (dtucker at zip dot com dot au)
7# This file is placed in the public domain and comes with absolutely 6# This file is placed in the public domain and comes with absolutely
@@ -15,9 +14,9 @@
15# create a "config.local" in your build directory or set 14# create a "config.local" in your build directory or set
16# environment variables to override these. 15# environment variables to override these.
17# 16#
18[ -z "$PERMIT_ROOT_LOGIN" ] && PERMIT_ROOT_LOGIN=no 17[ -z "$PERMIT_ROOT_LOGIN" ] || PERMIT_ROOT_LOGIN=no
19[ -z "$X11_FORWARDING" ] && X11_FORWARDING=no 18[ -z "$X11_FORWARDING" ] || X11_FORWARDING=no
20[ -z "$AIX_SRC" ] && AIX_SRC=no 19[ -z "$AIX_SRC" ] || AIX_SRC=no
21 20
22umask 022 21umask 022
23 22
@@ -32,7 +31,7 @@ else
32fi 31fi
33 32
34# 33#
35# We still support running from contrib/aix, but this is deprecated 34# We still support running from contrib/aix, but this is depreciated
36# 35#
37if pwd | egrep 'contrib/aix$' 36if pwd | egrep 'contrib/aix$'
38then 37then
@@ -122,7 +121,7 @@ cp $srcdir/README* $objdir/$PKGDIR/
122# Extract common info requires for the 'info' part of the package. 121# Extract common info requires for the 'info' part of the package.
123# AIX requires 4-part version numbers 122# AIX requires 4-part version numbers
124# 123#
125VERSION=`./ssh -V 2>&1 | cut -f 1 -d , | cut -f 2 -d _` 124VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//' | cut -f 2 -d _`
126MAJOR=`echo $VERSION | cut -f 1 -d p | cut -f 1 -d .` 125MAJOR=`echo $VERSION | cut -f 1 -d p | cut -f 1 -d .`
127MINOR=`echo $VERSION | cut -f 1 -d p | cut -f 2 -d .` 126MINOR=`echo $VERSION | cut -f 1 -d p | cut -f 2 -d .`
128PATCH=`echo $VERSION | cut -f 1 -d p | cut -f 3 -d .` 127PATCH=`echo $VERSION | cut -f 1 -d p | cut -f 3 -d .`
@@ -219,7 +218,7 @@ else
219 fi 218 fi
220 219
221 # Create user if required 220 # Create user if required
222 if lsuser ALL | cut -f1 -d: | egrep '^'$SSH_PRIVSEP_USER'\$' >/dev/null 221 if cut -f1 -d: /etc/passwd | egrep '^'$SSH_PRIVSEP_USER'\$' >/dev/null
223 then 222 then
224 echo "PrivSep user $SSH_PRIVSEP_USER already exists." 223 echo "PrivSep user $SSH_PRIVSEP_USER already exists."
225 else 224 else
diff --git a/contrib/aix/inventory.sh b/contrib/aix/inventory.sh
index 4f408e678..619493ae2 100755
--- a/contrib/aix/inventory.sh
+++ b/contrib/aix/inventory.sh
@@ -1,10 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# inventory.sh 3# inventory.sh
4# $Id: inventory.sh,v 1.5 2003/08/26 03:43:13 dtucker Exp $
5# 4#
6# Originally written by Ben Lindstrom, modified by Darren Tucker to use perl 5# Originally written by Ben Lindstrom, modified by Darren Tucker to use perl
7# This file is placed into the public domain.
8# 6#
9# This will produce an AIX package inventory file, which looks like: 7# This will produce an AIX package inventory file, which looks like:
10# 8#
diff --git a/contrib/aix/pam.conf b/contrib/aix/pam.conf
deleted file mode 100644
index 1495f43cb..000000000
--- a/contrib/aix/pam.conf
+++ /dev/null
@@ -1,20 +0,0 @@
1#
2# PAM configuration file /etc/pam.conf
3# Example for OpenSSH on AIX 5.2
4#
5
6# Authentication Management
7sshd auth required /usr/lib/security/pam_aix
8OTHER auth required /usr/lib/security/pam_aix
9
10# Account Management
11sshd account required /usr/lib/security/pam_aix
12OTHER account required /usr/lib/security/pam_aix
13
14# Session Management
15sshd password required /usr/lib/security/pam_aix
16OTHER password required /usr/lib/security/pam_aix
17
18# Password Management
19sshd session required /usr/lib/security/pam_aix
20OTHER session required /usr/lib/security/pam_aix
diff --git a/contrib/caldera/openssh.spec b/contrib/caldera/openssh.spec
index 97d6adf51..f7fbe15e5 100644
--- a/contrib/caldera/openssh.spec
+++ b/contrib/caldera/openssh.spec
@@ -17,9 +17,9 @@
17#old cvs stuff. please update before use. may be deprecated. 17#old cvs stuff. please update before use. may be deprecated.
18%define use_stable 1 18%define use_stable 1
19%if %{use_stable} 19%if %{use_stable}
20 %define version 3.7p1 20 %define version 3.6.1p2
21 %define cvs %{nil} 21 %define cvs %{nil}
22 %define release 1 22 %define release 2
23%else 23%else
24 %define version 2.9.9p2 24 %define version 2.9.9p2
25 %define cvs cvs20011009 25 %define cvs cvs20011009
@@ -364,4 +364,4 @@ fi
364* Mon Jan 01 1998 ... 364* Mon Jan 01 1998 ...
365Template Version: 1.31 365Template Version: 1.31
366 366
367$Id: openssh.spec,v 1.43.2.2 2003/09/16 06:02:40 djm Exp $ 367$Id: openssh.spec,v 1.42.2.1 2003/04/29 09:12:08 djm Exp $
diff --git a/contrib/cygwin/README b/contrib/cygwin/README
index ec58964c9..71ea3455f 100644
--- a/contrib/cygwin/README
+++ b/contrib/cygwin/README
@@ -1,4 +1,4 @@
1This package is the actual port of OpenSSH to Cygwin 1.5. 1This package is the actual port of OpenSSH to Cygwin 1.3.
2 2
3=========================================================================== 3===========================================================================
4Important change since 3.4p1-2: 4Important change since 3.4p1-2:
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config
index e9c56aea9..2c6db51e5 100644
--- a/contrib/cygwin/ssh-host-config
+++ b/contrib/cygwin/ssh-host-config
@@ -279,14 +279,12 @@ then
279# Host * 279# Host *
280# ForwardAgent no 280# ForwardAgent no
281# ForwardX11 no 281# ForwardX11 no
282# RhostsAuthentication no
282# RhostsRSAAuthentication no 283# RhostsRSAAuthentication no
283# RSAAuthentication yes 284# RSAAuthentication yes
284# PasswordAuthentication yes 285# PasswordAuthentication yes
285# HostbasedAuthentication no
286# BatchMode no 286# BatchMode no
287# CheckHostIP yes 287# CheckHostIP yes
288# AddressFamily any
289# ConnectTimeout 0
290# StrictHostKeyChecking ask 288# StrictHostKeyChecking ask
291# IdentityFile ~/.ssh/identity 289# IdentityFile ~/.ssh/identity
292# IdentityFile ~/.ssh/id_dsa 290# IdentityFile ~/.ssh/id_dsa
@@ -399,7 +397,7 @@ Port $port_number
399#HostKey ${SYSCONFDIR}/ssh_host_dsa_key 397#HostKey ${SYSCONFDIR}/ssh_host_dsa_key
400 398
401# Lifetime and size of ephemeral version 1 server key 399# Lifetime and size of ephemeral version 1 server key
402#KeyRegenerationInterval 1h 400#KeyRegenerationInterval 3600
403#ServerKeyBits 768 401#ServerKeyBits 768
404 402
405# Logging 403# Logging
@@ -409,7 +407,7 @@ Port $port_number
409 407
410# Authentication: 408# Authentication:
411 409
412#LoginGraceTime 2m 410#LoginGraceTime 120
413#PermitRootLogin yes 411#PermitRootLogin yes
414# The following setting overrides permission checks on host key files 412# The following setting overrides permission checks on host key files
415# and directories. For security reasons set this to "yes" when running 413# and directories. For security reasons set this to "yes" when running
@@ -420,6 +418,10 @@ StrictModes no
420#PubkeyAuthentication yes 418#PubkeyAuthentication yes
421#AuthorizedKeysFile .ssh/authorized_keys 419#AuthorizedKeysFile .ssh/authorized_keys
422 420
421# rhosts authentication should not be used
422#RhostsAuthentication no
423# Don't read the user's ~/.rhosts and ~/.shosts files
424#IgnoreRhosts yes
423# For this to work you will also need host keys in ${SYSCONFDIR}/ssh_known_hosts 425# For this to work you will also need host keys in ${SYSCONFDIR}/ssh_known_hosts
424#RhostsRSAAuthentication no 426#RhostsRSAAuthentication no
425# similar for protocol version 2 427# similar for protocol version 2
@@ -427,8 +429,6 @@ StrictModes no
427# Change to yes if you don't trust ~/.ssh/known_hosts for 429# Change to yes if you don't trust ~/.ssh/known_hosts for
428# RhostsRSAAuthentication and HostbasedAuthentication 430# RhostsRSAAuthentication and HostbasedAuthentication
429#IgnoreUserKnownHosts no 431#IgnoreUserKnownHosts no
430# Don't read the user's ~/.rhosts and ~/.shosts files
431#IgnoreRhosts yes
432 432
433# To disable tunneled clear text passwords, change to no here! 433# To disable tunneled clear text passwords, change to no here!
434#PasswordAuthentication yes 434#PasswordAuthentication yes
@@ -437,8 +437,6 @@ StrictModes no
437# Change to no to disable s/key passwords 437# Change to no to disable s/key passwords
438#ChallengeResponseAuthentication yes 438#ChallengeResponseAuthentication yes
439 439
440#AllowTcpForwarding yes
441#GatewayPorts no
442#X11Forwarding no 440#X11Forwarding no
443#X11DisplayOffset 10 441#X11DisplayOffset 10
444#X11UseLocalhost yes 442#X11UseLocalhost yes
@@ -449,14 +447,11 @@ StrictModes no
449UsePrivilegeSeparation $privsep_used 447UsePrivilegeSeparation $privsep_used
450#PermitUserEnvironment no 448#PermitUserEnvironment no
451#Compression yes 449#Compression yes
452#ClientAliveInterval 0
453#ClientAliveCountMax 3
454#UseDNS yes
455#PidFile /var/run/sshd.pid
456#MaxStartups 10
457 450
451#MaxStartups 10
458# no default banner path 452# no default banner path
459#Banner /some/path 453#Banner /some/path
454#VerifyReverseMapping no
460 455
461# override default of no subsystems 456# override default of no subsystems
462Subsystem sftp /usr/sbin/sftp-server 457Subsystem sftp /usr/sbin/sftp-server
diff --git a/contrib/cygwin/ssh-user-config b/contrib/cygwin/ssh-user-config
index 4da113181..5a76adbaf 100644
--- a/contrib/cygwin/ssh-user-config
+++ b/contrib/cygwin/ssh-user-config
@@ -171,8 +171,8 @@ then
171 fi 171 fi
172 if request "Do you want to use this identity to login to this machine?" 172 if request "Do you want to use this identity to login to this machine?"
173 then 173 then
174 echo "Adding to ${pwdhome}/.ssh/authorized_keys" 174 echo "Adding to ${pwdhome}/.ssh/authorized_keys2"
175 cat "${pwdhome}/.ssh/id_rsa.pub" >> "${pwdhome}/.ssh/authorized_keys" 175 cat "${pwdhome}/.ssh/id_rsa.pub" >> "${pwdhome}/.ssh/authorized_keys2"
176 fi 176 fi
177 fi 177 fi
178fi 178fi
@@ -190,8 +190,8 @@ then
190 fi 190 fi
191 if request "Do you want to use this identity to login to this machine?" 191 if request "Do you want to use this identity to login to this machine?"
192 then 192 then
193 echo "Adding to ${pwdhome}/.ssh/authorized_keys" 193 echo "Adding to ${pwdhome}/.ssh/authorized_keys2"
194 cat "${pwdhome}/.ssh/id_dsa.pub" >> "${pwdhome}/.ssh/authorized_keys" 194 cat "${pwdhome}/.ssh/id_dsa.pub" >> "${pwdhome}/.ssh/authorized_keys2"
195 fi 195 fi
196 fi 196 fi
197fi 197fi
diff --git a/contrib/findssl.sh b/contrib/findssl.sh
deleted file mode 100644
index 87a4abce2..000000000
--- a/contrib/findssl.sh
+++ /dev/null
@@ -1,159 +0,0 @@
1#!/bin/sh
2#
3# findssl.sh
4# Search for all instances of OpenSSL headers and libraries
5# and print their versions.
6# Intended to help diagnose OpenSSH's "OpenSSL headers do not
7# match your library" errors.
8#
9# Written by Darren Tucker (dtucker at zip dot com dot au)
10# This file is placed in the public domain.
11#
12# $Id: findssl.sh,v 1.1 2003/06/24 10:22:10 dtucker Exp $
13# 2002-07-27: Initial release.
14# 2002-08-04: Added public domain notice.
15# 2003-06-24: Incorporated readme, set library paths. First cvs version.
16#
17# "OpenSSL headers do not match your library" are usually caused by
18# OpenSSH's configure picking up an older version of OpenSSL headers
19# or libraries. You can use the following # procedure to help identify
20# the cause.
21#
22# The output of configure will tell you the versions of the OpenSSL
23# headers and libraries that were picked up, for example:
24#
25# checking OpenSSL header version... 90604f (OpenSSL 0.9.6d 9 May 2002)
26# checking OpenSSL library version... 90602f (OpenSSL 0.9.6b [engine] 9 Jul 2001)
27# checking whether OpenSSL's headers match the library... no
28# configure: error: Your OpenSSL headers do not match your library
29#
30# Now run findssl.sh. This should identify the headers and libraries
31# present and their versions. You should be able to identify the
32# libraries and headers used and adjust your CFLAGS or remove incorrect
33# versions. The output will show OpenSSL's internal version identifier
34# and should look something like:
35
36# $ ./findssl.sh
37# Searching for OpenSSL header files.
38# 0x0090604fL /usr/include/openssl/opensslv.h
39# 0x0090604fL /usr/local/ssl/include/openssl/opensslv.h
40#
41# Searching for OpenSSL shared library files.
42# 0x0090602fL /lib/libcrypto.so.0.9.6b
43# 0x0090602fL /lib/libcrypto.so.2
44# 0x0090581fL /usr/lib/libcrypto.so.0
45# 0x0090602fL /usr/lib/libcrypto.so
46# 0x0090581fL /usr/lib/libcrypto.so.0.9.5a
47# 0x0090600fL /usr/lib/libcrypto.so.0.9.6
48# 0x0090600fL /usr/lib/libcrypto.so.1
49#
50# Searching for OpenSSL static library files.
51# 0x0090602fL /usr/lib/libcrypto.a
52# 0x0090604fL /usr/local/ssl/lib/libcrypto.a
53#
54# In this example, I gave configure no extra flags, so it's picking up
55# the OpenSSL header from /usr/include/openssl (90604f) and the library
56# from /usr/lib/ (90602f).
57
58#
59# Adjust these to suit your compiler.
60# You may also need to set the *LIB*PATH environment variables if
61# DEFAULT_LIBPATH is not correct for your system.
62#
63CC=gcc
64STATIC=-static
65
66#
67# Set up conftest C source
68#
69rm -f findssl.log
70cat >conftest.c <<EOD
71#include <stdio.h>
72int main(){printf("0x%08xL\n", SSLeay());}
73EOD
74
75#
76# Set default library paths if not already set
77#
78DEFAULT_LIBPATH=/usr/lib:/usr/local/lib
79LIBPATH=${LIBPATH:=$DEFAULT_LIBPATH}
80LD_LIBRARY_PATH=${LD_LIBRARY_PATH:=$DEFAULT_LIBPATH}
81LIBRARY_PATH=${LIBRARY_PATH:=$DEFAULT_LIBPATH}
82export LIBPATH LD_LIBRARY_PATH LIBRARY_PATH
83
84#
85# Search for OpenSSL headers and print versions
86#
87echo Searching for OpenSSL header files.
88if [ -x "`which locate`" ]
89then
90 headers=`locate opensslv.h`
91else
92 headers=`find / -name opensslv.h -print 2>/dev/null`
93fi
94
95for header in $headers
96do
97 ver=`awk '/OPENSSL_VERSION_NUMBER/{printf \$3}' $header`
98 echo "$ver $header"
99done
100echo
101
102#
103# Search for shared libraries.
104# Relies on shared libraries looking like "libcrypto.s*"
105#
106echo Searching for OpenSSL shared library files.
107if [ -x "`which locate`" ]
108then
109 libraries=`locate libcrypto.s`
110else
111 libraries=`find / -name 'libcrypto.s*' -print 2>/dev/null`
112fi
113
114for lib in $libraries
115do
116 (echo "Trying libcrypto $lib" >>findssl.log
117 dir=`dirname $lib`
118 LIBPATH="$dir:$LIBPATH"
119 LD_LIBRARY_PATH="$dir:$LIBPATH"
120 LIBRARY_PATH="$dir:$LIBPATH"
121 export LIBPATH LD_LIBRARY_PATH LIBRARY_PATH
122 ${CC} -o conftest conftest.c $lib 2>>findssl.log
123 if [ -x ./conftest ]
124 then
125 ver=`./conftest 2>/dev/null`
126 rm -f ./conftest
127 echo "$ver $lib"
128 fi)
129done
130echo
131
132#
133# Search for static OpenSSL libraries and print versions
134#
135echo Searching for OpenSSL static library files.
136if [ -x "`which locate`" ]
137then
138 libraries=`locate libcrypto.a`
139else
140 libraries=`find / -name libcrypto.a -print 2>/dev/null`
141fi
142
143for lib in $libraries
144do
145 libdir=`dirname $lib`
146 echo "Trying libcrypto $lib" >>findssl.log
147 ${CC} ${STATIC} -o conftest conftest.c -L${libdir} -lcrypto 2>>findssl.log
148 if [ -x ./conftest ]
149 then
150 ver=`./conftest 2>/dev/null`
151 rm -f ./conftest
152 echo "$ver $lib"
153 fi
154done
155
156#
157# Clean up
158#
159rm -f conftest.c
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index ce7c564c3..e7c3bb121 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -1,4 +1,4 @@
1%define ver 3.7p1 1%define ver 3.6.1p2
2%define rel 1 2%define rel 1
3 3
4# OpenSSH privilege separation requires a user & group ID 4# OpenSSH privilege separation requires a user & group ID
@@ -26,6 +26,9 @@
26# Is this build for RHL 6.x? 26# Is this build for RHL 6.x?
27%define build6x 0 27%define build6x 0
28 28
29# Disable IPv6 (avoids DNS hangs on some glibc versions)
30%define noip6 0
31
29# Do we want kerberos5 support (1=yes 0=no) 32# Do we want kerberos5 support (1=yes 0=no)
30%define kerberos5 1 33%define kerberos5 1
31 34
@@ -40,6 +43,7 @@
40# If this is RHL 6.x, the default configuration has sysconfdir in /usr/etc. 43# If this is RHL 6.x, the default configuration has sysconfdir in /usr/etc.
41%if %{build6x} 44%if %{build6x}
42%define _sysconfdir /etc 45%define _sysconfdir /etc
46%define noip6 1
43%endif 47%endif
44 48
45# Options for static OpenSSL link: 49# Options for static OpenSSL link:
@@ -50,6 +54,10 @@
50# rpm -ba|--rebuild --define "smartcard 1" 54# rpm -ba|--rebuild --define "smartcard 1"
51%{?smartcard:%define scard 1} 55%{?smartcard:%define scard 1}
52 56
57# Option to disable ipv6
58# rpm -ba|--rebuild --define "noipv6 1"
59%{?noipv6:%define noip6 1}
60
53# Is this a build for the rescue CD (without PAM, with MD5)? (1=yes 0=no) 61# Is this a build for the rescue CD (without PAM, with MD5)? (1=yes 0=no)
54%define rescue 0 62%define rescue 0
55%{?build_rescue:%define rescue 1} 63%{?build_rescue:%define rescue 1}
@@ -79,12 +87,12 @@ PreReq: initscripts >= 5.00
79%else 87%else
80PreReq: initscripts >= 5.20 88PreReq: initscripts >= 5.20
81%endif 89%endif
82BuildPreReq: perl, openssl-devel, tcp_wrappers 90BuildPreReq: perl, openssl-devel, sharutils, tcp_wrappers
83BuildPreReq: /bin/login 91BuildPreReq: /bin/login
84%if ! %{build6x} 92%if ! %{build6x}
85BuildPreReq: glibc-devel, pam 93BuildPreReq: glibc-devel, pam
86%else 94%else
87BuildPreReq: /usr/include/security/pam_appl.h 95BuildPreReq: db1-devel, /usr/include/security/pam_appl.h
88%endif 96%endif
89%if ! %{no_x11_askpass} 97%if ! %{no_x11_askpass}
90BuildPreReq: XFree86-devel 98BuildPreReq: XFree86-devel
@@ -188,6 +196,9 @@ CFLAGS="$RPM_OPT_FLAGS -Os"; export CFLAGS
188%if %{scard} 196%if %{scard}
189 --with-smartcard \ 197 --with-smartcard \
190%endif 198%endif
199%if %{noip6}
200 --with-ipv4-default \
201%endif
191%if %{rescue} 202%if %{rescue}
192 --without-pam --with-md5-passwords \ 203 --without-pam --with-md5-passwords \
193%else 204%else
@@ -263,11 +274,9 @@ install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome
263 rm -f $RPM_BUILD_ROOT/usr/share/openssh/Ssh.bin 274 rm -f $RPM_BUILD_ROOT/usr/share/openssh/Ssh.bin
264%endif 275%endif
265 276
266%if ! %{no_gnome_askpass}
267install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/ 277install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
268install -m 755 contrib/redhat/gnome-ssh-askpass.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/ 278install -m 755 contrib/redhat/gnome-ssh-askpass.csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
269install -m 755 contrib/redhat/gnome-ssh-askpass.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/ 279install -m 755 contrib/redhat/gnome-ssh-askpass.sh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
270%endif
271 280
272perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/* 281perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/man*/*
273 282
@@ -391,14 +400,6 @@ fi
391%endif 400%endif
392 401
393%changelog 402%changelog
394* Mon Jun 2 2003 Damien Miller <djm@mindrot.org>
395- Remove noip6 option. This may be controlled at run-time in client config
396 file using new AddressFamily directive
397
398* Mon May 12 2003 Damien Miller <djm@mindrot.org>
399- Don't install profile.d scripts when not building with GNOME/GTK askpass
400 (patch from bet@rahul.net)
401
402* Wed Oct 01 2002 Damien Miller <djm@mindrot.org> 403* Wed Oct 01 2002 Damien Miller <djm@mindrot.org>
403- Install ssh-agent setgid nobody to prevent ptrace() key theft attacks 404- Install ssh-agent setgid nobody to prevent ptrace() key theft attacks
404 405
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index ca7437bd6..707c3a221 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -1,6 +1,6 @@
1Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation 1Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
2Name: openssh 2Name: openssh
3Version: 3.7p1 3Version: 3.6.1p2
4URL: http://www.openssh.com/ 4URL: http://www.openssh.com/
5Release: 1 5Release: 1
6Source0: openssh-%{version}.tar.gz 6Source0: openssh-%{version}.tar.gz
diff --git a/debian/README.Debian b/debian/README.Debian
index 4b6875d2c..ca928f9f0 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -87,10 +87,7 @@ Protocol 2,1
87Also add the line: 87Also add the line:
88HostKey /etc/ssh/ssh_host_key 88HostKey /etc/ssh/ssh_host_key
89 89
90If you do not already have an RSA1 host key in /etc/ssh/ssh_host_key, 90(you may need to generate a host key if you do not already have one)
91you will need to generate one. To do so, run this command as root:
92
93 ssh-keygen -f /etc/ssh/ssh_host_key -N '' -t rsa1
94 91
95X11 Forwarding 92X11 Forwarding
96-------------- 93--------------
diff --git a/debian/changelog b/debian/changelog
index e581eea64..de6903771 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,15 +1,12 @@
1openssh (1:3.7.1p2-1) UNRELEASED; urgency=low 1openssh (1:3.6.1p2-10) UNRELEASED; urgency=low
2 2
3 * New upstream release.
4 * Remove -fno-builtin-log and -DHAVE_MMAP_ANON_SHARED compiler options,
5 which are no longer necessary.
6 * Use --retry in init script when restarting rather than sleeping, to make 3 * Use --retry in init script when restarting rather than sleeping, to make
7 sure the old process is dead (thanks, Herbert Xu; closes: #212117). 4 sure the old process is dead (thanks, Herbert Xu; closes: #212117).
8 * Update Russian debconf template translation (thanks, Ilgiz Kalmetev). 5 * Update Russian debconf template translation (thanks, Ilgiz Kalmetev).
9 * Add Dutch debconf template translation (thanks, cobaco; 6 * Add Dutch debconf template translation (thanks, cobaco;
10 closes: #215372). 7 closes: #215372).
11 8
12 -- Colin Watson <cjwatson@debian.org> Tue, 23 Sep 2003 19:22:38 +0100 9 -- Colin Watson <cjwatson@debian.org> Sat, 15 Nov 2003 14:07:29 +0000
13 10
14openssh (1:3.6.1p2-9) unstable; urgency=high 11openssh (1:3.6.1p2-9) unstable; urgency=high
15 12
diff --git a/debian/po/da.po b/debian/po/da.po
index 56b157d18..56a83f826 100644
--- a/debian/po/da.po
+++ b/debian/po/da.po
@@ -16,7 +16,7 @@ msgid ""
16msgstr "" 16msgstr ""
17"Project-Id-Version: PACKAGE VERSION\n" 17"Project-Id-Version: PACKAGE VERSION\n"
18"Report-Msgid-Bugs-To: \n" 18"Report-Msgid-Bugs-To: \n"
19"POT-Creation-Date: 2003-09-12 21:03+0100\n" 19"POT-Creation-Date: 2003-08-27 02:20+0100\n"
20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
22"Language-Team: LANGUAGE <LL@li.org>\n" 22"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -73,9 +73,9 @@ msgstr ""
73#, fuzzy 73#, fuzzy
74msgid "" 74msgid ""
75"Since you've opted to have me generate an sshd_config file for you, you can " 75"Since you've opted to have me generate an sshd_config file for you, you can "
76"choose whether or not to have privilege separation turned on or not. Unless " 76"choose whether or not to have Privilege Separation turned on or not. Unless "
77"you know you need to use PAM features that won't work with this option, you " 77"you know you need to use PAM features that won't work with this option, you "
78"should enable it." 78"should say yes here."
79msgstr "" 79msgstr ""
80"Siden du har bedt mig om at lave en sshd_config fil til dig, kan du vælge om " 80"Siden du har bedt mig om at lave en sshd_config fil til dig, kan du vælge om "
81"du vil have privilegie adskillelse slået til eller ej. Medmindre du kører " 81"du vil have privilegie adskillelse slået til eller ej. Medmindre du kører "
@@ -182,7 +182,7 @@ msgstr ""
182 182
183#. Description 183#. Description
184#: ../templates.master:78 184#: ../templates.master:78
185msgid "Do you want to continue (and risk killing active ssh sessions)?" 185msgid "Do you want to continue (and risk killing active ssh sessions) ?"
186msgstr "Vil du fortsætte (og risikere at afbryde aktive ssh-forbindelser)?" 186msgstr "Vil du fortsætte (og risikere at afbryde aktive ssh-forbindelser)?"
187 187
188#. Description 188#. Description
@@ -325,7 +325,7 @@ msgstr ""
325 325
326#. Description 326#. Description
327#: ../templates.master:137 327#: ../templates.master:137
328msgid "Do you want to run the sshd server?" 328msgid "Do you want to run the sshd server ?"
329msgstr "Vil du køre sshd-serveren?" 329msgstr "Vil du køre sshd-serveren?"
330 330
331#. Description 331#. Description
diff --git a/debian/po/de.po b/debian/po/de.po
index c97b14e22..1e363835d 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -16,7 +16,7 @@ msgid ""
16msgstr "" 16msgstr ""
17"Project-Id-Version: PACKAGE VERSION\n" 17"Project-Id-Version: PACKAGE VERSION\n"
18"Report-Msgid-Bugs-To: \n" 18"Report-Msgid-Bugs-To: \n"
19"POT-Creation-Date: 2003-09-12 21:03+0100\n" 19"POT-Creation-Date: 2003-08-27 02:20+0100\n"
20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
22"Language-Team: LANGUAGE <LL@li.org>\n" 22"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -62,9 +62,9 @@ msgstr ""
62#: ../templates.master:19 62#: ../templates.master:19
63msgid "" 63msgid ""
64"Since you've opted to have me generate an sshd_config file for you, you can " 64"Since you've opted to have me generate an sshd_config file for you, you can "
65"choose whether or not to have privilege separation turned on or not. Unless " 65"choose whether or not to have Privilege Separation turned on or not. Unless "
66"you know you need to use PAM features that won't work with this option, you " 66"you know you need to use PAM features that won't work with this option, you "
67"should enable it." 67"should say yes here."
68msgstr "" 68msgstr ""
69 69
70#. Description 70#. Description
@@ -142,7 +142,7 @@ msgstr ""
142 142
143#. Description 143#. Description
144#: ../templates.master:78 144#: ../templates.master:78
145msgid "Do you want to continue (and risk killing active ssh sessions)?" 145msgid "Do you want to continue (and risk killing active ssh sessions) ?"
146msgstr "Wollen Sie weitermachen (und das Killen der Session riskieren)?" 146msgstr "Wollen Sie weitermachen (und das Killen der Session riskieren)?"
147 147
148#. Description 148#. Description
@@ -277,7 +277,7 @@ msgstr ""
277 277
278#. Description 278#. Description
279#: ../templates.master:137 279#: ../templates.master:137
280msgid "Do you want to run the sshd server?" 280msgid "Do you want to run the sshd server ?"
281msgstr "Möchten Sie den sshd Server starten?" 281msgstr "Möchten Sie den sshd Server starten?"
282 282
283#. Description 283#. Description
diff --git a/debian/po/es.po b/debian/po/es.po
index 844c43598..92cfbe2bd 100644
--- a/debian/po/es.po
+++ b/debian/po/es.po
@@ -17,7 +17,7 @@ msgid ""
17msgstr "" 17msgstr ""
18"Project-Id-Version: openssh 3.6.1p2-3\n" 18"Project-Id-Version: openssh 3.6.1p2-3\n"
19"Report-Msgid-Bugs-To: \n" 19"Report-Msgid-Bugs-To: \n"
20"POT-Creation-Date: 2003-09-12 21:03+0100\n" 20"POT-Creation-Date: 2003-08-27 02:20+0100\n"
21"PO-Revision-Date: 2003-06-21 15:30+0200\n" 21"PO-Revision-Date: 2003-06-21 15:30+0200\n"
22"Last-Translator: Carlos Valdivia Yagüe <valyag@dat.etsit.upm.es>\n" 22"Last-Translator: Carlos Valdivia Yagüe <valyag@dat.etsit.upm.es>\n"
23"Language-Team: Debian L10n Spanish <debian-l10n-spanish@lists.debian.org>\n" 23"Language-Team: Debian L10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
@@ -75,9 +75,9 @@ msgstr ""
75#, fuzzy 75#, fuzzy
76msgid "" 76msgid ""
77"Since you've opted to have me generate an sshd_config file for you, you can " 77"Since you've opted to have me generate an sshd_config file for you, you can "
78"choose whether or not to have privilege separation turned on or not. Unless " 78"choose whether or not to have Privilege Separation turned on or not. Unless "
79"you know you need to use PAM features that won't work with this option, you " 79"you know you need to use PAM features that won't work with this option, you "
80"should enable it." 80"should say yes here."
81msgstr "" 81msgstr ""
82"Puesto que ha elegido crear automáticamente el fichero sshd_config, puede " 82"Puesto que ha elegido crear automáticamente el fichero sshd_config, puede "
83"decidir ahora si quiere activar la opción de separación de privilegios. A " 83"decidir ahora si quiere activar la opción de separación de privilegios. A "
@@ -187,7 +187,7 @@ msgstr ""
187 187
188#. Description 188#. Description
189#: ../templates.master:78 189#: ../templates.master:78
190msgid "Do you want to continue (and risk killing active ssh sessions)?" 190msgid "Do you want to continue (and risk killing active ssh sessions) ?"
191msgstr "¿Desea continuar, aún a riesgo de matar las sesiones ssh activas?" 191msgstr "¿Desea continuar, aún a riesgo de matar las sesiones ssh activas?"
192 192
193#. Description 193#. Description
@@ -326,7 +326,7 @@ msgstr ""
326 326
327#. Description 327#. Description
328#: ../templates.master:137 328#: ../templates.master:137
329msgid "Do you want to run the sshd server?" 329msgid "Do you want to run the sshd server ?"
330msgstr "¿Quiere ejecutar el servidor sshd?" 330msgstr "¿Quiere ejecutar el servidor sshd?"
331 331
332#. Description 332#. Description
diff --git a/debian/po/fr.po b/debian/po/fr.po
index 178c833d5..d72a5d5d7 100644
--- a/debian/po/fr.po
+++ b/debian/po/fr.po
@@ -13,9 +13,9 @@
13# 13#
14msgid "" 14msgid ""
15msgstr "" 15msgstr ""
16"Project-Id-Version: openssh 3.6.1p2-5\n" 16"Project-Id-Version: openssh 3.6.1p2-2\n"
17"Report-Msgid-Bugs-To: \n" 17"Report-Msgid-Bugs-To: \n"
18"POT-Creation-Date: 2003-09-12 21:03+0100\n" 18"POT-Creation-Date: 2003-08-27 02:20+0100\n"
19"PO-Revision-Date: 2003-05-22 10:34+0200\n" 19"PO-Revision-Date: 2003-05-22 10:34+0200\n"
20"Last-Translator: Denis Barbier <barbier@debian.org>\n" 20"Last-Translator: Denis Barbier <barbier@debian.org>\n"
21"Language-Team: French <Debian-l10n-french@lists.debian.org>\n" 21"Language-Team: French <Debian-l10n-french@lists.debian.org>\n"
@@ -70,17 +70,19 @@ msgstr ""
70 70
71#. Description 71#. Description
72#: ../templates.master:19 72#: ../templates.master:19
73#, fuzzy
73msgid "" 74msgid ""
74"Since you've opted to have me generate an sshd_config file for you, you can " 75"Since you've opted to have me generate an sshd_config file for you, you can "
75"choose whether or not to have privilege separation turned on or not. Unless " 76"choose whether or not to have Privilege Separation turned on or not. Unless "
76"you know you need to use PAM features that won't work with this option, you " 77"you know you need to use PAM features that won't work with this option, you "
77"should enable it." 78"should say yes here."
78msgstr "" 79msgstr ""
79"Comme vous souhaitez que le fichier de configuration sshd_config soit généré " 80"Comme vous souhaitez que je génère le fichier de configuration sshd_config à "
80"à votre place, vous pouvez choisir d'activer ou non l'option de séparation " 81"votre place, vous pouvez choisir d'activer ou non l'option de séparation des "
81"des privilèges. Si vous êtes sûr d'avoir besoin de fonctionnalités PAM, cela " 82"privilèges. Si vous utilisez un noyau 2.0 (dans ce cas vous *devez* "
82"ne fonctionnera pas si cette option est activée. Dans le cas contraire vous " 83"désactiver cette option ou alors sshd ne se lancera pas) ou bien si vous "
83"devriez l'activer." 84"avez besoin de fonctionnalités PAM, cela ne fonctionnera pas si cette option "
85"est activée, dans le cas contraire vous devriez l'activer."
84 86
85#. Description 87#. Description
86#: ../templates.master:36 88#: ../templates.master:36
@@ -187,7 +189,7 @@ msgstr ""
187 189
188#. Description 190#. Description
189#: ../templates.master:78 191#: ../templates.master:78
190msgid "Do you want to continue (and risk killing active ssh sessions)?" 192msgid "Do you want to continue (and risk killing active ssh sessions) ?"
191msgstr "" 193msgstr ""
192"Voulez-vous continuer (et risquer de rompre les sessions ssh actives) ?" 194"Voulez-vous continuer (et risquer de rompre les sessions ssh actives) ?"
193 195
@@ -337,7 +339,7 @@ msgstr ""
337 339
338#. Description 340#. Description
339#: ../templates.master:137 341#: ../templates.master:137
340msgid "Do you want to run the sshd server?" 342msgid "Do you want to run the sshd server ?"
341msgstr "Voulez-vous utiliser le serveur sshd ?" 343msgstr "Voulez-vous utiliser le serveur sshd ?"
342 344
343#. Description 345#. Description
diff --git a/debian/po/ja.po b/debian/po/ja.po
index 444e29217..dcead1cdb 100644
--- a/debian/po/ja.po
+++ b/debian/po/ja.po
@@ -11,14 +11,15 @@
11# 11#
12# Developers do not need to manually edit POT or PO files. 12# Developers do not need to manually edit POT or PO files.
13# 13#
14#, fuzzy
14msgid "" 15msgid ""
15msgstr "" 16msgstr ""
16"Project-Id-Version: PACKAGE VERSION\n" 17"Project-Id-Version: PACKAGE VERSION\n"
17"Report-Msgid-Bugs-To: \n" 18"Report-Msgid-Bugs-To: \n"
18"POT-Creation-Date: 2003-09-12 21:03+0100\n" 19"POT-Creation-Date: 2003-08-27 02:20+0100\n"
19"PO-Revision-Date: 2003-09-11 13:11+0900\n" 20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
20"Last-Translator: Kenshi Muto <kmuto@debian.org>\n" 21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
21"Language-Team: Japanese <debian-japanese@lists.debian.org>\n" 22"Language-Team: LANGUAGE <LL@li.org>\n"
22"MIME-Version: 1.0\n" 23"MIME-Version: 1.0\n"
23"Content-Type: text/plain; charset=EUC-JP\n" 24"Content-Type: text/plain; charset=EUC-JP\n"
24"Content-Transfer-Encoding: 8bit\n" 25"Content-Transfer-Encoding: 8bit\n"
@@ -35,8 +36,8 @@ msgid ""
35"turned off, you need to add \"UsePrivilegeSeparation no\" to /etc/ssh/" 36"turned off, you need to add \"UsePrivilegeSeparation no\" to /etc/ssh/"
36"sshd_config." 37"sshd_config."
37msgstr "" 38msgstr ""
38"Æø¢Ê¬Î¥¤Ï¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£Ìµ¸ú¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢/etc/ssh/" 39"Æø¢Ê¬Î¥¤Ï¥Ç¥Õ¥©¥ë¥È¤ÇÍ­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£Ìµ¸ú¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢ /etc/ssh/"
39"sshd_conf ¤Ë¡ÖUsePrivilegeSeparation no¡×¤È¤¤¤¦¹Ô¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£" 40"sshd_conf ¤Ë¡ÖUsePrivilegeSeparation no¡×¤È¤¤¤¦¹Ô¤òÄɲà ¤·¤Æ¤¯¤À¤µ¤¤¡£"
40 41
41#. Description 42#. Description
42#: ../templates.master:19 43#: ../templates.master:19
@@ -51,7 +52,7 @@ msgid ""
51"reduces the impact of security holes in sshd." 52"reduces the impact of security holes in sshd."
52msgstr "" 53msgstr ""
53"ËܥС¼¥¸¥ç¥ó¤Î OpenSSH ¤Ï¡¢¿·¤·¤¤Æø¢Ê¬Î¥¥ª¥×¥·¥ç¥ó¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ ¤³¤ì¤Ë" 54"ËܥС¼¥¸¥ç¥ó¤Î OpenSSH ¤Ï¡¢¿·¤·¤¤Æø¢Ê¬Î¥¥ª¥×¥·¥ç¥ó¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ ¤³¤ì¤Ë"
54"¤è¤Ã¤Æ¡¢root ¸¢¸Â¤Ç¼Â¹Ô¤µ¤ì¤ë¥³¡¼¥É¤ÎÎ̤òÂçÉý¤Ë¸º¤é¤¹¤³¤È¤¬¤Ç¤­¡¢sshd ¤Î¥»" 55"¤è¤Ã¤Æ¡¢root ¸¢¸Â¤Ç¼Â¹Ô¤µ¤ì¤ë¥³¡¼¥É¤ÎÎ̤òÂçÉý¤Ë¸º¤é¤¹¤³¤È¤¬ ¤Ç¤­¡¢sshd ¤Î¥»"
55"¥­¥å¥ê¥Æ¥£¥Û¡¼¥ë¤Î±Æ¶Á¤ò¸º¤é¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" 56"¥­¥å¥ê¥Æ¥£¥Û¡¼¥ë¤Î±Æ¶Á¤ò¸º¤é¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"
56 57
57#. Description 58#. Description
@@ -61,8 +62,8 @@ msgid ""
61"session modules that need to run as root (pam_mkhomedir, for example) will " 62"session modules that need to run as root (pam_mkhomedir, for example) will "
62"fail, and PAM keyboard-interactive authentication won't work." 63"fail, and PAM keyboard-interactive authentication won't work."
63msgstr "" 64msgstr ""
64"»ÄÇ°¤Ê¤³¤È¤Ë¡¢Æø¢Ê¬Î¥¤Ï PAM ¤Ë°­±Æ¶Á¤òÍ¿¤¨¤Þ¤¹¡£root ¤Ç¼Â¹Ô¤µ¤ì¤ë¤¹¤Ù¤Æ¤Î " 65"»ÄÇ°¤Ê¤³¤È¤Ë¡¢Æø¢Ê¬Î¥¤Ï PAM ¤Ë°­±Æ¶Á¤òÍ¿¤¨¤Þ¤¹¡£root ¤Ç¼Â¹Ô¤µ¤ì¤ë Á´¤Æ¤Î "
65"PAM ¥»¥Ã¥·¥ç¥ó¥â¥¸¥å¡¼¥ë (¤¿¤È¤¨¤Ð pam_mkhomedir) ¤ÏÆ°¤«¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£¤Þ¤¿¡¢" 66"PAM ¥»¥Ã¥·¥ç¥ó¥â¥¸¥å¡¼¥ë (Î㤨¤Ð pam_mkhomedir) ¤ÏÆ°¤«¤Ê¤¯ ¤Ê¤ê¤Þ¤¹¡£¤Þ¤¿¡¢"
66"PAM ¥­¡¼¥Ü¡¼¥ÉÂÐÏÃŪǧ¾Ú¤âÆ°ºî¤·¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£" 67"PAM ¥­¡¼¥Ü¡¼¥ÉÂÐÏÃŪǧ¾Ú¤âÆ°ºî¤·¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£"
67 68
68#. Description 69#. Description
@@ -70,13 +71,14 @@ msgstr ""
70#, fuzzy 71#, fuzzy
71msgid "" 72msgid ""
72"Since you've opted to have me generate an sshd_config file for you, you can " 73"Since you've opted to have me generate an sshd_config file for you, you can "
73"choose whether or not to have privilege separation turned on or not. Unless " 74"choose whether or not to have Privilege Separation turned on or not. Unless "
74"you know you need to use PAM features that won't work with this option, you " 75"you know you need to use PAM features that won't work with this option, you "
75"should enable it." 76"should say yes here."
76msgstr "" 77msgstr ""
77"sshd_config ¥Õ¥¡¥¤¥ë¤ò¼«Æ°À¸À®¤¹¤ë¤³¤È¤òÁªÂò¤·¤¿¤Î¤Ç¡¢ ¤³¤³¤ÇÆø¢Ê¬Î¥¤òÍ­¸ú¤Ë" 78"¤¢¤Ê¤¿¤Ï sshd_config ¥Õ¥¡¥¤¥ë¤ò¼«Æ°À¸À®¤¹¤ë¤³¤È¤òÁªÂò¤·¤Þ¤·¤¿¤Î¤Ç¡¢ ¤³¤³¤ÇÆÃ"
78"¤¹¤ë¤«¤·¤Ê¤¤¤«¤òÁªÂò¤Ç¤­¤Þ¤¹¡£PAM ¤Îµ¡Ç½¤Î¤¦¤ÁÆø¢Ê¬Î¥¤È¶¦Â¸¤Ç¤­¤Ê¤¤µ¡Ç½¤ò»È" 79"¸¢Ê¬Î¥¤òÍ­¸ú¤Ë¤¹¤ë¤«¤·¤Ê¤¤¤«¤òÁªÂò¤Ç¤­¤Þ¤¹¡£2.0 ·ÏÎó¤Î ¥«¡¼¥Í¥ë¤ò»È¤Ã¤Æ¤¤¤ë"
79"¤¤¤¿¤¤¾ì¹ç°Ê³°¤Ï¡¢¡Ö¤Ï¤¤¡×¤òÁª¤Ö¤Ù¤­¤Ç¤¹¡£" 80"¤« (¤³¤Î¾ì¹ç¤Ë¤Ï¡Ö¤¤¤¤¤¨¡×¤òÁª¤Ð¤Ê¤¤¤È sshd ¤Ïµ¯Æ°¤¹¤é¤·¤Þ¤»¤ó)¡¢PAM ¤Îµ¡Ç½¤Î"
81"¤¦¤ÁÆø¢Ê¬Î¥¤È¶¦Â¸¤Ç¤­¤Ê¤¤µ¡Ç½¤ò »È¤¤¤¿¤¤¾ì¹ç°Ê³°¤Ï¡¢¡Ö¤Ï¤¤¡×¤òÁª¤Ö¤Ù¤­¤Ç¤¹¡£"
80 82
81#. Description 83#. Description
82#: ../templates.master:36 84#: ../templates.master:36
@@ -93,11 +95,11 @@ msgid ""
93"any customisations you made with the old version." 95"any customisations you made with the old version."
94msgstr "" 96msgstr ""
95"OpenSSH ¤Î¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢Debian 'Potato' ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¥Ð¡¼¥¸¥ç¥ó (¤¤¤Þ¡¢" 97"OpenSSH ¤Î¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢Debian 'Potato' ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¥Ð¡¼¥¸¥ç¥ó (¤¤¤Þ¡¢"
96"¤½¤Î¥Ð¡¼¥¸¥ç¥ó¤«¤é¤Î¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤ò»î¤ß¤Æ¤¤¤ë¤È¤³¤í) ¤«¤é¡¢ÀßÄê¥Õ¥¡¥¤¥ë¤¬" 98"¤½¤Î¥Ð¡¼¥¸¥ç¥ó¤«¤é¤Î¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤ò»î¤ß¤Æ¤¤¤ë¤È¤³¤í) ¤«¤é¡¢ ÀßÄê¥Õ¥¡¥¤¥ë¤¬"
97"ÂçÉý¤ËÊѲ½¤·¤Æ¤¤¤Þ¤¹¡£¤¤¤Þ¡¢¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î¥µ¡¼¥Ð¤Ç»È¤¦¤³¤È¤¬¤Ç¤­¤ë¿·¤·¤¤" 99"ÂçÉý¤ËÊѲ½¤·¤Æ¤¤¤Þ¤¹¡£¤¤¤Þ¡¢¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î¥µ¡¼¥Ð¤Ç »È¤¦¤³¤È¤¬¤Ç¤­¤ë¿·¤·¤¤"
98"ÀßÄê¥Õ¥¡¥¤¥ë (/etc/ssh/sshd/config) ¤ò¼«Æ°À¸À®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¤¬¡¢¤½¤Î¥Õ¥¡" 100"ÀßÄê¥Õ¥¡¥¤¥ë (/etc/ssh/sshd/config) ¤ò¼«Æ°À¸À® ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¤¬¡¢¤½¤Î¥Õ¥¡"
99"¥¤¥ë¤Ï¡¢¸Å¤¤¥Ð¡¼¥¸¥ç¥ó¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤ë¤¢¤Ê¤¿¤ÎÀßÄ꤬¤Þ¤Ã¤¿¤¯´Þ¤Þ¤ì¤Þ" 101"¥¤¥ë¤Ï¡¢¸Å¤¤¥Ð¡¼¥¸¥ç¥ó¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤Ë ´Þ¤Þ¤ì¤ë¤¢¤Ê¤¿¤ÎÀßÄ꤬Á´¤¯´Þ¤Þ¤ì¤Þ¤»"
100»¤ó¡£" 102"¤ó¡£"
101 103
102#. Description 104#. Description
103#: ../templates.master:36 105#: ../templates.master:36
@@ -108,10 +110,10 @@ msgid ""
108"the correct default (see README.Debian for more details), but you can always " 110"the correct default (see README.Debian for more details), but you can always "
109"edit sshd_config and set it to no if you wish." 111"edit sshd_config and set it to no if you wish."
110msgstr "" 112msgstr ""
111"¤³¤Î¿·¤·¤¤ÀßÄê¥Õ¥¡¥¤¥ë¤Ï¡¢¡ÖPermitRootLogin¡×¤ò¡Öyes¡×¤ËÀßÄꤷ¤Þ¤¹ (¤Ä¤Þ¤ê¡¢" 113"¤³¤Î¿·¤·¤¤ÀßÄê¥Õ¥¡¥¤¥ë¤Ï¡¢¡ÖPermitRootLogin¡×¤ò¡Öyes¡×¤ËÀßÄꤷ¤Þ¤¹¡£ (¤Ä¤Þ"
112"root ¤Î¥Ñ¥¹¥ï¡¼¥É¤òÃΤäƤ¤¤ë¿Í¤Ê¤éï¤Ç¤âľÀÜ¥í¥°¥¤¥ó¤Ç¤­¤Þ¤¹)¡£¤³¤ì¤Ç¤è¤¤¡¢" 114"¤ê¡¢root ¤Î¥Ñ¥¹¥ï¡¼¥É¤òÃΤäƤ¤¤ë¿Í¤Ê¤éï¤Ç¤âľÀÜ¥í¥°¥¤¥ó¤Ç¤­¤Þ ¤¹)¡£¤³¤ì¤Ç¤è"
113"¤È¤¤¤¦¤Î¤¬¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¥á¥ó¥Æ¥Ê¤Î°Õ¸«¤Ç¤¹¤¬ (¾Ü¤·¤¯¤Ï README.Debian ¤òÆɤó" 115¤¡¢¤È¤¤¤¦¤Î¤¬¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¥á¥ó¥Æ¥Ê¤Î°Õ¸«¤Ç¤¹¤¬ (¾Ü¤· ¤¯¤Ï README.Debian "
114Ǥ¯¤À¤µ¤¤)¡¢sshd_config ¤òÊÔ½¸¤·¤Æ¡Öno¡×¤ËÀßÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£" 116òÆɤó¤Ç²¼¤µ¤¤)¡¢sshd_config ¤òÊÔ½¸¤·¤Æ¡Öno¡×¤ËÀß Äꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£"
115 117
116#. Description 118#. Description
117#: ../templates.master:36 119#: ../templates.master:36
@@ -134,8 +136,8 @@ msgid ""
134"connecting (the ssh client shipped with \"potato\" is affected)." 136"connecting (the ssh client shipped with \"potato\" is affected)."
135msgstr "" 137msgstr ""
136"OpenSSH ¤Î¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢¤º¤Ã¤È°ÂÁ´¤Ê¡¢ssh ¥×¥í¥È¥³¥ë¤Î¥Ð¡¼¥¸¥ç¥ó 2 ¤ò¥µ" 138"OpenSSH ¤Î¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢¤º¤Ã¤È°ÂÁ´¤Ê¡¢ssh ¥×¥í¥È¥³¥ë¤Î¥Ð¡¼¥¸¥ç¥ó 2 ¤ò¥µ"
137"¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£ssh 1 ¤ò¶Ø»ß¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¤¬¡¢ÃÙ¤¤¥Þ¥·¥ó¤Ç¤ÏÆ°ºî¤¬" 139"¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£ssh 1 ¤ò¶Ø»ß¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¤¬¡¢ÃÙ¤¤¥Þ ¥·¥ó¤Ç¤ÏÆ°ºî¤¬"
138"ÃÙ¤¯¤Ê¤Ã¤¿¤ê¡¢¸Å¤¤¥¯¥é¥¤¥¢¥ó¥È¤«¤éÀܳ¤Ç¤­¤Ê¤¯¤Ê¤Ã¤¿¤ê¤·¤Þ¤¹ (\"potato\" ¤Î " 140"ÃÙ¤¯¤Ê¤Ã¤¿¤ê¡¢¸Å¤¤¥¯¥é¥¤¥¢¥ó¥È¤«¤éÀܳ¤Ç¤­¤Ê¤¯¤Ê¤Ã¤¿¤ê ¤·¤Þ¤¹ (\"potato\" ¤Î "
139"ssh ¥¯¥é¥¤¥¢¥ó¥È¤âÀܳ¤Ç¤­¤Ê¤¯¤Ê¤ê¤Þ¤¹)¡£" 141"ssh ¥¯¥é¥¤¥¢¥ó¥È¤âÀܳ¤Ç¤­¤Ê¤¯¤Ê¤ê¤Þ¤¹)¡£"
140 142
141#. Description 143#. Description
@@ -144,7 +146,7 @@ msgid ""
144"Also please note that keys used for protocol 1 are different so you will not " 146"Also please note that keys used for protocol 1 are different so you will not "
145"be able to use them if you only allow protocol 2 connections." 147"be able to use them if you only allow protocol 2 connections."
146msgstr "" 148msgstr ""
147"¤Þ¤¿¡¢¥×¥í¥È¥³¥ë 1 ¤Ç»È¤¦¥­¡¼¤Ï°Û¤Ê¤ë¤¿¤á¡¢¥×¥í¥È¥³¥ë 2 ¤òÍ­¸ú¤Ë¤·¤¿¤À¤±¤Ç¤Ï" 149"¤Þ¤¿¡¢¥×¥í¥È¥³¥ë 1 ¤Ç»È¤¦¥­¡¼¤Ï°Û¤Ê¤ë¤¿¤á¡¢¥×¥í¥È¥³¥ë 2 ¤òÍ­¸ú¤Ë¤·¤¿ ¤À¤±¤Ç¤Ï"
148"¤½¤Î¥­¡¼¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£" 150"¤½¤Î¥­¡¼¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£"
149 151
150#. Description 152#. Description
@@ -153,8 +155,8 @@ msgid ""
153"If you later change your mind about this setting, README.Debian has " 155"If you later change your mind about this setting, README.Debian has "
154"instructions on what to do to your sshd_config file." 156"instructions on what to do to your sshd_config file."
155msgstr "" 157msgstr ""
156"¤â¤·º£¸å¤¢¤Ê¤¿¤¬¹Í¤¨¤òÊѤ¨¤¿¤é¡¢README.Debian ¤òÆɤà¤È sshd_config ¤ò¤É¤Î¤è¤¦" 158"¤â¤·º£¸å¤¢¤Ê¤¿¤¬¹Í¤¨¤òÊѤ¨¤¿¤é¡¢README.Debian ¤òÆɤà¤È sshd_config ¤ò ¤É¤Î¤è"
157"¤ËÊѹ¹¤·¤¿¤é¤è¤¤¤«¤¬Ê¬¤«¤ê¤Þ¤¹¡£" 159¦¤ËÊѹ¹¤·¤¿¤é¤è¤¤¤«¤¬Ê¬¤«¤ê¤Þ¤¹¡£"
158 160
159#. Description 161#. Description
160#: ../templates.master:69 162#: ../templates.master:69
@@ -168,14 +170,14 @@ msgid ""
168"keys. This means the authorized_keys2 and known_hosts2 files are no longer " 170"keys. This means the authorized_keys2 and known_hosts2 files are no longer "
169"needed. They will still be read in order to maintain backwards compatibility" 171"needed. They will still be read in order to maintain backwards compatibility"
170msgstr "" 172msgstr ""
171"OpenSSH ¤Î¥Ð¡¼¥¸¥ç¥ó 3 ¤Ï¡¢ssh1 ¤È ssh2 ¤Î¥­¡¼¤Ë¸ÄÊ̤Υե¡¥¤¥ë¤ò»È¤¤¤Þ¤»¤ó¡£" 173"OpenSSH ¤Î¥Ð¡¼¥¸¥ç¥ó 3 ¤Ï¡¢ssh1 ¤È ssh2 ¤Î¥­¡¼¤Ë¸ÄÊ̤Υե¡¥¤¥ë¤ò»È¤¤ ¤Þ¤»¤ó¡£"
172"¤Ä¤Þ¤ê¡¢authorized_keys2 ¥Õ¥¡¥¤¥ë¤È known_hosts2 ¥Õ¥¡¥¤¥ë¤Ï¤â¤Ï¤äÉÔÍפȤʤê¤Þ" 174"¤Ä¤Þ¤ê¡¢authorized_keys2 ¥Õ¥¡¥¤¥ë¤È known_hosts2 ¥Õ¥¡¥¤¥ë¤Ï¤â ¤Ï¤äÉÔÍפȤʤê"
173"¤·¤¿¡£¸åÊý¸ß´¹À­¤òÊݤĤ¿¤á¤Ë¤Ï¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤¬É¬ÍפǤ¹¡£" 175Þ¤·¤¿¡£¸åÊý¸ß´¹À­¤òÊݤĤ¿¤á¤Ë¤Ï¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤¬É¬Í× ¤Ç¤¹¡£"
174 176
175#. Description 177#. Description
176#: ../templates.master:78 178#: ../templates.master:78
177msgid "Do you want to continue (and risk killing active ssh sessions)?" 179msgid "Do you want to continue (and risk killing active ssh sessions) ?"
178msgstr "³¤±¤Æ¤è¤¤¤Ç¤¹¤« (ÀܳÃæ¤Î ssh ¥»¥Ã¥·¥ç¥ó¤¬ÀÚ¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó)" 180msgstr "³¤±¤Æ¤¤¤¤¤Ç¤¹¤« (ÀܳÃæ¤Î ssh ¥»¥Ã¥·¥ç¥ó¤¬ÀÚ¤ì¤ë¤«¤â¤·¤ì¤Þ¤»¤ó)"
179 181
180#. Description 182#. Description
181#: ../templates.master:78 183#: ../templates.master:78
@@ -184,9 +186,9 @@ msgid ""
184"all running sshd instances. If you are doing this upgrade via an ssh " 186"all running sshd instances. If you are doing this upgrade via an ssh "
185"session, that would be a Bad Thing(tm)." 187"session, that would be a Bad Thing(tm)."
186msgstr "" 188msgstr ""
187"¤¤¤Þ¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿ /etc/init.d/ssh ¤Ï¡¢¤ª¤½¤é¤¯¼Â¹ÔÃæ¤Î sshd ¤ò¤¹¤Ù¤ÆÄä»ß¤µ" 189"¤¤¤Þ¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿ /etc/init.d/ssh ¤Ï¡¢¤ª¤½¤é¤¯¼Â¹ÔÃæ¤Î sshd ¤òÁ´¤Æ Ää»ß¤µ"
188"¤»¤Þ¤¹¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤ò ssh ¥»¥Ã¥·¥ç¥ó¤òÍѤ¤¤Æ¹Ô¤¦¤Î¤Ï´Ö°ã¤Ã¤¿¤ä¤ê¤«¤¿" 190"¤»¤Þ¤¹¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×¤ò ssh ¥»¥Ã¥·¥ç¥ó¤òÍѤ¤¤Æ¹Ô¤¦¤Î¤Ï´Ö °ã¤Ã¤¿¤ä¤ê¤«"
189"¤Ç¤¹¡£" 191¿¤Ç¤¹¡£"
190 192
191#. Description 193#. Description
192#: ../templates.master:78 194#: ../templates.master:78
@@ -217,13 +219,13 @@ msgid ""
217"You can enable it for servers you trust, either in one of the configuration " 219"You can enable it for servers you trust, either in one of the configuration "
218"files, or with the -X command line option." 220"files, or with the -X command line option."
219msgstr "" 221msgstr ""
220"ÀßÄê¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤¿¤ê¡¢-X ¥³¥Þ¥ó¥É¥é¥¤¥ó¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤¿¤ê¤¹¤ë¤³¤È¤Ç¡¢¿®ÍÑ" 222"ÀßÄê¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤¿¤ê¡¢-X ¥³¥Þ¥ó¥É¥é¥¤¥ó¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤¿¤ê¤¹¤ë ¤³¤È¤Ç¡¢¿®"
221"¤Ç¤­¤ë¥µ¡¼¥Ð¤ËÂФ·¤Æµö²Ä¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" 223"ÍѤǤ­¤ë¥µ¡¼¥Ð¤ËÂФ·¤Æµö²Ä¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"
222 224
223#. Description 225#. Description
224#: ../templates.master:88 226#: ../templates.master:88
225msgid "More details can be found in /usr/share/doc/ssh/README.Debian" 227msgid "More details can be found in /usr/share/doc/ssh/README.Debian"
226msgstr "¾ÜºÙ¤Ï /usr/share/doc/ssh/README.Debian ¤òÆɤó¤Ç¤¯¤À¤µ¤¤¡£" 228msgstr "¾ÜºÙ¤Ï /usr/share/doc/ssh/README.Debian ¤òÆɤó¤Ç²¼¤µ¤¤¡£"
227 229
228#. Description 230#. Description
229#: ../templates.master:99 231#: ../templates.master:99
@@ -237,8 +239,8 @@ msgid ""
237"having rsh-server installed undermines the security that you were probably " 239"having rsh-server installed undermines the security that you were probably "
238"wanting to obtain by installing ssh. I'd advise you to remove that package." 240"wanting to obtain by installing ssh. I'd advise you to remove that package."
239msgstr "" 241msgstr ""
240"rsh-server ¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤È¡¢¤¢¤Ê¤¿¤¬ ssh ¤Ë¤è¤Ã¤ÆÆÀ¤¿¤¤¤È»×¤Ã¤Æ¤¤" 242"rsh-server ¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤È¡¢¤¢¤Ê¤¿¤¬ ssh ¤Ë¤è¤Ã¤ÆÆÀ¤¿¤¤¤È »×¤Ã¤Æ¤¤"
241"¤ë¤Ç¤¢¤í¤¦¥»¥­¥å¥ê¥Æ¥£¤¬Â»¤Ê¤ï¤ì¤Þ¤¹¡£¤½¤Î¥Ñ¥Ã¥±¡¼¥¸¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤³" 243"¤ë¤Ç¤¢¤í¤¦¥»¥­¥å¥ê¥Æ¥£¤¬Â»¤Ê¤ï¤ì¤Þ¤¹¡£¤½¤Î¥Ñ¥Ã¥±¡¼¥¸¤ò¥¢¥ó¥¤ ¥ó¥¹¥È¡¼¥ë¤¹¤ë¤³"
242"¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£" 244"¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£"
243 245
244#. Description 246#. Description
@@ -256,7 +258,7 @@ msgid ""
256msgstr "" 258msgstr ""
257"(¤â¤· telnet ¥¢¥¯¥»¥¹¤òÄ󶡤·¤¿¤¤¤È»×¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¤·¤¿¤é) telnetd ¥Ñ¥Ã¥±¡¼¥¸" 259"(¤â¤· telnet ¥¢¥¯¥»¥¹¤òÄ󶡤·¤¿¤¤¤È»×¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¤·¤¿¤é) telnetd ¥Ñ¥Ã¥±¡¼¥¸"
258"¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤«¡¢¤Þ¤¿¤Ï¡¢telnetd-ssh ¥Ñ¥Ã¥±¡¼¥¸¤ò ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¾¯" 260"¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤«¡¢¤Þ¤¿¤Ï¡¢telnetd-ssh ¥Ñ¥Ã¥±¡¼¥¸¤ò ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¾¯"
259"¤Ê¤¯¤È¤â¥Í¥Ã¥È¥ï¡¼¥¯¾å¤ò°Å¹æ²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥æ¡¼¥¶Ì¾¤ä¥Ñ¥¹¥ï¡¼¥É¤ä¥»¥Ã¥·¥ç¥ó¾ð" 261"¤Ê¤¯¤È¤â¥Í¥Ã¥È¥ï¡¼¥¯¾å¤ò°Å¹æ²½¤µ¤ì¤Æ¤¤¤Ê¤¤¥æ¡¼¥¶Ì¾ ¤ä¥Ñ¥¹¥ï¡¼¥É¤ä¥»¥Ã¥·¥ç¥ó¾ð"
260"Êó¤¬Î®¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£" 262"Êó¤¬Î®¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£"
261 263
262#. Description 264#. Description
@@ -272,8 +274,8 @@ msgid ""
272"the old (non-free) SSH installation." 274"the old (non-free) SSH installation."
273msgstr "" 275msgstr ""
274"IDEA ¤Ç°Å¹æ²½¤µ¤ì¤¿¸Å¤¤¥­¡¼¤¬ /etc/ssh/ssh_host_key ¤Ë¤¢¤ê¤Þ¤¹¡£ OpenSSH ¤Ï¤³" 276"IDEA ¤Ç°Å¹æ²½¤µ¤ì¤¿¸Å¤¤¥­¡¼¤¬ /etc/ssh/ssh_host_key ¤Ë¤¢¤ê¤Þ¤¹¡£ OpenSSH ¤Ï¤³"
275"¤Î¥Û¥¹¥È¥­¡¼¥Õ¥¡¥¤¥ë¤ò°·¤¨¤Þ¤»¤ó¡£¤Þ¤¿¡¢º£¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¸Å¤¤ (¥Õ¥ê¡¼" 277"¤Î¥Û¥¹¥È¥­¡¼¥Õ¥¡¥¤¥ë¤ò°·¤¨¤Þ¤»¤ó¡£¤Þ¤¿¡¢º£¥¤¥ó¥¹¥È¡¼¥ë ¤µ¤ì¤Æ¤¤¤ë¸Å¤¤ (¥Õ¥ê¡¼"
276"¤Ç¤Ï¤Ê¤¤) SSH ¤Ë¤Ï ssh-keygen ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤»¤ó¡£" 278"¤Ç¤Ï¤Ê¤¤) SSH ¤Ë¤Ï ssh-keygen ¥æ¡¼¥Æ¥£¥ê¥Æ¥£ ¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"
277 279
278#. Description 280#. Description
279#: ../templates.master:114 281#: ../templates.master:114
@@ -291,8 +293,8 @@ msgid ""
291"You have the option of installing the ssh-keysign helper with the SUID bit " 293"You have the option of installing the ssh-keysign helper with the SUID bit "
292"set." 294"set."
293msgstr "" 295msgstr ""
294"ssh-keysign ¥Ø¥ë¥Ñ¡¼¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëºÝ¡¢SUID ¥Ó¥Ã¥È¤òÀßÄꤹ¤ë¤«¤·¤Ê¤¤¤«¤òÁª" 296"ssh-keysign ¥Ø¥ë¥Ñ¡¼¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëºÝ¡¢SUID ¥Ó¥Ã¥È¤òÀßÄꤹ¤ë¤« ¤·¤Ê¤¤¤«¤ò"
295"¤Ö¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" 297"Áª¤Ö¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"
296 298
297#. Description 299#. Description
298#: ../templates.master:124 300#: ../templates.master:124
@@ -300,8 +302,8 @@ msgid ""
300"If you make ssh-keysign SUID, you will be able to use SSH's Protocol 2 host-" 302"If you make ssh-keysign SUID, you will be able to use SSH's Protocol 2 host-"
301"based authentication." 303"based authentication."
302msgstr "" 304msgstr ""
303"ssh-keysign ¤ò SUID ¤ËÀßÄꤷ¤¿¾ì¹ç¡¢SSH ¥×¥í¥È¥³¥ë 2 ¤Î¥Û¥¹¥È¤Ë´ð¤Å¤¯Ç§¾Ú¤ò»È" 305"ssh-keysign ¤ò SUID ¤ËÀßÄꤷ¤¿¾ì¹ç¡¢SSH ¥×¥í¥È¥³¥ë 2 ¤Î¥Û¥¹¥È¤Ë ´ð¤Å¤¯Ç§¾Ú¤ò"
304"¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" 306"»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"
305 307
306#. Description 308#. Description
307#: ../templates.master:124 309#: ../templates.master:124
@@ -310,11 +312,11 @@ msgid ""
310"can change your mind later by running: dpkg-reconfigure ssh" 312"can change your mind later by running: dpkg-reconfigure ssh"
311msgstr "" 313msgstr ""
312"¤è¤¯Ê¬¤«¤é¤Ê¤¤¾ì¹ç¤Ï¡¢SUID ¤òÍ­¸ú¤Ë¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£¤â¤· ÌäÂ꤬µ¯¤³¤ì" 314"¤è¤¯Ê¬¤«¤é¤Ê¤¤¾ì¹ç¤Ï¡¢SUID ¤òÍ­¸ú¤Ë¤¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£¤â¤· ÌäÂ꤬µ¯¤³¤ì"
313"¤Ð¡¢dpkg-reconfigure ssh ¤ò¼Â¹Ô¤¹¤ë¤³¤È¤ÇÀßÄê¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£" 315"¤Ð¡¢dpkg-reconfigure ssh ¤ò¼Â¹Ô¤¹¤ë¤³¤È¤ÇÀßÄê¤òÊѹ¹ ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"
314 316
315#. Description 317#. Description
316#: ../templates.master:137 318#: ../templates.master:137
317msgid "Do you want to run the sshd server?" 319msgid "Do you want to run the sshd server ?"
318msgstr "sshd ¥µ¡¼¥Ð¤ò¼Â¹Ô¤·¤Þ¤¹¤«?" 320msgstr "sshd ¥µ¡¼¥Ð¤ò¼Â¹Ô¤·¤Þ¤¹¤«?"
319 321
320#. Description 322#. Description
@@ -328,8 +330,8 @@ msgid ""
328"Normally the sshd Secure Shell Server will be run to allow remote logins via " 330"Normally the sshd Secure Shell Server will be run to allow remote logins via "
329"ssh." 331"ssh."
330msgstr "" 332msgstr ""
331"Ä̾sshd ¥»¥­¥å¥¢¥·¥§¥ë¥µ¡¼¥Ð¤Ï¡¢ssh ¤òÍѤ¤¤¿¥ê¥â¡¼¥È¤«¤é¤Î¥í¥°¥¤¥ó¤ò²Äǽ¤Ë" 333"Ä̾sshd ¥»¥­¥å¥¢¥·¥§¥ë¥µ¡¼¥Ð¤Ï¡¢ssh ¤òÍѤ¤¤¿¥ê¥â¡¼¥È¤«¤é¤Î¥í¥°¥¤¥ó ¤ò²Äǽ"
332"¤¹¤ë¤¿¤á¤Ë¼Â¹Ô¤·¤Þ¤¹¡£" 334ˤ¹¤ë¤¿¤á¤Ë¼Â¹Ô¤·¤Þ¤¹¡£"
333 335
334#. Description 336#. Description
335#: ../templates.master:137 337#: ../templates.master:137
@@ -338,9 +340,9 @@ msgid ""
338"on this machine, and don't want to log into it at all using ssh, then you " 340"on this machine, and don't want to log into it at all using ssh, then you "
339"can disable sshd here." 341"can disable sshd here."
340msgstr "" 342msgstr ""
341"¤â¤· ssh ¥¯¥é¥¤¥¢¥ó¥È¤ò»È¤Ã¤Æ¤³¤Î¥Þ¥·¥ó¤«¤é¾¥Þ¥·¥ó¤Ø¤ÈÀܳ¤¹¤ë¤À¤±¤Ç¡¢¤³¤Î¥Þ" 343"¤â¤· ssh ¥¯¥é¥¤¥¢¥ó¥È¤ò»È¤Ã¤Æ¤³¤Î¥Þ¥·¥ó¤«¤é¾¥Þ¥·¥ó¤Ø¤ÈÀܳ¤¹¤ë¤À¤±¤Ç ¤Ç¡¢¤³"
342"¥·¥ó¤Ø¤È ssh ¤ò»È¤Ã¤Æ¥í¥°¥¤¥ó¤·¤Ê¤¤¤Î¤Ç¤·¤¿¤é¡¢¤³¤³¤Ç sshd ¤ò¼Â¹Ô¤·¤Ê¤¤¤Ç¤ª¤­" 344"¤Î¥Þ¥·¥ó¤Ø¤È ssh ¤ò»È¤Ã¤Æ¥í¥°¥¤¥ó¤·¤Ê¤¤¤Î¤Ç¤·¤¿¤é¡¢¤³¤³¤Ç sshd ¤ò¼Â¹Ô¤·¤Ê¤¤¤Ç"
343"¤Þ¤¹¡£" 345ª¤­¤Þ¤¹¡£"
344 346
345#. Description 347#. Description
346#: ../templates.master:149 348#: ../templates.master:149
@@ -355,10 +357,10 @@ msgid ""
355"are using this option in an authorized_keys file, beware that the keys in " 357"are using this option in an authorized_keys file, beware that the keys in "
356"question will no longer work until the option is removed." 358"question will no longer work until the option is removed."
357msgstr "" 359msgstr ""
358"ËܥС¼¥¸¥ç¥ó¤Î OpenSSH ¤Ï¡¢¸ø³«¸°¤Î´Ä¶­¥ª¥×¥·¥ç¥ó¤ò¥Ç¥Õ¥©¥ë¥È¤Ç̵¸ú¤ËÀßÄꤷ¤Æ" 360"ËܥС¼¥¸¥ç¥ó¤Î OpenSSH ¤Ï¡¢¸ø³«¸°¤Î´Ä¶­¥ª¥×¥·¥ç¥ó¤ò¥Ç¥Õ¥©¥ë¥È¤Ç ̵¸ú¤ËÀßÄꤷ"
359"¤¤¤Þ¤¹¡£LD_PRELOAD ¤Ê¤É¤Î¹¶·â¤òÈò¤±¤ë¤¿¤á¤Ç¤¹¡£¤â¤· authorized_keys ¥Õ¥¡¥¤¥ë" 361Ƥ¤¤Þ¤¹¡£LD_PRELOAD ¤Ê¤É¤Î¹¶·â¤òÈò¤±¤ë¤¿¤á¤Ç¤¹¡£ ¤â¤· authorized_keys ¥Õ¥¡¥¤"
360"¤Ç¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤ò½üµî¤·¤Ê¤¤¸Â¤ê¤Ï¤½¤Î¸°¤Ï" 362"¥ë¤Ç¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¡¢ ¤³¤Î¥ª¥×¥·¥ç¥ó¤ò½üµî¤·¤Ê¤¤¸Â¤ê¤Ï¤½¤Î¸°"
361"ÍøÍѤǤ­¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£" 363"¤ÏÍøÍѤǤ­¤Ê¤¤¤³¤È¤ËÃí°Õ ¤·¤Æ¤¯¤À¤µ¤¤¡£"
362 364
363#. Description 365#. Description
364#: ../templates.master:149 366#: ../templates.master:149
@@ -367,6 +369,15 @@ msgid ""
367"sshd_config after the upgrade is complete, taking note of the warning in the " 369"sshd_config after the upgrade is complete, taking note of the warning in the "
368"sshd_config(5) manual page." 370"sshd_config(5) manual page."
369msgstr "" 371msgstr ""
370"¤³¤Î¥ª¥×¥·¥ç¥ó¤òºÆ¤ÓÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢¥¢¥Ã¥×¥°¥ì¡¼¥É½ªÎ»¸å¤Ë¡¢sshd_config(5) ¥Þ" 372"¤³¤Î¥ª¥×¥·¥ç¥ó¤òºÆ¤ÓÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢¥¢¥Ã¥×¥°¥ì¡¼¥É½ªÎ»¸å¤Ë¡¢ sshd_config(5) "
371"¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Î·Ù¹ð»ö¹à¤òÆɤó¤Ç¡¢ /etc/ssh/sshd_config ¥Õ¥¡¥¤¥ë¤Ë" 373"¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Î·Ù¹ð»ö¹à¤òÆɤó¤Ç¡¢ /etc/ssh/sshd_config ¥Õ¥¡¥¤¥ë¤Ë"
372"¡ÖPermitUserEnvironment yes¡×¤ÈÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£" 374"¡ÖPermitUserEnvironment yes¡×¤È ÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£"
375
376#~ msgid ""
377#~ "NB! If you are running a 2.0 series Linux kernel, then privilege "
378#~ "separation will not work at all, and your sshd will fail to start unless "
379#~ "you explicitly turn privilege separation off."
380#~ msgstr ""
381#~ "Ãí°Õ! Linux ¥«¡¼¥Í¥ë¤Î¥Ð¡¼¥¸¥ç¥ó 2.0 ·ÏÎó¤ò»È¤Ã¤Æ¤¤¤ë¾ì¹ç¡¢Æø¢ ʬΥ¤ÏÁ´¤¯"
382#~ "Æ°ºî¤·¤Þ¤»¤ó¡£ÌÀ¼¨Åª¤ËÆø¢Ê¬Î¥¤ò̵¸ú¤Ë¤·¤Ê¤¤¸Â¤ê¡¢sshd ¤Ïµ¯Æ°¤Ë¼ºÇÔ¤·¤Þ"
383#~ "¤¹¡£"
diff --git a/debian/po/nl.po b/debian/po/nl.po
deleted file mode 100644
index b3737e050..000000000
--- a/debian/po/nl.po
+++ /dev/null
@@ -1,388 +0,0 @@
1#
2# Translators, if you are not familiar with the PO format, gettext
3# documentation is worth reading, especially sections dedicated to
4# this format, e.g. by running:
5# info -n '(gettext)PO Files'
6# info -n '(gettext)Header Entry'
7#
8# Some information specific to po-debconf are available at
9# /usr/share/doc/po-debconf/README-trans
10# or http://www.debian.org/intl/l10n/po-debconf/README-trans
11#
12# Developers do not need to manually edit POT or PO files.
13#
14msgid ""
15msgstr ""
16"Project-Id-Version: openssh 3.6.1p2-9\n"
17"Report-Msgid-Bugs-To: \n"
18"POT-Creation-Date: 2003-09-12 21:03+0100\n"
19"PO-Revision-Date: 2003-09-27 14:43+0100\n"
20"Last-Translator: Bart Cornelis <cobaco@linux.be>\n"
21"Language-Team: debian-l10n-dutch <debian-l10n-dutch@lists.debian.org>\n"
22"MIME-Version: 1.0\n"
23"Content-Type: text/plain; charset=iso-8859-1\n"
24"Content-Transfer-Encoding: 8bit\n"
25
26#. Description
27#: ../templates.master:3
28msgid "Privilege separation"
29msgstr "Rechtenscheiding"
30
31#. Description
32#: ../templates.master:3
33msgid ""
34"Privilege separation is turned on by default, so if you decide you want it "
35"turned off, you need to add \"UsePrivilegeSeparation no\" to /etc/ssh/"
36"sshd_config."
37msgstr ""
38"Rechtenscheiding is standaard ingeschakeld; mocht u dit niet willen, dan "
39"dient u \"UsePrivilegeSeparation no\" toe te voegen in /etc/ssh/sshd_config."
40
41#. Description
42#: ../templates.master:19
43msgid "Enable Privilege separation"
44msgstr "Rechtenscheiding inschakelen"
45
46#. Description
47#: ../templates.master:19
48msgid ""
49"This version of OpenSSH contains the new privilege separation option. This "
50"significantly reduces the quantity of code that runs as root, and therefore "
51"reduces the impact of security holes in sshd."
52msgstr ""
53"Deze OpenSSH-versie bevat de nieuwe rechtenscheidingoptie. Deze vermindert "
54"de hoeveelheid code die als root uitgevoerd wordt substantieel, en "
55"vermindert op die manier de invloed van veiligheidslekken in sshd."
56
57#. Description
58#: ../templates.master:19
59msgid ""
60"Unfortunately, privilege separation interacts badly with PAM. Any PAM "
61"session modules that need to run as root (pam_mkhomedir, for example) will "
62"fail, and PAM keyboard-interactive authentication won't work."
63msgstr ""
64"Spijtig genoeg werkt rechtenscheiding niet goed samen met PAM. Alle PAM-"
65"sessiemodules die als root uitgevoerd dienen te worden (b.v. pam_mkhomedir) "
66"zullen falen, en de interactieve PAM-toetsenbord-authenticatie zal ook niet "
67"werken."
68
69#. Description
70#: ../templates.master:19
71msgid ""
72"Since you've opted to have me generate an sshd_config file for you, you can "
73"choose whether or not to have privilege separation turned on or not. Unless "
74"you know you need to use PAM features that won't work with this option, you "
75"should enable it."
76msgstr ""
77"Aangezien u ervoor gekozen heeft om mij een ssh_config-bestand voor u te "
78"laten genereren, kunt u kiezen of u rechtenscheiding aan of uit wilt hebben. "
79"U kunt dit het best activeren, tenzij u PAM-mogelijkheden nodig heeft die "
80"niet met rechtenscheiding samenwerken."
81
82#. Description
83#: ../templates.master:36
84msgid "Generate new configuration file"
85msgstr "Genereer het nieuwe configuratiebestand"
86
87#. Description
88#: ../templates.master:36
89msgid ""
90"This version of OpenSSH has a considerably changed configuration file from "
91"the version shipped in Debian 'Potato', which you appear to be upgrading "
92"from. I can now generate you a new configuration file (/etc/ssh/sshd."
93"config), which will work with the new server version, but will not contain "
94"any customisations you made with the old version."
95msgstr ""
96"Deze versie van OpenSSH gebruikt een configuratiebestand dat sterk veranderd "
97"is ten opzichte van dat in Debian 'Potato' (waarvan u lijkt op te "
98"waardereren). Ik kan nu een nieuw, met de nieuwe serverversie werkend, "
99"configuratiebestand (/etc/ssh/sshd.config) voor u genereren. Dit "
100"gegenereerde bestand zal echter de aanpassingen die u wellicht gemaakt had "
101"niet overnemen."
102
103#. Description
104#: ../templates.master:36
105msgid ""
106"Please note that this new configuration file will set the value of "
107"'PermitRootLogin' to yes (meaning that anyone knowing the root password can "
108"ssh directly in as root). It is the opinion of the maintainer that this is "
109"the correct default (see README.Debian for more details), but you can always "
110"edit sshd_config and set it to no if you wish."
111msgstr ""
112"Merk op dat dit nieuwe configuratiebestand de waarde van 'PermitRootLogin' "
113"op 'yes' zet (wat betekent dat iedereen die het root-wachtwoord kent via ssh "
114"rechstreeks als root kan aanmelden). Het is de mening van de pakketbeheerder "
115"dat dit de juiste defaultwaarde is (zie README.Debian.gz voor meer details). "
116"Indien u dit niet wenst kunt u sshd_config handmatig aanpassen en de waarde "
117"op 'no' zetten."
118
119#. Description
120#: ../templates.master:36
121msgid ""
122"It is strongly recommended that you let me generate a new configuration file "
123"for you."
124msgstr ""
125"Het wordt ten zeerste aangeraden om mij het nieuwe configuratiebestand voor "
126"u te laten genereren."
127
128#. Description
129#: ../templates.master:55
130msgid "Allow SSH protocol 2 only"
131msgstr "Laat enkel versie 2 van het SSH-protocol toe."
132
133#. Description
134#: ../templates.master:55
135msgid ""
136"This version of OpenSSH supports version 2 of the ssh protocol, which is "
137"much more secure. Disabling ssh 1 is encouraged, however this will slow "
138"things down on low end machines and might prevent older clients from "
139"connecting (the ssh client shipped with \"potato\" is affected)."
140msgstr ""
141"Deze versie van OpenSSH ondersteunt de veiligere versie 2 van het ssh-"
142"protocol. Uitschakelen van ssh versie 1 wordt aangemoedigd, hoewel dit "
143"dingen op zwakkere machines zal vertragen, en mogelijk verbindingen van "
144"oudere clients (b.v. de ssh-client uit \"potato\") onmogelijk maakt."
145
146#. Description
147#: ../templates.master:55
148msgid ""
149"Also please note that keys used for protocol 1 are different so you will not "
150"be able to use them if you only allow protocol 2 connections."
151msgstr ""
152"Houd er ook rekening mee dat de sleutels gebruikt voor protocolversie 1 "
153"verschillend zijn, waardoor u deze niet kunt gebruiken indien u enkel "
154"protocolversie 2 verbindingen toelaat."
155
156#. Description
157#: ../templates.master:55
158msgid ""
159"If you later change your mind about this setting, README.Debian has "
160"instructions on what to do to your sshd_config file."
161msgstr ""
162"Instructies over wat te veranderen in sshd_config om deze instelling later "
163"nog te veranderen, vindt u in /usr/share/doc/ssh/README.Debian.gz."
164
165#. Description
166#: ../templates.master:69
167msgid "ssh2 keys merged in configuration files"
168msgstr "ssh2 sleutels zijn samengevoegd in de configuratiebestanden"
169
170#. Description
171#: ../templates.master:69
172msgid ""
173"As of version 3 OpenSSH no longer uses separate files for ssh1 and ssh2 "
174"keys. This means the authorized_keys2 and known_hosts2 files are no longer "
175"needed. They will still be read in order to maintain backwards compatibility"
176msgstr ""
177"Vanaf versie 3 gebruikt OpenSSH niet langer aparte bestanden om ssh1 en ssh2 "
178"sleutels bij te houden. Dit betekend dat de authorized_keys2 en known_hosts2 "
179"bestanden niet langer nodig zijn. Wel worden ze nog steeds gelezen om "
180"achterwaartse compabiliteit te behouden."
181
182#. Description
183#: ../templates.master:78
184msgid "Do you want to continue (and risk killing active ssh sessions)?"
185msgstr "Wilt u verder gaan (waarbij u mogelijk actieve ssh sessies afschiet)?"
186
187#. Description
188#: ../templates.master:78
189msgid ""
190"The version of /etc/init.d/ssh that you have installed, is likely to kill "
191"all running sshd instances. If you are doing this upgrade via an ssh "
192"session, that would be a Bad Thing(tm)."
193msgstr ""
194"De /etc/init.d/ssh versie die u geïnstalleerd hebt schiet waarschijnlijk "
195"alle lopende sshd-instanties af. Dit is Niet Goed wanneer u deze "
196"opwaardering via een ssh-sessie doet."
197
198#. Description
199#: ../templates.master:78
200msgid ""
201"You can fix this by adding \"--pidfile /var/run/sshd.pid\" to the start-stop-"
202"daemon line in the stop section of the file."
203msgstr ""
204"U kunt dit repareren door \"--pidfile /var/run/sshd.pid\" toe te voegen aan "
205"de start-stop-daemon regel in de stop-sectie van het bestand."
206
207#. Description
208#: ../templates.master:88
209msgid "NOTE: Forwarding of X11 and Authorization disabled by default."
210msgstr ""
211"OPMERKING: Doorsturen van X11 en Authorisatie is standaard uitgeschakeld."
212
213#. Description
214#: ../templates.master:88
215msgid ""
216"For security reasons, the Debian version of ssh has ForwardX11 and "
217"ForwardAgent set to ``off'' by default."
218msgstr ""
219"Om beveiligingsredenen zijn, in de Debian versie van ssh, ForwardX11 en "
220"ForwardAgent standaard uitgeschakeld."
221
222#. Description
223#: ../templates.master:88
224msgid ""
225"You can enable it for servers you trust, either in one of the configuration "
226"files, or with the -X command line option."
227msgstr ""
228"U kunt dit, voor vertrouwde servers, inschakelen in de "
229"configuratiebestanden, of met de -X commandoregeloptie."
230
231#. Description
232#: ../templates.master:88
233msgid "More details can be found in /usr/share/doc/ssh/README.Debian"
234msgstr "Meer details vindt u in /usr/share/doc/ssh/README.Debian.gz"
235
236#. Description
237#: ../templates.master:99
238msgid "Warning: rsh-server is installed --- probably not a good idea"
239msgstr ""
240"Waarschuwing: rsh-server is geïnstalleerd -- dit is waarschijnlijk geen goed "
241"idee"
242
243#. Description
244#: ../templates.master:99
245msgid ""
246"having rsh-server installed undermines the security that you were probably "
247"wanting to obtain by installing ssh. I'd advise you to remove that package."
248msgstr ""
249"rsh-server geïnstalleerd hebben ondermijnt de beveiliging die u, "
250"waarschijnlijk, net probeerde te verkrijgen door ssh te installeren. We "
251"raden u aan om dat pakket te verwijderen."
252
253#. Description
254#: ../templates.master:106
255msgid "Warning: telnetd is installed --- probably not a good idea"
256msgstr ""
257"Waarschuwing: telnetd is geïnstalleerd -- dit is waarschijnlijk geen goed "
258"idee"
259
260#. Description
261#: ../templates.master:106
262msgid ""
263"I'd advise you to either remove the telnetd package (if you don't actually "
264"need to offer telnet access) or install telnetd-ssl so that there is at "
265"least some chance that telnet sessions will not be sending unencrypted login/"
266"password and session information over the network."
267msgstr ""
268"Ik raad u aan om of het telnetd-pakket te verwijderen (indien u geen "
269"telnettoegang hoeft aan te bieden), of telnetd-ssl te installeren zodat er "
270"enige kans is dat telnetsessies geen onversleutelde gebruikersnaam/"
271"wachtwoord en sessie informatie over het netwerk versturen."
272
273#. Description
274#: ../templates.master:114
275msgid "Warning: you must create a new host key"
276msgstr "Waarschuwing: u dient een nieuwe computersleutel aan te maken"
277
278#. Description
279#: ../templates.master:114
280msgid ""
281"There is an old /etc/ssh/ssh_host_key, which is IDEA encrypted. OpenSSH can "
282"not handle this host key file, and I can't find the ssh-keygen utility from "
283"the old (non-free) SSH installation."
284msgstr ""
285"Er is een oude IDEA-versleutelde /etc/ssh/ssh_host_key aanwezig. OpenSSH kan "
286"dit computersleutelbestand niet aan, en ik kan het ssh-keygen programma van "
287"de oude (niet-vrije) SSH installatie niet vinden."
288
289#. Description
290#: ../templates.master:114
291msgid "You will need to generate a new host key."
292msgstr "Het zal nodig zijn om een nieuwe computersleutel te genereren"
293
294#. Description
295#: ../templates.master:124
296msgid "Do you want /usr/lib/ssh-keysign to be installed SUID root?"
297msgstr "Wilt u /usr/lib/ssh-keysign met SUID root installeren?"
298
299#. Description
300#: ../templates.master:124
301msgid ""
302"You have the option of installing the ssh-keysign helper with the SUID bit "
303"set."
304msgstr ""
305"U heeft de mogelijkheid om het ssh-keysign hulpprogramma te installeren met "
306"de SUID-bit aan."
307
308#. Description
309#: ../templates.master:124
310msgid ""
311"If you make ssh-keysign SUID, you will be able to use SSH's Protocol 2 host-"
312"based authentication."
313msgstr ""
314"Wanneer u de SUID-bit voor ssh-keysign aanzet, krijgt u de mogelijkheid om "
315"de computer-gebaseerde authenticatie van het versie 2 SSH-protocol te "
316"gebruiken."
317
318#. Description
319#: ../templates.master:124
320msgid ""
321"If in doubt, I suggest you install it with SUID. If it causes problems you "
322"can change your mind later by running: dpkg-reconfigure ssh"
323msgstr ""
324"Bij twijfel kunt u best met SUID installeren. Indien dit problemen "
325"veroorzaakt kunt u dit altijd later nog veranderen door \"dpkg-reconfigure "
326"ssh\" uit te voeren"
327
328#. Description
329#: ../templates.master:137
330msgid "Do you want to run the sshd server?"
331msgstr "Wilt u de sshd server opstarten?"
332
333#. Description
334#: ../templates.master:137
335msgid "This package contains both the ssh client, and the sshd server."
336msgstr "Dit pakket bevat zowel de ssh-client, als de sshd-server."
337
338#. Description
339#: ../templates.master:137
340msgid ""
341"Normally the sshd Secure Shell Server will be run to allow remote logins via "
342"ssh."
343msgstr ""
344"Normaal wordt de sshd-server uitgevoerd om aanmelden vanop een andere "
345"computer via ssh toe te laten."
346
347#. Description
348#: ../templates.master:137
349msgid ""
350"If you are only interested in using the ssh client for outbound connections "
351"on this machine, and don't want to log into it at all using ssh, then you "
352"can disable sshd here."
353msgstr ""
354"Indien u op deze machine enkel ssh wil gebruiken voor uitgaande "
355"verbindingen, en ook lokaal niet wilt inloggen via ssh, kunt u sshd hier "
356"uitschakelen."
357
358#. Description
359#: ../templates.master:149
360msgid "Environment options on keys have been deprecated"
361msgstr ""
362"Omgevingsopties voor sleutels zullen in de toekomst niet meer ondersteund "
363"worden."
364
365#. Description
366#: ../templates.master:149
367msgid ""
368"This version of OpenSSH disables the environment option for public keys by "
369"default, in order to avoid certain attacks (for example, LD_PRELOAD). If you "
370"are using this option in an authorized_keys file, beware that the keys in "
371"question will no longer work until the option is removed."
372msgstr ""
373"Deze versie van OpenSSH schakelt de omgevingsoptie voor publieke sleutels "
374"standaard uit om bepaalde aanvallen uit te sluiten (bv. LD_PRELOAD). Indien "
375"u deze optie in een authorized_keys-bestand gebruikt, dient u u ervan bewust "
376"te zijn dat de betreffende sleutels niet langer zullen werken totdat de "
377"optie verwijderd wordt."
378
379#. Description
380#: ../templates.master:149
381msgid ""
382"To re-enable this option, set \"PermitUserEnvironment yes\" in /etc/ssh/"
383"sshd_config after the upgrade is complete, taking note of the warning in the "
384"sshd_config(5) manual page."
385msgstr ""
386"Om deze optie opnieuw in te schakelen dient u \"PermitUserEnvironment yes\" "
387"in /etc/ssh/sshd_config aan te zetten in nadat de opwaardering compleet is; "
388"houd hierbij rekening met de waarschuwing in de sshd_config(5) man-pagina."
diff --git a/debian/po/pl.po b/debian/po/pl.po
index 853144294..6910ceaf7 100644
--- a/debian/po/pl.po
+++ b/debian/po/pl.po
@@ -16,7 +16,7 @@ msgid ""
16msgstr "" 16msgstr ""
17"Project-Id-Version: PACKAGE VERSION\n" 17"Project-Id-Version: PACKAGE VERSION\n"
18"Report-Msgid-Bugs-To: \n" 18"Report-Msgid-Bugs-To: \n"
19"POT-Creation-Date: 2003-09-12 21:03+0100\n" 19"POT-Creation-Date: 2003-08-27 02:20+0100\n"
20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
22"Language-Team: LANGUAGE <LL@li.org>\n" 22"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -73,9 +73,9 @@ msgstr ""
73#, fuzzy 73#, fuzzy
74msgid "" 74msgid ""
75"Since you've opted to have me generate an sshd_config file for you, you can " 75"Since you've opted to have me generate an sshd_config file for you, you can "
76"choose whether or not to have privilege separation turned on or not. Unless " 76"choose whether or not to have Privilege Separation turned on or not. Unless "
77"you know you need to use PAM features that won't work with this option, you " 77"you know you need to use PAM features that won't work with this option, you "
78"should enable it." 78"should say yes here."
79msgstr "" 79msgstr ""
80"Zdecydowa³e¶ siê na to abym wygenerowa³ dla ciebie plik sshd_config, i " 80"Zdecydowa³e¶ siê na to abym wygenerowa³ dla ciebie plik sshd_config, i "
81"mo¿esz wybraæ czy chcesz w³±czyæ Separacjê Uprawnieñ, czy te¿ nie. Je¶li nie " 81"mo¿esz wybraæ czy chcesz w³±czyæ Separacjê Uprawnieñ, czy te¿ nie. Je¶li nie "
@@ -183,8 +183,7 @@ msgstr ""
183 183
184#. Description 184#. Description
185#: ../templates.master:78 185#: ../templates.master:78
186#, fuzzy 186msgid "Do you want to continue (and risk killing active ssh sessions) ?"
187msgid "Do you want to continue (and risk killing active ssh sessions)?"
188msgstr "Czy chcesz kontynuowaæ (i ryzykowaæ zabicie aktywnych sesji ssh) ?" 187msgstr "Czy chcesz kontynuowaæ (i ryzykowaæ zabicie aktywnych sesji ssh) ?"
189 188
190#. Description 189#. Description
@@ -327,8 +326,7 @@ msgstr ""
327 326
328#. Description 327#. Description
329#: ../templates.master:137 328#: ../templates.master:137
330#, fuzzy 329msgid "Do you want to run the sshd server ?"
331msgid "Do you want to run the sshd server?"
332msgstr "Czy chcesz uruchamiaæ serwer sshd ?" 330msgstr "Czy chcesz uruchamiaæ serwer sshd ?"
333 331
334#. Description 332#. Description
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
index 9ac5f81ae..017d13cf4 100644
--- a/debian/po/pt_BR.po
+++ b/debian/po/pt_BR.po
@@ -15,7 +15,7 @@ msgid ""
15msgstr "" 15msgstr ""
16"Project-Id-Version: openssh-3.6.1p2-5\n" 16"Project-Id-Version: openssh-3.6.1p2-5\n"
17"Report-Msgid-Bugs-To: \n" 17"Report-Msgid-Bugs-To: \n"
18"POT-Creation-Date: 2003-09-12 21:03+0100\n" 18"POT-Creation-Date: 2003-08-27 02:20+0100\n"
19"PO-Revision-Date: 2003-03-08 16:56+0300\n" 19"PO-Revision-Date: 2003-03-08 16:56+0300\n"
20"Last-Translator: André Luís Lopes <andrelop@debian.org>\n" 20"Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
21"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n" 21"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n"
@@ -69,12 +69,11 @@ msgstr ""
69 69
70#. Description 70#. Description
71#: ../templates.master:19 71#: ../templates.master:19
72#, fuzzy
73msgid "" 72msgid ""
74"Since you've opted to have me generate an sshd_config file for you, you can " 73"Since you've opted to have me generate an sshd_config file for you, you can "
75"choose whether or not to have privilege separation turned on or not. Unless " 74"choose whether or not to have Privilege Separation turned on or not. Unless "
76"you know you need to use PAM features that won't work with this option, you " 75"you know you need to use PAM features that won't work with this option, you "
77"should enable it." 76"should say yes here."
78msgstr "" 77msgstr ""
79"Uma vez que você optou por permitir que o debconf gere o arquivo sshd_config " 78"Uma vez que você optou por permitir que o debconf gere o arquivo sshd_config "
80"para você, é possível escolher se você deseja ter ou não o recurso de " 79"para você, é possível escolher se você deseja ter ou não o recurso de "
@@ -190,8 +189,7 @@ msgstr ""
190 189
191#. Description 190#. Description
192#: ../templates.master:78 191#: ../templates.master:78
193#, fuzzy 192msgid "Do you want to continue (and risk killing active ssh sessions) ?"
194msgid "Do you want to continue (and risk killing active ssh sessions)?"
195msgstr "Deseja continuar (e arriscar acabar com sessões ssh ativas) ?" 193msgstr "Deseja continuar (e arriscar acabar com sessões ssh ativas) ?"
196 194
197#. Description 195#. Description
@@ -332,8 +330,7 @@ msgstr ""
332 330
333#. Description 331#. Description
334#: ../templates.master:137 332#: ../templates.master:137
335#, fuzzy 333msgid "Do you want to run the sshd server ?"
336msgid "Do you want to run the sshd server?"
337msgstr "Você quer executar o servidor sshd ?" 334msgstr "Você quer executar o servidor sshd ?"
338 335
339#. Description 336#. Description
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index 6d22b7ce4..42e6a9522 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -16,7 +16,7 @@ msgid ""
16msgstr "" 16msgstr ""
17"Project-Id-Version: PACKAGE VERSION\n" 17"Project-Id-Version: PACKAGE VERSION\n"
18"Report-Msgid-Bugs-To: \n" 18"Report-Msgid-Bugs-To: \n"
19"POT-Creation-Date: 2003-09-12 21:03+0100\n" 19"POT-Creation-Date: 2003-08-27 02:20+0100\n"
20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 20"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 21"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
22"Language-Team: LANGUAGE <LL@li.org>\n" 22"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -62,9 +62,9 @@ msgstr ""
62#: ../templates.master:19 62#: ../templates.master:19
63msgid "" 63msgid ""
64"Since you've opted to have me generate an sshd_config file for you, you can " 64"Since you've opted to have me generate an sshd_config file for you, you can "
65"choose whether or not to have privilege separation turned on or not. Unless " 65"choose whether or not to have Privilege Separation turned on or not. Unless "
66"you know you need to use PAM features that won't work with this option, you " 66"you know you need to use PAM features that won't work with this option, you "
67"should enable it." 67"should say yes here."
68msgstr "" 68msgstr ""
69 69
70#. Description 70#. Description
@@ -142,7 +142,7 @@ msgstr ""
142 142
143#. Description 143#. Description
144#: ../templates.master:78 144#: ../templates.master:78
145msgid "Do you want to continue (and risk killing active ssh sessions)?" 145msgid "Do you want to continue (and risk killing active ssh sessions) ?"
146msgstr "" 146msgstr ""
147 147
148#. Description 148#. Description
@@ -256,7 +256,7 @@ msgstr ""
256 256
257#. Description 257#. Description
258#: ../templates.master:137 258#: ../templates.master:137
259msgid "Do you want to run the sshd server?" 259msgid "Do you want to run the sshd server ?"
260msgstr "" 260msgstr ""
261 261
262#. Description 262#. Description
diff --git a/debian/rules b/debian/rules
index 640f6d3c2..ec594ecb0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,7 +33,7 @@ build-stamp:
33 dh_testdir 33 dh_testdir
34 ./configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin --with-superuser-path=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin --with-pam --with-4in6 \ 34 ./configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin --with-superuser-path=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin --with-pam --with-4in6 \
35 --with-privsep-path=/var/run/sshd --without-rand-helper 35 --with-privsep-path=/var/run/sshd --without-rand-helper
36 $(MAKE) -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) -g -Wall -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -D__FILE_OFFSET_BITS=64 -DSSH_VERSION="\"$(SSH_VERSION)\""' \ 36 $(MAKE) -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) -g -Wall -fno-builtin-log -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -D__FILE_OFFSET_BITS=64 -DHAVE_MMAP_ANON_SHARED -DSSH_VERSION="\"$(SSH_VERSION)\""' \
37 SSH_KEYSIGN='/usr/lib/ssh-keysign' 37 SSH_KEYSIGN='/usr/lib/ssh-keysign'
38 # Support building on Debian 3.0 (with GNOME 1.4) and later. 38 # Support building on Debian 3.0 (with GNOME 1.4) and later.
39 if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \ 39 if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \
diff --git a/debian/templates.master b/debian/templates.master
index 4d60e95da..a4005fd38 100644
--- a/debian/templates.master
+++ b/debian/templates.master
@@ -26,9 +26,9 @@ _Description: Enable Privilege separation
26 fail, and PAM keyboard-interactive authentication won't work. 26 fail, and PAM keyboard-interactive authentication won't work.
27 . 27 .
28 Since you've opted to have me generate an sshd_config file for you, you 28 Since you've opted to have me generate an sshd_config file for you, you
29 can choose whether or not to have privilege separation turned on or not. 29 can choose whether or not to have Privilege Separation turned on or not.
30 Unless you know you need to use PAM features that won't work with this 30 Unless you know you need to use PAM features that won't work with this
31 option, you should enable it. 31 option, you should say yes here.
32 32
33Template: ssh/new_config 33Template: ssh/new_config
34Type: boolean 34Type: boolean
@@ -75,7 +75,7 @@ _Description: ssh2 keys merged in configuration files
75Template: ssh/use_old_init_script 75Template: ssh/use_old_init_script
76Type: boolean 76Type: boolean
77Default: false 77Default: false
78_Description: Do you want to continue (and risk killing active ssh sessions)? 78_Description: Do you want to continue (and risk killing active ssh sessions) ?
79 The version of /etc/init.d/ssh that you have installed, is likely to kill 79 The version of /etc/init.d/ssh that you have installed, is likely to kill
80 all running sshd instances. If you are doing this upgrade via an ssh 80 all running sshd instances. If you are doing this upgrade via an ssh
81 session, that would be a Bad Thing(tm). 81 session, that would be a Bad Thing(tm).
@@ -134,7 +134,7 @@ _Description: Do you want /usr/lib/ssh-keysign to be installed SUID root?
134Template: ssh/run_sshd 134Template: ssh/run_sshd
135Type: boolean 135Type: boolean
136Default: true 136Default: true
137_Description: Do you want to run the sshd server? 137_Description: Do you want to run the sshd server ?
138 This package contains both the ssh client, and the sshd server. 138 This package contains both the ssh client, and the sshd server.
139 . 139 .
140 Normally the sshd Secure Shell Server will be run to allow remote logins 140 Normally the sshd Secure Shell Server will be run to allow remote logins
diff --git a/defines.h b/defines.h
index e662966fb..73fbe077b 100644
--- a/defines.h
+++ b/defines.h
@@ -1,31 +1,7 @@
1/*
2 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#ifndef _DEFINES_H 1#ifndef _DEFINES_H
26#define _DEFINES_H 2#define _DEFINES_H
27 3
28/* $Id: defines.h,v 1.103 2003/09/16 01:52:19 dtucker Exp $ */ 4/* $Id: defines.h,v 1.97 2003/01/24 00:50:32 djm Exp $ */
29 5
30 6
31/* Constants */ 7/* Constants */
@@ -212,21 +188,28 @@ typedef unsigned long u_int32_t;
212#ifndef HAVE_INT64_T 188#ifndef HAVE_INT64_T
213# if (SIZEOF_LONG_INT == 8) 189# if (SIZEOF_LONG_INT == 8)
214typedef long int int64_t; 190typedef long int int64_t;
191# define HAVE_INT64_T 1
215# else 192# else
216# if (SIZEOF_LONG_LONG_INT == 8) 193# if (SIZEOF_LONG_LONG_INT == 8)
217typedef long long int int64_t; 194typedef long long int int64_t;
195# define HAVE_INT64_T 1
218# endif 196# endif
219# endif 197# endif
220#endif 198#endif
221#ifndef HAVE_U_INT64_T 199#ifndef HAVE_U_INT64_T
222# if (SIZEOF_LONG_INT == 8) 200# if (SIZEOF_LONG_INT == 8)
223typedef unsigned long int u_int64_t; 201typedef unsigned long int u_int64_t;
202# define HAVE_U_INT64_T 1
224# else 203# else
225# if (SIZEOF_LONG_LONG_INT == 8) 204# if (SIZEOF_LONG_LONG_INT == 8)
226typedef unsigned long long int u_int64_t; 205typedef unsigned long long int u_int64_t;
206# define HAVE_U_INT64_T 1
227# endif 207# endif
228# endif 208# endif
229#endif 209#endif
210#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8)
211# define HAVE_LONG_LONG_INT 1
212#endif
230 213
231#ifndef HAVE_U_CHAR 214#ifndef HAVE_U_CHAR
232typedef unsigned char u_char; 215typedef unsigned char u_char;
@@ -321,10 +304,6 @@ struct winsize {
321# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" 304# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
322#endif 305#endif
323 306
324#ifndef SUPERUSER_PATH
325# define SUPERUSER_PATH _PATH_STDPATH
326#endif
327
328#ifndef _PATH_DEVNULL 307#ifndef _PATH_DEVNULL
329# define _PATH_DEVNULL "/dev/null" 308# define _PATH_DEVNULL "/dev/null"
330#endif 309#endif
@@ -441,23 +420,6 @@ struct winsize {
441#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) 420#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
442#endif 421#endif
443 422
444/* given pointer to struct cmsghdr, return pointer to data */
445#ifndef CMSG_DATA
446#define CMSG_DATA(cmsg) ((u_char *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr)))
447#endif /* CMSG_DATA */
448
449/*
450 * RFC 2292 requires to check msg_controllen, in case that the kernel returns
451 * an empty list for some reasons.
452 */
453#ifndef CMSG_FIRSTHDR
454#define CMSG_FIRSTHDR(mhdr) \
455 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
456 (struct cmsghdr *)(mhdr)->msg_control : \
457 (struct cmsghdr *)NULL)
458#endif /* CMSG_FIRSTHDR */
459
460
461/* Function replacement / compatibility hacks */ 423/* Function replacement / compatibility hacks */
462 424
463#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO)) 425#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO))
@@ -525,10 +487,6 @@ struct winsize {
525# define __func__ "" 487# define __func__ ""
526#endif 488#endif
527 489
528#if defined(KRB5) && !defined(HEIMDAL)
529# define krb5_get_err_text(context,code) error_message(code)
530#endif
531
532/* 490/*
533 * Define this to use pipes instead of socketpairs for communicating with the 491 * Define this to use pipes instead of socketpairs for communicating with the
534 * client program. Socketpairs do not seem to work on all systems. 492 * client program. Socketpairs do not seem to work on all systems.
diff --git a/dh.c b/dh.c
index 996428b7f..1be51953c 100644
--- a/dh.c
+++ b/dh.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: dh.c,v 1.24 2003/04/08 20:21:28 itojun Exp $"); 26RCSID("$OpenBSD: dh.c,v 1.23 2002/11/21 22:22:50 markus Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29 29
@@ -112,7 +112,7 @@ choose_dh(int min, int wantbits, int max)
112 112
113 if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL && 113 if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL &&
114 (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) { 114 (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) {
115 logit("WARNING: %s does not exist, using old modulus", _PATH_DH_MODULI); 115 log("WARNING: %s does not exist, using old modulus", _PATH_DH_MODULI);
116 return (dh_new_group1()); 116 return (dh_new_group1());
117 } 117 }
118 118
@@ -140,7 +140,7 @@ choose_dh(int min, int wantbits, int max)
140 140
141 if (bestcount == 0) { 141 if (bestcount == 0) {
142 fclose(f); 142 fclose(f);
143 logit("WARNING: no suitable primes in %s", _PATH_DH_PRIMES); 143 log("WARNING: no suitable primes in %s", _PATH_DH_PRIMES);
144 return (NULL); 144 return (NULL);
145 } 145 }
146 146
@@ -176,7 +176,7 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub)
176 int bits_set = 0; 176 int bits_set = 0;
177 177
178 if (dh_pub->neg) { 178 if (dh_pub->neg) {
179 logit("invalid public DH value: negativ"); 179 log("invalid public DH value: negativ");
180 return 0; 180 return 0;
181 } 181 }
182 for (i = 0; i <= n; i++) 182 for (i = 0; i <= n; i++)
@@ -187,7 +187,7 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub)
187 /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */ 187 /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */
188 if (bits_set > 1 && (BN_cmp(dh_pub, dh->p) == -1)) 188 if (bits_set > 1 && (BN_cmp(dh_pub, dh->p) == -1))
189 return 1; 189 return 1;
190 logit("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p)); 190 log("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p));
191 return 0; 191 return 0;
192} 192}
193 193
diff --git a/dispatch.c b/dispatch.c
index c5ff65031..ce32bc22f 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: dispatch.c,v 1.16 2003/04/08 20:21:28 itojun Exp $"); 25RCSID("$OpenBSD: dispatch.c,v 1.15 2002/01/11 13:39:36 markus Exp $");
26 26
27#include "ssh1.h" 27#include "ssh1.h"
28#include "ssh2.h" 28#include "ssh2.h"
@@ -39,7 +39,7 @@ dispatch_fn *dispatch[DISPATCH_MAX];
39void 39void
40dispatch_protocol_error(int type, u_int32_t seq, void *ctxt) 40dispatch_protocol_error(int type, u_int32_t seq, void *ctxt)
41{ 41{
42 logit("dispatch_protocol_error: type %d seq %u", type, seq); 42 log("dispatch_protocol_error: type %d seq %u", type, seq);
43 if (!compat20) 43 if (!compat20)
44 fatal("protocol error"); 44 fatal("protocol error");
45 packet_start(SSH2_MSG_UNIMPLEMENTED); 45 packet_start(SSH2_MSG_UNIMPLEMENTED);
@@ -50,7 +50,7 @@ dispatch_protocol_error(int type, u_int32_t seq, void *ctxt)
50void 50void
51dispatch_protocol_ignore(int type, u_int32_t seq, void *ctxt) 51dispatch_protocol_ignore(int type, u_int32_t seq, void *ctxt)
52{ 52{
53 logit("dispatch_protocol_ignore: type %d seq %u", type, seq); 53 log("dispatch_protocol_ignore: type %d seq %u", type, seq);
54} 54}
55void 55void
56dispatch_init(dispatch_fn *dflt) 56dispatch_init(dispatch_fn *dflt)
diff --git a/dns.c b/dns.c
deleted file mode 100644
index 90ab5601a..000000000
--- a/dns.c
+++ /dev/null
@@ -1,290 +0,0 @@
1/* $OpenBSD: dns.c,v 1.6 2003/06/11 10:18:47 jakob Exp $ */
2
3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
5 * Copyright (c) 2003 Jakob Schlyter. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28
29#include "includes.h"
30
31#ifdef DNS
32#include <openssl/bn.h>
33#ifdef LWRES
34#include <lwres/netdb.h>
35#include <dns/result.h>
36#else /* LWRES */
37#include <netdb.h>
38#endif /* LWRES */
39
40#include "xmalloc.h"
41#include "key.h"
42#include "dns.h"
43#include "log.h"
44#include "uuencode.h"
45
46extern char *__progname;
47RCSID("$OpenBSD: dns.c,v 1.6 2003/06/11 10:18:47 jakob Exp $");
48
49#ifndef LWRES
50static const char *errset_text[] = {
51 "success", /* 0 ERRSET_SUCCESS */
52 "out of memory", /* 1 ERRSET_NOMEMORY */
53 "general failure", /* 2 ERRSET_FAIL */
54 "invalid parameter", /* 3 ERRSET_INVAL */
55 "name does not exist", /* 4 ERRSET_NONAME */
56 "data does not exist", /* 5 ERRSET_NODATA */
57};
58
59static const char *
60dns_result_totext(unsigned int error)
61{
62 switch (error) {
63 case ERRSET_SUCCESS:
64 return errset_text[ERRSET_SUCCESS];
65 case ERRSET_NOMEMORY:
66 return errset_text[ERRSET_NOMEMORY];
67 case ERRSET_FAIL:
68 return errset_text[ERRSET_FAIL];
69 case ERRSET_INVAL:
70 return errset_text[ERRSET_INVAL];
71 case ERRSET_NONAME:
72 return errset_text[ERRSET_NONAME];
73 case ERRSET_NODATA:
74 return errset_text[ERRSET_NODATA];
75 default:
76 return "unknown error";
77 }
78}
79#endif /* LWRES */
80
81
82/*
83 * Read SSHFP parameters from key buffer.
84 */
85static int
86dns_read_key(u_int8_t *algorithm, u_int8_t *digest_type,
87 u_char **digest, u_int *digest_len, Key *key)
88{
89 int success = 0;
90
91 switch (key->type) {
92 case KEY_RSA:
93 *algorithm = SSHFP_KEY_RSA;
94 break;
95 case KEY_DSA:
96 *algorithm = SSHFP_KEY_DSA;
97 break;
98 default:
99 *algorithm = SSHFP_KEY_RESERVED;
100 }
101
102 if (*algorithm) {
103 *digest_type = SSHFP_HASH_SHA1;
104 *digest = key_fingerprint_raw(key, SSH_FP_SHA1, digest_len);
105 success = 1;
106 } else {
107 *digest_type = SSHFP_HASH_RESERVED;
108 *digest = NULL;
109 *digest_len = 0;
110 success = 0;
111 }
112
113 return success;
114}
115
116/*
117 * Read SSHFP parameters from rdata buffer.
118 */
119static int
120dns_read_rdata(u_int8_t *algorithm, u_int8_t *digest_type,
121 u_char **digest, u_int *digest_len, u_char *rdata, int rdata_len)
122{
123 int success = 0;
124
125 *algorithm = SSHFP_KEY_RESERVED;
126 *digest_type = SSHFP_HASH_RESERVED;
127
128 if (rdata_len >= 2) {
129 *algorithm = rdata[0];
130 *digest_type = rdata[1];
131 *digest_len = rdata_len - 2;
132
133 if (*digest_len > 0) {
134 *digest = (u_char *) xmalloc(*digest_len);
135 memcpy(*digest, rdata + 2, *digest_len);
136 } else {
137 *digest = NULL;
138 }
139
140 success = 1;
141 }
142
143 return success;
144}
145
146
147/*
148 * Verify the given hostname, address and host key using DNS.
149 * Returns 0 if key verifies or -1 if key does NOT verify
150 */
151int
152verify_host_key_dns(const char *hostname, struct sockaddr *address,
153 Key *hostkey)
154{
155 int counter;
156 int result;
157 struct rrsetinfo *fingerprints = NULL;
158 int failures = 0;
159
160 u_int8_t hostkey_algorithm;
161 u_int8_t hostkey_digest_type;
162 u_char *hostkey_digest;
163 u_int hostkey_digest_len;
164
165 u_int8_t dnskey_algorithm;
166 u_int8_t dnskey_digest_type;
167 u_char *dnskey_digest;
168 u_int dnskey_digest_len;
169
170
171 debug3("verify_hostkey_dns");
172 if (hostkey == NULL)
173 fatal("No key to look up!");
174
175 result = getrrsetbyname(hostname, DNS_RDATACLASS_IN,
176 DNS_RDATATYPE_SSHFP, 0, &fingerprints);
177 if (result) {
178 verbose("DNS lookup error: %s", dns_result_totext(result));
179 return DNS_VERIFY_ERROR;
180 }
181
182#ifdef DNSSEC
183 /* Only accept validated answers */
184 if (!fingerprints->rri_flags & RRSET_VALIDATED) {
185 error("Ignored unvalidated fingerprint from DNS.");
186 freerrset(fingerprints);
187 return DNS_VERIFY_ERROR;
188 }
189#endif
190
191 debug("found %d fingerprints in DNS", fingerprints->rri_nrdatas);
192
193 /* Initialize host key parameters */
194 if (!dns_read_key(&hostkey_algorithm, &hostkey_digest_type,
195 &hostkey_digest, &hostkey_digest_len, hostkey)) {
196 error("Error calculating host key fingerprint.");
197 freerrset(fingerprints);
198 return DNS_VERIFY_ERROR;
199 }
200
201 for (counter = 0 ; counter < fingerprints->rri_nrdatas ; counter++) {
202 /*
203 * Extract the key from the answer. Ignore any badly
204 * formatted fingerprints.
205 */
206 if (!dns_read_rdata(&dnskey_algorithm, &dnskey_digest_type,
207 &dnskey_digest, &dnskey_digest_len,
208 fingerprints->rri_rdatas[counter].rdi_data,
209 fingerprints->rri_rdatas[counter].rdi_length)) {
210 verbose("Error parsing fingerprint from DNS.");
211 continue;
212 }
213
214 /* Check if the current key is the same as the given key */
215 if (hostkey_algorithm == dnskey_algorithm &&
216 hostkey_digest_type == dnskey_digest_type) {
217
218 if (hostkey_digest_len == dnskey_digest_len &&
219 memcmp(hostkey_digest, dnskey_digest,
220 hostkey_digest_len) == 0) {
221
222 /* Matching algoritm and digest. */
223 freerrset(fingerprints);
224 debug("matching host key fingerprint found in DNS");
225 return DNS_VERIFY_OK;
226 } else {
227 /* Correct algorithm but bad digest */
228 debug("verify_hostkey_dns: failed");
229 failures++;
230 }
231 }
232 }
233
234 freerrset(fingerprints);
235
236 if (failures) {
237 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
238 error("@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @");
239 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
240 error("IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!");
241 error("Someone could be eavesdropping on you right now (man-in-the-middle attack)!");
242 error("It is also possible that the %s host key has just been changed.",
243 key_type(hostkey));
244 error("Please contact your system administrator.");
245 return DNS_VERIFY_FAILED;
246 }
247
248 debug("fingerprints found in DNS, but none of them matched");
249
250 return DNS_VERIFY_ERROR;
251}
252
253
254/*
255 * Export the fingerprint of a key as a DNS resource record
256 */
257int
258export_dns_rr(const char *hostname, Key *key, FILE *f, int generic)
259{
260 u_int8_t rdata_pubkey_algorithm = 0;
261 u_int8_t rdata_digest_type = SSHFP_HASH_SHA1;
262 u_char *rdata_digest;
263 u_int rdata_digest_len;
264
265 int i;
266 int success = 0;
267
268 if (dns_read_key(&rdata_pubkey_algorithm, &rdata_digest_type,
269 &rdata_digest, &rdata_digest_len, key)) {
270
271 if (generic)
272 fprintf(f, "%s IN TYPE%d \\# %d %02x %02x ", hostname,
273 DNS_RDATATYPE_SSHFP, 2 + rdata_digest_len,
274 rdata_pubkey_algorithm, rdata_digest_type);
275 else
276 fprintf(f, "%s IN SSHFP %d %d ", hostname,
277 rdata_pubkey_algorithm, rdata_digest_type);
278
279 for (i = 0; i < rdata_digest_len; i++)
280 fprintf(f, "%02x", rdata_digest[i]);
281 fprintf(f, "\n");
282 success = 1;
283 } else {
284 error("dns_export_rr: unsupported algorithm");
285 }
286
287 return success;
288}
289
290#endif /* DNS */
diff --git a/entropy.c b/entropy.c
index d7c7fdf6e..a95519e90 100644
--- a/entropy.c
+++ b/entropy.c
@@ -45,7 +45,7 @@
45 * XXX: we should tell the child how many bytes we need. 45 * XXX: we should tell the child how many bytes we need.
46 */ 46 */
47 47
48RCSID("$Id: entropy.c,v 1.46 2003/08/25 01:16:21 mouring Exp $"); 48RCSID("$Id: entropy.c,v 1.44 2002/06/09 19:41:48 mouring Exp $");
49 49
50#ifndef OPENSSL_PRNG_ONLY 50#ifndef OPENSSL_PRNG_ONLY
51#define RANDOM_SEED_SIZE 48 51#define RANDOM_SEED_SIZE 48
@@ -75,7 +75,7 @@ seed_rng(void)
75 if (pipe(p) == -1) 75 if (pipe(p) == -1)
76 fatal("pipe: %s", strerror(errno)); 76 fatal("pipe: %s", strerror(errno));
77 77
78 old_sigchld = signal(SIGCHLD, SIG_DFL); 78 old_sigchld = mysignal(SIGCHLD, SIG_DFL);
79 if ((pid = fork()) == -1) 79 if ((pid = fork()) == -1)
80 fatal("Couldn't fork: %s", strerror(errno)); 80 fatal("Couldn't fork: %s", strerror(errno));
81 if (pid == 0) { 81 if (pid == 0) {
@@ -89,8 +89,8 @@ seed_rng(void)
89 if (original_uid != original_euid && 89 if (original_uid != original_euid &&
90 ( seteuid(getuid()) == -1 || 90 ( seteuid(getuid()) == -1 ||
91 setuid(original_uid) == -1) ) { 91 setuid(original_uid) == -1) ) {
92 fprintf(stderr, "(rand child) setuid(%li): %s\n", 92 fprintf(stderr, "(rand child) setuid(%d): %s\n",
93 (long int)original_uid, strerror(errno)); 93 original_uid, strerror(errno));
94 _exit(1); 94 _exit(1);
95 } 95 }
96 96
@@ -116,7 +116,7 @@ seed_rng(void)
116 if (waitpid(pid, &ret, 0) == -1) 116 if (waitpid(pid, &ret, 0) == -1)
117 fatal("Couldn't wait for ssh-rand-helper completion: %s", 117 fatal("Couldn't wait for ssh-rand-helper completion: %s",
118 strerror(errno)); 118 strerror(errno));
119 signal(SIGCHLD, old_sigchld); 119 mysignal(SIGCHLD, old_sigchld);
120 120
121 /* We don't mind if the child exits upon a SIGPIPE */ 121 /* We don't mind if the child exits upon a SIGPIPE */
122 if (!WIFEXITED(ret) && 122 if (!WIFEXITED(ret) &&
diff --git a/groupaccess.c b/groupaccess.c
index fbf794fc8..66dfa68fe 100644
--- a/groupaccess.c
+++ b/groupaccess.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: groupaccess.c,v 1.6 2003/04/08 20:21:28 itojun Exp $"); 26RCSID("$OpenBSD: groupaccess.c,v 1.5 2002/03/04 17:27:39 stevesk Exp $");
27 27
28#include "groupaccess.h" 28#include "groupaccess.h"
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -49,7 +49,7 @@ ga_init(const char *user, gid_t base)
49 49
50 ngroups = sizeof(groups_bygid) / sizeof(gid_t); 50 ngroups = sizeof(groups_bygid) / sizeof(gid_t);
51 if (getgrouplist(user, base, groups_bygid, &ngroups) == -1) 51 if (getgrouplist(user, base, groups_bygid, &ngroups) == -1)
52 logit("getgrouplist: groups list too small"); 52 log("getgrouplist: groups list too small");
53 for (i = 0, j = 0; i < ngroups; i++) 53 for (i = 0, j = 0; i < ngroups; i++)
54 if ((gr = getgrgid(groups_bygid[i])) != NULL) 54 if ((gr = getgrgid(groups_bygid[i])) != NULL)
55 groups_byname[j++] = xstrdup(gr->gr_name); 55 groups_byname[j++] = xstrdup(gr->gr_name);
diff --git a/gss-genr.c b/gss-genr.c
deleted file mode 100644
index bda12d6f1..000000000
--- a/gss-genr.c
+++ /dev/null
@@ -1,256 +0,0 @@
1/* $OpenBSD: gss-genr.c,v 1.1 2003/08/22 10:56:09 markus Exp $ */
2
3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include "includes.h"
28
29#ifdef GSSAPI
30
31#include "xmalloc.h"
32#include "bufaux.h"
33#include "compat.h"
34#include "log.h"
35#include "monitor_wrap.h"
36
37#include "ssh-gss.h"
38
39
40/* Check that the OID in a data stream matches that in the context */
41int
42ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len)
43{
44 return (ctx != NULL && ctx->oid != GSS_C_NO_OID &&
45 ctx->oid->length == len &&
46 memcmp(ctx->oid->elements, data, len) == 0);
47}
48
49/* Set the contexts OID from a data stream */
50void
51ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len)
52{
53 if (ctx->oid != GSS_C_NO_OID) {
54 xfree(ctx->oid->elements);
55 xfree(ctx->oid);
56 }
57 ctx->oid = xmalloc(sizeof(gss_OID_desc));
58 ctx->oid->length = len;
59 ctx->oid->elements = xmalloc(len);
60 memcpy(ctx->oid->elements, data, len);
61}
62
63/* Set the contexts OID */
64void
65ssh_gssapi_set_oid(Gssctxt *ctx, gss_OID oid)
66{
67 ssh_gssapi_set_oid_data(ctx, oid->elements, oid->length);
68}
69
70/* All this effort to report an error ... */
71void
72ssh_gssapi_error(Gssctxt *ctxt)
73{
74 debug("%s", ssh_gssapi_last_error(ctxt, NULL, NULL));
75}
76
77char *
78ssh_gssapi_last_error(Gssctxt *ctxt,
79 OM_uint32 *major_status, OM_uint32 *minor_status)
80{
81 OM_uint32 lmin;
82 gss_buffer_desc msg = GSS_C_EMPTY_BUFFER;
83 OM_uint32 ctx;
84 Buffer b;
85 char *ret;
86
87 buffer_init(&b);
88
89 if (major_status != NULL)
90 *major_status = ctxt->major;
91 if (minor_status != NULL)
92 *minor_status = ctxt->minor;
93
94 ctx = 0;
95 /* The GSSAPI error */
96 do {
97 gss_display_status(&lmin, ctxt->major,
98 GSS_C_GSS_CODE, GSS_C_NULL_OID, &ctx, &msg);
99
100 buffer_append(&b, msg.value, msg.length);
101 buffer_put_char(&b, '\n');
102
103 gss_release_buffer(&lmin, &msg);
104 } while (ctx != 0);
105
106 /* The mechanism specific error */
107 do {
108 gss_display_status(&lmin, ctxt->minor,
109 GSS_C_MECH_CODE, GSS_C_NULL_OID, &ctx, &msg);
110
111 buffer_append(&b, msg.value, msg.length);
112 buffer_put_char(&b, '\n');
113
114 gss_release_buffer(&lmin, &msg);
115 } while (ctx != 0);
116
117 buffer_put_char(&b, '\0');
118 ret = xmalloc(buffer_len(&b));
119 buffer_get(&b, ret, buffer_len(&b));
120 buffer_free(&b);
121 return (ret);
122}
123
124/*
125 * Initialise our GSSAPI context. We use this opaque structure to contain all
126 * of the data which both the client and server need to persist across
127 * {accept,init}_sec_context calls, so that when we do it from the userauth
128 * stuff life is a little easier
129 */
130void
131ssh_gssapi_build_ctx(Gssctxt **ctx)
132{
133 *ctx = xmalloc(sizeof (Gssctxt));
134 (*ctx)->major = 0;
135 (*ctx)->minor = 0;
136 (*ctx)->context = GSS_C_NO_CONTEXT;
137 (*ctx)->name = GSS_C_NO_NAME;
138 (*ctx)->oid = GSS_C_NO_OID;
139 (*ctx)->creds = GSS_C_NO_CREDENTIAL;
140 (*ctx)->client = GSS_C_NO_NAME;
141 (*ctx)->client_creds = GSS_C_NO_CREDENTIAL;
142}
143
144/* Delete our context, providing it has been built correctly */
145void
146ssh_gssapi_delete_ctx(Gssctxt **ctx)
147{
148 OM_uint32 ms;
149
150 if ((*ctx) == NULL)
151 return;
152 if ((*ctx)->context != GSS_C_NO_CONTEXT)
153 gss_delete_sec_context(&ms, &(*ctx)->context, GSS_C_NO_BUFFER);
154 if ((*ctx)->name != GSS_C_NO_NAME)
155 gss_release_name(&ms, &(*ctx)->name);
156 if ((*ctx)->oid != GSS_C_NO_OID) {
157 xfree((*ctx)->oid->elements);
158 xfree((*ctx)->oid);
159 (*ctx)->oid = GSS_C_NO_OID;
160 }
161 if ((*ctx)->creds != GSS_C_NO_CREDENTIAL)
162 gss_release_cred(&ms, &(*ctx)->creds);
163 if ((*ctx)->client != GSS_C_NO_NAME)
164 gss_release_name(&ms, &(*ctx)->client);
165 if ((*ctx)->client_creds != GSS_C_NO_CREDENTIAL)
166 gss_release_cred(&ms, &(*ctx)->client_creds);
167
168 xfree(*ctx);
169 *ctx = NULL;
170}
171
172/*
173 * Wrapper to init_sec_context
174 * Requires that the context contains:
175 * oid
176 * server name (from ssh_gssapi_import_name)
177 */
178OM_uint32
179ssh_gssapi_init_ctx(Gssctxt *ctx, int deleg_creds, gss_buffer_desc *recv_tok,
180 gss_buffer_desc* send_tok, OM_uint32 *flags)
181{
182 int deleg_flag = 0;
183
184 if (deleg_creds) {
185 deleg_flag = GSS_C_DELEG_FLAG;
186 debug("Delegating credentials");
187 }
188
189 ctx->major = gss_init_sec_context(&ctx->minor,
190 GSS_C_NO_CREDENTIAL, &ctx->context, ctx->name, ctx->oid,
191 GSS_C_MUTUAL_FLAG | GSS_C_INTEG_FLAG | deleg_flag,
192 0, NULL, recv_tok, NULL, send_tok, flags, NULL);
193
194 if (GSS_ERROR(ctx->major))
195 ssh_gssapi_error(ctx);
196
197 return (ctx->major);
198}
199
200/* Create a service name for the given host */
201OM_uint32
202ssh_gssapi_import_name(Gssctxt *ctx, const char *host)
203{
204 gss_buffer_desc gssbuf;
205
206 gssbuf.length = sizeof("host@") + strlen(host);
207 gssbuf.value = xmalloc(gssbuf.length);
208 snprintf(gssbuf.value, gssbuf.length, "host@%s", host);
209
210 if ((ctx->major = gss_import_name(&ctx->minor,
211 &gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name)))
212 ssh_gssapi_error(ctx);
213
214 xfree(gssbuf.value);
215 return (ctx->major);
216}
217
218/* Acquire credentials for a server running on the current host.
219 * Requires that the context structure contains a valid OID
220 */
221
222/* Returns a GSSAPI error code */
223OM_uint32
224ssh_gssapi_acquire_cred(Gssctxt *ctx)
225{
226 OM_uint32 status;
227 char lname[MAXHOSTNAMELEN];
228 gss_OID_set oidset;
229
230 gss_create_empty_oid_set(&status, &oidset);
231 gss_add_oid_set_member(&status, ctx->oid, &oidset);
232
233 if (gethostname(lname, MAXHOSTNAMELEN))
234 return (-1);
235
236 if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname)))
237 return (ctx->major);
238
239 if ((ctx->major = gss_acquire_cred(&ctx->minor,
240 ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL)))
241 ssh_gssapi_error(ctx);
242
243 gss_release_oid_set(&status, &oidset);
244 return (ctx->major);
245}
246
247OM_uint32
248ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid) {
249 if (*ctx)
250 ssh_gssapi_delete_ctx(ctx);
251 ssh_gssapi_build_ctx(ctx);
252 ssh_gssapi_set_oid(*ctx, oid);
253 return (ssh_gssapi_acquire_cred(*ctx));
254}
255
256#endif /* GSSAPI */
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
deleted file mode 100644
index f48e09911..000000000
--- a/gss-serv-krb5.c
+++ /dev/null
@@ -1,205 +0,0 @@
1/* $OpenBSD: gss-serv-krb5.c,v 1.1 2003/08/22 10:56:09 markus Exp $ */
2
3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include "includes.h"
28
29#ifdef GSSAPI
30#ifdef KRB5
31
32#include "auth.h"
33#include "xmalloc.h"
34#include "log.h"
35#include "servconf.h"
36
37#include "ssh-gss.h"
38
39extern ServerOptions options;
40
41#ifdef HEIMDAL
42#include <krb5.h>
43#else
44#include <gssapi_krb5.h>
45#endif
46
47static krb5_context krb_context = NULL;
48
49/* Initialise the krb5 library, for the stuff that GSSAPI won't do */
50
51static int
52ssh_gssapi_krb5_init()
53{
54 krb5_error_code problem;
55
56 if (krb_context != NULL)
57 return 1;
58
59 problem = krb5_init_context(&krb_context);
60 if (problem) {
61 logit("Cannot initialize krb5 context");
62 return 0;
63 }
64 krb5_init_ets(krb_context);
65
66 return 1;
67}
68
69/* Check if this user is OK to login. This only works with krb5 - other
70 * GSSAPI mechanisms will need their own.
71 * Returns true if the user is OK to log in, otherwise returns 0
72 */
73
74static int
75ssh_gssapi_krb5_userok(ssh_gssapi_client *client, char *name)
76{
77 krb5_principal princ;
78 int retval;
79
80 if (ssh_gssapi_krb5_init() == 0)
81 return 0;
82
83 if ((retval = krb5_parse_name(krb_context, client->exportedname.value,
84 &princ))) {
85 logit("krb5_parse_name(): %.100s",
86 krb5_get_err_text(krb_context, retval));
87 return 0;
88 }
89 if (krb5_kuserok(krb_context, princ, name)) {
90 retval = 1;
91 logit("Authorized to %s, krb5 principal %s (krb5_kuserok)",
92 name, (char *)client->displayname.value);
93 } else
94 retval = 0;
95
96 krb5_free_principal(krb_context, princ);
97 return retval;
98}
99
100
101/* This writes out any forwarded credentials from the structure populated
102 * during userauth. Called after we have setuid to the user */
103
104static void
105ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
106{
107 krb5_ccache ccache;
108 krb5_error_code problem;
109 krb5_principal princ;
110 OM_uint32 maj_status, min_status;
111
112 if (client->creds == NULL) {
113 debug("No credentials stored");
114 return;
115 }
116
117 if (ssh_gssapi_krb5_init() == 0)
118 return;
119
120#ifdef HEIMDAL
121 if ((problem = krb5_cc_gen_new(krb_context, &krb5_fcc_ops, &ccache))) {
122 logit("krb5_cc_gen_new(): %.100s",
123 krb5_get_err_text(krb_context, problem));
124 return;
125 }
126#else
127 {
128 int tmpfd;
129 char ccname[40];
130
131 snprintf(ccname, sizeof(ccname),
132 "FILE:/tmp/krb5cc_%d_XXXXXX", geteuid());
133
134 if ((tmpfd = mkstemp(ccname + strlen("FILE:"))) == -1) {
135 logit("mkstemp(): %.100s", strerror(errno));
136 problem = errno;
137 return;
138 }
139 if (fchmod(tmpfd, S_IRUSR | S_IWUSR) == -1) {
140 logit("fchmod(): %.100s", strerror(errno));
141 close(tmpfd);
142 problem = errno;
143 return;
144 }
145 close(tmpfd);
146 if ((problem = krb5_cc_resolve(krb_context, ccname, &ccache))) {
147 logit("krb5_cc_resolve(): %.100s",
148 krb5_get_err_text(krb_context, problem));
149 return;
150 }
151 }
152#endif /* #ifdef HEIMDAL */
153
154 if ((problem = krb5_parse_name(krb_context,
155 client->exportedname.value, &princ))) {
156 logit("krb5_parse_name(): %.100s",
157 krb5_get_err_text(krb_context, problem));
158 krb5_cc_destroy(krb_context, ccache);
159 return;
160 }
161
162 if ((problem = krb5_cc_initialize(krb_context, ccache, princ))) {
163 logit("krb5_cc_initialize(): %.100s",
164 krb5_get_err_text(krb_context, problem));
165 krb5_free_principal(krb_context, princ);
166 krb5_cc_destroy(krb_context, ccache);
167 return;
168 }
169
170 krb5_free_principal(krb_context, princ);
171
172 if ((maj_status = gss_krb5_copy_ccache(&min_status,
173 client->creds, ccache))) {
174 logit("gss_krb5_copy_ccache() failed");
175 krb5_cc_destroy(krb_context, ccache);
176 return;
177 }
178
179 client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache));
180 client->store.envvar = "KRB5CCNAME";
181 client->store.envval = xstrdup(client->store.filename);
182
183#ifdef USE_PAM
184 if (options.use_pam)
185 do_pam_putenv(client->store.envvar,client->store.envval);
186#endif
187
188 krb5_cc_close(krb_context, ccache);
189
190 return;
191}
192
193ssh_gssapi_mech gssapi_kerberos_mech = {
194 "toWM5Slw5Ew8Mqkay+al2g==",
195 "Kerberos",
196 {9, "\x2A\x86\x48\x86\xF7\x12\x01\x02\x02"},
197 NULL,
198 &ssh_gssapi_krb5_userok,
199 NULL,
200 &ssh_gssapi_krb5_storecreds
201};
202
203#endif /* KRB5 */
204
205#endif /* GSSAPI */
diff --git a/gss-serv.c b/gss-serv.c
deleted file mode 100644
index 8fd1d63f0..000000000
--- a/gss-serv.c
+++ /dev/null
@@ -1,292 +0,0 @@
1/* $OpenBSD: gss-serv.c,v 1.3 2003/08/31 13:31:57 markus Exp $ */
2
3/*
4 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include "includes.h"
28
29#ifdef GSSAPI
30
31#include "bufaux.h"
32#include "compat.h"
33#include "auth.h"
34#include "log.h"
35#include "channels.h"
36#include "session.h"
37#include "servconf.h"
38#include "monitor_wrap.h"
39#include "xmalloc.h"
40#include "getput.h"
41
42#include "ssh-gss.h"
43
44extern ServerOptions options;
45
46static ssh_gssapi_client gssapi_client =
47 { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER,
48 GSS_C_NO_CREDENTIAL, NULL, {NULL, NULL, NULL}};
49
50ssh_gssapi_mech gssapi_null_mech =
51 { NULL, NULL, {0, NULL}, NULL, NULL, NULL, NULL};
52
53#ifdef KRB5
54extern ssh_gssapi_mech gssapi_kerberos_mech;
55#endif
56
57ssh_gssapi_mech* supported_mechs[]= {
58#ifdef KRB5
59 &gssapi_kerberos_mech,
60#endif
61 &gssapi_null_mech,
62};
63
64/* Unpriviledged */
65void
66ssh_gssapi_supported_oids(gss_OID_set *oidset)
67{
68 int i = 0;
69 OM_uint32 min_status;
70 int present;
71 gss_OID_set supported;
72
73 gss_create_empty_oid_set(&min_status, oidset);
74 gss_indicate_mechs(&min_status, &supported);
75
76 while (supported_mechs[i]->name != NULL) {
77 if (GSS_ERROR(gss_test_oid_set_member(&min_status,
78 &supported_mechs[i]->oid, supported, &present)))
79 present = 0;
80 if (present)
81 gss_add_oid_set_member(&min_status,
82 &supported_mechs[i]->oid, oidset);
83 i++;
84 }
85}
86
87
88/* Wrapper around accept_sec_context
89 * Requires that the context contains:
90 * oid
91 * credentials (from ssh_gssapi_acquire_cred)
92 */
93/* Priviledged */
94OM_uint32
95ssh_gssapi_accept_ctx(Gssctxt *ctx, gss_buffer_desc *recv_tok,
96 gss_buffer_desc *send_tok, OM_uint32 *flags)
97{
98 OM_uint32 status;
99 gss_OID mech;
100
101 ctx->major = gss_accept_sec_context(&ctx->minor,
102 &ctx->context, ctx->creds, recv_tok,
103 GSS_C_NO_CHANNEL_BINDINGS, &ctx->client, &mech,
104 send_tok, flags, NULL, &ctx->client_creds);
105
106 if (GSS_ERROR(ctx->major))
107 ssh_gssapi_error(ctx);
108
109 if (ctx->client_creds)
110 debug("Received some client credentials");
111 else
112 debug("Got no client credentials");
113
114 status = ctx->major;
115
116 /* Now, if we're complete and we have the right flags, then
117 * we flag the user as also having been authenticated
118 */
119
120 if (((flags == NULL) || ((*flags & GSS_C_MUTUAL_FLAG) &&
121 (*flags & GSS_C_INTEG_FLAG))) && (ctx->major == GSS_S_COMPLETE)) {
122 if (ssh_gssapi_getclient(ctx, &gssapi_client))
123 fatal("Couldn't convert client name");
124 }
125
126 return (status);
127}
128
129/*
130 * This parses an exported name, extracting the mechanism specific portion
131 * to use for ACL checking. It verifies that the name belongs the mechanism
132 * originally selected.
133 */
134static OM_uint32
135ssh_gssapi_parse_ename(Gssctxt *ctx, gss_buffer_t ename, gss_buffer_t name)
136{
137 char *tok;
138 OM_uint32 offset;
139 OM_uint32 oidl;
140
141 tok=ename->value;
142
143 /*
144 * Check that ename is long enough for all of the fixed length
145 * header, and that the initial ID bytes are correct
146 */
147
148 if (ename->length<6 || memcmp(tok,"\x04\x01", 2)!=0)
149 return GSS_S_FAILURE;
150
151 /*
152 * Extract the OID, and check it. Here GSSAPI breaks with tradition
153 * and does use the OID type and length bytes. To confuse things
154 * there are two lengths - the first including these, and the
155 * second without.
156 */
157
158 oidl = GET_16BIT(tok+2); /* length including next two bytes */
159 oidl = oidl-2; /* turn it into the _real_ length of the variable OID */
160
161 /*
162 * Check the BER encoding for correct type and length, that the
163 * string is long enough and that the OID matches that in our context
164 */
165 if (tok[4] != 0x06 || tok[5] != oidl ||
166 ename->length < oidl+6 ||
167 !ssh_gssapi_check_oid(ctx,tok+6,oidl))
168 return GSS_S_FAILURE;
169
170 offset = oidl+6;
171
172 if (ename->length < offset+4)
173 return GSS_S_FAILURE;
174
175 name->length = GET_32BIT(tok+offset);
176 offset += 4;
177
178 if (ename->length < offset+name->length)
179 return GSS_S_FAILURE;
180
181 name->value = xmalloc(name->length+1);
182 memcpy(name->value,tok+offset,name->length);
183 ((char *)name->value)[name->length] = 0;
184
185 return GSS_S_COMPLETE;
186}
187
188/* Extract the client details from a given context. This can only reliably
189 * be called once for a context */
190
191/* Priviledged (called from accept_secure_ctx) */
192OM_uint32
193ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
194{
195 int i = 0;
196
197 gss_buffer_desc ename;
198
199 client->mech = NULL;
200
201 while (supported_mechs[i]->name != NULL) {
202 if (supported_mechs[i]->oid.length == ctx->oid->length &&
203 (memcmp(supported_mechs[i]->oid.elements,
204 ctx->oid->elements, ctx->oid->length) == 0))
205 client->mech = supported_mechs[i];
206 i++;
207 }
208
209 if (client->mech == NULL)
210 return GSS_S_FAILURE;
211
212 if ((ctx->major = gss_display_name(&ctx->minor, ctx->client,
213 &client->displayname, NULL))) {
214 ssh_gssapi_error(ctx);
215 return (ctx->major);
216 }
217
218 if ((ctx->major = gss_export_name(&ctx->minor, ctx->client,
219 &ename))) {
220 ssh_gssapi_error(ctx);
221 return (ctx->major);
222 }
223
224 if ((ctx->major = ssh_gssapi_parse_ename(ctx,&ename,
225 &client->exportedname))) {
226 return (ctx->major);
227 }
228
229 /* We can't copy this structure, so we just move the pointer to it */
230 client->creds = ctx->client_creds;
231 ctx->client_creds = GSS_C_NO_CREDENTIAL;
232 return (ctx->major);
233}
234
235/* As user - called through fatal cleanup hook */
236void
237ssh_gssapi_cleanup_creds(void *ignored)
238{
239 if (gssapi_client.store.filename != NULL) {
240 /* Unlink probably isn't sufficient */
241 debug("removing gssapi cred file\"%s\"", gssapi_client.store.filename);
242 unlink(gssapi_client.store.filename);
243 }
244}
245
246/* As user */
247void
248ssh_gssapi_storecreds(void)
249{
250 if (gssapi_client.mech && gssapi_client.mech->storecreds) {
251 (*gssapi_client.mech->storecreds)(&gssapi_client);
252 if (options.gss_cleanup_creds)
253 fatal_add_cleanup(ssh_gssapi_cleanup_creds, NULL);
254 } else
255 debug("ssh_gssapi_storecreds: Not a GSSAPI mechanism");
256}
257
258/* This allows GSSAPI methods to do things to the childs environment based
259 * on the passed authentication process and credentials.
260 */
261/* As user */
262void
263ssh_gssapi_do_child(char ***envp, u_int *envsizep)
264{
265
266 if (gssapi_client.store.envvar != NULL &&
267 gssapi_client.store.envval != NULL) {
268
269 debug("Setting %s to %s", gssapi_client.store.envvar,
270 gssapi_client.store.envval);
271 child_set_env(envp, envsizep, gssapi_client.store.envvar,
272 gssapi_client.store.envval);
273 }
274}
275
276/* Priviledged */
277int
278ssh_gssapi_userok(char *user)
279{
280 if (gssapi_client.exportedname.length == 0 ||
281 gssapi_client.exportedname.value == NULL) {
282 debug("No suitable client data");
283 return 0;
284 }
285 if (gssapi_client.mech && gssapi_client.mech->userok)
286 return ((*gssapi_client.mech->userok)(&gssapi_client, user));
287 else
288 debug("ssh_gssapi_userok: Unknown GSSAPI mechanism");
289 return (0);
290}
291
292#endif
diff --git a/hostfile.c b/hostfile.c
index 42a8aa71d..dcee03448 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38#include "includes.h" 38#include "includes.h"
39RCSID("$OpenBSD: hostfile.c,v 1.31 2003/04/08 20:21:28 itojun Exp $"); 39RCSID("$OpenBSD: hostfile.c,v 1.30 2002/07/24 16:11:18 markus Exp $");
40 40
41#include "packet.h" 41#include "packet.h"
42#include "match.h" 42#include "match.h"
@@ -77,10 +77,10 @@ hostfile_check_key(int bits, Key *key, const char *host, const char *filename, i
77 if (key == NULL || key->type != KEY_RSA1 || key->rsa == NULL) 77 if (key == NULL || key->type != KEY_RSA1 || key->rsa == NULL)
78 return 1; 78 return 1;
79 if (bits != BN_num_bits(key->rsa->n)) { 79 if (bits != BN_num_bits(key->rsa->n)) {
80 logit("Warning: %s, line %d: keysize mismatch for host %s: " 80 log("Warning: %s, line %d: keysize mismatch for host %s: "
81 "actual %d vs. announced %d.", 81 "actual %d vs. announced %d.",
82 filename, linenum, host, BN_num_bits(key->rsa->n), bits); 82 filename, linenum, host, BN_num_bits(key->rsa->n), bits);
83 logit("Warning: replace %d with %d in %s, line %d.", 83 log("Warning: replace %d with %d in %s, line %d.",
84 bits, BN_num_bits(key->rsa->n), filename, linenum); 84 bits, BN_num_bits(key->rsa->n), filename, linenum);
85 } 85 }
86 return 1; 86 return 1;
diff --git a/includes.h b/includes.h
index 033cd91fa..37d402ef4 100644
--- a/includes.h
+++ b/includes.h
@@ -50,6 +50,9 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
50#ifdef HAVE_NETGROUP_H 50#ifdef HAVE_NETGROUP_H
51# include <netgroup.h> 51# include <netgroup.h>
52#endif 52#endif
53#if defined(HAVE_NETDB_H)
54# include <netdb.h>
55#endif
53#ifdef HAVE_ENDIAN_H 56#ifdef HAVE_ENDIAN_H
54# include <endian.h> 57# include <endian.h>
55#endif 58#endif
@@ -65,7 +68,6 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
65#ifdef HAVE_NEXT 68#ifdef HAVE_NEXT
66# include <libc.h> 69# include <libc.h>
67#endif 70#endif
68#define __USE_GNU /* before unistd.h, activate extra prototypes for glibc */
69#include <unistd.h> /* For STDIN_FILENO, etc */ 71#include <unistd.h> /* For STDIN_FILENO, etc */
70#include <termios.h> /* Struct winsize */ 72#include <termios.h> /* Struct winsize */
71 73
@@ -131,18 +133,12 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
131#ifdef HAVE_SYS_MMAN_H 133#ifdef HAVE_SYS_MMAN_H
132#include <sys/mman.h> /* for MAP_ANONYMOUS */ 134#include <sys/mman.h> /* for MAP_ANONYMOUS */
133#endif 135#endif
134#ifdef HAVE_SYS_STRTIO_H
135#include <sys/strtio.h> /* for TIOCCBRK on HP-UX */
136#endif
137 136
138#include <netinet/in_systm.h> /* For typedefs */ 137#include <netinet/in_systm.h> /* For typedefs */
139#include <netinet/in.h> /* For IPv6 macros */ 138#include <netinet/in.h> /* For IPv6 macros */
140#include <netinet/ip.h> /* For IPTOS macros */ 139#include <netinet/ip.h> /* For IPTOS macros */
141#include <netinet/tcp.h> 140#include <netinet/tcp.h>
142#include <arpa/inet.h> 141#include <arpa/inet.h>
143#if defined(HAVE_NETDB_H)
144# include <netdb.h>
145#endif
146#ifdef HAVE_RPC_TYPES_H 142#ifdef HAVE_RPC_TYPES_H
147# include <rpc/types.h> /* For INADDR_LOOPBACK */ 143# include <rpc/types.h> /* For INADDR_LOOPBACK */
148#endif 144#endif
@@ -171,6 +167,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
171 167
172#include "version.h" 168#include "version.h"
173#include "openbsd-compat/openbsd-compat.h" 169#include "openbsd-compat/openbsd-compat.h"
170#include "openbsd-compat/bsd-cygwin_util.h"
174#include "openbsd-compat/bsd-nextstep.h" 171#include "openbsd-compat/bsd-nextstep.h"
175 172
176#include "entropy.h" 173#include "entropy.h"
diff --git a/key.c b/key.c
index 54318cbbf..060b63745 100644
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34#include "includes.h" 34#include "includes.h"
35RCSID("$OpenBSD: key.c,v 1.54 2003/07/09 13:58:19 avsm Exp $"); 35RCSID("$OpenBSD: key.c,v 1.51 2003/02/12 09:33:04 markus Exp $");
36 36
37#include <openssl/evp.h> 37#include <openssl/evp.h>
38 38
@@ -169,7 +169,7 @@ key_equal(Key *a, Key *b)
169 return 0; 169 return 0;
170} 170}
171 171
172u_char* 172static u_char *
173key_fingerprint_raw(Key *k, enum fp_type dgst_type, u_int *dgst_raw_length) 173key_fingerprint_raw(Key *k, enum fp_type dgst_type, u_int *dgst_raw_length)
174{ 174{
175 const EVP_MD *md = NULL; 175 const EVP_MD *md = NULL;
@@ -236,10 +236,8 @@ key_fingerprint_hex(u_char *dgst_raw, u_int dgst_raw_len)
236 for (i = 0; i < dgst_raw_len; i++) { 236 for (i = 0; i < dgst_raw_len; i++) {
237 char hex[4]; 237 char hex[4];
238 snprintf(hex, sizeof(hex), "%02x:", dgst_raw[i]); 238 snprintf(hex, sizeof(hex), "%02x:", dgst_raw[i]);
239 strlcat(retval, hex, dgst_raw_len * 3 + 1); 239 strlcat(retval, hex, dgst_raw_len * 3);
240 } 240 }
241
242 /* Remove the trailing ':' character */
243 retval[(dgst_raw_len * 3) - 1] = '\0'; 241 retval[(dgst_raw_len * 3) - 1] = '\0';
244 return retval; 242 return retval;
245} 243}
@@ -440,7 +438,7 @@ key_read(Key *ret, char **cpp)
440 xfree(blob); 438 xfree(blob);
441 return -1; 439 return -1;
442 } 440 }
443 k = key_from_blob(blob, (u_int)n); 441 k = key_from_blob(blob, n);
444 xfree(blob); 442 xfree(blob);
445 if (k == NULL) { 443 if (k == NULL) {
446 error("key_read: key_from_blob %s failed", cp); 444 error("key_read: key_from_blob %s failed", cp);
@@ -676,7 +674,7 @@ key_names_valid2(const char *names)
676} 674}
677 675
678Key * 676Key *
679key_from_blob(u_char *blob, u_int blen) 677key_from_blob(u_char *blob, int blen)
680{ 678{
681 Buffer b; 679 Buffer b;
682 char *ktype; 680 char *ktype;
diff --git a/key.h b/key.h
index 28753fdfa..725c7a04a 100644
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.h,v 1.22 2003/06/24 08:23:46 markus Exp $ */ 1/* $OpenBSD: key.h,v 1.20 2003/02/12 09:33:04 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -61,7 +61,6 @@ void key_free(Key *);
61Key *key_demote(Key *); 61Key *key_demote(Key *);
62int key_equal(Key *, Key *); 62int key_equal(Key *, Key *);
63char *key_fingerprint(Key *, enum fp_type, enum fp_rep); 63char *key_fingerprint(Key *, enum fp_type, enum fp_rep);
64u_char *key_fingerprint_raw(Key *, enum fp_type, u_int *);
65char *key_type(Key *); 64char *key_type(Key *);
66int key_write(Key *, FILE *); 65int key_write(Key *, FILE *);
67int key_read(Key *, char **); 66int key_read(Key *, char **);
@@ -71,7 +70,7 @@ Key *key_generate(int, u_int);
71Key *key_from_private(Key *); 70Key *key_from_private(Key *);
72int key_type_from_name(char *); 71int key_type_from_name(char *);
73 72
74Key *key_from_blob(u_char *, u_int); 73Key *key_from_blob(u_char *, int);
75int key_to_blob(Key *, u_char **, u_int *); 74int key_to_blob(Key *, u_char **, u_int *);
76char *key_ssh_name(Key *); 75char *key_ssh_name(Key *);
77int key_names_valid2(const char *); 76int key_names_valid2(const char *);
diff --git a/log.c b/log.c
index 45affca13..70bfcfd34 100644
--- a/log.c
+++ b/log.c
@@ -34,15 +34,12 @@
34 */ 34 */
35 35
36#include "includes.h" 36#include "includes.h"
37RCSID("$OpenBSD: log.c,v 1.28 2003/05/24 09:02:22 djm Exp $"); 37RCSID("$OpenBSD: log.c,v 1.25 2003/01/11 18:29:43 markus Exp $");
38 38
39#include "log.h" 39#include "log.h"
40#include "xmalloc.h" 40#include "xmalloc.h"
41 41
42#include <syslog.h> 42#include <syslog.h>
43#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H)
44# include <vis.h>
45#endif
46 43
47static LogLevel log_level = SYSLOG_LEVEL_INFO; 44static LogLevel log_level = SYSLOG_LEVEL_INFO;
48static int log_on_stderr = 1; 45static int log_on_stderr = 1;
@@ -131,7 +128,7 @@ error(const char *fmt,...)
131/* Log this message (information that usually should go to the log). */ 128/* Log this message (information that usually should go to the log). */
132 129
133void 130void
134logit(const char *fmt,...) 131log(const char *fmt,...)
135{ 132{
136 va_list args; 133 va_list args;
137 134
@@ -344,9 +341,6 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
344void 341void
345do_log(LogLevel level, const char *fmt, va_list args) 342do_log(LogLevel level, const char *fmt, va_list args)
346{ 343{
347#ifdef OPENLOG_R
348 struct syslog_data sdata = SYSLOG_DATA_INIT;
349#endif
350 char msgbuf[MSGBUFSIZ]; 344 char msgbuf[MSGBUFSIZ];
351 char fmtbuf[MSGBUFSIZ]; 345 char fmtbuf[MSGBUFSIZ];
352 char *txt = NULL; 346 char *txt = NULL;
@@ -395,19 +389,14 @@ do_log(LogLevel level, const char *fmt, va_list args)
395 } else { 389 } else {
396 vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); 390 vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
397 } 391 }
398 strnvis(fmtbuf, msgbuf, sizeof(fmtbuf), VIS_SAFE|VIS_OCTAL); 392 /* Escape magic chars in output. */
393 strnvis(fmtbuf, msgbuf, sizeof(fmtbuf), VIS_OCTAL);
394
399 if (log_on_stderr) { 395 if (log_on_stderr) {
400 snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); 396 fprintf(stderr, "%s\r\n", fmtbuf);
401 write(STDERR_FILENO, msgbuf, strlen(msgbuf));
402 } else { 397 } else {
403#ifdef OPENLOG_R
404 openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sdata);
405 syslog_r(pri, &sdata, "%.500s", fmtbuf);
406 closelog_r(&sdata);
407#else
408 openlog(argv0 ? argv0 : __progname, LOG_PID, log_facility); 398 openlog(argv0 ? argv0 : __progname, LOG_PID, log_facility);
409 syslog(pri, "%.500s", fmtbuf); 399 syslog(pri, "%.500s", fmtbuf);
410 closelog(); 400 closelog();
411#endif
412 } 401 }
413} 402}
diff --git a/log.h b/log.h
index 5c0402b52..9819eceaa 100644
--- a/log.h
+++ b/log.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.h,v 1.9 2003/04/08 20:21:28 itojun Exp $ */ 1/* $OpenBSD: log.h,v 1.8 2002/07/19 15:43:33 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -56,7 +56,7 @@ LogLevel log_level_number(char *);
56 56
57void fatal(const char *, ...) __attribute__((format(printf, 1, 2))); 57void fatal(const char *, ...) __attribute__((format(printf, 1, 2)));
58void error(const char *, ...) __attribute__((format(printf, 1, 2))); 58void error(const char *, ...) __attribute__((format(printf, 1, 2)));
59void logit(const char *, ...) __attribute__((format(printf, 1, 2))); 59void log(const char *, ...) __attribute__((format(printf, 1, 2)));
60void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); 60void verbose(const char *, ...) __attribute__((format(printf, 1, 2)));
61void debug(const char *, ...) __attribute__((format(printf, 1, 2))); 61void debug(const char *, ...) __attribute__((format(printf, 1, 2)));
62void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); 62void debug2(const char *, ...) __attribute__((format(printf, 1, 2)));
diff --git a/loginrec.c b/loginrec.c
index bdac3e959..6697ca7b0 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -12,6 +12,11 @@
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Markus Friedl.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
15 * 20 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -158,7 +163,7 @@
158#include "log.h" 163#include "log.h"
159#include "atomicio.h" 164#include "atomicio.h"
160 165
161RCSID("$Id: loginrec.c,v 1.52 2003/07/06 05:20:46 dtucker Exp $"); 166RCSID("$Id: loginrec.c,v 1.47 2003/03/10 00:23:07 djm Exp $");
162 167
163#ifdef HAVE_UTIL_H 168#ifdef HAVE_UTIL_H
164# include <util.h> 169# include <util.h>
@@ -408,7 +413,7 @@ login_write (struct logininfo *li)
408{ 413{
409#ifndef HAVE_CYGWIN 414#ifndef HAVE_CYGWIN
410 if ((int)geteuid() != 0) { 415 if ((int)geteuid() != 0) {
411 logit("Attempt to write login records by non-root user (aborting)"); 416 log("Attempt to write login records by non-root user (aborting)");
412 return 1; 417 return 1;
413 } 418 }
414#endif 419#endif
@@ -813,7 +818,7 @@ utmp_write_direct(struct logininfo *li, struct utmp *ut)
813 endttyent(); 818 endttyent();
814 819
815 if((struct ttyent *)0 == ty) { 820 if((struct ttyent *)0 == ty) {
816 logit("utmp_write_entry: tty not found"); 821 log("utmp_write_entry: tty not found");
817 return(1); 822 return(1);
818 } 823 }
819#else /* FIXME */ 824#else /* FIXME */
@@ -837,8 +842,8 @@ utmp_write_direct(struct logininfo *li, struct utmp *ut)
837 } 842 }
838 843
839 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET); 844 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
840 if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut)) 845 if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut))
841 logit("utmp_write_direct: error writing %s: %s", 846 log("utmp_write_direct: error writing %s: %s",
842 UTMP_FILE, strerror(errno)); 847 UTMP_FILE, strerror(errno));
843 848
844 (void)close(fd); 849 (void)close(fd);
@@ -857,12 +862,12 @@ utmp_perform_login(struct logininfo *li)
857 construct_utmp(li, &ut); 862 construct_utmp(li, &ut);
858# ifdef UTMP_USE_LIBRARY 863# ifdef UTMP_USE_LIBRARY
859 if (!utmp_write_library(li, &ut)) { 864 if (!utmp_write_library(li, &ut)) {
860 logit("utmp_perform_login: utmp_write_library() failed"); 865 log("utmp_perform_login: utmp_write_library() failed");
861 return 0; 866 return 0;
862 } 867 }
863# else 868# else
864 if (!utmp_write_direct(li, &ut)) { 869 if (!utmp_write_direct(li, &ut)) {
865 logit("utmp_perform_login: utmp_write_direct() failed"); 870 log("utmp_perform_login: utmp_write_direct() failed");
866 return 0; 871 return 0;
867 } 872 }
868# endif 873# endif
@@ -878,12 +883,12 @@ utmp_perform_logout(struct logininfo *li)
878 construct_utmp(li, &ut); 883 construct_utmp(li, &ut);
879# ifdef UTMP_USE_LIBRARY 884# ifdef UTMP_USE_LIBRARY
880 if (!utmp_write_library(li, &ut)) { 885 if (!utmp_write_library(li, &ut)) {
881 logit("utmp_perform_logout: utmp_write_library() failed"); 886 log("utmp_perform_logout: utmp_write_library() failed");
882 return 0; 887 return 0;
883 } 888 }
884# else 889# else
885 if (!utmp_write_direct(li, &ut)) { 890 if (!utmp_write_direct(li, &ut)) {
886 logit("utmp_perform_logout: utmp_write_direct() failed"); 891 log("utmp_perform_logout: utmp_write_direct() failed");
887 return 0; 892 return 0;
888 } 893 }
889# endif 894# endif
@@ -902,7 +907,7 @@ utmp_write_entry(struct logininfo *li)
902 return utmp_perform_logout(li); 907 return utmp_perform_logout(li);
903 908
904 default: 909 default:
905 logit("utmp_write_entry: invalid type field"); 910 log("utmp_write_entry: invalid type field");
906 return 0; 911 return 0;
907 } 912 }
908} 913}
@@ -943,7 +948,7 @@ utmpx_write_library(struct logininfo *li, struct utmpx *utx)
943static int 948static int
944utmpx_write_direct(struct logininfo *li, struct utmpx *utx) 949utmpx_write_direct(struct logininfo *li, struct utmpx *utx)
945{ 950{
946 logit("utmpx_write_direct: not implemented!"); 951 log("utmpx_write_direct: not implemented!");
947 return 0; 952 return 0;
948} 953}
949# endif /* UTMPX_USE_LIBRARY */ 954# endif /* UTMPX_USE_LIBRARY */
@@ -956,12 +961,12 @@ utmpx_perform_login(struct logininfo *li)
956 construct_utmpx(li, &utx); 961 construct_utmpx(li, &utx);
957# ifdef UTMPX_USE_LIBRARY 962# ifdef UTMPX_USE_LIBRARY
958 if (!utmpx_write_library(li, &utx)) { 963 if (!utmpx_write_library(li, &utx)) {
959 logit("utmpx_perform_login: utmp_write_library() failed"); 964 log("utmpx_perform_login: utmp_write_library() failed");
960 return 0; 965 return 0;
961 } 966 }
962# else 967# else
963 if (!utmpx_write_direct(li, &ut)) { 968 if (!utmpx_write_direct(li, &ut)) {
964 logit("utmpx_perform_login: utmp_write_direct() failed"); 969 log("utmpx_perform_login: utmp_write_direct() failed");
965 return 0; 970 return 0;
966 } 971 }
967# endif 972# endif
@@ -999,7 +1004,7 @@ utmpx_write_entry(struct logininfo *li)
999 case LTYPE_LOGOUT: 1004 case LTYPE_LOGOUT:
1000 return utmpx_perform_logout(li); 1005 return utmpx_perform_logout(li);
1001 default: 1006 default:
1002 logit("utmpx_write_entry: invalid type field"); 1007 log("utmpx_write_entry: invalid type field");
1003 return 0; 1008 return 0;
1004 } 1009 }
1005} 1010}
@@ -1021,14 +1026,14 @@ wtmp_write(struct logininfo *li, struct utmp *ut)
1021 int fd, ret = 1; 1026 int fd, ret = 1;
1022 1027
1023 if ((fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0)) < 0) { 1028 if ((fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0)) < 0) {
1024 logit("wtmp_write: problem writing %s: %s", 1029 log("wtmp_write: problem writing %s: %s",
1025 WTMP_FILE, strerror(errno)); 1030 WTMP_FILE, strerror(errno));
1026 return 0; 1031 return 0;
1027 } 1032 }
1028 if (fstat(fd, &buf) == 0) 1033 if (fstat(fd, &buf) == 0)
1029 if (atomicio(vwrite, fd, ut, sizeof(*ut)) != sizeof(*ut)) { 1034 if (atomicio(write, fd, ut, sizeof(*ut)) != sizeof(*ut)) {
1030 ftruncate(fd, buf.st_size); 1035 ftruncate(fd, buf.st_size);
1031 logit("wtmp_write: problem writing %s: %s", 1036 log("wtmp_write: problem writing %s: %s",
1032 WTMP_FILE, strerror(errno)); 1037 WTMP_FILE, strerror(errno));
1033 ret = 0; 1038 ret = 0;
1034 } 1039 }
@@ -1065,7 +1070,7 @@ wtmp_write_entry(struct logininfo *li)
1065 case LTYPE_LOGOUT: 1070 case LTYPE_LOGOUT:
1066 return wtmp_perform_logout(li); 1071 return wtmp_perform_logout(li);
1067 default: 1072 default:
1068 logit("wtmp_write_entry: invalid type field"); 1073 log("wtmp_write_entry: invalid type field");
1069 return 0; 1074 return 0;
1070 } 1075 }
1071} 1076}
@@ -1114,12 +1119,12 @@ wtmp_get_entry(struct logininfo *li)
1114 li->tv_sec = li->tv_usec = 0; 1119 li->tv_sec = li->tv_usec = 0;
1115 1120
1116 if ((fd = open(WTMP_FILE, O_RDONLY)) < 0) { 1121 if ((fd = open(WTMP_FILE, O_RDONLY)) < 0) {
1117 logit("wtmp_get_entry: problem opening %s: %s", 1122 log("wtmp_get_entry: problem opening %s: %s",
1118 WTMP_FILE, strerror(errno)); 1123 WTMP_FILE, strerror(errno));
1119 return 0; 1124 return 0;
1120 } 1125 }
1121 if (fstat(fd, &st) != 0) { 1126 if (fstat(fd, &st) != 0) {
1122 logit("wtmp_get_entry: couldn't stat %s: %s", 1127 log("wtmp_get_entry: couldn't stat %s: %s",
1123 WTMP_FILE, strerror(errno)); 1128 WTMP_FILE, strerror(errno));
1124 close(fd); 1129 close(fd);
1125 return 0; 1130 return 0;
@@ -1134,7 +1139,7 @@ wtmp_get_entry(struct logininfo *li)
1134 1139
1135 while (!found) { 1140 while (!found) {
1136 if (atomicio(read, fd, &ut, sizeof(ut)) != sizeof(ut)) { 1141 if (atomicio(read, fd, &ut, sizeof(ut)) != sizeof(ut)) {
1137 logit("wtmp_get_entry: read of %s failed: %s", 1142 log("wtmp_get_entry: read of %s failed: %s",
1138 WTMP_FILE, strerror(errno)); 1143 WTMP_FILE, strerror(errno));
1139 close (fd); 1144 close (fd);
1140 return 0; 1145 return 0;
@@ -1187,15 +1192,15 @@ wtmpx_write(struct logininfo *li, struct utmpx *utx)
1187 int fd, ret = 1; 1192 int fd, ret = 1;
1188 1193
1189 if ((fd = open(WTMPX_FILE, O_WRONLY|O_APPEND, 0)) < 0) { 1194 if ((fd = open(WTMPX_FILE, O_WRONLY|O_APPEND, 0)) < 0) {
1190 logit("wtmpx_write: problem opening %s: %s", 1195 log("wtmpx_write: problem opening %s: %s",
1191 WTMPX_FILE, strerror(errno)); 1196 WTMPX_FILE, strerror(errno));
1192 return 0; 1197 return 0;
1193 } 1198 }
1194 1199
1195 if (fstat(fd, &buf) == 0) 1200 if (fstat(fd, &buf) == 0)
1196 if (atomicio(vwrite, fd, utx, sizeof(*utx)) != sizeof(*utx)) { 1201 if (atomicio(write, fd, utx, sizeof(*utx)) != sizeof(*utx)) {
1197 ftruncate(fd, buf.st_size); 1202 ftruncate(fd, buf.st_size);
1198 logit("wtmpx_write: problem writing %s: %s", 1203 log("wtmpx_write: problem writing %s: %s",
1199 WTMPX_FILE, strerror(errno)); 1204 WTMPX_FILE, strerror(errno));
1200 ret = 0; 1205 ret = 0;
1201 } 1206 }
@@ -1234,7 +1239,7 @@ wtmpx_write_entry(struct logininfo *li)
1234 case LTYPE_LOGOUT: 1239 case LTYPE_LOGOUT:
1235 return wtmpx_perform_logout(li); 1240 return wtmpx_perform_logout(li);
1236 default: 1241 default:
1237 logit("wtmpx_write_entry: invalid type field"); 1242 log("wtmpx_write_entry: invalid type field");
1238 return 0; 1243 return 0;
1239 } 1244 }
1240} 1245}
@@ -1270,12 +1275,12 @@ wtmpx_get_entry(struct logininfo *li)
1270 li->tv_sec = li->tv_usec = 0; 1275 li->tv_sec = li->tv_usec = 0;
1271 1276
1272 if ((fd = open(WTMPX_FILE, O_RDONLY)) < 0) { 1277 if ((fd = open(WTMPX_FILE, O_RDONLY)) < 0) {
1273 logit("wtmpx_get_entry: problem opening %s: %s", 1278 log("wtmpx_get_entry: problem opening %s: %s",
1274 WTMPX_FILE, strerror(errno)); 1279 WTMPX_FILE, strerror(errno));
1275 return 0; 1280 return 0;
1276 } 1281 }
1277 if (fstat(fd, &st) != 0) { 1282 if (fstat(fd, &st) != 0) {
1278 logit("wtmpx_get_entry: couldn't stat %s: %s", 1283 log("wtmpx_get_entry: couldn't stat %s: %s",
1279 WTMPX_FILE, strerror(errno)); 1284 WTMPX_FILE, strerror(errno));
1280 close(fd); 1285 close(fd);
1281 return 0; 1286 return 0;
@@ -1290,7 +1295,7 @@ wtmpx_get_entry(struct logininfo *li)
1290 1295
1291 while (!found) { 1296 while (!found) {
1292 if (atomicio(read, fd, &utx, sizeof(utx)) != sizeof(utx)) { 1297 if (atomicio(read, fd, &utx, sizeof(utx)) != sizeof(utx)) {
1293 logit("wtmpx_get_entry: read of %s failed: %s", 1298 log("wtmpx_get_entry: read of %s failed: %s",
1294 WTMPX_FILE, strerror(errno)); 1299 WTMPX_FILE, strerror(errno));
1295 close (fd); 1300 close (fd);
1296 return 0; 1301 return 0;
@@ -1335,7 +1340,7 @@ syslogin_perform_login(struct logininfo *li)
1335 struct utmp *ut; 1340 struct utmp *ut;
1336 1341
1337 if (! (ut = (struct utmp *)malloc(sizeof(*ut)))) { 1342 if (! (ut = (struct utmp *)malloc(sizeof(*ut)))) {
1338 logit("syslogin_perform_login: couldn't malloc()"); 1343 log("syslogin_perform_login: couldn't malloc()");
1339 return 0; 1344 return 0;
1340 } 1345 }
1341 construct_utmp(li, ut); 1346 construct_utmp(li, ut);
@@ -1354,7 +1359,7 @@ syslogin_perform_logout(struct logininfo *li)
1354 (void)line_stripname(line, li->line, sizeof(line)); 1359 (void)line_stripname(line, li->line, sizeof(line));
1355 1360
1356 if (!logout(line)) { 1361 if (!logout(line)) {
1357 logit("syslogin_perform_logout: logout() returned an error"); 1362 log("syslogin_perform_logout: logout() returned an error");
1358# ifdef HAVE_LOGWTMP 1363# ifdef HAVE_LOGWTMP
1359 } else { 1364 } else {
1360 logwtmp(line, "", ""); 1365 logwtmp(line, "", "");
@@ -1377,7 +1382,7 @@ syslogin_write_entry(struct logininfo *li)
1377 case LTYPE_LOGOUT: 1382 case LTYPE_LOGOUT:
1378 return syslogin_perform_logout(li); 1383 return syslogin_perform_logout(li);
1379 default: 1384 default:
1380 logit("syslogin_write_entry: Invalid type field"); 1385 log("syslogin_write_entry: Invalid type field");
1381 return 0; 1386 return 0;
1382 } 1387 }
1383} 1388}
@@ -1412,7 +1417,7 @@ lastlog_filetype(char *filename)
1412 struct stat st; 1417 struct stat st;
1413 1418
1414 if (stat(LASTLOG_FILE, &st) != 0) { 1419 if (stat(LASTLOG_FILE, &st) != 0) {
1415 logit("lastlog_perform_login: Couldn't stat %s: %s", LASTLOG_FILE, 1420 log("lastlog_perform_login: Couldn't stat %s: %s", LASTLOG_FILE,
1416 strerror(errno)); 1421 strerror(errno));
1417 return 0; 1422 return 0;
1418 } 1423 }
@@ -1443,12 +1448,12 @@ lastlog_openseek(struct logininfo *li, int *fd, int filemode)
1443 LASTLOG_FILE, li->username); 1448 LASTLOG_FILE, li->username);
1444 break; 1449 break;
1445 default: 1450 default:
1446 logit("lastlog_openseek: %.100s is not a file or directory!", 1451 log("lastlog_openseek: %.100s is not a file or directory!",
1447 LASTLOG_FILE); 1452 LASTLOG_FILE);
1448 return 0; 1453 return 0;
1449 } 1454 }
1450 1455
1451 *fd = open(lastlog_file, filemode, 0600); 1456 *fd = open(lastlog_file, filemode);
1452 if ( *fd < 0) { 1457 if ( *fd < 0) {
1453 debug("lastlog_openseek: Couldn't open %s: %s", 1458 debug("lastlog_openseek: Couldn't open %s: %s",
1454 lastlog_file, strerror(errno)); 1459 lastlog_file, strerror(errno));
@@ -1460,7 +1465,7 @@ lastlog_openseek(struct logininfo *li, int *fd, int filemode)
1460 offset = (off_t) ((long)li->uid * sizeof(struct lastlog)); 1465 offset = (off_t) ((long)li->uid * sizeof(struct lastlog));
1461 1466
1462 if ( lseek(*fd, offset, SEEK_SET) != offset ) { 1467 if ( lseek(*fd, offset, SEEK_SET) != offset ) {
1463 logit("lastlog_openseek: %s->lseek(): %s", 1468 log("lastlog_openseek: %s->lseek(): %s",
1464 lastlog_file, strerror(errno)); 1469 lastlog_file, strerror(errno));
1465 return 0; 1470 return 0;
1466 } 1471 }
@@ -1482,9 +1487,9 @@ lastlog_perform_login(struct logininfo *li)
1482 return(0); 1487 return(0);
1483 1488
1484 /* write the entry */ 1489 /* write the entry */
1485 if (atomicio(vwrite, fd, &last, sizeof(last)) != sizeof(last)) { 1490 if (atomicio(write, fd, &last, sizeof(last)) != sizeof(last)) {
1486 close(fd); 1491 close(fd);
1487 logit("lastlog_write_filemode: Error writing to %s: %s", 1492 log("lastlog_write_filemode: Error writing to %s: %s",
1488 LASTLOG_FILE, strerror(errno)); 1493 LASTLOG_FILE, strerror(errno));
1489 return 0; 1494 return 0;
1490 } 1495 }
@@ -1500,7 +1505,7 @@ lastlog_write_entry(struct logininfo *li)
1500 case LTYPE_LOGIN: 1505 case LTYPE_LOGIN:
1501 return lastlog_perform_login(li); 1506 return lastlog_perform_login(li);
1502 default: 1507 default:
1503 logit("lastlog_write_entry: Invalid type field"); 1508 log("lastlog_write_entry: Invalid type field");
1504 return 0; 1509 return 0;
1505 } 1510 }
1506} 1511}
diff --git a/loginrec.h b/loginrec.h
index 7f932c296..732e21e11 100644
--- a/loginrec.h
+++ b/loginrec.h
@@ -12,6 +12,11 @@
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Markus Friedl.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
15 * 20 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -35,7 +40,7 @@
35#include <netinet/in.h> 40#include <netinet/in.h>
36#include <sys/socket.h> 41#include <sys/socket.h>
37 42
38/* RCSID("$Id: loginrec.h,v 1.7 2003/06/03 02:18:50 djm Exp $"); */ 43/* RCSID("$Id: loginrec.h,v 1.6 2001/05/08 20:33:06 mouring Exp $"); */
39 44
40/** 45/**
41 ** you should use the login_* calls to work around platform dependencies 46 ** you should use the login_* calls to work around platform dependencies
diff --git a/logintest.c b/logintest.c
index 3f3997d10..da9ea50ec 100644
--- a/logintest.c
+++ b/logintest.c
@@ -9,6 +9,11 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
12 * 17 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -43,7 +48,7 @@
43 48
44#include "loginrec.h" 49#include "loginrec.h"
45 50
46RCSID("$Id: logintest.c,v 1.10 2003/08/21 23:34:41 djm Exp $"); 51RCSID("$Id: logintest.c,v 1.8 2001/04/05 23:05:22 stevesk Exp $");
47 52
48#ifdef HAVE___PROGNAME 53#ifdef HAVE___PROGNAME
49extern char *__progname; 54extern char *__progname;
@@ -287,7 +292,7 @@ main(int argc, char *argv[])
287{ 292{
288 printf("Platform-independent login recording test driver\n"); 293 printf("Platform-independent login recording test driver\n");
289 294
290 __progname = ssh_get_progname(argv[0]); 295 __progname = get_progname(argv[0]);
291 if (argc == 2) { 296 if (argc == 2) {
292 if (strncmp(argv[1], "-i", 3) == 0) 297 if (strncmp(argv[1], "-i", 3) == 0)
293 compile_opts_only = 1; 298 compile_opts_only = 1;
diff --git a/md5crypt.c b/md5crypt.c
index e14d53ac1..ba98ccccc 100644
--- a/md5crypt.c
+++ b/md5crypt.c
@@ -1,165 +1,159 @@
1/* 1/*
2 * ---------------------------------------------------------------------------- 2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42): 3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@login.dknet.dk> wrote this file. As long as you retain this 4 * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
5 * notice you can do whatever you want with this stuff. If we meet some 5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * day, and you think this stuff is worth it, you can buy me a beer in 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * return. Poul-Henning Kamp
8 * ---------------------------------------------------------------------------- 7 * ----------------------------------------------------------------------------
9 */ 8 */
10 9
10/*
11 * Ported from FreeBSD to Linux, only minimal changes. --marekm
12 */
13
14/*
15 * Adapted from shadow-19990607 by Tudor Bosman, tudorb@jm.nu
16 */
17
11#include "includes.h" 18#include "includes.h"
12 19
20RCSID("$Id: md5crypt.c,v 1.5 2001/02/09 01:55:36 djm Exp $");
21
13#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) 22#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
14#include <openssl/md5.h>
15 23
16RCSID("$Id: md5crypt.c,v 1.7 2003/05/30 06:58:23 dtucker Exp $"); 24#include <openssl/md5.h>
17 25
18/* 0 ... 63 => ascii - 64 */ 26static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
19static unsigned char itoa64[] = 27 "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
20 "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
21 28
22static char *magic = "$1$"; 29static char *magic = "$1$"; /*
30 * This string is magic for
31 * this algorithm. Having
32 * it this way, we can get
33 * get better later on
34 */
23 35
24static char * 36static void
25to64(unsigned long v, int n) 37to64(char *s, unsigned long v, int n)
26{ 38{
27 static char buf[5];
28 char *s = buf;
29
30 if (n > 4)
31 return (NULL);
32
33 memset(buf, '\0', sizeof(buf));
34 while (--n >= 0) { 39 while (--n >= 0) {
35 *s++ = itoa64[v&0x3f]; 40 *s++ = itoa64[v&0x3f];
36 v >>= 6; 41 v >>= 6;
37 } 42 }
38
39 return (buf);
40} 43}
41 44
42int 45int
43is_md5_salt(const char *salt) 46is_md5_salt(const char *salt)
44{ 47{
45 return (strncmp(salt, magic, strlen(magic)) == 0); 48 return (!strncmp(salt, magic, strlen(magic)));
46} 49}
47 50
51/*
52 * UNIX password
53 *
54 * Use MD5 for what it is best at...
55 */
56
48char * 57char *
49md5_crypt(const char *pw, const char *salt) 58md5_crypt(const char *pw, const char *salt)
50{ 59{
51 static char passwd[120], salt_copy[9], *p; 60 static char passwd[120], *p;
52 static const char *sp, *ep; 61 static const char *sp,*ep;
53 unsigned char final[16]; 62 unsigned char final[16];
54 int sl, pl, i, j; 63 int sl,pl,i,j;
55 MD5_CTX ctx, ctx1; 64 MD5_CTX ctx,ctx1;
56 unsigned long l; 65 unsigned long l;
57 66
58 /* Refine the Salt first */ 67 /* Refine the Salt first */
59 sp = salt; 68 sp = salt;
60 69
61 /* If it starts with the magic string, then skip that */ 70 /* If it starts with the magic string, then skip that */
62 if(strncmp(sp, magic, strlen(magic)) == 0) 71 if(!strncmp(sp,magic,strlen(magic)))
63 sp += strlen(magic); 72 sp += strlen(magic);
64 73
65 /* It stops at the first '$', max 8 chars */ 74 /* It stops at the first '$', max 8 chars */
66 for (ep = sp; *ep != '$'; ep++) { 75 for(ep=sp;*ep && *ep != '$' && ep < (sp+8);ep++)
67 if (*ep == '\0' || ep >= (sp + 8)) 76 continue;
68 return (NULL);
69 }
70 77
71 /* get the length of the true salt */ 78 /* get the length of the true salt */
72 sl = ep - sp; 79 sl = ep - sp;
73 80
74 /* Stash the salt */
75 memcpy(salt_copy, sp, sl);
76 salt_copy[sl] = '\0';
77
78 MD5_Init(&ctx); 81 MD5_Init(&ctx);
79 82
80 /* The password first, since that is what is most unknown */ 83 /* The password first, since that is what is most unknown */
81 MD5_Update(&ctx, pw, strlen(pw)); 84 MD5_Update(&ctx,pw,strlen(pw));
82 85
83 /* Then our magic string */ 86 /* Then our magic string */
84 MD5_Update(&ctx, magic, strlen(magic)); 87 MD5_Update(&ctx,magic,strlen(magic));
85 88
86 /* Then the raw salt */ 89 /* Then the raw salt */
87 MD5_Update(&ctx, sp, sl); 90 MD5_Update(&ctx,sp,sl);
88 91
89 /* Then just as many characters of the MD5(pw, salt, pw) */ 92 /* Then just as many characters of the MD5(pw,salt,pw) */
90 MD5_Init(&ctx1); 93 MD5_Init(&ctx1);
91 MD5_Update(&ctx1, pw, strlen(pw)); 94 MD5_Update(&ctx1,pw,strlen(pw));
92 MD5_Update(&ctx1, sp, sl); 95 MD5_Update(&ctx1,sp,sl);
93 MD5_Update(&ctx1, pw, strlen(pw)); 96 MD5_Update(&ctx1,pw,strlen(pw));
94 MD5_Final(final, &ctx1); 97 MD5_Final(final,&ctx1);
95
96 for(pl = strlen(pw); pl > 0; pl -= 16) 98 for(pl = strlen(pw); pl > 0; pl -= 16)
97 MD5_Update(&ctx, final, pl > 16 ? 16 : pl); 99 MD5_Update(&ctx,final,pl>16 ? 16 : pl);
98 100
99 /* Don't leave anything around in vm they could use. */ 101 /* Don't leave anything around in vm they could use. */
100 memset(final, '\0', sizeof final); 102 memset(final,0,sizeof final);
101 103
102 /* Then something really weird... */ 104 /* Then something really weird... */
103 for (j = 0, i = strlen(pw); i != 0; i >>= 1) 105 for (j=0,i = strlen(pw); i ; i >>= 1)
104 if (i & 1) 106 if(i&1)
105 MD5_Update(&ctx, final + j, 1); 107 MD5_Update(&ctx, final+j, 1);
106 else 108 else
107 MD5_Update(&ctx, pw + j, 1); 109 MD5_Update(&ctx, pw+j, 1);
108 110
109 /* Now make the output string */ 111 /* Now make the output string */
110 snprintf(passwd, sizeof(passwd), "%s%s$", magic, salt_copy); 112 strcpy(passwd,magic);
113 strncat(passwd,sp,sl);
114 strcat(passwd,"$");
111 115
112 MD5_Final(final, &ctx); 116 MD5_Final(final,&ctx);
113 117
114 /* 118 /*
115 * and now, just to make sure things don't run too fast 119 * and now, just to make sure things don't run too fast
116 * On a 60 Mhz Pentium this takes 34 msec, so you would 120 * On a 60 Mhz Pentium this takes 34 msec, so you would
117 * need 30 seconds to build a 1000 entry dictionary... 121 * need 30 seconds to build a 1000 entry dictionary...
118 */ 122 */
119 for(i = 0; i < 1000; i++) { 123 for(i=0;i<1000;i++) {
120 MD5_Init(&ctx1); 124 MD5_Init(&ctx1);
121 if (i & 1) 125 if(i & 1)
122 MD5_Update(&ctx1, pw, strlen(pw)); 126 MD5_Update(&ctx1,pw,strlen(pw));
123 else 127 else
124 MD5_Update(&ctx1, final, 16); 128 MD5_Update(&ctx1,final,16);
125 129
126 if (i % 3) 130 if(i % 3)
127 MD5_Update(&ctx1, sp, sl); 131 MD5_Update(&ctx1,sp,sl);
128 132
129 if (i % 7) 133 if(i % 7)
130 MD5_Update(&ctx1, pw, strlen(pw)); 134 MD5_Update(&ctx1,pw,strlen(pw));
131 135
132 if (i & 1) 136 if(i & 1)
133 MD5_Update(&ctx1, final, 16); 137 MD5_Update(&ctx1,final,16);
134 else 138 else
135 MD5_Update(&ctx1, pw, strlen(pw)); 139 MD5_Update(&ctx1,pw,strlen(pw));
136 140 MD5_Final(final,&ctx1);
137 MD5_Final(final, &ctx1);
138 } 141 }
139 142
140 p = passwd + strlen(passwd); 143 p = passwd + strlen(passwd);
141 144
142 l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; 145 l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; to64(p,l,4); p += 4;
143 strlcat(passwd, to64(l, 4), sizeof(passwd)); 146 l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; to64(p,l,4); p += 4;
144 l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; 147 l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; to64(p,l,4); p += 4;
145 strlcat(passwd, to64(l, 4), sizeof(passwd)); 148 l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; to64(p,l,4); p += 4;
146 l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; 149 l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; to64(p,l,4); p += 4;
147 strlcat(passwd, to64(l, 4), sizeof(passwd)); 150 l = final[11] ; to64(p,l,2); p += 2;
148 l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; 151 *p = '\0';
149 strlcat(passwd, to64(l, 4), sizeof(passwd));
150 l = (final[ 4]<<16) | (final[10]<<8) | final[ 5];
151 strlcat(passwd, to64(l, 4), sizeof(passwd));
152 l = final[11] ;
153 strlcat(passwd, to64(l, 2), sizeof(passwd));
154 152
155 /* Don't leave anything around in vm they could use. */ 153 /* Don't leave anything around in vm they could use. */
156 memset(final, 0, sizeof(final)); 154 memset(final,0,sizeof final);
157 memset(salt_copy, 0, sizeof(salt_copy));
158 memset(&ctx, 0, sizeof(ctx));
159 memset(&ctx1, 0, sizeof(ctx1));
160 (void)to64(0, 4);
161 155
162 return (passwd); 156 return passwd;
163} 157}
164 158
165#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */ 159#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
diff --git a/md5crypt.h b/md5crypt.h
index 2341e2c12..21356fbe7 100644
--- a/md5crypt.h
+++ b/md5crypt.h
@@ -7,7 +7,15 @@
7 * ---------------------------------------------------------------------------- 7 * ----------------------------------------------------------------------------
8 */ 8 */
9 9
10/* $Id: md5crypt.h,v 1.4 2003/05/18 14:46:46 djm Exp $ */ 10/*
11 * Ported from FreeBSD to Linux, only minimal changes. --marekm
12 */
13
14/*
15 * Adapted from shadow-19990607 by Tudor Bosman, tudorb@jm.nu
16 */
17
18/* $Id: md5crypt.h,v 1.3 2001/02/09 01:55:36 djm Exp $ */
11 19
12#ifndef _MD5CRYPT_H 20#ifndef _MD5CRYPT_H
13#define _MD5CRYPT_H 21#define _MD5CRYPT_H
@@ -16,8 +24,8 @@
16 24
17#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) 25#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
18 26
19int is_md5_salt(const char *); 27int is_md5_salt(const char *salt);
20char *md5_crypt(const char *, const char *); 28char *md5_crypt(const char *pw, const char *salt);
21 29
22#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */ 30#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
23 31
diff --git a/mdoc2man.awk b/mdoc2man.awk
deleted file mode 100644
index 856e2d7c5..000000000
--- a/mdoc2man.awk
+++ /dev/null
@@ -1,340 +0,0 @@
1#!/usr/bin/awk
2#
3# Version history:
4# v3, I put the program under a proper license
5# Dan Nelson <dnelson@allantgroup.com> added .An, .Aq and fixed a typo
6# v2, fixed to work on GNU awk --posix and MacOS X
7# v1, first attempt, didn't work on MacOS X
8#
9# Copyright (c) 2003 Peter Stuge <stuge-mdoc2man@cdy.org>
10#
11# Permission to use, copy, modify, and distribute this software for any
12# purpose with or without fee is hereby granted, provided that the above
13# copyright notice and this permission notice appear in all copies.
14#
15# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
16# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
17# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
18# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
21# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23
24BEGIN {
25 optlist=0
26 oldoptlist=0
27 nospace=0
28 synopsis=0
29 reference=0
30 block=0
31 ext=0
32 extopt=0
33 literal=0
34 prenl=0
35 line=""
36}
37
38function wtail() {
39 retval=""
40 while(w<nwords) {
41 if(length(retval))
42 retval=retval OFS
43 retval=retval words[++w]
44 }
45 return retval
46}
47
48function add(str) {
49 for(;prenl;prenl--)
50 line=line "\n"
51 line=line str
52}
53
54! /^\./ {
55 for(;prenl;prenl--)
56 print ""
57 print
58 if(literal)
59 print ".br"
60 next
61}
62
63/^\.\\"/ { next }
64
65{
66 option=0
67 parens=0
68 angles=0
69 sub("^\\.","")
70 nwords=split($0,words)
71 for(w=1;w<=nwords;w++) {
72 skip=0
73 if(match(words[w],"^Li|Pf$")) {
74 skip=1
75 } else if(match(words[w],"^Xo$")) {
76 skip=1
77 ext=1
78 if(length(line)&&!(match(line," $")||prenl))
79 add(OFS)
80 } else if(match(words[w],"^Xc$")) {
81 skip=1
82 ext=0
83 if(!extopt)
84 prenl++
85 w=nwords
86 } else if(match(words[w],"^Bd$")) {
87 skip=1
88 if(match(words[w+1],"-literal")) {
89 literal=1
90 prenl++
91 w=nwords
92 }
93 } else if(match(words[w],"^Ed$")) {
94 skip=1
95 literal=0
96 } else if(match(words[w],"^Ns$")) {
97 skip=1
98 if(!nospace)
99 nospace=1
100 sub(" $","",line)
101 } else if(match(words[w],"^No$")) {
102 skip=1
103 sub(" $","",line)
104 add(words[++w])
105 } else if(match(words[w],"^Dq$")) {
106 skip=1
107 add("``")
108 add(words[++w])
109 while(w<nwords&&!match(words[w+1],"^[\\.,]"))
110 add(OFS words[++w])
111 add("''")
112 if(!nospace&&match(words[w+1],"^[\\.,]"))
113 nospace=1
114 } else if(match(words[w],"^Sq|Ql$")) {
115 skip=1
116 add("`" words[++w] "'")
117 if(!nospace&&match(words[w+1],"^[\\.,]"))
118 nospace=1
119 } else if(match(words[w],"^Oo$")) {
120 skip=1
121 extopt=1
122 if(!nospace)
123 nospace=1
124 add("[")
125 } else if(match(words[w],"^Oc$")) {
126 skip=1
127 extopt=0
128 add("]")
129 }
130 if(!skip) {
131 if(!nospace&&length(line)&&!(match(line," $")||prenl))
132 add(OFS)
133 if(nospace==1)
134 nospace=0
135 }
136 if(match(words[w],"^Dd$")) {
137 date=wtail()
138 next
139 } else if(match(words[w],"^Dt$")) {
140 id=wtail()
141 next
142 } else if(match(words[w],"^Os$")) {
143 add(".TH " id " \"" date "\" \"" wtail() "\"")
144 } else if(match(words[w],"^Sh$")) {
145 add(".SH")
146 synopsis=match(words[w+1],"SYNOPSIS")
147 } else if(match(words[w],"^Xr$")) {
148 add("\\fB" words[++w] "\\fP(" words[++w] ")" words[++w])
149 } else if(match(words[w],"^Rs$")) {
150 split("",refauthors)
151 nrefauthors=0
152 reftitle=""
153 refissue=""
154 refdate=""
155 refopt=""
156 reference=1
157 next
158 } else if(match(words[w],"^Re$")) {
159 prenl++
160 for(i=nrefauthors-1;i>0;i--) {
161 add(refauthors[i])
162 if(i>1)
163 add(", ")
164 }
165 if(nrefauthors>1)
166 add(" and ")
167 add(refauthors[0] ", \\fI" reftitle "\\fP")
168 if(length(refissue))
169 add(", " refissue)
170 if(length(refdate))
171 add(", " refdate)
172 if(length(refopt))
173 add(", " refopt)
174 add(".")
175 reference=0
176 } else if(reference) {
177 if(match(words[w],"^%A$")) { refauthors[nrefauthors++]=wtail() }
178 if(match(words[w],"^%T$")) {
179 reftitle=wtail()
180 sub("^\"","",reftitle)
181 sub("\"$","",reftitle)
182 }
183 if(match(words[w],"^%N$")) { refissue=wtail() }
184 if(match(words[w],"^%D$")) { refdate=wtail() }
185 if(match(words[w],"^%O$")) { refopt=wtail() }
186 } else if(match(words[w],"^Nm$")) {
187 if(synopsis) {
188 add(".br")
189 prenl++
190 }
191 n=words[++w]
192 if(!length(name))
193 name=n
194 if(!length(n))
195 n=name
196 add("\\fB" n "\\fP")
197 if(!nospace&&match(words[w+1],"^[\\.,]"))
198 nospace=1
199 } else if(match(words[w],"^Nd$")) {
200 add("\\- " wtail())
201 } else if(match(words[w],"^Fl$")) {
202 add("\\fB\\-" words[++w] "\\fP")
203 if(!nospace&&match(words[w+1],"^[\\.,]"))
204 nospace=1
205 } else if(match(words[w],"^Ar$")) {
206 add("\\fI")
207 if(w==nwords)
208 add("file ...\\fP")
209 else {
210 add(words[++w] "\\fP")
211 while(match(words[w+1],"^\\|$"))
212 add(OFS words[++w] " \\fI" words[++w] "\\fP")
213 }
214 if(!nospace&&match(words[w+1],"^[\\.,]"))
215 nospace=1
216 } else if(match(words[w],"^Cm$")) {
217 add("\\fB" words[++w] "\\fP")
218 while(w<nwords&&match(words[w+1],"^[\\.,:;)]"))
219 add(words[++w])
220 } else if(match(words[w],"^Op$")) {
221 option=1
222 if(!nospace)
223 nospace=1
224 add("[")
225 } else if(match(words[w],"^Pp$")) {
226 prenl++
227 } else if(match(words[w],"^An$")) {
228 prenl++
229 } else if(match(words[w],"^Ss$")) {
230 add(".SS")
231 } else if(match(words[w],"^Pa$")&&!option) {
232 add("\\fI")
233 w++
234 if(match(words[w],"^\\."))
235 add("\\&")
236 add(words[w] "\\fP")
237 while(w<nwords&&match(words[w+1],"^[\\.,:;)]"))
238 add(words[++w])
239 } else if(match(words[w],"^Dv$")) {
240 add(".BR")
241 } else if(match(words[w],"^Em|Ev$")) {
242 add(".IR")
243 } else if(match(words[w],"^Pq$")) {
244 add("(")
245 nospace=1
246 parens=1
247 } else if(match(words[w],"^Aq$")) {
248 add("<")
249 nospace=1
250 angles=1
251 } else if(match(words[w],"^S[xy]$")) {
252 add(".B " wtail())
253 } else if(match(words[w],"^Ic$")) {
254 plain=1
255 add("\\fB")
256 while(w<nwords) {
257 w++
258 if(match(words[w],"^Op$")) {
259 w++
260 add("[")
261 words[nwords]=words[nwords] "]"
262 }
263 if(match(words[w],"^Ar$")) {
264 add("\\fI" words[++w] "\\fP")
265 } else if(match(words[w],"^[\\.,]")) {
266 sub(" $","",line)
267 if(plain) {
268 add("\\fP")
269 plain=0
270 }
271 add(words[w])
272 } else {
273 if(!plain) {
274 add("\\fB")
275 plain=1
276 }
277 add(words[w])
278 }
279 if(!nospace)
280 add(OFS)
281 }
282 sub(" $","",line)
283 if(plain)
284 add("\\fP")
285 } else if(match(words[w],"^Bl$")) {
286 oldoptlist=optlist
287 if(match(words[w+1],"-bullet"))
288 optlist=1
289 else if(match(words[w+1],"-enum")) {
290 optlist=2
291 enum=0
292 } else if(match(words[w+1],"-tag"))
293 optlist=3
294 else if(match(words[w+1],"-item"))
295 optlist=4
296 else if(match(words[w+1],"-bullet"))
297 optlist=1
298 w=nwords
299 } else if(match(words[w],"^El$")) {
300 optlist=oldoptlist
301 } else if(match(words[w],"^It$")&&optlist) {
302 if(optlist==1)
303 add(".IP \\(bu")
304 else if(optlist==2)
305 add(".IP " ++enum ".")
306 else if(optlist==3) {
307 add(".TP")
308 prenl++
309 if(match(words[w+1],"^Pa|Ev$")) {
310 add(".B")
311 w++
312 }
313 } else if(optlist==4)
314 add(".IP")
315 } else if(match(words[w],"^Sm$")) {
316 if(match(words[w+1],"off"))
317 nospace=2
318 else if(match(words[w+1],"on"))
319 nospace=0
320 w++
321 } else if(!skip) {
322 add(words[w])
323 }
324 }
325 if(match(line,"^\\.[^a-zA-Z]"))
326 sub("^\\.","",line)
327 if(parens)
328 add(")")
329 if(angles)
330 add(">")
331 if(option)
332 add("]")
333 if(ext&&!extopt&&!match(line," $"))
334 add(OFS)
335 if(!ext&&!extopt&&length(line)) {
336 print line
337 prenl=0
338 line=""
339 }
340}
diff --git a/mdoc2man.pl b/mdoc2man.pl
new file mode 100644
index 000000000..928fc5d7a
--- /dev/null
+++ b/mdoc2man.pl
@@ -0,0 +1,592 @@
1#!/usr/bin/perl
2###
3### Quick usage: mdoc2man.pl < mdoc_manpage.8 > man_manpage.8
4###
5###
6### Copyright (c) 2001 University of Illinois Board of Trustees
7### Copyright (c) 2001 Mark D. Roth
8### All rights reserved.
9###
10### Redistribution and use in source and binary forms, with or without
11### modification, are permitted provided that the following conditions
12### are met:
13### 1. Redistributions of source code must retain the above copyright
14### notice, this list of conditions and the following disclaimer.
15### 2. Redistributions in binary form must reproduce the above copyright
16### notice, this list of conditions and the following disclaimer in the
17### documentation and/or other materials provided with the distribution.
18### 3. All advertising materials mentioning features or use of this software
19### must display the following acknowledgement:
20### This product includes software developed by the University of
21### Illinois at Urbana, and their contributors.
22### 4. The University nor the names of their
23### contributors may be used to endorse or promote products derived from
24### this software without specific prior written permission.
25###
26### THIS SOFTWARE IS PROVIDED BY THE TRUSTEES AND CONTRIBUTORS ``AS IS'' AND
27### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29### ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR CONTRIBUTORS BE LIABLE
30### FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31### DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32### OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33### HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34### LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35### OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36### SUCH DAMAGE.
37###
38
39use strict;
40
41my ($name, $date, $id);
42my ($line);
43my ($optlist, $oldoptlist, $nospace, $enum, $synopsis);
44my ($reference, $block, $ext, $extopt, $literal);
45my (@refauthors, $reftitle, $refissue, $refdate, $refopt);
46
47
48$optlist = 0; ### 1 = bullet, 2 = enum, 3 = tag, 4 = item
49$oldoptlist = 0;
50$nospace = 0;
51$synopsis = 0;
52$reference = 0;
53$block = 0;
54$ext = 0;
55$extopt = 0;
56$literal = 0;
57
58while ($line = <STDIN>)
59{
60 if ($line !~ /^\./)
61 {
62 print $line;
63 print ".br\n"
64 if ($literal);
65 next;
66 }
67
68 $line =~ s/^\.//;
69
70 next
71 if ($line =~ m/\\"/);
72
73 $line = ParseMacro($line);
74 print($line)
75 if (defined $line);
76}
77
78
79
80sub ParseMacro # ($line)
81{
82 my ($line) = @_;
83 my (@words, $retval, $option, $parens);
84
85 @words = split(/\s+/, $line);
86 $retval = '';
87 $option = 0;
88 $parens = 0;
89
90# print('@words = ', scalar(@words), ': ', join(' ', @words), "\n");
91
92 while ($_ = shift @words)
93 {
94# print "WORD: $_\n";
95
96 next
97 if (/^(Li|Pf)$/);
98
99 if (/^Xo$/)
100 {
101 $ext = 1;
102 $retval .= ' '
103 if ($retval ne '' && $retval !~ m/[\n ]$/);
104 next;
105 }
106
107 if (/^Xc$/)
108 {
109 $ext = 0;
110 $retval .= "\n"
111 if (! $extopt);
112 last;
113 }
114
115 if (/^Bd$/)
116 {
117 $literal = 1
118 if ($words[0] eq '-literal');
119 $retval .= "\n";
120 last;
121 }
122
123 if (/^Ed$/)
124 {
125 $literal = 0;
126 last;
127 }
128
129 if (/^Ns$/)
130 {
131 $nospace = 1
132 if (! $nospace);
133 $retval =~ s/ $//;
134 next;
135 }
136
137 if (/^No$/)
138 {
139 $retval =~ s/ $//;
140 $retval .= shift @words;
141 next;
142 }
143
144 if (/^Dq$/)
145 {
146 $retval .= '``';
147 do
148 {
149 $retval .= (shift @words) . ' ';
150 }
151 while (@words > 0 && $words[0] !~ m/^[\.,]/);
152 $retval =~ s/ $//;
153 $retval .= '\'\'';
154 $nospace = 1
155 if (! $nospace && $words[0] =~ m/^[\.,]/);
156 next;
157 }
158
159 if (/^(Sq|Ql)$/)
160 {
161 $retval .= '`' . (shift @words) . '\'';
162 $nospace = 1
163 if (! $nospace && $words[0] =~ m/^[\.,]/);
164 next;
165 }
166
167# if (/^Ic$/)
168# {
169# $retval .= '\\fB' . shift(@words) . '\\fP';
170# next;
171# }
172
173 if (/^Oo$/)
174 {
175# $retval .= "[\\c\n";
176 $extopt = 1;
177 $nospace = 1
178 if (! $nospace);
179 $retval .= '[';
180 next;
181 }
182
183 if (/^Oc$/)
184 {
185 $extopt = 0;
186 $retval .= ']';
187 next;
188 }
189
190 $retval .= ' '
191 if (! $nospace && $retval ne '' && $retval !~ m/[\n ]$/);
192 $nospace = 0
193 if ($nospace == 1);
194
195 if (/^Dd$/)
196 {
197 $date = join(' ', @words);
198 return undef;
199 }
200
201 if (/^Dt$/)
202 {
203 $id = join(' ', @words);
204 return undef;
205 }
206
207 if (/^Os$/)
208 {
209 $retval .= '.TH '
210 . $id
211 . " \"$date\" \""
212 . join(' ', @words)
213 . "\"";
214 last;
215 }
216
217 if (/^Sh$/)
218 {
219 $retval .= '.SH';
220 if ($words[0] eq 'SYNOPSIS')
221 {
222 $synopsis = 1;
223 }
224 else
225 {
226 $synopsis = 0;
227 }
228 next;
229 }
230
231 if (/^Xr$/)
232 {
233 $retval .= '\\fB' . (shift @words) .
234 '\\fP(' . (shift @words) . ')'
235 . (shift @words);
236 last;
237 }
238
239 if (/^Rs/)
240 {
241 @refauthors = ();
242 $reftitle = '';
243 $refissue = '';
244 $refdate = '';
245 $refopt = '';
246 $reference = 1;
247 last;
248 }
249
250 if (/^Re/)
251 {
252 $retval .= "\n";
253
254 # authors
255 while (scalar(@refauthors) > 1)
256 {
257 $retval .= shift(@refauthors) . ', ';
258 }
259 $retval .= 'and '
260 if ($retval ne '');
261 $retval .= shift(@refauthors);
262
263 # title
264 $retval .= ', \\fI' . $reftitle . '\\fP';
265
266 # issue
267 $retval .= ', ' . $refissue
268 if ($refissue ne '');
269
270 # date
271 $retval .= ', ' . $refdate
272 if ($refdate ne '');
273
274 # optional info
275 $retval .= ', ' . $refopt
276 if ($refopt ne '');
277
278 $retval .= ".\n";
279
280 $reference = 0;
281 last;
282 }
283
284 if ($reference)
285 {
286 if (/^%A$/)
287 {
288 unshift(@refauthors, join(' ', @words));
289 last;
290 }
291
292 if (/^%T$/)
293 {
294 $reftitle = join(' ', @words);
295 $reftitle =~ s/^"//;
296 $reftitle =~ s/"$//;
297 last;
298 }
299
300 if (/^%N$/)
301 {
302 $refissue = join(' ', @words);
303 last;
304 }
305
306 if (/^%D$/)
307 {
308 $refdate = join(' ', @words);
309 last;
310 }
311
312 if (/^%O$/)
313 {
314 $refopt = join(' ', @words);
315 last;
316 }
317 }
318
319 if (/^Nm$/)
320 {
321 my $n = $name;
322 $n = shift @words
323 if (@words > 0);
324 $name = $n unless $name;
325 $retval .= ".br\n"
326 if ($synopsis);
327 $retval .= "\\fB$n\\fP";
328 $nospace = 1
329 if (! $nospace && $words[0] =~ m/^[\.,]/);
330 next;
331 }
332
333 if (/^Nd$/)
334 {
335 $retval .= '\\-';
336 next;
337 }
338
339 if (/^Fl$/)
340 {
341 $retval .= '\\fB\\-' . (shift @words) . '\\fP';
342 $nospace = 1
343 if (! $nospace && $words[0] =~ m/^[\.,]/);
344 next;
345 }
346
347 if (/^Ar$/)
348 {
349 $retval .= '\\fI';
350 if (! defined $words[0])
351 {
352 $retval .= 'file ...\\fP';
353 }
354 else
355 {
356 $retval .= shift(@words) . '\\fP';
357 while ($words[0] eq '|')
358 {
359 $retval .= ' ' . shift(@words);
360 $retval .= ' \\fI' . shift(@words);
361 $retval .= '\\fP';
362 }
363 }
364 $nospace = 1
365 if (! $nospace && $words[0] =~ m/^[\.,]/);
366 next;
367 }
368
369 if (/^Cm$/)
370 {
371 $retval .= '\\fB' . (shift @words) . '\\fP';
372 while ($words[0] =~ m/^[\.,:)]$/)
373 {
374 $retval .= shift(@words);
375 }
376 next;
377 }
378
379 if (/^Op$/)
380 {
381 $option = 1;
382 $nospace = 1
383 if (! $nospace);
384 $retval .= '[';
385# my $tmp = pop(@words);
386# $tmp .= ']';
387# push(@words, $tmp);
388 next;
389 }
390
391 if (/^Pp$/)
392 {
393 $retval .= "\n";
394 next;
395 }
396
397 if (/^Ss$/)
398 {
399 $retval .= '.SS';
400 next;
401 }
402
403 if (/^Pa$/ && ! $option)
404 {
405 $retval .= '\\fI';
406 $retval .= '\\&'
407 if ($words[0] =~ m/^\./);
408 $retval .= (shift @words) . '\\fP';
409 while ($words[0] =~ m/^[\.,:;)]$/)
410 {
411 $retval .= shift(@words);
412 }
413# $nospace = 1
414# if (! $nospace && $words[0] =~ m/^[\.,:)]/);
415 next;
416 }
417
418 if (/^Dv$/)
419 {
420 $retval .= '.BR';
421 next;
422 }
423
424 if (/^(Em|Ev)$/)
425 {
426 $retval .= '.IR';
427 next;
428 }
429
430 if (/^Pq$/)
431 {
432 $retval .= '(';
433 $nospace = 1;
434 $parens = 1;
435 next;
436 }
437
438 if (/^(S[xy])$/)
439 {
440 $retval .= '.B ' . join(' ', @words);
441 last;
442 }
443
444 if (/^Ic$/)
445 {
446 $retval .= '\\fB';
447 while (defined $words[0]
448 && $words[0] !~ m/^[\.,]/)
449 {
450 if ($words[0] eq 'Op')
451 {
452 shift(@words);
453 $retval .= '[';
454 my $tmp = pop(@words);
455 $tmp .= ']';
456 push(@words, $tmp);
457 next;
458 }
459 if ($words[0] eq 'Ar')
460 {
461 shift @words;
462 $retval .= '\\fI';
463 $retval .= shift @words;
464 $retval .= '\\fP';
465 }
466 else
467 {
468 $retval .= shift @words;
469 }
470 $retval .= ' '
471 if (! $nospace);
472 }
473 $retval =~ s/ $//;
474 $retval .= '\\fP';
475 $retval .= shift @words
476 if (defined $words[0]);
477 last;
478 }
479
480 if (/^Bl$/)
481 {
482 $oldoptlist = $optlist;
483 if ($words[0] eq '-bullet')
484 {
485 $optlist = 1;
486 }
487 elsif ($words[0] eq '-enum')
488 {
489 $optlist = 2;
490 $enum = 0;
491 }
492 elsif ($words[0] eq '-tag')
493 {
494 $optlist = 3;
495 }
496 elsif ($words[0] eq '-item')
497 {
498 $optlist = 4;
499 }
500 last;
501 }
502
503 if (/^El$/)
504 {
505 $optlist = $oldoptlist;
506 next;
507 }
508
509 if ($optlist && /^It$/)
510 {
511 if ($optlist == 1)
512 {
513 # bullets
514 $retval .= '.IP \\(bu';
515 next;
516 }
517
518 if ($optlist == 2)
519 {
520 # enum
521 $retval .= '.IP ' . (++$enum) . '.';
522 next;
523 }
524
525 if ($optlist == 3)
526 {
527 # tags
528 $retval .= ".TP\n";
529 if ($words[0] =~ m/^(Pa|Ev)$/)
530 {
531 shift @words;
532 $retval .= '.B';
533 }
534 next;
535 }
536
537 if ($optlist == 4)
538 {
539 # item
540 $retval .= ".IP\n";
541 next;
542 }
543
544 next;
545 }
546
547 if (/^Sm$/)
548 {
549 if ($words[0] eq 'off')
550 {
551 $nospace = 2;
552 }
553 elsif ($words[0] eq 'on')
554 {
555# $retval .= "\n";
556 $nospace = 0;
557 }
558 shift @words;
559 next;
560 }
561
562 $retval .= "$_";
563 }
564
565 return undef
566 if ($retval eq '.');
567
568 $retval =~ s/^\.([^a-zA-Z])/$1/;
569# $retval =~ s/ $//;
570
571 $retval .= ')'
572 if ($parens == 1);
573
574 $retval .= ']'
575 if ($option == 1);
576
577# $retval .= ' '
578# if ($nospace && $retval ne '' && $retval !~ m/\n$/);
579
580# $retval .= ' '
581# if ($extended && $retval !~ m/ $/);
582
583 $retval .= ' '
584 if ($ext && ! $extopt && $retval !~ m/ $/);
585
586 $retval .= "\n"
587 if (! $ext && ! $extopt && $retval ne '' && $retval !~ m/\n$/);
588
589 return $retval;
590}
591
592
diff --git a/misc.c b/misc.c
index c457a952c..84c94f9b6 100644
--- a/misc.c
+++ b/misc.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: misc.c,v 1.21 2003/04/12 10:15:36 markus Exp $"); 26RCSID("$OpenBSD: misc.c,v 1.20 2002/12/13 10:03:15 markus Exp $");
27 27
28#include "misc.h" 28#include "misc.h"
29#include "log.h" 29#include "log.h"
@@ -60,7 +60,7 @@ set_nonblock(int fd)
60 debug2("fd %d is O_NONBLOCK", fd); 60 debug2("fd %d is O_NONBLOCK", fd);
61 return; 61 return;
62 } 62 }
63 debug2("fd %d setting O_NONBLOCK", fd); 63 debug("fd %d setting O_NONBLOCK", fd);
64 val |= O_NONBLOCK; 64 val |= O_NONBLOCK;
65 if (fcntl(fd, F_SETFL, val) == -1) 65 if (fcntl(fd, F_SETFL, val) == -1)
66 debug("fcntl(%d, F_SETFL, O_NONBLOCK): %s", 66 debug("fcntl(%d, F_SETFL, O_NONBLOCK): %s",
@@ -308,18 +308,47 @@ addargs(arglist *args, char *fmt, ...)
308{ 308{
309 va_list ap; 309 va_list ap;
310 char buf[1024]; 310 char buf[1024];
311 int nalloc;
311 312
312 va_start(ap, fmt); 313 va_start(ap, fmt);
313 vsnprintf(buf, sizeof(buf), fmt, ap); 314 vsnprintf(buf, sizeof(buf), fmt, ap);
314 va_end(ap); 315 va_end(ap);
315 316
317 nalloc = args->nalloc;
316 if (args->list == NULL) { 318 if (args->list == NULL) {
317 args->nalloc = 32; 319 nalloc = 32;
318 args->num = 0; 320 args->num = 0;
319 } else if (args->num+2 >= args->nalloc) 321 } else if (args->num+2 >= nalloc)
320 args->nalloc *= 2; 322 nalloc *= 2;
321 323
322 args->list = xrealloc(args->list, args->nalloc * sizeof(char *)); 324 args->list = xrealloc(args->list, nalloc * sizeof(char *));
325 args->nalloc = nalloc;
323 args->list[args->num++] = xstrdup(buf); 326 args->list[args->num++] = xstrdup(buf);
324 args->list[args->num] = NULL; 327 args->list[args->num] = NULL;
325} 328}
329
330mysig_t
331mysignal(int sig, mysig_t act)
332{
333#ifdef HAVE_SIGACTION
334 struct sigaction sa, osa;
335
336 if (sigaction(sig, NULL, &osa) == -1)
337 return (mysig_t) -1;
338 if (osa.sa_handler != act) {
339 memset(&sa, 0, sizeof(sa));
340 sigemptyset(&sa.sa_mask);
341 sa.sa_flags = 0;
342#if defined(SA_INTERRUPT)
343 if (sig == SIGALRM)
344 sa.sa_flags |= SA_INTERRUPT;
345#endif
346 sa.sa_handler = act;
347 if (sigaction(sig, &sa, NULL) == -1)
348 return (mysig_t) -1;
349 }
350 return (osa.sa_handler);
351#else
352 return (signal(sig, act));
353#endif
354}
diff --git a/misc.h b/misc.h
index 6d2869b36..3b4b87967 100644
--- a/misc.h
+++ b/misc.h
@@ -31,3 +31,7 @@ struct arglist {
31 int nalloc; 31 int nalloc;
32}; 32};
33void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3))); 33void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
34
35/* wrapper for signal interface */
36typedef void (*mysig_t)(int);
37mysig_t mysignal(int sig, mysig_t act);
diff --git a/moduli.c b/moduli.c
deleted file mode 100644
index eb2c0fd18..000000000
--- a/moduli.c
+++ /dev/null
@@ -1,617 +0,0 @@
1/* $OpenBSD: moduli.c,v 1.1 2003/07/28 09:49:56 djm Exp $ */
2/*
3 * Copyright 1994 Phil Karn <karn@qualcomm.com>
4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
5 * Copyright 2000 Niels Provos <provos@citi.umich.edu>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * Two-step process to generate safe primes for DHGEX
31 *
32 * Sieve candidates for "safe" primes,
33 * suitable for use as Diffie-Hellman moduli;
34 * that is, where q = (p-1)/2 is also prime.
35 *
36 * First step: generate candidate primes (memory intensive)
37 * Second step: test primes' safety (processor intensive)
38 */
39
40#include "includes.h"
41#include "moduli.h"
42#include "xmalloc.h"
43#include "log.h"
44
45#include <openssl/bn.h>
46
47
48/*
49 * Debugging defines
50 */
51
52/* define DEBUG_LARGE 1 */
53/* define DEBUG_SMALL 1 */
54/* define DEBUG_TEST 1 */
55
56/*
57 * File output defines
58 */
59
60/* need line long enough for largest moduli plus headers */
61#define QLINESIZE (100+8192)
62
63/* Type: decimal.
64 * Specifies the internal structure of the prime modulus.
65 */
66#define QTYPE_UNKNOWN (0)
67#define QTYPE_UNSTRUCTURED (1)
68#define QTYPE_SAFE (2)
69#define QTYPE_SCHNOOR (3)
70#define QTYPE_SOPHIE_GERMAINE (4)
71#define QTYPE_STRONG (5)
72
73/* Tests: decimal (bit field).
74 * Specifies the methods used in checking for primality.
75 * Usually, more than one test is used.
76 */
77#define QTEST_UNTESTED (0x00)
78#define QTEST_COMPOSITE (0x01)
79#define QTEST_SIEVE (0x02)
80#define QTEST_MILLER_RABIN (0x04)
81#define QTEST_JACOBI (0x08)
82#define QTEST_ELLIPTIC (0x10)
83
84/* Size: decimal.
85 * Specifies the number of the most significant bit (0 to M).
86 ** WARNING: internally, usually 1 to N.
87 */
88#define QSIZE_MINIMUM (511)
89
90/*
91 * Prime sieving defines
92 */
93
94/* Constant: assuming 8 bit bytes and 32 bit words */
95#define SHIFT_BIT (3)
96#define SHIFT_BYTE (2)
97#define SHIFT_WORD (SHIFT_BIT+SHIFT_BYTE)
98#define SHIFT_MEGABYTE (20)
99#define SHIFT_MEGAWORD (SHIFT_MEGABYTE-SHIFT_BYTE)
100
101/*
102 * Constant: when used with 32-bit integers, the largest sieve prime
103 * has to be less than 2**32.
104 */
105#define SMALL_MAXIMUM (0xffffffffUL)
106
107/* Constant: can sieve all primes less than 2**32, as 65537**2 > 2**32-1. */
108#define TINY_NUMBER (1UL<<16)
109
110/* Ensure enough bit space for testing 2*q. */
111#define TEST_MAXIMUM (1UL<<16)
112#define TEST_MINIMUM (QSIZE_MINIMUM + 1)
113/* real TEST_MINIMUM (1UL << (SHIFT_WORD - TEST_POWER)) */
114#define TEST_POWER (3) /* 2**n, n < SHIFT_WORD */
115
116/* bit operations on 32-bit words */
117#define BIT_CLEAR(a,n) ((a)[(n)>>SHIFT_WORD] &= ~(1L << ((n) & 31)))
118#define BIT_SET(a,n) ((a)[(n)>>SHIFT_WORD] |= (1L << ((n) & 31)))
119#define BIT_TEST(a,n) ((a)[(n)>>SHIFT_WORD] & (1L << ((n) & 31)))
120
121/*
122 * Prime testing defines
123 */
124
125/*
126 * Sieving data (XXX - move to struct)
127 */
128
129/* sieve 2**16 */
130static u_int32_t *TinySieve, tinybits;
131
132/* sieve 2**30 in 2**16 parts */
133static u_int32_t *SmallSieve, smallbits, smallbase;
134
135/* sieve relative to the initial value */
136static u_int32_t *LargeSieve, largewords, largetries, largenumbers;
137static u_int32_t largebits, largememory; /* megabytes */
138static BIGNUM *largebase;
139
140
141/*
142 * print moduli out in consistent form,
143 */
144static int
145qfileout(FILE * ofile, u_int32_t otype, u_int32_t otests, u_int32_t otries,
146 u_int32_t osize, u_int32_t ogenerator, BIGNUM * omodulus)
147{
148 struct tm *gtm;
149 time_t time_now;
150 int res;
151
152 time(&time_now);
153 gtm = gmtime(&time_now);
154
155 res = fprintf(ofile, "%04d%02d%02d%02d%02d%02d %u %u %u %u %x ",
156 gtm->tm_year + 1900, gtm->tm_mon + 1, gtm->tm_mday,
157 gtm->tm_hour, gtm->tm_min, gtm->tm_sec,
158 otype, otests, otries, osize, ogenerator);
159
160 if (res < 0)
161 return (-1);
162
163 if (BN_print_fp(ofile, omodulus) < 1)
164 return (-1);
165
166 res = fprintf(ofile, "\n");
167 fflush(ofile);
168
169 return (res > 0 ? 0 : -1);
170}
171
172
173/*
174 ** Sieve p's and q's with small factors
175 */
176static void
177sieve_large(u_int32_t s)
178{
179 u_int32_t r, u;
180
181 debug2("sieve_large %u", s);
182 largetries++;
183 /* r = largebase mod s */
184 r = BN_mod_word(largebase, s);
185 if (r == 0)
186 u = 0; /* s divides into largebase exactly */
187 else
188 u = s - r; /* largebase+u is first entry divisible by s */
189
190 if (u < largebits * 2) {
191 /*
192 * The sieve omits p's and q's divisible by 2, so ensure that
193 * largebase+u is odd. Then, step through the sieve in
194 * increments of 2*s
195 */
196 if (u & 0x1)
197 u += s; /* Make largebase+u odd, and u even */
198
199 /* Mark all multiples of 2*s */
200 for (u /= 2; u < largebits; u += s)
201 BIT_SET(LargeSieve, u);
202 }
203
204 /* r = p mod s */
205 r = (2 * r + 1) % s;
206 if (r == 0)
207 u = 0; /* s divides p exactly */
208 else
209 u = s - r; /* p+u is first entry divisible by s */
210
211 if (u < largebits * 4) {
212 /*
213 * The sieve omits p's divisible by 4, so ensure that
214 * largebase+u is not. Then, step through the sieve in
215 * increments of 4*s
216 */
217 while (u & 0x3) {
218 if (SMALL_MAXIMUM - u < s)
219 return;
220 u += s;
221 }
222
223 /* Mark all multiples of 4*s */
224 for (u /= 4; u < largebits; u += s)
225 BIT_SET(LargeSieve, u);
226 }
227}
228
229/*
230 * list candidates for Sophie-Germaine primes (where q = (p-1)/2)
231 * to standard output.
232 * The list is checked against small known primes (less than 2**30).
233 */
234int
235gen_candidates(FILE *out, int memory, int power, BIGNUM *start)
236{
237 BIGNUM *q;
238 u_int32_t j, r, s, t;
239 u_int32_t smallwords = TINY_NUMBER >> 6;
240 u_int32_t tinywords = TINY_NUMBER >> 6;
241 time_t time_start, time_stop;
242 int i, ret = 0;
243
244 largememory = memory;
245
246 /*
247 * Set power to the length in bits of the prime to be generated.
248 * This is changed to 1 less than the desired safe prime moduli p.
249 */
250 if (power > TEST_MAXIMUM) {
251 error("Too many bits: %u > %lu", power, TEST_MAXIMUM);
252 return (-1);
253 } else if (power < TEST_MINIMUM) {
254 error("Too few bits: %u < %u", power, TEST_MINIMUM);
255 return (-1);
256 }
257 power--; /* decrement before squaring */
258
259 /*
260 * The density of ordinary primes is on the order of 1/bits, so the
261 * density of safe primes should be about (1/bits)**2. Set test range
262 * to something well above bits**2 to be reasonably sure (but not
263 * guaranteed) of catching at least one safe prime.
264 */
265 largewords = ((power * power) >> (SHIFT_WORD - TEST_POWER));
266
267 /*
268 * Need idea of how much memory is available. We don't have to use all
269 * of it.
270 */
271 if (largememory > LARGE_MAXIMUM) {
272 logit("Limited memory: %u MB; limit %lu MB",
273 largememory, LARGE_MAXIMUM);
274 largememory = LARGE_MAXIMUM;
275 }
276
277 if (largewords <= (largememory << SHIFT_MEGAWORD)) {
278 logit("Increased memory: %u MB; need %u bytes",
279 largememory, (largewords << SHIFT_BYTE));
280 largewords = (largememory << SHIFT_MEGAWORD);
281 } else if (largememory > 0) {
282 logit("Decreased memory: %u MB; want %u bytes",
283 largememory, (largewords << SHIFT_BYTE));
284 largewords = (largememory << SHIFT_MEGAWORD);
285 }
286
287 TinySieve = calloc(tinywords, sizeof(u_int32_t));
288 if (TinySieve == NULL) {
289 error("Insufficient memory for tiny sieve: need %u bytes",
290 tinywords << SHIFT_BYTE);
291 exit(1);
292 }
293 tinybits = tinywords << SHIFT_WORD;
294
295 SmallSieve = calloc(smallwords, sizeof(u_int32_t));
296 if (SmallSieve == NULL) {
297 error("Insufficient memory for small sieve: need %u bytes",
298 smallwords << SHIFT_BYTE);
299 xfree(TinySieve);
300 exit(1);
301 }
302 smallbits = smallwords << SHIFT_WORD;
303
304 /*
305 * dynamically determine available memory
306 */
307 while ((LargeSieve = calloc(largewords, sizeof(u_int32_t))) == NULL)
308 largewords -= (1L << (SHIFT_MEGAWORD - 2)); /* 1/4 MB chunks */
309
310 largebits = largewords << SHIFT_WORD;
311 largenumbers = largebits * 2; /* even numbers excluded */
312
313 /* validation check: count the number of primes tried */
314 largetries = 0;
315 q = BN_new();
316
317 /*
318 * Generate random starting point for subprime search, or use
319 * specified parameter.
320 */
321 largebase = BN_new();
322 if (start == NULL)
323 BN_rand(largebase, power, 1, 1);
324 else
325 BN_copy(largebase, start);
326
327 /* ensure odd */
328 BN_set_bit(largebase, 0);
329
330 time(&time_start);
331
332 logit("%.24s Sieve next %u plus %u-bit", ctime(&time_start),
333 largenumbers, power);
334 debug2("start point: 0x%s", BN_bn2hex(largebase));
335
336 /*
337 * TinySieve
338 */
339 for (i = 0; i < tinybits; i++) {
340 if (BIT_TEST(TinySieve, i))
341 continue; /* 2*i+3 is composite */
342
343 /* The next tiny prime */
344 t = 2 * i + 3;
345
346 /* Mark all multiples of t */
347 for (j = i + t; j < tinybits; j += t)
348 BIT_SET(TinySieve, j);
349
350 sieve_large(t);
351 }
352
353 /*
354 * Start the small block search at the next possible prime. To avoid
355 * fencepost errors, the last pass is skipped.
356 */
357 for (smallbase = TINY_NUMBER + 3;
358 smallbase < (SMALL_MAXIMUM - TINY_NUMBER);
359 smallbase += TINY_NUMBER) {
360 for (i = 0; i < tinybits; i++) {
361 if (BIT_TEST(TinySieve, i))
362 continue; /* 2*i+3 is composite */
363
364 /* The next tiny prime */
365 t = 2 * i + 3;
366 r = smallbase % t;
367
368 if (r == 0) {
369 s = 0; /* t divides into smallbase exactly */
370 } else {
371 /* smallbase+s is first entry divisible by t */
372 s = t - r;
373 }
374
375 /*
376 * The sieve omits even numbers, so ensure that
377 * smallbase+s is odd. Then, step through the sieve
378 * in increments of 2*t
379 */
380 if (s & 1)
381 s += t; /* Make smallbase+s odd, and s even */
382
383 /* Mark all multiples of 2*t */
384 for (s /= 2; s < smallbits; s += t)
385 BIT_SET(SmallSieve, s);
386 }
387
388 /*
389 * SmallSieve
390 */
391 for (i = 0; i < smallbits; i++) {
392 if (BIT_TEST(SmallSieve, i))
393 continue; /* 2*i+smallbase is composite */
394
395 /* The next small prime */
396 sieve_large((2 * i) + smallbase);
397 }
398
399 memset(SmallSieve, 0, smallwords << SHIFT_BYTE);
400 }
401
402 time(&time_stop);
403
404 logit("%.24s Sieved with %u small primes in %ld seconds",
405 ctime(&time_stop), largetries, (long) (time_stop - time_start));
406
407 for (j = r = 0; j < largebits; j++) {
408 if (BIT_TEST(LargeSieve, j))
409 continue; /* Definitely composite, skip */
410
411 debug2("test q = largebase+%u", 2 * j);
412 BN_set_word(q, 2 * j);
413 BN_add(q, q, largebase);
414 if (qfileout(out, QTYPE_SOPHIE_GERMAINE, QTEST_SIEVE,
415 largetries, (power - 1) /* MSB */, (0), q) == -1) {
416 ret = -1;
417 break;
418 }
419
420 r++; /* count q */
421 }
422
423 time(&time_stop);
424
425 xfree(LargeSieve);
426 xfree(SmallSieve);
427 xfree(TinySieve);
428
429 logit("%.24s Found %u candidates", ctime(&time_stop), r);
430
431 return (ret);
432}
433
434/*
435 * perform a Miller-Rabin primality test
436 * on the list of candidates
437 * (checking both q and p)
438 * The result is a list of so-call "safe" primes
439 */
440int
441prime_test(FILE *in, FILE *out, u_int32_t trials,
442 u_int32_t generator_wanted)
443{
444 BIGNUM *q, *p, *a;
445 BN_CTX *ctx;
446 char *cp, *lp;
447 u_int32_t count_in = 0, count_out = 0, count_possible = 0;
448 u_int32_t generator_known, in_tests, in_tries, in_type, in_size;
449 time_t time_start, time_stop;
450 int res;
451
452 time(&time_start);
453
454 p = BN_new();
455 q = BN_new();
456 ctx = BN_CTX_new();
457
458 debug2("%.24s Final %u Miller-Rabin trials (%x generator)",
459 ctime(&time_start), trials, generator_wanted);
460
461 res = 0;
462 lp = xmalloc(QLINESIZE + 1);
463 while (fgets(lp, QLINESIZE, in) != NULL) {
464 int ll = strlen(lp);
465
466 count_in++;
467 if (ll < 14 || *lp == '!' || *lp == '#') {
468 debug2("%10u: comment or short line", count_in);
469 continue;
470 }
471
472 /* XXX - fragile parser */
473 /* time */
474 cp = &lp[14]; /* (skip) */
475
476 /* type */
477 in_type = strtoul(cp, &cp, 10);
478
479 /* tests */
480 in_tests = strtoul(cp, &cp, 10);
481
482 if (in_tests & QTEST_COMPOSITE) {
483 debug2("%10u: known composite", count_in);
484 continue;
485 }
486 /* tries */
487 in_tries = strtoul(cp, &cp, 10);
488
489 /* size (most significant bit) */
490 in_size = strtoul(cp, &cp, 10);
491
492 /* generator (hex) */
493 generator_known = strtoul(cp, &cp, 16);
494
495 /* Skip white space */
496 cp += strspn(cp, " ");
497
498 /* modulus (hex) */
499 switch (in_type) {
500 case QTYPE_SOPHIE_GERMAINE:
501 debug2("%10u: (%u) Sophie-Germaine", count_in, in_type);
502 a = q;
503 BN_hex2bn(&a, cp);
504 /* p = 2*q + 1 */
505 BN_lshift(p, q, 1);
506 BN_add_word(p, 1);
507 in_size += 1;
508 generator_known = 0;
509 break;
510 default:
511 debug2("%10u: (%u)", count_in, in_type);
512 a = p;
513 BN_hex2bn(&a, cp);
514 /* q = (p-1) / 2 */
515 BN_rshift(q, p, 1);
516 break;
517 }
518
519 /*
520 * due to earlier inconsistencies in interpretation, check
521 * the proposed bit size.
522 */
523 if (BN_num_bits(p) != (in_size + 1)) {
524 debug2("%10u: bit size %u mismatch", count_in, in_size);
525 continue;
526 }
527 if (in_size < QSIZE_MINIMUM) {
528 debug2("%10u: bit size %u too short", count_in, in_size);
529 continue;
530 }
531
532 if (in_tests & QTEST_MILLER_RABIN)
533 in_tries += trials;
534 else
535 in_tries = trials;
536 /*
537 * guess unknown generator
538 */
539 if (generator_known == 0) {
540 if (BN_mod_word(p, 24) == 11)
541 generator_known = 2;
542 else if (BN_mod_word(p, 12) == 5)
543 generator_known = 3;
544 else {
545 u_int32_t r = BN_mod_word(p, 10);
546
547 if (r == 3 || r == 7) {
548 generator_known = 5;
549 }
550 }
551 }
552 /*
553 * skip tests when desired generator doesn't match
554 */
555 if (generator_wanted > 0 &&
556 generator_wanted != generator_known) {
557 debug2("%10u: generator %d != %d",
558 count_in, generator_known, generator_wanted);
559 continue;
560 }
561
562 count_possible++;
563
564 /*
565 * The (1/4)^N performance bound on Miller-Rabin is
566 * extremely pessimistic, so don't spend a lot of time
567 * really verifying that q is prime until after we know
568 * that p is also prime. A single pass will weed out the
569 * vast majority of composite q's.
570 */
571 if (BN_is_prime(q, 1, NULL, ctx, NULL) <= 0) {
572 debug2("%10u: q failed first possible prime test",
573 count_in);
574 continue;
575 }
576
577 /*
578 * q is possibly prime, so go ahead and really make sure
579 * that p is prime. If it is, then we can go back and do
580 * the same for q. If p is composite, chances are that
581 * will show up on the first Rabin-Miller iteration so it
582 * doesn't hurt to specify a high iteration count.
583 */
584 if (!BN_is_prime(p, trials, NULL, ctx, NULL)) {
585 debug2("%10u: p is not prime", count_in);
586 continue;
587 }
588 debug("%10u: p is almost certainly prime", count_in);
589
590 /* recheck q more rigorously */
591 if (!BN_is_prime(q, trials - 1, NULL, ctx, NULL)) {
592 debug("%10u: q is not prime", count_in);
593 continue;
594 }
595 debug("%10u: q is almost certainly prime", count_in);
596
597 if (qfileout(out, QTYPE_SAFE, (in_tests | QTEST_MILLER_RABIN),
598 in_tries, in_size, generator_known, p)) {
599 res = -1;
600 break;
601 }
602
603 count_out++;
604 }
605
606 time(&time_stop);
607 xfree(lp);
608 BN_free(p);
609 BN_free(q);
610 BN_CTX_free(ctx);
611
612 logit("%.24s Found %u safe primes of %u candidates in %ld seconds",
613 ctime(&time_stop), count_out, count_possible,
614 (long) (time_stop - time_start));
615
616 return (res);
617}
diff --git a/moduli.h b/moduli.h
deleted file mode 100644
index 9cd1cd3f8..000000000
--- a/moduli.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* $OpenBSD: moduli.h,v 1.1 2003/07/28 09:49:56 djm Exp $ */
2
3#include <sys/types.h>
4#include <openssl/bn.h>
5
6/*
7 * Using virtual memory can cause thrashing. This should be the largest
8 * number that is supported without a large amount of disk activity --
9 * that would increase the run time from hours to days or weeks!
10 */
11#define LARGE_MINIMUM (8UL) /* megabytes */
12
13/*
14 * Do not increase this number beyond the unsigned integer bit size.
15 * Due to a multiple of 4, it must be LESS than 128 (yielding 2**30 bits).
16 */
17#define LARGE_MAXIMUM (127UL) /* megabytes */
18
19/* Minimum number of primality tests to perform */
20#define TRIAL_MINIMUM (4)
21
22int gen_candidates(FILE *, int, int, BIGNUM *);
23int prime_test(FILE *, FILE *, u_int32_t, u_int32_t);
diff --git a/monitor.c b/monitor.c
index e5656470d..bd39f7ccb 100644
--- a/monitor.c
+++ b/monitor.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: monitor.c,v 1.49 2003/08/28 12:54:34 markus Exp $"); 28RCSID("$OpenBSD: monitor.c,v 1.36 2003/04/01 10:22:21 markus Exp $");
29 29
30#include <openssl/dh.h> 30#include <openssl/dh.h>
31 31
@@ -59,11 +59,6 @@ RCSID("$OpenBSD: monitor.c,v 1.49 2003/08/28 12:54:34 markus Exp $");
59#include "ssh2.h" 59#include "ssh2.h"
60#include "mpaux.h" 60#include "mpaux.h"
61 61
62#ifdef GSSAPI
63#include "ssh-gss.h"
64static Gssctxt *gsscontext = NULL;
65#endif
66
67/* Imports */ 62/* Imports */
68extern ServerOptions options; 63extern ServerOptions options;
69extern u_int utmp_len; 64extern u_int utmp_len;
@@ -98,7 +93,7 @@ struct {
98 u_int olen; 93 u_int olen;
99} child_state; 94} child_state;
100 95
101/* Functions on the monitor that answer unprivileged requests */ 96/* Functions on the montior that answer unprivileged requests */
102 97
103int mm_answer_moduli(int, Buffer *); 98int mm_answer_moduli(int, Buffer *);
104int mm_answer_sign(int, Buffer *); 99int mm_answer_sign(int, Buffer *);
@@ -123,17 +118,13 @@ int mm_answer_sessid(int, Buffer *);
123 118
124#ifdef USE_PAM 119#ifdef USE_PAM
125int mm_answer_pam_start(int, Buffer *); 120int mm_answer_pam_start(int, Buffer *);
126int mm_answer_pam_account(int, Buffer *);
127int mm_answer_pam_init_ctx(int, Buffer *);
128int mm_answer_pam_query(int, Buffer *);
129int mm_answer_pam_respond(int, Buffer *);
130int mm_answer_pam_free_ctx(int, Buffer *);
131#endif 121#endif
132 122
133#ifdef GSSAPI 123#ifdef KRB4
134int mm_answer_gss_setup_ctx(int, Buffer *); 124int mm_answer_krb4(int, Buffer *);
135int mm_answer_gss_accept_ctx(int, Buffer *); 125#endif
136int mm_answer_gss_userok(int, Buffer *); 126#ifdef KRB5
127int mm_answer_krb5(int, Buffer *);
137#endif 128#endif
138 129
139static Authctxt *authctxt; 130static Authctxt *authctxt;
@@ -146,7 +137,7 @@ static int key_blobtype = MM_NOKEY;
146static char *hostbased_cuser = NULL; 137static char *hostbased_cuser = NULL;
147static char *hostbased_chost = NULL; 138static char *hostbased_chost = NULL;
148static char *auth_method = "unknown"; 139static char *auth_method = "unknown";
149static u_int session_id2_len = 0; 140static int session_id2_len = 0;
150static u_char *session_id2 = NULL; 141static u_char *session_id2 = NULL;
151static pid_t monitor_child_pid; 142static pid_t monitor_child_pid;
152 143
@@ -173,11 +164,6 @@ struct mon_table mon_dispatch_proto20[] = {
173 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword}, 164 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
174#ifdef USE_PAM 165#ifdef USE_PAM
175 {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start}, 166 {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
176 {MONITOR_REQ_PAM_ACCOUNT, 0, mm_answer_pam_account},
177 {MONITOR_REQ_PAM_INIT_CTX, MON_ISAUTH, mm_answer_pam_init_ctx},
178 {MONITOR_REQ_PAM_QUERY, MON_ISAUTH, mm_answer_pam_query},
179 {MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond},
180 {MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx},
181#endif 167#endif
182#ifdef BSD_AUTH 168#ifdef BSD_AUTH
183 {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery}, 169 {MONITOR_REQ_BSDAUTHQUERY, MON_ISAUTH, mm_answer_bsdauthquery},
@@ -189,11 +175,6 @@ struct mon_table mon_dispatch_proto20[] = {
189#endif 175#endif
190 {MONITOR_REQ_KEYALLOWED, MON_ISAUTH, mm_answer_keyallowed}, 176 {MONITOR_REQ_KEYALLOWED, MON_ISAUTH, mm_answer_keyallowed},
191 {MONITOR_REQ_KEYVERIFY, MON_AUTH, mm_answer_keyverify}, 177 {MONITOR_REQ_KEYVERIFY, MON_AUTH, mm_answer_keyverify},
192#ifdef GSSAPI
193 {MONITOR_REQ_GSSSETUP, MON_ISAUTH, mm_answer_gss_setup_ctx},
194 {MONITOR_REQ_GSSSTEP, MON_ISAUTH, mm_answer_gss_accept_ctx},
195 {MONITOR_REQ_GSSUSEROK, MON_AUTH, mm_answer_gss_userok},
196#endif
197 {0, 0, NULL} 178 {0, 0, NULL}
198}; 179};
199 180
@@ -225,11 +206,12 @@ struct mon_table mon_dispatch_proto15[] = {
225#endif 206#endif
226#ifdef USE_PAM 207#ifdef USE_PAM
227 {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start}, 208 {MONITOR_REQ_PAM_START, MON_ONCE, mm_answer_pam_start},
228 {MONITOR_REQ_PAM_ACCOUNT, 0, mm_answer_pam_account}, 209#endif
229 {MONITOR_REQ_PAM_INIT_CTX, MON_ISAUTH, mm_answer_pam_init_ctx}, 210#ifdef KRB4
230 {MONITOR_REQ_PAM_QUERY, MON_ISAUTH, mm_answer_pam_query}, 211 {MONITOR_REQ_KRB4, MON_ONCE|MON_AUTH, mm_answer_krb4},
231 {MONITOR_REQ_PAM_RESPOND, MON_ISAUTH, mm_answer_pam_respond}, 212#endif
232 {MONITOR_REQ_PAM_FREE_CTX, MON_ONCE|MON_AUTHDECIDE, mm_answer_pam_free_ctx}, 213#ifdef KRB5
214 {MONITOR_REQ_KRB5, MON_ONCE|MON_AUTH, mm_answer_krb5},
233#endif 215#endif
234 {0, 0, NULL} 216 {0, 0, NULL}
235}; 217};
@@ -305,16 +287,8 @@ monitor_child_preauth(struct monitor *pmonitor)
305 !auth_root_allowed(auth_method)) 287 !auth_root_allowed(auth_method))
306 authenticated = 0; 288 authenticated = 0;
307#ifdef USE_PAM 289#ifdef USE_PAM
308 /* PAM needs to perform account checks after auth */ 290 if (!do_pam_account(authctxt->pw->pw_name, NULL))
309 if (options.use_pam) { 291 authenticated = 0;
310 Buffer m;
311
312 buffer_init(&m);
313 mm_request_receive_expect(pmonitor->m_sendfd,
314 MONITOR_REQ_PAM_ACCOUNT, &m);
315 authenticated = mm_answer_pam_account(pmonitor->m_sendfd, &m);
316 buffer_free(&m);
317 }
318#endif 292#endif
319 } 293 }
320 294
@@ -363,6 +337,7 @@ monitor_child_postauth(struct monitor *pmonitor)
363 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1); 337 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
364 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1); 338 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
365 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); 339 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
340
366 } else { 341 } else {
367 mon_dispatch = mon_dispatch_postauth15; 342 mon_dispatch = mon_dispatch_postauth15;
368 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); 343 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
@@ -598,8 +573,7 @@ mm_answer_pwnamallow(int socket, Buffer *m)
598 } 573 }
599 574
600#ifdef USE_PAM 575#ifdef USE_PAM
601 if (options.use_pam) 576 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
602 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
603#endif 577#endif
604 578
605 return (0); 579 return (0);
@@ -649,7 +623,7 @@ mm_answer_authpassword(int socket, Buffer *m)
649 passwd = buffer_get_string(m, &plen); 623 passwd = buffer_get_string(m, &plen);
650 /* Only authenticate if the context is valid */ 624 /* Only authenticate if the context is valid */
651 authenticated = options.password_authentication && 625 authenticated = options.password_authentication &&
652 auth_password(authctxt, passwd); 626 auth_password(authctxt, passwd) && authctxt->valid;
653 memset(passwd, 0, strlen(passwd)); 627 memset(passwd, 0, strlen(passwd));
654 xfree(passwd); 628 xfree(passwd);
655 629
@@ -782,133 +756,14 @@ mm_answer_pam_start(int socket, Buffer *m)
782{ 756{
783 char *user; 757 char *user;
784 758
785 if (!options.use_pam)
786 fatal("UsePAM not set, but ended up in %s anyway", __func__);
787
788 user = buffer_get_string(m, NULL); 759 user = buffer_get_string(m, NULL);
789 760
790 start_pam(user); 761 start_pam(user);
791 762
792 xfree(user); 763 xfree(user);
793 764
794 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_ACCOUNT, 1);
795
796 return (0);
797}
798
799int
800mm_answer_pam_account(int socket, Buffer *m)
801{
802 u_int ret;
803
804 if (!options.use_pam)
805 fatal("UsePAM not set, but ended up in %s anyway", __func__);
806
807 ret = do_pam_account();
808
809 buffer_put_int(m, ret);
810
811 mm_request_send(socket, MONITOR_ANS_PAM_ACCOUNT, m);
812
813 return (ret);
814}
815
816static void *sshpam_ctxt, *sshpam_authok;
817extern KbdintDevice sshpam_device;
818
819int
820mm_answer_pam_init_ctx(int socket, Buffer *m)
821{
822
823 debug3("%s", __func__);
824 authctxt->user = buffer_get_string(m, NULL);
825 sshpam_ctxt = (sshpam_device.init_ctx)(authctxt);
826 sshpam_authok = NULL;
827 buffer_clear(m);
828 if (sshpam_ctxt != NULL) {
829 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_FREE_CTX, 1);
830 buffer_put_int(m, 1);
831 } else {
832 buffer_put_int(m, 0);
833 }
834 mm_request_send(socket, MONITOR_ANS_PAM_INIT_CTX, m);
835 return (0);
836}
837
838int
839mm_answer_pam_query(int socket, Buffer *m)
840{
841 char *name, *info, **prompts;
842 u_int num, *echo_on;
843 int i, ret;
844
845 debug3("%s", __func__);
846 sshpam_authok = NULL;
847 ret = (sshpam_device.query)(sshpam_ctxt, &name, &info, &num, &prompts, &echo_on);
848 if (ret == 0 && num == 0)
849 sshpam_authok = sshpam_ctxt;
850 if (num > 1 || name == NULL || info == NULL)
851 ret = -1;
852 buffer_clear(m);
853 buffer_put_int(m, ret);
854 buffer_put_cstring(m, name);
855 xfree(name);
856 buffer_put_cstring(m, info);
857 xfree(info);
858 buffer_put_int(m, num);
859 for (i = 0; i < num; ++i) {
860 buffer_put_cstring(m, prompts[i]);
861 xfree(prompts[i]);
862 buffer_put_int(m, echo_on[i]);
863 }
864 if (prompts != NULL)
865 xfree(prompts);
866 if (echo_on != NULL)
867 xfree(echo_on);
868 mm_request_send(socket, MONITOR_ANS_PAM_QUERY, m);
869 return (0);
870}
871
872int
873mm_answer_pam_respond(int socket, Buffer *m)
874{
875 char **resp;
876 u_int num;
877 int i, ret;
878
879 debug3("%s", __func__);
880 sshpam_authok = NULL;
881 num = buffer_get_int(m);
882 if (num > 0) {
883 resp = xmalloc(num * sizeof(char *));
884 for (i = 0; i < num; ++i)
885 resp[i] = buffer_get_string(m, NULL);
886 ret = (sshpam_device.respond)(sshpam_ctxt, num, resp);
887 for (i = 0; i < num; ++i)
888 xfree(resp[i]);
889 xfree(resp);
890 } else {
891 ret = (sshpam_device.respond)(sshpam_ctxt, num, NULL);
892 }
893 buffer_clear(m);
894 buffer_put_int(m, ret);
895 mm_request_send(socket, MONITOR_ANS_PAM_RESPOND, m);
896 auth_method = "keyboard-interactive/pam";
897 if (ret == 0)
898 sshpam_authok = sshpam_ctxt;
899 return (0); 765 return (0);
900} 766}
901
902int
903mm_answer_pam_free_ctx(int socket, Buffer *m)
904{
905
906 debug3("%s", __func__);
907 (sshpam_device.free_ctx)(sshpam_ctxt);
908 buffer_clear(m);
909 mm_request_send(socket, MONITOR_ANS_PAM_FREE_CTX, m);
910 return (sshpam_authok == sshpam_ctxt);
911}
912#endif 767#endif
913 768
914static void 769static void
@@ -1032,7 +887,7 @@ monitor_valid_userblob(u_char *data, u_int datalen)
1032 fail++; 887 fail++;
1033 p = buffer_get_string(&b, NULL); 888 p = buffer_get_string(&b, NULL);
1034 if (strcmp(authctxt->user, p) != 0) { 889 if (strcmp(authctxt->user, p) != 0) {
1035 logit("wrong user name passed to monitor: expected %s != %.100s", 890 log("wrong user name passed to monitor: expected %s != %.100s",
1036 authctxt->user, p); 891 authctxt->user, p);
1037 fail++; 892 fail++;
1038 } 893 }
@@ -1080,7 +935,7 @@ monitor_valid_hostbasedblob(u_char *data, u_int datalen, char *cuser,
1080 fail++; 935 fail++;
1081 p = buffer_get_string(&b, NULL); 936 p = buffer_get_string(&b, NULL);
1082 if (strcmp(authctxt->user, p) != 0) { 937 if (strcmp(authctxt->user, p) != 0) {
1083 logit("wrong user name passed to monitor: expected %s != %.100s", 938 log("wrong user name passed to monitor: expected %s != %.100s",
1084 authctxt->user, p); 939 authctxt->user, p);
1085 fail++; 940 fail++;
1086 } 941 }
@@ -1190,14 +1045,14 @@ mm_record_login(Session *s, struct passwd *pw)
1190 } 1045 }
1191 /* Record that there was a login on that tty from the remote host. */ 1046 /* Record that there was a login on that tty from the remote host. */
1192 record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid, 1047 record_login(s->pid, s->tty, pw->pw_name, pw->pw_uid,
1193 get_remote_name_or_ip(utmp_len, options.use_dns), 1048 get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping),
1194 (struct sockaddr *)&from, fromlen); 1049 (struct sockaddr *)&from, fromlen);
1195} 1050}
1196 1051
1197static void 1052static void
1198mm_session_close(Session *s) 1053mm_session_close(Session *s)
1199{ 1054{
1200 debug3("%s: session %d pid %ld", __func__, s->self, (long)s->pid); 1055 debug3("%s: session %d pid %d", __func__, s->self, s->pid);
1201 if (s->ttyfd != -1) { 1056 if (s->ttyfd != -1) {
1202 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ptyfd); 1057 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ptyfd);
1203 fatal_remove_cleanup(session_pty_cleanup2, (void *)s); 1058 fatal_remove_cleanup(session_pty_cleanup2, (void *)s);
@@ -1461,6 +1316,89 @@ mm_answer_rsa_response(int socket, Buffer *m)
1461 return (success); 1316 return (success);
1462} 1317}
1463 1318
1319#ifdef KRB4
1320int
1321mm_answer_krb4(int socket, Buffer *m)
1322{
1323 KTEXT_ST auth, reply;
1324 char *client, *p;
1325 int success;
1326 u_int alen;
1327
1328 reply.length = auth.length = 0;
1329
1330 p = buffer_get_string(m, &alen);
1331 if (alen >= MAX_KTXT_LEN)
1332 fatal("%s: auth too large", __func__);
1333 memcpy(auth.dat, p, alen);
1334 auth.length = alen;
1335 memset(p, 0, alen);
1336 xfree(p);
1337
1338 success = options.kerberos_authentication &&
1339 authctxt->valid &&
1340 auth_krb4(authctxt, &auth, &client, &reply);
1341
1342 memset(auth.dat, 0, alen);
1343 buffer_clear(m);
1344 buffer_put_int(m, success);
1345
1346 if (success) {
1347 buffer_put_cstring(m, client);
1348 buffer_put_string(m, reply.dat, reply.length);
1349 if (client)
1350 xfree(client);
1351 if (reply.length)
1352 memset(reply.dat, 0, reply.length);
1353 }
1354
1355 debug3("%s: sending result %d", __func__, success);
1356 mm_request_send(socket, MONITOR_ANS_KRB4, m);
1357
1358 auth_method = "kerberos";
1359
1360 /* Causes monitor loop to terminate if authenticated */
1361 return (success);
1362}
1363#endif
1364
1365#ifdef KRB5
1366int
1367mm_answer_krb5(int socket, Buffer *m)
1368{
1369 krb5_data tkt, reply;
1370 char *client_user;
1371 u_int len;
1372 int success;
1373
1374 /* use temporary var to avoid size issues on 64bit arch */
1375 tkt.data = buffer_get_string(m, &len);
1376 tkt.length = len;
1377
1378 success = options.kerberos_authentication &&
1379 authctxt->valid &&
1380 auth_krb5(authctxt, &tkt, &client_user, &reply);
1381
1382 if (tkt.length)
1383 xfree(tkt.data);
1384
1385 buffer_clear(m);
1386 buffer_put_int(m, success);
1387
1388 if (success) {
1389 buffer_put_cstring(m, client_user);
1390 buffer_put_string(m, reply.data, reply.length);
1391 if (client_user)
1392 xfree(client_user);
1393 if (reply.length)
1394 xfree(reply.data);
1395 }
1396 mm_request_send(socket, MONITOR_ANS_KRB5, m);
1397
1398 return success;
1399}
1400#endif
1401
1464int 1402int
1465mm_answer_term(int socket, Buffer *req) 1403mm_answer_term(int socket, Buffer *req)
1466{ 1404{
@@ -1576,8 +1514,6 @@ mm_get_keystate(struct monitor *pmonitor)
1576 Buffer m; 1514 Buffer m;
1577 u_char *blob, *p; 1515 u_char *blob, *p;
1578 u_int bloblen, plen; 1516 u_int bloblen, plen;
1579 u_int32_t seqnr, packets;
1580 u_int64_t blocks;
1581 1517
1582 debug3("%s: Waiting for new keys", __func__); 1518 debug3("%s: Waiting for new keys", __func__);
1583 1519
@@ -1607,14 +1543,8 @@ mm_get_keystate(struct monitor *pmonitor)
1607 xfree(blob); 1543 xfree(blob);
1608 1544
1609 /* Now get sequence numbers for the packets */ 1545 /* Now get sequence numbers for the packets */
1610 seqnr = buffer_get_int(&m); 1546 packet_set_seqnr(MODE_OUT, buffer_get_int(&m));
1611 blocks = buffer_get_int64(&m); 1547 packet_set_seqnr(MODE_IN, buffer_get_int(&m));
1612 packets = buffer_get_int(&m);
1613 packet_set_state(MODE_OUT, seqnr, blocks, packets);
1614 seqnr = buffer_get_int(&m);
1615 blocks = buffer_get_int64(&m);
1616 packets = buffer_get_int(&m);
1617 packet_set_state(MODE_IN, seqnr, blocks, packets);
1618 1548
1619 skip: 1549 skip:
1620 /* Get the key context */ 1550 /* Get the key context */
@@ -1735,79 +1665,3 @@ monitor_reinit(struct monitor *mon)
1735 mon->m_recvfd = pair[0]; 1665 mon->m_recvfd = pair[0];
1736 mon->m_sendfd = pair[1]; 1666 mon->m_sendfd = pair[1];
1737} 1667}
1738
1739#ifdef GSSAPI
1740int
1741mm_answer_gss_setup_ctx(int socket, Buffer *m)
1742{
1743 gss_OID_desc oid;
1744 OM_uint32 major;
1745 u_int len;
1746
1747 oid.elements = buffer_get_string(m, &len);
1748 oid.length = len;
1749
1750 major = ssh_gssapi_server_ctx(&gsscontext, &oid);
1751
1752 xfree(oid.elements);
1753
1754 buffer_clear(m);
1755 buffer_put_int(m, major);
1756
1757 mm_request_send(socket,MONITOR_ANS_GSSSETUP, m);
1758
1759 /* Now we have a context, enable the step */
1760 monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 1);
1761
1762 return (0);
1763}
1764
1765int
1766mm_answer_gss_accept_ctx(int socket, Buffer *m)
1767{
1768 gss_buffer_desc in;
1769 gss_buffer_desc out = GSS_C_EMPTY_BUFFER;
1770 OM_uint32 major,minor;
1771 OM_uint32 flags = 0; /* GSI needs this */
1772 u_int len;
1773
1774 in.value = buffer_get_string(m, &len);
1775 in.length = len;
1776 major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags);
1777 xfree(in.value);
1778
1779 buffer_clear(m);
1780 buffer_put_int(m, major);
1781 buffer_put_string(m, out.value, out.length);
1782 buffer_put_int(m, flags);
1783 mm_request_send(socket, MONITOR_ANS_GSSSTEP, m);
1784
1785 gss_release_buffer(&minor, &out);
1786
1787 /* Complete - now we can do signing */
1788 if (major==GSS_S_COMPLETE) {
1789 monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0);
1790 monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1);
1791 }
1792 return (0);
1793}
1794
1795int
1796mm_answer_gss_userok(int socket, Buffer *m)
1797{
1798 int authenticated;
1799
1800 authenticated = authctxt->valid && ssh_gssapi_userok(authctxt->user);
1801
1802 buffer_clear(m);
1803 buffer_put_int(m, authenticated);
1804
1805 debug3("%s: sending result %d", __func__, authenticated);
1806 mm_request_send(socket, MONITOR_ANS_GSSUSEROK, m);
1807
1808 auth_method="gssapi";
1809
1810 /* Monitor loop will terminate if authenticated */
1811 return (authenticated);
1812}
1813#endif /* GSSAPI */
diff --git a/monitor.h b/monitor.h
index 2461156c7..668ac9897 100644
--- a/monitor.h
+++ b/monitor.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.h,v 1.11 2003/08/28 12:54:34 markus Exp $ */ 1/* $OpenBSD: monitor.h,v 1.8 2002/09/26 11:38:43 markus Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -49,15 +49,9 @@ enum monitor_reqtype {
49 MONITOR_REQ_RSAKEYALLOWED, MONITOR_ANS_RSAKEYALLOWED, 49 MONITOR_REQ_RSAKEYALLOWED, MONITOR_ANS_RSAKEYALLOWED,
50 MONITOR_REQ_RSACHALLENGE, MONITOR_ANS_RSACHALLENGE, 50 MONITOR_REQ_RSACHALLENGE, MONITOR_ANS_RSACHALLENGE,
51 MONITOR_REQ_RSARESPONSE, MONITOR_ANS_RSARESPONSE, 51 MONITOR_REQ_RSARESPONSE, MONITOR_ANS_RSARESPONSE,
52 MONITOR_REQ_GSSSETUP, MONITOR_ANS_GSSSETUP, 52 MONITOR_REQ_KRB4, MONITOR_ANS_KRB4,
53 MONITOR_REQ_GSSSTEP, MONITOR_ANS_GSSSTEP, 53 MONITOR_REQ_KRB5, MONITOR_ANS_KRB5,
54 MONITOR_REQ_GSSUSEROK, MONITOR_ANS_GSSUSEROK,
55 MONITOR_REQ_PAM_START, 54 MONITOR_REQ_PAM_START,
56 MONITOR_REQ_PAM_ACCOUNT, MONITOR_ANS_PAM_ACCOUNT,
57 MONITOR_REQ_PAM_INIT_CTX, MONITOR_ANS_PAM_INIT_CTX,
58 MONITOR_REQ_PAM_QUERY, MONITOR_ANS_PAM_QUERY,
59 MONITOR_REQ_PAM_RESPOND, MONITOR_ANS_PAM_RESPOND,
60 MONITOR_REQ_PAM_FREE_CTX, MONITOR_ANS_PAM_FREE_CTX,
61 MONITOR_REQ_TERM 55 MONITOR_REQ_TERM
62}; 56};
63 57
diff --git a/monitor_mm.c b/monitor_mm.c
index e57c87cc2..b4a6e40c9 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -30,6 +30,7 @@ RCSID("$OpenBSD: monitor_mm.c,v 1.8 2002/08/02 14:43:15 millert Exp $");
30#include <sys/mman.h> 30#include <sys/mman.h>
31#endif 31#endif
32 32
33#include "openbsd-compat/xmmap.h"
33#include "ssh.h" 34#include "ssh.h"
34#include "xmalloc.h" 35#include "xmalloc.h"
35#include "log.h" 36#include "log.h"
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 4034d569c..c9714138a 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: monitor_wrap.c,v 1.31 2003/08/28 12:54:34 markus Exp $"); 28RCSID("$OpenBSD: monitor_wrap.c,v 1.24 2003/04/01 10:22:21 markus Exp $");
29 29
30#include <openssl/bn.h> 30#include <openssl/bn.h>
31#include <openssl/dh.h> 31#include <openssl/dh.h>
@@ -47,16 +47,11 @@ RCSID("$OpenBSD: monitor_wrap.c,v 1.31 2003/08/28 12:54:34 markus Exp $");
47#include "atomicio.h" 47#include "atomicio.h"
48#include "monitor_fdpass.h" 48#include "monitor_fdpass.h"
49#include "getput.h" 49#include "getput.h"
50#include "servconf.h"
51 50
52#include "auth.h" 51#include "auth.h"
53#include "channels.h" 52#include "channels.h"
54#include "session.h" 53#include "session.h"
55 54
56#ifdef GSSAPI
57#include "ssh-gss.h"
58#endif
59
60/* Imports */ 55/* Imports */
61extern int compat20; 56extern int compat20;
62extern Newkeys *newkeys[]; 57extern Newkeys *newkeys[];
@@ -64,7 +59,6 @@ extern z_stream incoming_stream;
64extern z_stream outgoing_stream; 59extern z_stream outgoing_stream;
65extern struct monitor *pmonitor; 60extern struct monitor *pmonitor;
66extern Buffer input, output; 61extern Buffer input, output;
67extern ServerOptions options;
68 62
69void 63void
70mm_request_send(int socket, enum monitor_reqtype type, Buffer *m) 64mm_request_send(int socket, enum monitor_reqtype type, Buffer *m)
@@ -76,9 +70,9 @@ mm_request_send(int socket, enum monitor_reqtype type, Buffer *m)
76 70
77 PUT_32BIT(buf, mlen + 1); 71 PUT_32BIT(buf, mlen + 1);
78 buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */ 72 buf[4] = (u_char) type; /* 1st byte of payload is mesg-type */
79 if (atomicio(vwrite, socket, buf, sizeof(buf)) != sizeof(buf)) 73 if (atomicio(write, socket, buf, sizeof(buf)) != sizeof(buf))
80 fatal("%s: write", __func__); 74 fatal("%s: write", __func__);
81 if (atomicio(vwrite, socket, buffer_ptr(m), mlen) != mlen) 75 if (atomicio(write, socket, buffer_ptr(m), mlen) != mlen)
82 fatal("%s: write", __func__); 76 fatal("%s: write", __func__);
83} 77}
84 78
@@ -526,8 +520,6 @@ mm_send_keystate(struct monitor *pmonitor)
526 Buffer m; 520 Buffer m;
527 u_char *blob, *p; 521 u_char *blob, *p;
528 u_int bloblen, plen; 522 u_int bloblen, plen;
529 u_int32_t seqnr, packets;
530 u_int64_t blocks;
531 523
532 buffer_init(&m); 524 buffer_init(&m);
533 525
@@ -576,14 +568,8 @@ mm_send_keystate(struct monitor *pmonitor)
576 buffer_put_string(&m, blob, bloblen); 568 buffer_put_string(&m, blob, bloblen);
577 xfree(blob); 569 xfree(blob);
578 570
579 packet_get_state(MODE_OUT, &seqnr, &blocks, &packets); 571 buffer_put_int(&m, packet_get_seqnr(MODE_OUT));
580 buffer_put_int(&m, seqnr); 572 buffer_put_int(&m, packet_get_seqnr(MODE_IN));
581 buffer_put_int64(&m, blocks);
582 buffer_put_int(&m, packets);
583 packet_get_state(MODE_IN, &seqnr, &blocks, &packets);
584 buffer_put_int(&m, seqnr);
585 buffer_put_int64(&m, blocks);
586 buffer_put_int(&m, packets);
587 573
588 debug3("%s: New keys have been sent", __func__); 574 debug3("%s: New keys have been sent", __func__);
589 skip: 575 skip:
@@ -675,8 +661,6 @@ mm_start_pam(char *user)
675 Buffer m; 661 Buffer m;
676 662
677 debug3("%s entering", __func__); 663 debug3("%s entering", __func__);
678 if (!options.use_pam)
679 fatal("UsePAM=no, but ended up in %s anyway", __func__);
680 664
681 buffer_init(&m); 665 buffer_init(&m);
682 buffer_put_cstring(&m, user); 666 buffer_put_cstring(&m, user);
@@ -685,112 +669,6 @@ mm_start_pam(char *user)
685 669
686 buffer_free(&m); 670 buffer_free(&m);
687} 671}
688
689u_int
690mm_do_pam_account(void)
691{
692 Buffer m;
693 u_int ret;
694
695 debug3("%s entering", __func__);
696 if (!options.use_pam)
697 fatal("UsePAM=no, but ended up in %s anyway", __func__);
698
699 buffer_init(&m);
700 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_ACCOUNT, &m);
701
702 mm_request_receive_expect(pmonitor->m_recvfd,
703 MONITOR_ANS_PAM_ACCOUNT, &m);
704 ret = buffer_get_int(&m);
705
706 buffer_free(&m);
707
708 debug3("%s returning %d", __func__, ret);
709
710 return (ret);
711}
712
713void *
714mm_sshpam_init_ctx(Authctxt *authctxt)
715{
716 Buffer m;
717 int success;
718
719 debug3("%s", __func__);
720 buffer_init(&m);
721 buffer_put_cstring(&m, authctxt->user);
722 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_INIT_CTX, &m);
723 debug3("%s: waiting for MONITOR_ANS_PAM_INIT_CTX", __func__);
724 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_INIT_CTX, &m);
725 success = buffer_get_int(&m);
726 if (success == 0) {
727 debug3("%s: pam_init_ctx failed", __func__);
728 buffer_free(&m);
729 return (NULL);
730 }
731 buffer_free(&m);
732 return (authctxt);
733}
734
735int
736mm_sshpam_query(void *ctx, char **name, char **info,
737 u_int *num, char ***prompts, u_int **echo_on)
738{
739 Buffer m;
740 int i, ret;
741
742 debug3("%s", __func__);
743 buffer_init(&m);
744 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_QUERY, &m);
745 debug3("%s: waiting for MONITOR_ANS_PAM_QUERY", __func__);
746 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_QUERY, &m);
747 ret = buffer_get_int(&m);
748 debug3("%s: pam_query returned %d", __func__, ret);
749 *name = buffer_get_string(&m, NULL);
750 *info = buffer_get_string(&m, NULL);
751 *num = buffer_get_int(&m);
752 *prompts = xmalloc((*num + 1) * sizeof(char *));
753 *echo_on = xmalloc((*num + 1) * sizeof(u_int));
754 for (i = 0; i < *num; ++i) {
755 (*prompts)[i] = buffer_get_string(&m, NULL);
756 (*echo_on)[i] = buffer_get_int(&m);
757 }
758 buffer_free(&m);
759 return (ret);
760}
761
762int
763mm_sshpam_respond(void *ctx, u_int num, char **resp)
764{
765 Buffer m;
766 int i, ret;
767
768 debug3("%s", __func__);
769 buffer_init(&m);
770 buffer_put_int(&m, num);
771 for (i = 0; i < num; ++i)
772 buffer_put_cstring(&m, resp[i]);
773 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_RESPOND, &m);
774 debug3("%s: waiting for MONITOR_ANS_PAM_RESPOND", __func__);
775 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_RESPOND, &m);
776 ret = buffer_get_int(&m);
777 debug3("%s: pam_respond returned %d", __func__, ret);
778 buffer_free(&m);
779 return (ret);
780}
781
782void
783mm_sshpam_free_ctx(void *ctxtp)
784{
785 Buffer m;
786
787 debug3("%s", __func__);
788 buffer_init(&m);
789 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_FREE_CTX, &m);
790 debug3("%s: waiting for MONITOR_ANS_PAM_FREE_CTX", __func__);
791 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_FREE_CTX, &m);
792 buffer_free(&m);
793}
794#endif /* USE_PAM */ 672#endif /* USE_PAM */
795 673
796/* Request process termination */ 674/* Request process termination */
@@ -1071,69 +949,73 @@ mm_auth_rsa_verify_response(Key *key, BIGNUM *p, u_char response[16])
1071 return (success); 949 return (success);
1072} 950}
1073 951
1074#ifdef GSSAPI 952#ifdef KRB4
1075OM_uint32 953int
1076mm_ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid) 954mm_auth_krb4(Authctxt *authctxt, void *_auth, char **client, void *_reply)
1077{ 955{
1078 Buffer m; 956 KTEXT auth, reply;
1079 OM_uint32 major; 957 Buffer m;
1080 958 u_int rlen;
1081 /* Client doesn't get to see the context */ 959 int success = 0;
1082 *ctx = NULL; 960 char *p;
1083
1084 buffer_init(&m);
1085 buffer_put_string(&m, oid->elements, oid->length);
1086
1087 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSETUP, &m);
1088 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSETUP, &m);
1089
1090 major = buffer_get_int(&m);
1091
1092 buffer_free(&m);
1093 return (major);
1094}
1095 961
1096OM_uint32 962 debug3("%s entering", __func__);
1097mm_ssh_gssapi_accept_ctx(Gssctxt *ctx, gss_buffer_desc *in, 963 auth = _auth;
1098 gss_buffer_desc *out, OM_uint32 *flags) 964 reply = _reply;
1099{
1100 Buffer m;
1101 OM_uint32 major;
1102 u_int len;
1103 965
1104 buffer_init(&m); 966 buffer_init(&m);
1105 buffer_put_string(&m, in->value, in->length); 967 buffer_put_string(&m, auth->dat, auth->length);
1106
1107 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSTEP, &m);
1108 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSTEP, &m);
1109 968
1110 major = buffer_get_int(&m); 969 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KRB4, &m);
1111 out->value = buffer_get_string(&m, &len); 970 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_KRB4, &m);
1112 out->length = len;
1113 if (flags)
1114 *flags = buffer_get_int(&m);
1115 971
972 success = buffer_get_int(&m);
973 if (success) {
974 *client = buffer_get_string(&m, NULL);
975 p = buffer_get_string(&m, &rlen);
976 if (rlen >= MAX_KTXT_LEN)
977 fatal("%s: reply from monitor too large", __func__);
978 reply->length = rlen;
979 memcpy(reply->dat, p, rlen);
980 memset(p, 0, rlen);
981 xfree(p);
982 }
1116 buffer_free(&m); 983 buffer_free(&m);
1117 984 return (success);
1118 return (major);
1119} 985}
986#endif
1120 987
988#ifdef KRB5
1121int 989int
1122mm_ssh_gssapi_userok(char *user) 990mm_auth_krb5(void *ctx, void *argp, char **userp, void *resp)
1123{ 991{
992 krb5_data *tkt, *reply;
1124 Buffer m; 993 Buffer m;
1125 int authenticated = 0; 994 int success;
995
996 debug3("%s entering", __func__);
997 tkt = (krb5_data *) argp;
998 reply = (krb5_data *) resp;
1126 999
1127 buffer_init(&m); 1000 buffer_init(&m);
1001 buffer_put_string(&m, tkt->data, tkt->length);
1128 1002
1129 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUSEROK, &m); 1003 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KRB5, &m);
1130 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUSEROK, 1004 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_KRB5, &m);
1131 &m);
1132 1005
1133 authenticated = buffer_get_int(&m); 1006 success = buffer_get_int(&m);
1007 if (success) {
1008 u_int len;
1009
1010 *userp = buffer_get_string(&m, NULL);
1011 reply->data = buffer_get_string(&m, &len);
1012 reply->length = len;
1013 } else {
1014 memset(reply, 0, sizeof(*reply));
1015 *userp = NULL;
1016 }
1134 1017
1135 buffer_free(&m); 1018 buffer_free(&m);
1136 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); 1019 return (success);
1137 return (authenticated);
1138} 1020}
1139#endif /* GSSAPI */ 1021#endif
diff --git a/monitor_wrap.h b/monitor_wrap.h
index 5e0334588..d960a3d0b 100644
--- a/monitor_wrap.h
+++ b/monitor_wrap.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.h,v 1.11 2003/08/28 12:54:34 markus Exp $ */ 1/* $OpenBSD: monitor_wrap.h,v 1.8 2002/09/26 11:38:43 markus Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -55,21 +55,8 @@ int mm_auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **);
55int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *); 55int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *);
56BIGNUM *mm_auth_rsa_generate_challenge(Key *); 56BIGNUM *mm_auth_rsa_generate_challenge(Key *);
57 57
58#ifdef GSSAPI
59#include "ssh-gss.h"
60OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **ctxt, gss_OID oid);
61OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *ctxt,
62 gss_buffer_desc *recv, gss_buffer_desc *send, OM_uint32 *flags);
63int mm_ssh_gssapi_userok(char *user);
64#endif
65
66#ifdef USE_PAM 58#ifdef USE_PAM
67void mm_start_pam(char *); 59void mm_start_pam(char *);
68u_int mm_do_pam_account(void);
69void *mm_sshpam_init_ctx(struct Authctxt *);
70int mm_sshpam_query(void *, char **, char **, u_int *, char ***, u_int **);
71int mm_sshpam_respond(void *, u_int, char **);
72void mm_sshpam_free_ctx(void *);
73#endif 60#endif
74 61
75void mm_terminate(void); 62void mm_terminate(void);
@@ -96,6 +83,16 @@ int mm_bsdauth_respond(void *, u_int, char **);
96int mm_skey_query(void *, char **, char **, u_int *, char ***, u_int **); 83int mm_skey_query(void *, char **, char **, u_int *, char ***, u_int **);
97int mm_skey_respond(void *, u_int, char **); 84int mm_skey_respond(void *, u_int, char **);
98 85
86/* auth_krb */
87#ifdef KRB4
88int mm_auth_krb4(struct Authctxt *, void *, char **, void *);
89#endif
90#ifdef KRB5
91/* auth and reply are really krb5_data objects, but we don't want to
92 * include all of the krb5 headers here */
93int mm_auth_krb5(void *authctxt, void *auth, char **client, void *reply);
94#endif
95
99/* zlib allocation hooks */ 96/* zlib allocation hooks */
100 97
101void *mm_zalloc(struct mm_master *, u_int, u_int); 98void *mm_zalloc(struct mm_master *, u_int, u_int);
diff --git a/msg.c b/msg.c
index 6a806c3f5..5d266c207 100644
--- a/msg.c
+++ b/msg.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: msg.c,v 1.6 2003/06/28 16:23:06 deraadt Exp $"); 25RCSID("$OpenBSD: msg.c,v 1.5 2002/12/19 00:07:02 djm Exp $");
26 26
27#include "buffer.h" 27#include "buffer.h"
28#include "getput.h" 28#include "getput.h"
@@ -40,9 +40,9 @@ ssh_msg_send(int fd, u_char type, Buffer *m)
40 40
41 PUT_32BIT(buf, mlen + 1); 41 PUT_32BIT(buf, mlen + 1);
42 buf[4] = type; /* 1st byte of payload is mesg-type */ 42 buf[4] = type; /* 1st byte of payload is mesg-type */
43 if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) 43 if (atomicio(write, fd, buf, sizeof(buf)) != sizeof(buf))
44 fatal("ssh_msg_send: write"); 44 fatal("ssh_msg_send: write");
45 if (atomicio(vwrite, fd, buffer_ptr(m), mlen) != mlen) 45 if (atomicio(write, fd, buffer_ptr(m), mlen) != mlen)
46 fatal("ssh_msg_send: write"); 46 fatal("ssh_msg_send: write");
47} 47}
48 48
diff --git a/myproposal.h b/myproposal.h
index 8b431d9d2..62f5cfb65 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: myproposal.h,v 1.15 2003/05/17 04:27:52 markus Exp $ */ 1/* $OpenBSD: myproposal.h,v 1.14 2002/04/03 09:26:11 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -27,8 +27,7 @@
27#define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss" 27#define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss"
28#define KEX_DEFAULT_ENCRYPT \ 28#define KEX_DEFAULT_ENCRYPT \
29 "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour," \ 29 "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour," \
30 "aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se," \ 30 "aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se"
31 "aes128-ctr,aes192-ctr,aes256-ctr"
32#define KEX_DEFAULT_MAC \ 31#define KEX_DEFAULT_MAC \
33 "hmac-md5,hmac-sha1,hmac-ripemd160," \ 32 "hmac-md5,hmac-sha1,hmac-ripemd160," \
34 "hmac-ripemd160@openssh.com," \ 33 "hmac-ripemd160@openssh.com," \
diff --git a/nchan.c b/nchan.c
index 3138cdd19..bce7325b3 100644
--- a/nchan.c
+++ b/nchan.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: nchan.c,v 1.49 2003/08/29 10:04:36 markus Exp $"); 26RCSID("$OpenBSD: nchan.c,v 1.47 2002/06/19 00:27:55 deraadt Exp $");
27 27
28#include "ssh1.h" 28#include "ssh1.h"
29#include "ssh2.h" 29#include "ssh2.h"
@@ -83,7 +83,7 @@ chan_set_istate(Channel *c, u_int next)
83{ 83{
84 if (c->istate > CHAN_INPUT_CLOSED || next > CHAN_INPUT_CLOSED) 84 if (c->istate > CHAN_INPUT_CLOSED || next > CHAN_INPUT_CLOSED)
85 fatal("chan_set_istate: bad state %d -> %d", c->istate, next); 85 fatal("chan_set_istate: bad state %d -> %d", c->istate, next);
86 debug2("channel %d: input %s -> %s", c->self, istates[c->istate], 86 debug("channel %d: input %s -> %s", c->self, istates[c->istate],
87 istates[next]); 87 istates[next]);
88 c->istate = next; 88 c->istate = next;
89} 89}
@@ -92,7 +92,7 @@ chan_set_ostate(Channel *c, u_int next)
92{ 92{
93 if (c->ostate > CHAN_OUTPUT_CLOSED || next > CHAN_OUTPUT_CLOSED) 93 if (c->ostate > CHAN_OUTPUT_CLOSED || next > CHAN_OUTPUT_CLOSED)
94 fatal("chan_set_ostate: bad state %d -> %d", c->ostate, next); 94 fatal("chan_set_ostate: bad state %d -> %d", c->ostate, next);
95 debug2("channel %d: output %s -> %s", c->self, ostates[c->ostate], 95 debug("channel %d: output %s -> %s", c->self, ostates[c->ostate],
96 ostates[next]); 96 ostates[next]);
97 c->ostate = next; 97 c->ostate = next;
98} 98}
@@ -104,7 +104,7 @@ chan_set_ostate(Channel *c, u_int next)
104static void 104static void
105chan_rcvd_oclose1(Channel *c) 105chan_rcvd_oclose1(Channel *c)
106{ 106{
107 debug2("channel %d: rcvd oclose", c->self); 107 debug("channel %d: rcvd oclose", c->self);
108 switch (c->istate) { 108 switch (c->istate) {
109 case CHAN_INPUT_WAIT_OCLOSE: 109 case CHAN_INPUT_WAIT_OCLOSE:
110 chan_set_istate(c, CHAN_INPUT_CLOSED); 110 chan_set_istate(c, CHAN_INPUT_CLOSED);
@@ -128,7 +128,7 @@ chan_rcvd_oclose1(Channel *c)
128void 128void
129chan_read_failed(Channel *c) 129chan_read_failed(Channel *c)
130{ 130{
131 debug2("channel %d: read failed", c->self); 131 debug("channel %d: read failed", c->self);
132 switch (c->istate) { 132 switch (c->istate) {
133 case CHAN_INPUT_OPEN: 133 case CHAN_INPUT_OPEN:
134 chan_shutdown_read(c); 134 chan_shutdown_read(c);
@@ -143,7 +143,7 @@ chan_read_failed(Channel *c)
143void 143void
144chan_ibuf_empty(Channel *c) 144chan_ibuf_empty(Channel *c)
145{ 145{
146 debug2("channel %d: ibuf empty", c->self); 146 debug("channel %d: ibuf empty", c->self);
147 if (buffer_len(&c->input)) { 147 if (buffer_len(&c->input)) {
148 error("channel %d: chan_ibuf_empty for non empty buffer", 148 error("channel %d: chan_ibuf_empty for non empty buffer",
149 c->self); 149 c->self);
@@ -169,7 +169,7 @@ chan_ibuf_empty(Channel *c)
169static void 169static void
170chan_rcvd_ieof1(Channel *c) 170chan_rcvd_ieof1(Channel *c)
171{ 171{
172 debug2("channel %d: rcvd ieof", c->self); 172 debug("channel %d: rcvd ieof", c->self);
173 switch (c->ostate) { 173 switch (c->ostate) {
174 case CHAN_OUTPUT_OPEN: 174 case CHAN_OUTPUT_OPEN:
175 chan_set_ostate(c, CHAN_OUTPUT_WAIT_DRAIN); 175 chan_set_ostate(c, CHAN_OUTPUT_WAIT_DRAIN);
@@ -186,7 +186,7 @@ chan_rcvd_ieof1(Channel *c)
186static void 186static void
187chan_write_failed1(Channel *c) 187chan_write_failed1(Channel *c)
188{ 188{
189 debug2("channel %d: write failed", c->self); 189 debug("channel %d: write failed", c->self);
190 switch (c->ostate) { 190 switch (c->ostate) {
191 case CHAN_OUTPUT_OPEN: 191 case CHAN_OUTPUT_OPEN:
192 chan_shutdown_write(c); 192 chan_shutdown_write(c);
@@ -207,7 +207,7 @@ chan_write_failed1(Channel *c)
207void 207void
208chan_obuf_empty(Channel *c) 208chan_obuf_empty(Channel *c)
209{ 209{
210 debug2("channel %d: obuf empty", c->self); 210 debug("channel %d: obuf empty", c->self);
211 if (buffer_len(&c->output)) { 211 if (buffer_len(&c->output)) {
212 error("channel %d: chan_obuf_empty for non empty buffer", 212 error("channel %d: chan_obuf_empty for non empty buffer",
213 c->self); 213 c->self);
@@ -229,7 +229,7 @@ chan_obuf_empty(Channel *c)
229static void 229static void
230chan_send_ieof1(Channel *c) 230chan_send_ieof1(Channel *c)
231{ 231{
232 debug2("channel %d: send ieof", c->self); 232 debug("channel %d: send ieof", c->self);
233 switch (c->istate) { 233 switch (c->istate) {
234 case CHAN_INPUT_OPEN: 234 case CHAN_INPUT_OPEN:
235 case CHAN_INPUT_WAIT_DRAIN: 235 case CHAN_INPUT_WAIT_DRAIN:
@@ -246,7 +246,7 @@ chan_send_ieof1(Channel *c)
246static void 246static void
247chan_send_oclose1(Channel *c) 247chan_send_oclose1(Channel *c)
248{ 248{
249 debug2("channel %d: send oclose", c->self); 249 debug("channel %d: send oclose", c->self);
250 switch (c->ostate) { 250 switch (c->ostate) {
251 case CHAN_OUTPUT_OPEN: 251 case CHAN_OUTPUT_OPEN:
252 case CHAN_OUTPUT_WAIT_DRAIN: 252 case CHAN_OUTPUT_WAIT_DRAIN:
@@ -268,7 +268,7 @@ chan_send_oclose1(Channel *c)
268static void 268static void
269chan_rcvd_close2(Channel *c) 269chan_rcvd_close2(Channel *c)
270{ 270{
271 debug2("channel %d: rcvd close", c->self); 271 debug("channel %d: rcvd close", c->self);
272 if (c->flags & CHAN_CLOSE_RCVD) 272 if (c->flags & CHAN_CLOSE_RCVD)
273 error("channel %d: protocol error: close rcvd twice", c->self); 273 error("channel %d: protocol error: close rcvd twice", c->self);
274 c->flags |= CHAN_CLOSE_RCVD; 274 c->flags |= CHAN_CLOSE_RCVD;
@@ -301,7 +301,7 @@ chan_rcvd_close2(Channel *c)
301static void 301static void
302chan_rcvd_eof2(Channel *c) 302chan_rcvd_eof2(Channel *c)
303{ 303{
304 debug2("channel %d: rcvd eof", c->self); 304 debug("channel %d: rcvd eof", c->self);
305 c->flags |= CHAN_EOF_RCVD; 305 c->flags |= CHAN_EOF_RCVD;
306 if (c->ostate == CHAN_OUTPUT_OPEN) 306 if (c->ostate == CHAN_OUTPUT_OPEN)
307 chan_set_ostate(c, CHAN_OUTPUT_WAIT_DRAIN); 307 chan_set_ostate(c, CHAN_OUTPUT_WAIT_DRAIN);
@@ -309,7 +309,7 @@ chan_rcvd_eof2(Channel *c)
309static void 309static void
310chan_write_failed2(Channel *c) 310chan_write_failed2(Channel *c)
311{ 311{
312 debug2("channel %d: write failed", c->self); 312 debug("channel %d: write failed", c->self);
313 switch (c->ostate) { 313 switch (c->ostate) {
314 case CHAN_OUTPUT_OPEN: 314 case CHAN_OUTPUT_OPEN:
315 case CHAN_OUTPUT_WAIT_DRAIN: 315 case CHAN_OUTPUT_WAIT_DRAIN:
@@ -325,7 +325,7 @@ chan_write_failed2(Channel *c)
325static void 325static void
326chan_send_eof2(Channel *c) 326chan_send_eof2(Channel *c)
327{ 327{
328 debug2("channel %d: send eof", c->self); 328 debug("channel %d: send eof", c->self);
329 switch (c->istate) { 329 switch (c->istate) {
330 case CHAN_INPUT_WAIT_DRAIN: 330 case CHAN_INPUT_WAIT_DRAIN:
331 packet_start(SSH2_MSG_CHANNEL_EOF); 331 packet_start(SSH2_MSG_CHANNEL_EOF);
@@ -342,7 +342,7 @@ chan_send_eof2(Channel *c)
342static void 342static void
343chan_send_close2(Channel *c) 343chan_send_close2(Channel *c)
344{ 344{
345 debug2("channel %d: send close", c->self); 345 debug("channel %d: send close", c->self);
346 if (c->ostate != CHAN_OUTPUT_CLOSED || 346 if (c->ostate != CHAN_OUTPUT_CLOSED ||
347 c->istate != CHAN_INPUT_CLOSED) { 347 c->istate != CHAN_INPUT_CLOSED) {
348 error("channel %d: cannot send close for istate/ostate %d/%d", 348 error("channel %d: cannot send close for istate/ostate %d/%d",
@@ -398,13 +398,13 @@ int
398chan_is_dead(Channel *c, int send) 398chan_is_dead(Channel *c, int send)
399{ 399{
400 if (c->type == SSH_CHANNEL_ZOMBIE) { 400 if (c->type == SSH_CHANNEL_ZOMBIE) {
401 debug2("channel %d: zombie", c->self); 401 debug("channel %d: zombie", c->self);
402 return 1; 402 return 1;
403 } 403 }
404 if (c->istate != CHAN_INPUT_CLOSED || c->ostate != CHAN_OUTPUT_CLOSED) 404 if (c->istate != CHAN_INPUT_CLOSED || c->ostate != CHAN_OUTPUT_CLOSED)
405 return 0; 405 return 0;
406 if (!compat20) { 406 if (!compat20) {
407 debug2("channel %d: is dead", c->self); 407 debug("channel %d: is dead", c->self);
408 return 1; 408 return 1;
409 } 409 }
410 if ((datafellows & SSH_BUG_EXTEOF) && 410 if ((datafellows & SSH_BUG_EXTEOF) &&
@@ -421,7 +421,7 @@ chan_is_dead(Channel *c, int send)
421 } else { 421 } else {
422 /* channel would be dead if we sent a close */ 422 /* channel would be dead if we sent a close */
423 if (c->flags & CHAN_CLOSE_RCVD) { 423 if (c->flags & CHAN_CLOSE_RCVD) {
424 debug2("channel %d: almost dead", 424 debug("channel %d: almost dead",
425 c->self); 425 c->self);
426 return 1; 426 return 1;
427 } 427 }
@@ -429,7 +429,7 @@ chan_is_dead(Channel *c, int send)
429 } 429 }
430 if ((c->flags & CHAN_CLOSE_SENT) && 430 if ((c->flags & CHAN_CLOSE_SENT) &&
431 (c->flags & CHAN_CLOSE_RCVD)) { 431 (c->flags & CHAN_CLOSE_RCVD)) {
432 debug2("channel %d: is dead", c->self); 432 debug("channel %d: is dead", c->self);
433 return 1; 433 return 1;
434 } 434 }
435 return 0; 435 return 0;
@@ -443,15 +443,15 @@ chan_shutdown_write(Channel *c)
443 if (compat20 && c->type == SSH_CHANNEL_LARVAL) 443 if (compat20 && c->type == SSH_CHANNEL_LARVAL)
444 return; 444 return;
445 /* shutdown failure is allowed if write failed already */ 445 /* shutdown failure is allowed if write failed already */
446 debug2("channel %d: close_write", c->self); 446 debug("channel %d: close_write", c->self);
447 if (c->sock != -1) { 447 if (c->sock != -1) {
448 if (shutdown(c->sock, SHUT_WR) < 0) 448 if (shutdown(c->sock, SHUT_WR) < 0)
449 debug2("channel %d: chan_shutdown_write: " 449 debug("channel %d: chan_shutdown_write: "
450 "shutdown() failed for fd%d: %.100s", 450 "shutdown() failed for fd%d: %.100s",
451 c->self, c->sock, strerror(errno)); 451 c->self, c->sock, strerror(errno));
452 } else { 452 } else {
453 if (channel_close_fd(&c->wfd) < 0) 453 if (channel_close_fd(&c->wfd) < 0)
454 logit("channel %d: chan_shutdown_write: " 454 log("channel %d: chan_shutdown_write: "
455 "close() failed for fd%d: %.100s", 455 "close() failed for fd%d: %.100s",
456 c->self, c->wfd, strerror(errno)); 456 c->self, c->wfd, strerror(errno));
457 } 457 }
@@ -461,7 +461,7 @@ chan_shutdown_read(Channel *c)
461{ 461{
462 if (compat20 && c->type == SSH_CHANNEL_LARVAL) 462 if (compat20 && c->type == SSH_CHANNEL_LARVAL)
463 return; 463 return;
464 debug2("channel %d: close_read", c->self); 464 debug("channel %d: close_read", c->self);
465 if (c->sock != -1) { 465 if (c->sock != -1) {
466 /* 466 /*
467 * shutdown(sock, SHUT_READ) may return ENOTCONN if the 467 * shutdown(sock, SHUT_READ) may return ENOTCONN if the
@@ -476,7 +476,7 @@ chan_shutdown_read(Channel *c)
476 strerror(errno)); 476 strerror(errno));
477 } else { 477 } else {
478 if (channel_close_fd(&c->rfd) < 0) 478 if (channel_close_fd(&c->rfd) < 0)
479 logit("channel %d: chan_shutdown_read: " 479 log("channel %d: chan_shutdown_read: "
480 "close() failed for fd%d: %.100s", 480 "close() failed for fd%d: %.100s",
481 c->self, c->rfd, strerror(errno)); 481 c->self, c->rfd, strerror(errno));
482 } 482 }
diff --git a/openbsd-compat/Makefile.in b/openbsd-compat/Makefile.in
index c48593f7b..8615e3633 100644
--- a/openbsd-compat/Makefile.in
+++ b/openbsd-compat/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.28 2003/07/24 06:52:14 mouring Exp $ 1# $Id: Makefile.in,v 1.25 2003/02/24 01:55:56 djm Exp $
2 2
3sysconfdir=@sysconfdir@ 3sysconfdir=@sysconfdir@
4piddir=@piddir@ 4piddir=@piddir@
@@ -16,9 +16,9 @@ RANLIB=@RANLIB@
16INSTALL=@INSTALL@ 16INSTALL=@INSTALL@
17LDFLAGS=-L. @LDFLAGS@ 17LDFLAGS=-L. @LDFLAGS@
18 18
19OPENBSD=base64.o basename.o bindresvport.o daemon.o dirname.o getcwd.o getgrouplist.o getopt.o getrrsetbyname.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o readpassphrase.o realpath.o rresvport.o setenv.o setproctitle.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o vis.o 19OPENBSD=base64.o basename.o bindresvport.o daemon.o dirname.o getcwd.o getgrouplist.o getopt.o glob.o inet_aton.o inet_ntoa.o inet_ntop.o mktemp.o readpassphrase.o realpath.o rresvport.o setenv.o setproctitle.o sigact.o strlcat.o strlcpy.o strmode.o strsep.o vis.o
20 20
21COMPAT=bsd-arc4random.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-rfc2553.o xmmap.o xcrypt.o 21COMPAT=bsd-arc4random.o bsd-cray.o bsd-cygwin_util.o bsd-getpeereid.o bsd-misc.o bsd-nextstep.o bsd-snprintf.o bsd-waitpid.o fake-getaddrinfo.o fake-getnameinfo.o xmmap.o
22 22
23PORTS=port-irix.o port-aix.o 23PORTS=port-irix.o port-aix.o
24 24
diff --git a/openbsd-compat/base64.h b/openbsd-compat/base64.h
index 732c6b3f8..72db3ffc7 100644
--- a/openbsd-compat/base64.h
+++ b/openbsd-compat/base64.h
@@ -1,65 +1,23 @@
1/* $Id: base64.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */ 1/* $Id: base64.h,v 1.4 2003/02/24 04:45:43 djm Exp $ */
2
3/*
4 * Copyright (c) 1996 by Internet Software Consortium.
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
11 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
12 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
13 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
16 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
17 * SOFTWARE.
18 */
19
20/*
21 * Portions Copyright (c) 1995 by International Business Machines, Inc.
22 *
23 * International Business Machines, Inc. (hereinafter called IBM) grants
24 * permission under its copyrights to use, copy, modify, and distribute this
25 * Software with or without fee, provided that the above copyright notice and
26 * all paragraphs of this notice appear in all copies, and that the name of IBM
27 * not be used in connection with the marketing of any product incorporating
28 * the Software or modifications thereof, without specific, written prior
29 * permission.
30 *
31 * To the extent it has a right to do so, IBM grants an immunity from suit
32 * under its patents, if any, for the use, sale or manufacture of products to
33 * the extent that such products are used for performing Domain Name System
34 * dynamic updates in TCP/IP networks by means of the Software. No immunity is
35 * granted for any product per se or for any other function of any product.
36 *
37 * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
38 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
39 * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
40 * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
41 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
42 * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
43 */
44 2
45#ifndef _BSD_BASE64_H 3#ifndef _BSD_BASE64_H
46#define _BSD_BASE64_H 4#define _BSD_BASE64_H
47 5
48#include "includes.h" 6#include "config.h"
49 7
50#ifndef HAVE___B64_NTOP 8#ifndef HAVE___B64_NTOP
51# ifndef HAVE_B64_NTOP 9# ifndef HAVE_B64_NTOP
52int b64_ntop(u_char const *src, size_t srclength, char *target, 10int b64_ntop(u_char const *src, size_t srclength, char *target,
53 size_t targsize); 11 size_t targsize);
54# endif /* !HAVE_B64_NTOP */ 12# endif /* !HAVE_B64_NTOP */
55# define __b64_ntop(a,b,c,d) b64_ntop(a,b,c,d) 13# define __b64_ntop b64_ntop
56#endif /* HAVE___B64_NTOP */ 14#endif /* HAVE___B64_NTOP */
57 15
58#ifndef HAVE___B64_PTON 16#ifndef HAVE___B64_PTON
59# ifndef HAVE_B64_PTON 17# ifndef HAVE_B64_PTON
60int b64_pton(char const *src, u_char *target, size_t targsize); 18int b64_pton(char const *src, u_char *target, size_t targsize);
61# endif /* !HAVE_B64_PTON */ 19# endif /* !HAVE_B64_PTON */
62# define __b64_pton(a,b,c) b64_pton(a,b,c) 20# define __b64_pton b64_pton
63#endif /* HAVE___B64_PTON */ 21#endif /* HAVE___B64_PTON */
64 22
65#endif /* _BSD_BASE64_H */ 23#endif /* _BSD_BASE64_H */
diff --git a/openbsd-compat/basename.c b/openbsd-compat/basename.c
index 2054c8068..5a3823bc5 100644
--- a/openbsd-compat/basename.c
+++ b/openbsd-compat/basename.c
@@ -1,26 +1,37 @@
1/* $OpenBSD: basename.c,v 1.11 2003/06/17 21:56:23 millert Exp $ */ 1/* $OpenBSD: basename.c,v 1.8 2002/06/09 05:03:59 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
5 * All rights reserved.
5 * 6 *
6 * Permission to use, copy, modify, and distribute this software for any 7 * Redistribution and use in source and binary forms, with or without
7 * purpose with or without fee is hereby granted, provided that the above 8 * modification, are permitted provided that the following conditions
8 * copyright notice and this permission notice appear in all copies. 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
9 * 17 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 19 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 20 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 21 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 28 */
18
19#include "includes.h" 29#include "includes.h"
20#ifndef HAVE_BASENAME 30
31#if !defined(HAVE_BASENAME)
21 32
22#ifndef lint 33#ifndef lint
23static char rcsid[] = "$OpenBSD: basename.c,v 1.11 2003/06/17 21:56:23 millert Exp $"; 34static char rcsid[] = "$OpenBSD: basename.c,v 1.8 2002/06/09 05:03:59 deraadt Exp $";
24#endif /* not lint */ 35#endif /* not lint */
25 36
26char * 37char *
diff --git a/openbsd-compat/basename.h b/openbsd-compat/basename.h
new file mode 100644
index 000000000..a8bd6c17c
--- /dev/null
+++ b/openbsd-compat/basename.h
@@ -0,0 +1,12 @@
1/* $Id: basename.h,v 1.3 2003/02/25 03:32:16 djm Exp $ */
2
3#ifndef _BASENAME_H
4#define _BASENAME_H
5#include "config.h"
6
7#if !defined(HAVE_BASENAME)
8
9char *basename(const char *path);
10
11#endif /* !defined(HAVE_BASENAME) */
12#endif /* _BASENAME_H */
diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c
index 8a273f9b5..620f980ed 100644
--- a/openbsd-compat/bindresvport.c
+++ b/openbsd-compat/bindresvport.c
@@ -1,37 +1,48 @@
1/* This file has be substantially modified from the original OpenBSD source */ 1/* This file has be modified from the original OpenBSD source */
2
3/* $OpenBSD: bindresvport.c,v 1.15 2003/05/20 22:42:35 deraadt Exp $ */
4 2
5/* 3/*
6 * Copyright 1996, Jason Downs. All rights reserved. 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
7 * Copyright 1998, Theo de Raadt. All rights reserved. 5 * unrestricted use provided that this legend is included on all tape
8 * Copyright 2000, Damien Miller. All rights reserved. 6 * media and as a part of the software program in whole or part. Users
9 * 7 * may copy or modify Sun RPC without charge, but are not authorized
10 * Redistribution and use in source and binary forms, with or without 8 * to license or distribute it to anyone else except as part of a product or
11 * modification, are permitted provided that the following conditions 9 * program developed by the user.
12 * are met: 10 *
13 * 1. Redistributions of source code must retain the above copyright 11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
14 * notice, this list of conditions and the following disclaimer. 12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
15 * 2. Redistributions in binary form must reproduce the above copyright 13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
16 * notice, this list of conditions and the following disclaimer in the 14 *
17 * documentation and/or other materials provided with the distribution. 15 * Sun RPC is provided with no support and without any obligation on the
18 * 16 * part of Sun Microsystems, Inc. to assist in its use, correction,
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * modification or enhancement.
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 *
21 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * OR ANY PART THEREOF.
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 *
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * or profits or other special, indirect and consequential damages, even if
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * Sun has been advised of the possibility of such damages.
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 *
27 * Sun Microsystems, Inc.
28 * 2550 Garcia Avenue
29 * Mountain View, California 94043
29 */ 30 */
30 31
31#include "includes.h" 32#include "includes.h"
32 33
33#ifndef HAVE_BINDRESVPORT_SA 34#ifndef HAVE_BINDRESVPORT_SA
34 35
36#if defined(LIBC_SCCS) && !defined(lint)
37static char *rcsid = "$OpenBSD: bindresvport.c,v 1.13 2000/01/26 03:43:21 deraadt Exp $";
38#endif /* LIBC_SCCS and not lint */
39
40/*
41 * Copyright (c) 1987 by Sun Microsystems, Inc.
42 *
43 * Portions Copyright(C) 1996, Jason Downs. All rights reserved.
44 */
45
35#include "includes.h" 46#include "includes.h"
36 47
37#define STARTPORT 600 48#define STARTPORT 600
diff --git a/openbsd-compat/bindresvport.h b/openbsd-compat/bindresvport.h
new file mode 100644
index 000000000..b42f46983
--- /dev/null
+++ b/openbsd-compat/bindresvport.h
@@ -0,0 +1,12 @@
1/* $Id: bindresvport.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_BINDRESVPORT_H
4#define _BSD_BINDRESVPORT_H
5
6#include "config.h"
7
8#ifndef HAVE_BINDRESVPORT_SA
9int bindresvport_sa(int sd, struct sockaddr *sa);
10#endif /* !HAVE_BINDRESVPORT_SA */
11
12#endif /* _BSD_BINDRESVPORT_H */
diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c
index 5f890968e..dd08130d5 100644
--- a/openbsd-compat/bsd-arc4random.c
+++ b/openbsd-compat/bsd-arc4random.c
@@ -25,7 +25,7 @@
25#include "includes.h" 25#include "includes.h"
26#include "log.h" 26#include "log.h"
27 27
28RCSID("$Id: bsd-arc4random.c,v 1.7 2003/05/18 14:13:38 djm Exp $"); 28RCSID("$Id: bsd-arc4random.c,v 1.6 2003/03/17 05:13:53 djm Exp $");
29 29
30#ifndef HAVE_ARC4RANDOM 30#ifndef HAVE_ARC4RANDOM
31 31
@@ -70,7 +70,6 @@ void arc4random_stir(void)
70 fatal("Couldn't obtain random bytes (error %ld)", 70 fatal("Couldn't obtain random bytes (error %ld)",
71 ERR_get_error()); 71 ERR_get_error());
72 RC4_set_key(&rc4, sizeof(rand_buf), rand_buf); 72 RC4_set_key(&rc4, sizeof(rand_buf), rand_buf);
73 RC4(&rc4, sizeof(rand_buf), rand_buf, rand_buf);
74 memset(rand_buf, 0, sizeof(rand_buf)); 73 memset(rand_buf, 0, sizeof(rand_buf));
75 74
76 rc4_ready = REKEY_BYTES; 75 rc4_ready = REKEY_BYTES;
diff --git a/dns.h b/openbsd-compat/bsd-arc4random.h
index ba0ea9fb4..7af757b2d 100644
--- a/dns.h
+++ b/openbsd-compat/bsd-arc4random.h
@@ -1,8 +1,5 @@
1/* $OpenBSD: dns.h,v 1.3 2003/05/14 22:56:51 jakob Exp $ */
2
3/* 1/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved. 2 * Copyright (c) 1999-2000 Damien Miller. All rights reserved.
5 * Copyright (c) 2003 Jakob Schlyter. All rights reserved.
6 * 3 *
7 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
@@ -25,33 +22,16 @@
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 23 */
27 24
25/* $Id: bsd-arc4random.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
28 26
29#include "includes.h" 27#ifndef _BSD_ARC4RANDOM_H
30 28#define _BSD_ARC4RANDOM_H
31#ifdef DNS
32#ifndef DNS_H
33#define DNS_H
34
35enum sshfp_types {
36 SSHFP_KEY_RESERVED,
37 SSHFP_KEY_RSA,
38 SSHFP_KEY_DSA
39};
40
41enum sshfp_hashes {
42 SSHFP_HASH_RESERVED,
43 SSHFP_HASH_SHA1
44};
45
46#define DNS_RDATACLASS_IN 1
47#define DNS_RDATATYPE_SSHFP 44
48 29
49#define DNS_VERIFY_FAILED -1 30#include "config.h"
50#define DNS_VERIFY_OK 0
51#define DNS_VERIFY_ERROR 1
52 31
53int verify_host_key_dns(const char *, struct sockaddr *, Key *); 32#ifndef HAVE_ARC4RANDOM
54int export_dns_rr(const char *, Key *, FILE *, int); 33unsigned int arc4random(void);
34void arc4random_stir(void);
35#endif /* !HAVE_ARC4RANDOM */
55 36
56#endif /* DNS_H */ 37#endif /* _BSD_ARC4RANDOM_H */
57#endif /* DNS */
diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c
index f2ac428cc..edb3112b3 100644
--- a/openbsd-compat/bsd-cray.c
+++ b/openbsd-compat/bsd-cray.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: bsd-cray.c,v 1.12 2003/06/03 02:45:27 dtucker Exp $ 2 * $Id: bsd-cray.c,v 1.8 2002/09/26 00:38:51 tim Exp $
3 * 3 *
4 * bsd-cray.c 4 * bsd-cray.c
5 * 5 *
@@ -67,10 +67,10 @@
67 67
68extern ServerOptions options; 68extern ServerOptions options;
69 69
70char cray_tmpdir[TPATHSIZ + 1]; /* job TMPDIR path */ 70char cray_tmpdir[TPATHSIZ+1]; /* job TMPDIR path */
71 71
72struct sysv sysv; /* system security structure */ 72struct sysv sysv; /* system security structure */
73struct usrv usrv; /* user security structure */ 73struct usrv usrv; /* user security structure */
74 74
75/* 75/*
76 * Functions. 76 * Functions.
@@ -86,40 +86,39 @@ int cray_access_denied(char *);
86void 86void
87cray_login_failure(char *username, int errcode) 87cray_login_failure(char *username, int errcode)
88{ 88{
89 struct udb *ueptr; /* UDB pointer for username */ 89 struct udb *ueptr; /* UDB pointer for username */
90 ia_failure_t fsent; /* ia_failure structure */ 90 ia_failure_t fsent; /* ia_failure structure */
91 ia_failure_ret_t fret; /* ia_failure return stuff */ 91 ia_failure_ret_t fret; /* ia_failure return stuff */
92 struct jtab jtab; /* job table structure */ 92 struct jtab jtab; /* job table structure */
93 int jid = 0; /* job id */ 93 int jid = 0; /* job id */
94 94
95 if ((jid = getjtab(&jtab)) < 0) 95 if ((jid = getjtab(&jtab)) < 0) {
96 debug("cray_login_failure(): getjtab error"); 96 debug("cray_login_failure(): getjtab error");
97 97 }
98 getsysudb(); 98 getsysudb();
99 if ((ueptr = getudbnam(username)) == UDB_NULL) 99 if ((ueptr = getudbnam(username)) == UDB_NULL) {
100 debug("cray_login_failure(): getudbname() returned NULL"); 100 debug("cray_login_failure(): getudbname() returned NULL");
101 }
101 endudb(); 102 endudb();
102 103 fsent.revision = 0;
103 memset(&fsent, '\0', sizeof(fsent)); 104 fsent.uname = username;
104 fsent.revision = 0; 105 fsent.host = (char *)get_canonical_hostname(options.verify_reverse_mapping);
105 fsent.uname = username; 106 fsent.ttyn = "sshd";
106 fsent.host = (char *)get_canonical_hostname(options.use_dns); 107 fsent.caller = IA_SSHD;
107 fsent.ttyn = "sshd"; 108 fsent.flags = IA_INTERACTIVE;
108 fsent.caller = IA_SSHD; 109 fsent.ueptr = ueptr;
109 fsent.flags = IA_INTERACTIVE; 110 fsent.jid = jid;
110 fsent.ueptr = ueptr; 111 fsent.errcode = errcode;
111 fsent.jid = jid; 112 fsent.pwdp = NULL;
112 fsent.errcode = errcode; 113 fsent.exitcode = 0; /* dont exit in ia_failure() */
113 fsent.pwdp = NULL; 114
114 fsent.exitcode = 0; /* dont exit in ia_failure() */ 115 fret.revision = 0;
115 116 fret.normal = 0;
116 fret.revision = 0;
117 fret.normal = 0;
118 117
119 /* 118 /*
120 * Call ia_failure because of an login failure. 119 * Call ia_failure because of an login failure.
121 */ 120 */
122 ia_failure(&fsent, &fret); 121 ia_failure(&fsent,&fret);
123} 122}
124 123
125/* 124/*
@@ -128,316 +127,338 @@ cray_login_failure(char *username, int errcode)
128int 127int
129cray_access_denied(char *username) 128cray_access_denied(char *username)
130{ 129{
131 struct udb *ueptr; /* UDB pointer for username */ 130 struct udb *ueptr; /* UDB pointer for username */
132 int errcode; /* IA errorcode */ 131 int errcode; /* IA errorcode */
133 132
134 errcode = 0; 133 errcode = 0;
135 getsysudb(); 134 getsysudb();
136 if ((ueptr = getudbnam(username)) == UDB_NULL) 135 if ((ueptr = getudbnam(username)) == UDB_NULL) {
137 debug("cray_login_failure(): getudbname() returned NULL"); 136 debug("cray_login_failure(): getudbname() returned NULL");
137 }
138 endudb(); 138 endudb();
139 139 if (ueptr && ueptr->ue_disabled)
140 if (ueptr != NULL && ueptr->ue_disabled)
141 errcode = IA_DISABLED; 140 errcode = IA_DISABLED;
142 if (errcode) 141 if (errcode)
143 cray_login_failure(username, errcode); 142 cray_login_failure(username, errcode);
144
145 return (errcode); 143 return (errcode);
146} 144}
147 145
148/*
149 * record_failed_login: generic "login failed" interface function
150 */
151void
152record_failed_login(const char *user, const char *ttyname)
153{
154 cray_login_failure((char *)user, IA_UDBERR);
155}
156
157int 146int
158cray_setup (uid_t uid, char *username, const char *command) 147cray_setup (uid_t uid, char *username, const char *command)
159{ 148{
160 extern struct udb *getudb(); 149 extern struct udb *getudb();
161 extern char *setlimits(); 150 extern char *setlimits();
162 151
163 int err; /* error return */ 152 int err; /* error return */
164 time_t system_time; /* current system clock */ 153 time_t system_time; /* current system clock */
165 time_t expiration_time; /* password expiration time */ 154 time_t expiration_time; /* password expiration time */
166 int maxattempts; /* maximum no. of failed login attempts */ 155 int maxattempts; /* maximum no. of failed login attempts */
167 int SecureSys; /* unicos security flag */ 156 int SecureSys; /* unicos security flag */
168 int minslevel = 0; /* system minimum security level */ 157 int minslevel = 0; /* system minimum security level */
169 int i, j; 158 int i, j;
170 int valid_acct = -1; /* flag for reading valid acct */ 159 int valid_acct = -1; /* flag for reading valid acct */
171 char acct_name[MAXACID] = { "" }; /* used to read acct name */ 160 char acct_name[MAXACID] = { "" }; /* used to read acct name */
172 struct jtab jtab; /* Job table struct */ 161 struct jtab jtab; /* Job table struct */
173 struct udb ue; /* udb entry for logging-in user */ 162 struct udb ue; /* udb entry for logging-in user */
174 struct udb *up; /* pointer to UDB entry */ 163 struct udb *up; /* pointer to UDB entry */
175 struct secstat secinfo; /* file security attributes */ 164 struct secstat secinfo; /* file security attributes */
176 struct servprov init_info; /* used for sesscntl() call */ 165 struct servprov init_info; /* used for sesscntl() call */
177 int jid; /* job ID */ 166 int jid; /* job ID */
178 int pid; /* process ID */ 167 int pid; /* process ID */
179 char *sr; /* status return from setlimits() */ 168 char *sr; /* status return from setlimits() */
180 char *ttyn = NULL; /* ttyname or command name*/ 169 char *ttyn = NULL; /* ttyname or command name*/
181 char hostname[MAXHOSTNAMELEN]; 170 char hostname[MAXHOSTNAMELEN];
182 /* passwd stuff for ia_user */ 171 passwd_t pwdacm,
183 passwd_t pwdacm, pwddialup, pwdudb, pwdwal, pwddce; 172 pwddialup,
184 ia_user_ret_t uret; /* stuff returned from ia_user */ 173 pwdudb,
185 ia_user_t usent /* ia_user main structure */ 174 pwdwal,
186 int ia_rcode; /* ia_user return code */ 175 pwddce; /* passwd stuff for ia_user */
187 ia_failure_t fsent; /* ia_failure structure */ 176 ia_user_ret_t uret; /* stuff returned from ia_user */
177 ia_user_t usent; /* ia_user main structure */
178 int ia_rcode; /* ia_user return code */
179 ia_failure_t fsent; /* ia_failure structure */
188 ia_failure_ret_t fret; /* ia_failure return stuff */ 180 ia_failure_ret_t fret; /* ia_failure return stuff */
189 ia_success_t ssent; /* ia_success structure */ 181 ia_success_t ssent; /* ia_success structure */
190 ia_success_ret_t sret; /* ia_success return stuff */ 182 ia_success_ret_t sret; /* ia_success return stuff */
191 int ia_mlsrcode; /* ia_mlsuser return code */ 183 int ia_mlsrcode; /* ia_mlsuser return code */
192 int secstatrc; /* [f]secstat return code */ 184 int secstatrc; /* [f]secstat return code */
193 185
194 if (SecureSys = (int)sysconf(_SC_CRAY_SECURE_SYS)) { 186 if (SecureSys = (int)sysconf(_SC_CRAY_SECURE_SYS)) {
195 getsysv(&sysv, sizeof(struct sysv)); 187 getsysv(&sysv, sizeof(struct sysv));
196 minslevel = sysv.sy_minlvl; 188 minslevel = sysv.sy_minlvl;
197 if (getusrv(&usrv) < 0) 189 if (getusrv(&usrv) < 0) {
198 fatal("getusrv() failed, errno = %d", errno); 190 debug("getusrv() failed, errno = %d",errno);
191 exit(1);
192 }
199 } 193 }
200 hostname[0] = '\0'; 194 hostname[0] = '\0';
201 strlcpy(hostname, 195 strncpy(hostname,
202 (char *)get_canonical_hostname(options.use_dns), 196 (char *)get_canonical_hostname(options.verify_reverse_mapping),
203 MAXHOSTNAMELEN); 197 MAXHOSTNAMELEN);
204 /* 198 /*
205 * Fetch user's UDB entry. 199 * Fetch user's UDB entry.
206 */ 200 */
207 getsysudb(); 201 getsysudb();
208 if ((up = getudbnam(username)) == UDB_NULL) 202 if ((up = getudbnam(username)) == UDB_NULL) {
209 fatal("cannot fetch user's UDB entry"); 203 debug("cannot fetch user's UDB entry");
210 204 exit(1);
211 /* 205 }
212 * Prevent any possible fudging so perform a data 206
213 * safety check and compare the supplied uid against 207 /*
214 * the udb's uid. 208 * Prevent any possible fudging so perform a data
215 */ 209 * safety check and compare the supplied uid against
216 if (up->ue_uid != uid) 210 * the udb's uid.
217 fatal("IA uid missmatch"); 211 */
212 if (up->ue_uid != uid) {
213 debug("IA uid missmatch");
214 exit(1);
215 }
218 endudb(); 216 endudb();
219 217
220 if ((jid = getjtab(&jtab)) < 0) { 218 if ((jid = getjtab (&jtab)) < 0) {
221 debug("getjtab"); 219 debug("getjtab");
222 return(-1); 220 return -1;
223 } 221 }
224 pid = getpid(); 222 pid = getpid();
225 ttyn = ttyname(0); 223 ttyn = ttyname(0);
226 if (SecureSys) { 224 if (SecureSys) {
227 if (ttyn != NULL) 225 if (ttyn) {
228 secstatrc = secstat(ttyn, &secinfo); 226 secstatrc = secstat(ttyn, &secinfo);
229 else 227 } else {
230 secstatrc = fsecstat(1, &secinfo); 228 secstatrc = fsecstat(1, &secinfo);
231 229 }
232 if (secstatrc == 0) 230 if (secstatrc == 0) {
233 debug("[f]secstat() successful"); 231 debug("[f]secstat() successful");
234 else 232 } else {
235 fatal("[f]secstat() error, rc = %d", secstatrc); 233 debug("[f]secstat() error, rc = %d", secstatrc);
234 exit(1);
235 }
236 } 236 }
237 if ((ttyn == NULL) && ((char *)command != NULL)) 237 if ((ttyn == NULL) && ((char *)command != NULL))
238 ttyn = (char *)command; 238 ttyn = (char *)command;
239 /* 239 /*
240 * Initialize all structures to call ia_user 240 * Initialize all structures to call ia_user
241 */ 241 */
242 usent.revision = 0; 242 usent.revision = 0;
243 usent.uname = username; 243 usent.uname = username;
244 usent.host = hostname; 244 usent.host = hostname;
245 usent.ttyn = ttyn; 245 usent.ttyn = ttyn;
246 usent.caller = IA_SSHD; 246 usent.caller = IA_SSHD;
247 usent.pswdlist = &pwdacm; 247 usent.pswdlist = &pwdacm;
248 usent.ueptr = &ue; 248 usent.ueptr = &ue;
249 usent.flags = IA_INTERACTIVE | IA_FFLAG; 249 usent.flags = IA_INTERACTIVE | IA_FFLAG;
250 pwdacm.atype = IA_SECURID; 250 pwdacm.atype = IA_SECURID;
251 pwdacm.pwdp = NULL; 251 pwdacm.pwdp = NULL;
252 pwdacm.next = &pwdudb; 252 pwdacm.next = &pwdudb;
253 253
254 pwdudb.atype = IA_UDB; 254 pwdudb.atype = IA_UDB;
255 pwdudb.pwdp = NULL; 255 pwdudb.pwdp = NULL;
256 pwdudb.next = &pwddce; 256 pwdudb.next = &pwddce;
257 257
258 pwddce.atype = IA_DCE; 258 pwddce.atype = IA_DCE;
259 pwddce.pwdp = NULL; 259 pwddce.pwdp = NULL;
260 pwddce.next = &pwddialup; 260 pwddce.next = &pwddialup;
261 261
262 pwddialup.atype = IA_DIALUP; 262 pwddialup.atype = IA_DIALUP;
263 pwddialup.pwdp = NULL; 263 pwddialup.pwdp = NULL;
264 /* pwddialup.next = &pwdwal; */ 264 /* pwddialup.next = &pwdwal; */
265 pwddialup.next = NULL; 265 pwddialup.next = NULL;
266 266
267 pwdwal.atype = IA_WAL; 267 pwdwal.atype = IA_WAL;
268 pwdwal.pwdp = NULL; 268 pwdwal.pwdp = NULL;
269 pwdwal.next = NULL; 269 pwdwal.next = NULL;
270 270
271 uret.revision = 0; 271 uret.revision = 0;
272 uret.pswd = NULL; 272 uret.pswd = NULL;
273 uret.normal = 0; 273 uret.normal = 0;
274 274
275 ia_rcode = ia_user(&usent, &uret); 275 ia_rcode = ia_user(&usent, &uret);
276 switch (ia_rcode) { 276
277 /* 277 switch (ia_rcode) {
278 * These are acceptable return codes from ia_user() 278 /*
279 */ 279 * These are acceptable return codes from ia_user()
280 case IA_UDBWEEK: /* Password Expires in 1 week */ 280 */
281 expiration_time = ue.ue_pwage.time + ue.ue_pwage.maxage; 281 case IA_UDBWEEK: /* Password Expires in 1 week */
282 printf ("WARNING - your current password will expire %s\n", 282 expiration_time = ue.ue_pwage.time + ue.ue_pwage.maxage;
283 ctime((const time_t *)&expiration_time)); 283 printf ("WARNING - your current password will expire %s\n",
284 break; 284 ctime((const time_t *)&expiration_time));
285 case IA_UDBEXPIRED: 285 break;
286 if (ttyname(0) != NULL) { 286 case IA_UDBEXPIRED:
287 /* Force a password change */ 287 if (ttyname(0) != NULL) {
288 printf("Your password has expired; Choose a new one.\n"); 288 /* Force a password change */
289 execl("/bin/passwd", "passwd", username, 0); 289 printf("Your password has expired; Choose a new one.\n");
290 exit(9); 290 execl("/bin/passwd", "passwd", username, 0);
291 } 291 exit(9);
292 break; 292 }
293 case IA_NORMAL: /* Normal Return Code */ 293
294 break; 294 break;
295 case IA_BACKDOOR: 295 case IA_NORMAL: /* Normal Return Code */
296 /* XXX: can we memset it to zero here so save some of this */ 296 break;
297 strlcpy(ue.ue_name, "root", sizeof(ue.ue_name)); 297 case IA_BACKDOOR:
298 strlcpy(ue.ue_dir, "/", sizeof(ue.ue_dir)); 298 strcpy(ue.ue_name, "root");
299 strlcpy(ue.ue_shell, "/bin/sh", sizeof(ue.ue_shell)); 299 strcpy(ue.ue_passwd, "");
300 300 strcpy(ue.ue_dir, "/");
301 ue.ue_passwd[0] = '\0'; 301 strcpy(ue.ue_shell, "/bin/sh");
302 ue.ue_age[0] = '\0'; 302 strcpy(ue.ue_age, "");
303 ue.ue_comment[0] = '\0'; 303 strcpy(ue.ue_comment, "");
304 ue.ue_loghost[0] = '\0'; 304 strcpy(ue.ue_loghost, "");
305 ue.ue_logline[0] = '\0'; 305 strcpy(ue.ue_logline, "");
306 306 ue.ue_uid=-1;
307 ue.ue_uid = -1; 307 ue.ue_nice[UDBRC_INTER]=0;
308 ue.ue_nice[UDBRC_INTER] = 0; 308 for (i=0;i<MAXVIDS;i++)
309 309 ue.ue_gids[i]=0;
310 for (i = 0; i < MAXVIDS; i++) 310 ue.ue_logfails=0;
311 ue.ue_gids[i] = 0; 311 ue.ue_minlvl=minslevel;
312 312 ue.ue_maxlvl=minslevel;
313 ue.ue_logfails = 0; 313 ue.ue_deflvl=minslevel;
314 ue.ue_minlvl = ue.ue_maxlvl = ue.ue_deflvl = minslevel; 314 ue.ue_defcomps=0;
315 ue.ue_defcomps = 0; 315 ue.ue_comparts=0;
316 ue.ue_comparts = 0; 316 ue.ue_permits=0;
317 ue.ue_permits = 0; 317 ue.ue_trap=0;
318 ue.ue_trap = 0; 318 ue.ue_disabled=0;
319 ue.ue_disabled = 0; 319 ue.ue_logtime=0;
320 ue.ue_logtime = 0; 320 break;
321 break; 321 case IA_CONSOLE: /* Superuser not from Console */
322 case IA_CONSOLE: /* Superuser not from Console */ 322 case IA_TRUSTED: /* Trusted user */
323 case IA_TRUSTED: /* Trusted user */ 323 if (options.permit_root_login > PERMIT_NO)
324 if (options.permit_root_login > PERMIT_NO) 324 break; /* Accept root login */
325 break; /* Accept root login */ 325 default:
326 default: 326 /*
327 /* 327 * These are failed return codes from ia_user()
328 * These are failed return codes from ia_user() 328 */
329 */ 329 switch (ia_rcode)
330 switch (ia_rcode) 330 {
331 { 331 case IA_BADAUTH:
332 case IA_BADAUTH: 332 printf ("Bad authorization, access denied.\n");
333 printf("Bad authorization, access denied.\n"); 333 break;
334 break; 334 case IA_DIALUPERR:
335 case IA_DISABLED: 335 break;
336 printf("Your login has been disabled. Contact the system "); 336 case IA_DISABLED:
337 printf("administrator for assistance.\n"); 337 printf ("Your login has been disabled. Contact the system ");
338 break; 338 printf ("administrator for assistance.\n");
339 case IA_GETSYSV: 339 break;
340 printf("getsysv() failed - errno = %d\n", errno); 340 case IA_GETSYSV:
341 break; 341 printf ("getsysv() failed - errno = %d\n", errno);
342 case IA_MAXLOGS: 342 break;
343 printf("Maximum number of failed login attempts exceeded.\n"); 343 case IA_LOCALHOST:
344 printf("Access denied.\n"); 344 break;
345 break; 345 case IA_MAXLOGS:
346 case IA_UDBPWDNULL: 346 printf ("Maximum number of failed login attempts exceeded.\n");
347 if (SecureSys) 347 printf ("Access denied.\n");
348 printf("NULL Password not allowed on MLS systems.\n"); 348 break;
349 break; 349 case IA_NOPASS:
350 default: 350 break;
351 break; 351 case IA_PUBLIC:
352 } 352 break;
353 353 case IA_SECURIDERR:
354 /* 354 break;
355 * Authentication failed. 355 case IA_CONSOLE:
356 */ 356 break;
357 printf("sshd: Login incorrect, (0%o)\n", 357 case IA_TRUSTED:
358 ia_rcode-IA_ERRORCODE); 358 break;
359 359 case IA_UDBERR:
360 /* 360 break;
361 * Initialize structure for ia_failure 361 case IA_UDBPWDNULL:
362 * which will exit. 362 /*
363 */ 363 * NULL password not allowed on MLS systems
364 fsent.revision = 0; 364 */
365 fsent.uname = username; 365 if (SecureSys) {
366 fsent.host = hostname; 366 printf("NULL Password not allowed on MLS systems.\n");
367 fsent.ttyn = ttyn; 367 }
368 fsent.caller = IA_SSHD; 368 break;
369 fsent.flags = IA_INTERACTIVE; 369 case IA_UNKNOWN:
370 fsent.ueptr = &ue; 370 break;
371 fsent.jid = jid; 371 case IA_UNKNOWNYP:
372 fsent.errcode = ia_rcode; 372 break;
373 fsent.pwdp = uret.pswd; 373 case IA_WALERR:
374 fsent.exitcode = 1; 374 break;
375 375 default:
376 fret.revision = 0; 376 /* nothing special */
377 fret.normal = 0; 377 ;
378 378 } /* 2. switch (ia_rcode) */
379 /* 379 /*
380 * Call ia_failure because of an IA failure. 380 * Authentication failed.
381 * There is no return because ia_failure exits. 381 */
382 */ 382 printf("sshd: Login incorrect, (0%o)\n",
383 ia_failure(&fsent, &fret); 383 ia_rcode-IA_ERRORCODE);
384 384
385 exit(1); 385 /*
386 } 386 * Initialize structure for ia_failure
387 387 * which will exit.
388 */
389 fsent.revision = 0;
390 fsent.uname = username;
391 fsent.host = hostname;
392 fsent.ttyn = ttyn;
393 fsent.caller = IA_SSHD;
394 fsent.flags = IA_INTERACTIVE;
395 fsent.ueptr = &ue;
396 fsent.jid = jid;
397 fsent.errcode = ia_rcode;
398 fsent.pwdp = uret.pswd;
399 fsent.exitcode = 1;
400
401 fret.revision = 0;
402 fret.normal = 0;
403
404 /*
405 * Call ia_failure because of an IA failure.
406 * There is no return because ia_failure exits.
407 */
408
409 ia_failure(&fsent,&fret);
410
411 exit(1);
412 } /* 1. switch (ia_rcode) */
388 ia_mlsrcode = IA_NORMAL; 413 ia_mlsrcode = IA_NORMAL;
389 if (SecureSys) { 414 if (SecureSys) {
390 debug("calling ia_mlsuser()"); 415 debug("calling ia_mlsuser()");
391 ia_mlsrcode = ia_mlsuser(&ue, &secinfo, &usrv, NULL, 0); 416 ia_mlsrcode = ia_mlsuser (&ue, &secinfo, &usrv, NULL, 0);
392 } 417 }
393 if (ia_mlsrcode != IA_NORMAL) { 418 if (ia_mlsrcode != IA_NORMAL) {
394 printf("sshd: Login incorrect, (0%o)\n", 419 printf("sshd: Login incorrect, (0%o)\n",
395 ia_mlsrcode-IA_ERRORCODE); 420 ia_mlsrcode-IA_ERRORCODE);
396 /* 421 /*
397 * Initialize structure for ia_failure 422 * Initialize structure for ia_failure
398 * which will exit. 423 * which will exit.
399 */ 424 */
400 fsent.revision = 0; 425 fsent.revision = 0;
401 fsent.uname = username; 426 fsent.uname = username;
402 fsent.host = hostname; 427 fsent.host = hostname;
403 fsent.ttyn = ttyn; 428 fsent.ttyn = ttyn;
404 fsent.caller = IA_SSHD; 429 fsent.caller = IA_SSHD;
405 fsent.flags = IA_INTERACTIVE; 430 fsent.flags = IA_INTERACTIVE;
406 fsent.ueptr = &ue; 431 fsent.ueptr = &ue;
407 fsent.jid = jid; 432 fsent.jid = jid;
408 fsent.errcode = ia_mlsrcode; 433 fsent.errcode = ia_mlsrcode;
409 fsent.pwdp = uret.pswd; 434 fsent.pwdp = uret.pswd;
410 fsent.exitcode = 1; 435 fsent.exitcode = 1;
411 fret.revision = 0; 436 fret.revision = 0;
412 fret.normal = 0; 437 fret.normal = 0;
413 438
414 /* 439 /*
415 * Call ia_failure because of an IA failure. 440 * Call ia_failure because of an IA failure.
416 * There is no return because ia_failure exits. 441 * There is no return because ia_failure exits.
417 */ 442 */
418 ia_failure(&fsent,&fret); 443 ia_failure(&fsent,&fret);
419 exit(1); 444 exit(1);
420 } 445 }
421 446
422 /* Provide login status information */ 447 /* Provide login status information */
423 if (options.print_lastlog && ue.ue_logtime != 0) { 448 if (options.print_lastlog && ue.ue_logtime != 0) {
424 printf("Last successful login was : %.*s ", 19, 449 printf("Last successful login was : %.*s ",
425 (char *)ctime(&ue.ue_logtime)); 450 19, (char *)ctime(&ue.ue_logtime));
426 451
427 if (*ue.ue_loghost != '\0') { 452 if (*ue.ue_loghost != '\0')
428 printf("from %.*s\n", sizeof(ue.ue_loghost), 453 printf("from %.*s\n", sizeof(ue.ue_loghost), ue.ue_loghost);
429 ue.ue_loghost); 454
430 } else { 455 else printf("on %.*s\n", sizeof(ue.ue_logline), ue.ue_logline);
431 printf("on %.*s\n", sizeof(ue.ue_logline), 456
432 ue.ue_logline); 457 if ( SecureSys && (ue.ue_logfails != 0))
433 } 458 printf(" followed by %d failed attempts\n", ue.ue_logfails);
434 459 }
435 if (SecureSys && (ue.ue_logfails != 0)) { 460
436 printf(" followed by %d failed attempts\n", 461
437 ue.ue_logfails);
438 }
439 }
440
441 /* 462 /*
442 * Call ia_success to process successful I/A. 463 * Call ia_success to process successful I/A.
443 */ 464 */
@@ -451,116 +472,109 @@ cray_setup (uid_t uid, char *username, const char *command)
451 ssent.jid = jid; 472 ssent.jid = jid;
452 ssent.errcode = ia_rcode; 473 ssent.errcode = ia_rcode;
453 ssent.us = NULL; 474 ssent.us = NULL;
454 ssent.time = 1; /* Set ue_logtime */ 475 ssent.time = 1; /* Set ue_logtime */
455 476
456 sret.revision = 0; 477 sret.revision = 0;
457 sret.normal = 0; 478 sret.normal = 0;
458 479
459 ia_success(&ssent, &sret); 480 ia_success(&ssent,&sret);
460 481
461 /* 482 /*
462 * Query for account, iff > 1 valid acid & askacid permbit 483 * Query for account, iff > 1 valid acid & askacid permbit
463 */ 484 */
464 if (((ue.ue_permbits & PERMBITS_ACCTID) || 485 if (((ue.ue_permbits & PERMBITS_ACCTID) ||
465 (ue.ue_acids[0] >= 0) && (ue.ue_acids[1] >= 0)) && 486 (ue.ue_acids[0] >= 0) && (ue.ue_acids[1] >= 0)) &&
466 ue.ue_permbits & PERMBITS_ASKACID) { 487 ue.ue_permbits & PERMBITS_ASKACID) {
467 if (ttyname(0) != NULL) { 488 if (ttyname(0) != NULL) {
468 debug("cray_setup: ttyname true case, %.100s", ttyname); 489 debug("cray_setup: ttyname true case, %.100s", ttyname);
469 while (valid_acct == -1) { 490 while (valid_acct == -1) {
470 printf("Account (? for available accounts)" 491 printf("Account (? for available accounts)"
471 " [%s]: ", acid2nam(ue.ue_acids[0])); 492 " [%s]: ", acid2nam(ue.ue_acids[0]));
472 fgets(acct_name, MAXACID, stdin); 493 gets(acct_name);
473 switch (acct_name[0]) { 494 switch (acct_name[0]) {
474 case EOF: 495 case EOF:
475 exit(0); 496 exit(0);
476 break; 497 break;
477 case '\0': 498 case '\0':
478 valid_acct = ue.ue_acids[0]; 499 valid_acct = ue.ue_acids[0];
479 strlcpy(acct_name, acid2nam(valid_acct), MAXACID); 500 strcpy(acct_name, acid2nam(valid_acct));
480 break; 501 break;
481 case '?': 502 case '?':
482 /* Print the list 3 wide */ 503 /* Print the list 3 wide */
483 for (i = 0, j = 0; i < MAXVIDS; i++) { 504 for (i = 0, j = 0; i < MAXVIDS; i++) {
484 if (ue.ue_acids[i] == -1) { 505 if (ue.ue_acids[i] == -1) {
485 printf("\n"); 506 printf("\n");
486 break; 507 break;
487 } 508 }
488 if (++j == 4) { 509 if (++j == 4) {
489 j = 1; 510 j = 1;
490 printf("\n"); 511 printf("\n");
491 } 512 }
492 printf(" %s", 513 printf(" %s",
493 acid2nam(ue.ue_acids[i])); 514 acid2nam(ue.ue_acids[i]));
494 } 515 }
495 if (ue.ue_permbits & PERMBITS_ACCTID) { 516 if (ue.ue_permbits & PERMBITS_ACCTID)
496 printf("\"acctid\" permbit also allows" 517 printf("\"acctid\" permbit also allows"
497 " you to select any valid " 518 " you to select any valid "
498 "account name.\n"); 519 "account name.\n");
499 } 520 printf("\n");
500 printf("\n"); 521 break;
501 break; 522 default:
502 default: 523 if ((valid_acct = nam2acid(acct_name)) == -1) printf("Account id not found for"
503 valid_acct = nam2acid(acct_name); 524 " account name \"%s\"\n\n",
504 if (valid_acct == -1) { 525 acct_name);
505 printf( 526 break;
506 "Account id not found for" 527 }
507 " account name \"%s\"\n\n", 528 /*
508 acct_name); 529 * If an account was given, search the user's
509 break; 530 * acids array to verify they can use this account.
510 } 531 */
511 /* 532 if ((valid_acct != -1) &&
512 * If an account was given, search the user's 533 !(ue.ue_permbits & PERMBITS_ACCTID)) {
513 * acids array to verify they can use this account. 534 for (i = 0; i < MAXVIDS; i++) {
514 */ 535 if (ue.ue_acids[i] == -1)
515 if ((valid_acct != -1) && 536 break;
516 !(ue.ue_permbits & PERMBITS_ACCTID)) { 537 if (valid_acct == ue.ue_acids[i])
517 for (i = 0; i < MAXVIDS; i++) { 538 break;
518 if (ue.ue_acids[i] == -1) 539 }
519 break; 540 if (i == MAXVIDS ||
520 if (valid_acct == ue.ue_acids[i]) 541 ue.ue_acids[i] == -1) {
521 break; 542 fprintf(stderr, "Cannot set"
522 } 543 " account name to "
523 if (i == MAXVIDS || 544 "\"%s\", permission "
524 ue.ue_acids[i] == -1) { 545 "denied\n\n", acct_name);
525 fprintf(stderr, "Cannot set" 546 valid_acct = -1;
526 " account name to " 547 }
527 "\"%s\", permission " 548 }
528 "denied\n\n", acct_name); 549 }
529 valid_acct = -1;
530 }
531 }
532 }
533 } else {
534 /*
535 * The client isn't connected to a terminal and can't
536 * respond to an acid prompt. Use default acid.
537 */
538 debug("cray_setup: ttyname false case, %.100s",
539 ttyname);
540 valid_acct = ue.ue_acids[0];
541 }
542 } else { 550 } else {
543 /* 551 /*
544 * The user doesn't have the askacid permbit set or 552 * The client isn't connected to a terminal and can't
545 * only has one valid account to use. 553 * respond to an acid prompt. Use default acid.
546 */ 554 */
555 debug("cray_setup: ttyname false case, %.100s", ttyname);
547 valid_acct = ue.ue_acids[0]; 556 valid_acct = ue.ue_acids[0];
548 } 557 }
549 if (acctid(0, valid_acct) < 0) { 558 } else {
550 printf ("Bad account id: %d\n", valid_acct); 559 /*
551 exit(1); 560 * The user doesn't have the askacid permbit set or
552 } 561 * only has one valid account to use.
553 562 */
554 /* 563 valid_acct = ue.ue_acids[0];
555 * Now set shares, quotas, limits, including CPU time for the 564 }
556 * (interactive) job and process, and set up permissions 565 if (acctid(0, valid_acct) < 0) {
557 * (for chown etc), etc. 566 printf ("Bad account id: %d\n", valid_acct);
558 */ 567 exit(1);
568 }
569
570/* set up shares and quotas */
571/* Now set shares, quotas, limits, including CPU time for the (interactive)
572 * job and process, and set up permissions (for chown etc), etc.
573 */
559 if (setshares(ue.ue_uid, valid_acct, printf, 0, 0)) { 574 if (setshares(ue.ue_uid, valid_acct, printf, 0, 0)) {
560 printf("Unable to give %d shares to <%s>(%d/%d)\n", 575 printf("Unable to give %d shares to <%s>(%d/%d)\n", ue.ue_shares, ue.ue_name, ue.ue_uid, valid_acct);
561 ue.ue_shares, ue.ue_name, ue.ue_uid, valid_acct);
562 exit(1); 576 exit(1);
563 } 577 }
564 578
565 sr = setlimits(username, C_PROC, pid, UDBRC_INTER); 579 sr = setlimits(username, C_PROC, pid, UDBRC_INTER);
566 if (sr != NULL) { 580 if (sr != NULL) {
@@ -573,15 +587,17 @@ cray_setup (uid_t uid, char *username, const char *command)
573 exit(1); 587 exit(1);
574 } 588 }
575 /* 589 /*
576 * Place the service provider information into 590 * Place the service provider information into
577 * the session table (Unicos) or job table (Unicos/mk). 591 * the session table (Unicos) or job table (Unicos/mk).
578 * There exist double defines for the job/session table in 592 * There exist double defines for the job/session table in
579 * unicos/mk (jtab.h) so no need for a compile time switch. 593 * unicos/mk (jtab.h) so no need for a compile time switch.
580 */ 594 */
581 memset(&init_info, '\0', sizeof(init_info)); 595 bzero((char *)&init_info, sizeof(struct servprov));
582 init_info.s_sessinit.si_id = URM_SPT_LOGIN; 596 init_info.s_sessinit.si_id = URM_SPT_LOGIN;
583 init_info.s_sessinit.si_pid = getpid(); 597 init_info.s_sessinit.si_pid = getpid();
584 init_info.s_sessinit.si_sid = jid; 598 init_info.s_sessinit.si_sid = jid;
599 init_info.s_routing.seqno = 0;
600 init_info.s_routing.iadrs = 0;
585 sesscntl(0, S_SETSERVPO, (int)&init_info); 601 sesscntl(0, S_SETSERVPO, (int)&init_info);
586 602
587 /* 603 /*
@@ -594,7 +610,7 @@ cray_setup (uid_t uid, char *username, const char *command)
594 } 610 }
595 } 611 }
596 612
597 return (0); 613 return(0);
598} 614}
599 615
600/* 616/*
@@ -607,10 +623,10 @@ void
607drop_cray_privs() 623drop_cray_privs()
608{ 624{
609#if defined(_SC_CRAY_PRIV_SU) 625#if defined(_SC_CRAY_PRIV_SU)
610 priv_proc_t *privstate; 626 priv_proc_t* privstate;
611 int result; 627 int result;
612 extern int priv_set_proc(); 628 extern int priv_set_proc();
613 extern priv_proc_t *priv_init_proc(); 629 extern priv_proc_t* priv_init_proc();
614 630
615 /* 631 /*
616 * If ether of theses two flags are not set 632 * If ether of theses two flags are not set
@@ -638,17 +654,15 @@ drop_cray_privs()
638 usrv.sv_intcat = TFM_SYSTEM; 654 usrv.sv_intcat = TFM_SYSTEM;
639 usrv.sv_valcat |= (TFM_SYSTEM | TFM_SYSFILE); 655 usrv.sv_valcat |= (TFM_SYSTEM | TFM_SYSFILE);
640 656
641 if (setusrv(&usrv) < 0) { 657 if (setusrv(&usrv) < 0)
642 fatal("%s(%d): setusrv(): %s", __FILE__, __LINE__, 658 fatal("%s(%d): setusrv(): %s", __FILE__, __LINE__,
643 strerror(errno)); 659 strerror(errno));
644 }
645 660
646 if ((privstate = priv_init_proc()) != NULL) { 661 if ((privstate = priv_init_proc()) != NULL) {
647 result = priv_set_proc(privstate); 662 result = priv_set_proc(privstate);
648 if (result != 0 ) { 663 if (result != 0 )
649 fatal("%s(%d): priv_set_proc(): %s", 664 fatal("%s(%d): priv_set_proc(): %s",
650 __FILE__, __LINE__, strerror(errno)); 665 __FILE__, __LINE__, strerror(errno));
651 }
652 priv_free_proc(privstate); 666 priv_free_proc(privstate);
653 } 667 }
654 debug ("Privileges should be cleared..."); 668 debug ("Privileges should be cleared...");
@@ -669,7 +683,6 @@ cray_retain_utmp(struct utmp *ut, int pid)
669 struct utmp utmp; 683 struct utmp utmp;
670 684
671 if ((fd = open(UTMP_FILE, O_RDONLY)) != -1) { 685 if ((fd = open(UTMP_FILE, O_RDONLY)) != -1) {
672 /* XXX use atomicio */
673 while (read(fd, (char *)&utmp, sizeof(utmp)) == sizeof(utmp)) { 686 while (read(fd, (char *)&utmp, sizeof(utmp)) == sizeof(utmp)) {
674 if (pid == utmp.ut_pid) { 687 if (pid == utmp.ut_pid) {
675 ut->ut_jid = utmp.ut_jid; 688 ut->ut_jid = utmp.ut_jid;
@@ -680,8 +693,9 @@ cray_retain_utmp(struct utmp *ut, int pid)
680 } 693 }
681 } 694 }
682 close(fd); 695 close(fd);
683 } else 696 }
684 fatal("Unable to open utmp file"); 697 else
698 fatal("Unable to open utmp file");
685} 699}
686 700
687/* 701/*
@@ -694,9 +708,11 @@ cray_retain_utmp(struct utmp *ut, int pid)
694void 708void
695cray_delete_tmpdir(char *login, int jid, uid_t uid) 709cray_delete_tmpdir(char *login, int jid, uid_t uid)
696{ 710{
711 int child;
697 static char jtmp[TPATHSIZ]; 712 static char jtmp[TPATHSIZ];
698 struct stat statbuf; 713 struct stat statbuf;
699 int child, c, wstat; 714 int c;
715 int wstat;
700 716
701 for (c = 'a'; c <= 'z'; c++) { 717 for (c = 'a'; c <= 'z'; c++) {
702 snprintf(jtmp, TPATHSIZ, "%s/jtmp.%06d%c", JTMPDIR, jid, c); 718 snprintf(jtmp, TPATHSIZ, "%s/jtmp.%06d%c", JTMPDIR, jid, c);
diff --git a/openbsd-compat/bsd-cray.h b/openbsd-compat/bsd-cray.h
index a121ea152..a09954f2f 100644
--- a/openbsd-compat/bsd-cray.h
+++ b/openbsd-compat/bsd-cray.h
@@ -1,6 +1,8 @@
1/* $Id: bsd-cray.h,v 1.10 2003/08/29 16:59:52 mouring Exp $ */ 1/*
2 2 * $Id: bsd-cray.h,v 1.7 2003/03/21 01:05:38 mouring Exp $
3/* 3 *
4 * bsd-cray.h
5 *
4 * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>) 6 * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
5 * Significant portions provided by 7 * Significant portions provided by
6 * Wayne Schroeder, SDSC <schroeder@sdsc.edu> 8 * Wayne Schroeder, SDSC <schroeder@sdsc.edu>
@@ -32,31 +34,25 @@
32 * on UNICOS systems. 34 * on UNICOS systems.
33 * 35 *
34 */ 36 */
35
36#ifndef _BSD_CRAY_H 37#ifndef _BSD_CRAY_H
37#define _BSD_CRAY_H 38#define _BSD_CRAY_H
38 39
39#ifdef _UNICOS 40#ifdef _UNICOS
40 41void cray_init_job(struct passwd *); /* init cray job */
41void cray_init_job(struct passwd *); 42void cray_job_termination_handler(int); /* process end of job signal */
42void cray_job_termination_handler(int); 43void cray_login_failure(char *username, int errcode);
43void cray_login_failure(char *, int ); 44int cray_access_denied(char *username);
44int cray_access_denied(char *); 45extern char cray_tmpdir[]; /* cray tmpdir */
45#define CUSTOM_FAILED_LOGIN 1
46void record_failed_login(const char *, const char *);
47extern char cray_tmpdir[];
48
49#ifndef IA_SSHD 46#ifndef IA_SSHD
50# define IA_SSHD IA_LOGIN 47#define IA_SSHD IA_LOGIN
51#endif 48#endif
52#ifndef MAXHOSTNAMELEN 49#ifndef MAXHOSTNAMELEN
53# define MAXHOSTNAMELEN 64 50#define MAXHOSTNAMELEN 64
54#endif 51#endif
55#ifndef _CRAYT3E 52#ifndef _CRAYT3E
56# include <sys/ttold.h> 53#include <sys/ttold.h>
57# define TIOCGPGRP (tIOC|20) 54#define TIOCGPGRP (tIOC|20)
55#endif
58#endif 56#endif
59
60#endif /* UNICOS */
61 57
62#endif /* _BSD_CRAY_H */ 58#endif /* _BSD_CRAY_H */
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index a87cf3c97..0fa5964bc 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -1,4 +1,6 @@
1/* 1/*
2 * cygwin_util.c
3 *
2 * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com> 4 * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com>
3 * 5 *
4 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
@@ -29,7 +31,7 @@
29 31
30#include "includes.h" 32#include "includes.h"
31 33
32RCSID("$Id: bsd-cygwin_util.c,v 1.11 2003/08/07 06:23:43 dtucker Exp $"); 34RCSID("$Id: bsd-cygwin_util.c,v 1.9 2002/11/09 15:59:29 mouring Exp $");
33 35
34#ifdef HAVE_CYGWIN 36#ifdef HAVE_CYGWIN
35 37
@@ -51,8 +53,7 @@ RCSID("$Id: bsd-cygwin_util.c,v 1.11 2003/08/07 06:23:43 dtucker Exp $");
51# undef pipe 53# undef pipe
52#endif 54#endif
53 55
54int 56int binary_open(const char *filename, int flags, ...)
55binary_open(const char *filename, int flags, ...)
56{ 57{
57 va_list ap; 58 va_list ap;
58 mode_t mode; 59 mode_t mode;
@@ -60,56 +61,55 @@ binary_open(const char *filename, int flags, ...)
60 va_start(ap, flags); 61 va_start(ap, flags);
61 mode = va_arg(ap, mode_t); 62 mode = va_arg(ap, mode_t);
62 va_end(ap); 63 va_end(ap);
63 return (open(filename, flags | O_BINARY, mode)); 64 return open(filename, flags | O_BINARY, mode);
64} 65}
65 66
66int 67int binary_pipe(int fd[2])
67binary_pipe(int fd[2])
68{ 68{
69 int ret = pipe(fd); 69 int ret = pipe(fd);
70 70
71 if (!ret) { 71 if (!ret) {
72 setmode(fd[0], O_BINARY); 72 setmode (fd[0], O_BINARY);
73 setmode(fd[1], O_BINARY); 73 setmode (fd[1], O_BINARY);
74 } 74 }
75 return (ret); 75 return ret;
76} 76}
77 77
78#define HAS_CREATE_TOKEN 1 78#define HAS_CREATE_TOKEN 1
79#define HAS_NTSEC_BY_DEFAULT 2 79#define HAS_NTSEC_BY_DEFAULT 2
80 80
81static int 81static int has_capability(int what)
82has_capability(int what)
83{ 82{
83 /* has_capability() basically calls uname() and checks if
84 specific capabilities of Cygwin can be evaluated from that.
85 This simplifies the calling functions which only have to ask
86 for a capability using has_capability() instead of having
87 to figure that out by themselves. */
84 static int inited; 88 static int inited;
85 static int has_create_token; 89 static int has_create_token;
86 static int has_ntsec_by_default; 90 static int has_ntsec_by_default;
87 91
88 /*
89 * has_capability() basically calls uname() and checks if
90 * specific capabilities of Cygwin can be evaluated from that.
91 * This simplifies the calling functions which only have to ask
92 * for a capability using has_capability() instead of having
93 * to figure that out by themselves.
94 */
95 if (!inited) { 92 if (!inited) {
96 struct utsname uts; 93 struct utsname uts;
97 char *c; 94 char *c;
98 95
99 if (!uname(&uts)) { 96 if (!uname(&uts)) {
100 int major_high = 0, major_low = 0, minor = 0; 97 int major_high = 0;
101 int api_major_version = 0, api_minor_version = 0; 98 int major_low = 0;
99 int minor = 0;
100 int api_major_version = 0;
101 int api_minor_version = 0;
102 char *c; 102 char *c;
103 103
104 sscanf(uts.release, "%d.%d.%d", &major_high, 104 sscanf(uts.release, "%d.%d.%d", &major_high,
105 &major_low, &minor); 105 &major_low, &minor);
106 if ((c = strchr(uts.release, '(')) != NULL) { 106 c = strchr(uts.release, '(');
107 if (c)
107 sscanf(c + 1, "%d.%d", &api_major_version, 108 sscanf(c + 1, "%d.%d", &api_major_version,
108 &api_minor_version); 109 &api_minor_version);
109 }
110 if (major_high > 1 || 110 if (major_high > 1 ||
111 (major_high == 1 && (major_low > 3 || 111 (major_high == 1 && (major_low > 3 ||
112 (major_low == 3 && minor >= 2)))) 112 (major_low == 3 && minor >= 2))))
113 has_create_token = 1; 113 has_create_token = 1;
114 if (api_major_version > 0 || api_minor_version >= 56) 114 if (api_major_version > 0 || api_minor_version >= 56)
115 has_ntsec_by_default = 1; 115 has_ntsec_by_default = 1;
@@ -118,15 +118,14 @@ has_capability(int what)
118 } 118 }
119 switch (what) { 119 switch (what) {
120 case HAS_CREATE_TOKEN: 120 case HAS_CREATE_TOKEN:
121 return (has_create_token); 121 return has_create_token;
122 case HAS_NTSEC_BY_DEFAULT: 122 case HAS_NTSEC_BY_DEFAULT:
123 return (has_ntsec_by_default); 123 return has_ntsec_by_default;
124 } 124 }
125 return (0); 125 return 0;
126} 126}
127 127
128int 128int check_nt_auth(int pwd_authenticated, struct passwd *pw)
129check_nt_auth(int pwd_authenticated, struct passwd *pw)
130{ 129{
131 /* 130 /*
132 * The only authentication which is able to change the user 131 * The only authentication which is able to change the user
@@ -150,33 +149,34 @@ check_nt_auth(int pwd_authenticated, struct passwd *pw)
150 has_create_token = 0; 149 has_create_token = 0;
151 if (has_capability(HAS_CREATE_TOKEN) && 150 if (has_capability(HAS_CREATE_TOKEN) &&
152 (ntsec_on(cygwin) || 151 (ntsec_on(cygwin) ||
153 (has_capability(HAS_NTSEC_BY_DEFAULT) && 152 (has_capability(HAS_NTSEC_BY_DEFAULT) &&
154 !ntsec_off(cygwin)))) 153 !ntsec_off(cygwin))))
155 has_create_token = 1; 154 has_create_token = 1;
156 } 155 }
157 if (has_create_token < 1 && 156 if (has_create_token < 1 &&
158 !pwd_authenticated && geteuid() != pw->pw_uid) 157 !pwd_authenticated && geteuid() != pw->pw_uid)
159 return (0); 158 return 0;
160 } 159 }
161 return (1); 160 return 1;
162} 161}
163 162
164int 163int check_ntsec(const char *filename)
165check_ntsec(const char *filename)
166{ 164{
167 char *cygwin; 165 char *cygwin;
168 int allow_ntea = 0, allow_ntsec = 0; 166 int allow_ntea = 0;
167 int allow_ntsec = 0;
169 struct statfs fsstat; 168 struct statfs fsstat;
170 169
171 /* Windows 95/98/ME don't support file system security at all. */ 170 /* Windows 95/98/ME don't support file system security at all. */
172 if (!is_winnt) 171 if (!is_winnt)
173 return (0); 172 return 0;
174 173
175 /* Evaluate current CYGWIN settings. */ 174 /* Evaluate current CYGWIN settings. */
176 cygwin = getenv("CYGWIN"); 175 cygwin = getenv("CYGWIN");
177 allow_ntea = ntea_on(cygwin); 176 allow_ntea = ntea_on(cygwin);
178 allow_ntsec = ntsec_on(cygwin) || 177 allow_ntsec = ntsec_on(cygwin) ||
179 (has_capability(HAS_NTSEC_BY_DEFAULT) && !ntsec_off(cygwin)); 178 (has_capability(HAS_NTSEC_BY_DEFAULT) &&
179 !ntsec_off(cygwin));
180 180
181 /* 181 /*
182 * `ntea' is an emulation of POSIX attributes. It doesn't support 182 * `ntea' is an emulation of POSIX attributes. It doesn't support
@@ -185,14 +185,14 @@ check_ntsec(const char *filename)
185 * for security checks. 185 * for security checks.
186 */ 186 */
187 if (allow_ntea) 187 if (allow_ntea)
188 return (1); 188 return 1;
189 189
190 /* 190 /*
191 * Retrieve file system flags. In Cygwin, file system flags are 191 * Retrieve file system flags. In Cygwin, file system flags are
192 * copied to f_type which has no meaning in Win32 itself. 192 * copied to f_type which has no meaning in Win32 itself.
193 */ 193 */
194 if (statfs(filename, &fsstat)) 194 if (statfs(filename, &fsstat))
195 return (1); 195 return 1;
196 196
197 /* 197 /*
198 * Only file systems supporting ACLs are able to set permissions. 198 * Only file systems supporting ACLs are able to set permissions.
@@ -200,13 +200,12 @@ check_ntsec(const char *filename)
200 * ACLs to support POSIX permissions on files. 200 * ACLs to support POSIX permissions on files.
201 */ 201 */
202 if (fsstat.f_type & FS_PERSISTENT_ACLS) 202 if (fsstat.f_type & FS_PERSISTENT_ACLS)
203 return (allow_ntsec); 203 return allow_ntsec;
204 204
205 return (0); 205 return 0;
206} 206}
207 207
208void 208void register_9x_service(void)
209register_9x_service(void)
210{ 209{
211 HINSTANCE kerneldll; 210 HINSTANCE kerneldll;
212 DWORD (*RegisterServiceProcess)(DWORD, DWORD); 211 DWORD (*RegisterServiceProcess)(DWORD, DWORD);
@@ -220,10 +219,10 @@ register_9x_service(void)
220 */ 219 */
221 if (is_winnt) 220 if (is_winnt)
222 return; 221 return;
223 if (!(kerneldll = LoadLibrary("KERNEL32.DLL"))) 222 if (! (kerneldll = LoadLibrary("KERNEL32.DLL")))
224 return; 223 return;
225 if (!(RegisterServiceProcess = (DWORD (*)(DWORD, DWORD)) 224 if (! (RegisterServiceProcess = (DWORD (*)(DWORD, DWORD))
226 GetProcAddress(kerneldll, "RegisterServiceProcess"))) 225 GetProcAddress(kerneldll, "RegisterServiceProcess")))
227 return; 226 return;
228 RegisterServiceProcess(0, 1); 227 RegisterServiceProcess(0, 1);
229} 228}
diff --git a/openbsd-compat/bsd-cygwin_util.h b/openbsd-compat/bsd-cygwin_util.h
index 5ccb0fba2..af470bdd8 100644
--- a/openbsd-compat/bsd-cygwin_util.h
+++ b/openbsd-compat/bsd-cygwin_util.h
@@ -1,6 +1,8 @@
1/* $Id: bsd-cygwin_util.h,v 1.10 2003/08/07 06:28:16 dtucker Exp $ */ 1/* $Id: bsd-cygwin_util.h,v 1.7 2002/04/15 22:00:52 stevesk Exp $ */
2 2
3/* 3/*
4 * cygwin_util.c
5 *
4 * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com> 6 * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com>
5 * 7 *
6 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -34,17 +36,12 @@
34 36
35#ifdef HAVE_CYGWIN 37#ifdef HAVE_CYGWIN
36 38
37#undef ERROR
38#define is_winnt (GetVersion() < 0x80000000)
39
40#include <windows.h>
41#include <sys/cygwin.h>
42#include <io.h> 39#include <io.h>
43 40
44int binary_open(const char *, int , ...); 41int binary_open(const char *filename, int flags, ...);
45int binary_pipe(int fd[2]); 42int binary_pipe(int fd[2]);
46int check_nt_auth(int, struct passwd *); 43int check_nt_auth(int pwd_authenticated, struct passwd *pw);
47int check_ntsec(const char *); 44int check_ntsec(const char *filename);
48void register_9x_service(void); 45void register_9x_service(void);
49 46
50#define open binary_open 47#define open binary_open
diff --git a/openbsd-compat/bsd-getpeereid.h b/openbsd-compat/bsd-getpeereid.h
new file mode 100644
index 000000000..2e9f077f9
--- /dev/null
+++ b/openbsd-compat/bsd-getpeereid.h
@@ -0,0 +1,14 @@
1/* $Id: bsd-getpeereid.h,v 1.1 2002/09/12 00:33:02 djm Exp $ */
2
3#ifndef _BSD_GETPEEREID_H
4#define _BSD_GETPEEREID_H
5
6#include "config.h"
7
8#include <sys/types.h> /* For uid_t, gid_t */
9
10#ifndef HAVE_GETPEEREID
11int getpeereid(int , uid_t *, gid_t *);
12#endif /* HAVE_GETPEEREID */
13
14#endif /* _BSD_GETPEEREID_H */
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index 08b089bdc..b8e9996d5 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 2 * Copyright (c) 1999-2000 Damien Miller. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
@@ -25,13 +25,13 @@
25#include "includes.h" 25#include "includes.h"
26#include "xmalloc.h" 26#include "xmalloc.h"
27 27
28RCSID("$Id: bsd-misc.c,v 1.19 2003/08/25 01:16:21 mouring Exp $"); 28RCSID("$Id: bsd-misc.c,v 1.12 2003/03/18 18:21:41 tim Exp $");
29 29
30/* 30/*
31 * NB. duplicate __progname in case it is an alias for argv[0] 31 * NB. duplicate __progname in case it is an alias for argv[0]
32 * Otherwise it may get clobbered by setproctitle() 32 * Otherwise it may get clobbered by setproctitle()
33 */ 33 */
34char *ssh_get_progname(char *argv0) 34char *get_progname(char *argv0)
35{ 35{
36#ifdef HAVE___PROGNAME 36#ifdef HAVE___PROGNAME
37 extern char *__progname; 37 extern char *__progname;
@@ -41,21 +41,21 @@ char *ssh_get_progname(char *argv0)
41 char *p; 41 char *p;
42 42
43 if (argv0 == NULL) 43 if (argv0 == NULL)
44 return ("unknown"); /* XXX */ 44 return "unknown"; /* XXX */
45 p = strrchr(argv0, '/'); 45 p = strrchr(argv0, '/');
46 if (p == NULL) 46 if (p == NULL)
47 p = argv0; 47 p = argv0;
48 else 48 else
49 p++; 49 p++;
50 50
51 return (xstrdup(p)); 51 return xstrdup(p);
52#endif 52#endif
53} 53}
54 54
55#ifndef HAVE_SETLOGIN 55#ifndef HAVE_SETLOGIN
56int setlogin(const char *name) 56int setlogin(const char *name)
57{ 57{
58 return (0); 58 return(0);
59} 59}
60#endif /* !HAVE_SETLOGIN */ 60#endif /* !HAVE_SETLOGIN */
61 61
@@ -63,21 +63,21 @@ int setlogin(const char *name)
63int innetgr(const char *netgroup, const char *host, 63int innetgr(const char *netgroup, const char *host,
64 const char *user, const char *domain) 64 const char *user, const char *domain)
65{ 65{
66 return (0); 66 return(0);
67} 67}
68#endif /* HAVE_INNETGR */ 68#endif /* HAVE_INNETGR */
69 69
70#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) 70#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
71int seteuid(uid_t euid) 71int seteuid(uid_t euid)
72{ 72{
73 return (setreuid(-1, euid)); 73 return(setreuid(-1,euid));
74} 74}
75#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ 75#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
76 76
77#if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) 77#if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID)
78int setegid(uid_t egid) 78int setegid(uid_t egid)
79{ 79{
80 return(setresgid(-1, egid, -1)); 80 return(setresgid(-1,egid,-1));
81} 81}
82#endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */ 82#endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */
83 83
@@ -88,9 +88,9 @@ const char *strerror(int e)
88 extern char *sys_errlist[]; 88 extern char *sys_errlist[];
89 89
90 if ((e >= 0) && (e < sys_nerr)) 90 if ((e >= 0) && (e < sys_nerr))
91 return (sys_errlist[e]); 91 return(sys_errlist[e]);
92 92 else
93 return ("unlisted error"); 93 return("unlisted error");
94} 94}
95#endif 95#endif
96 96
@@ -102,25 +102,24 @@ int utimes(char *filename, struct timeval *tvp)
102 ub.actime = tvp[0].tv_sec; 102 ub.actime = tvp[0].tv_sec;
103 ub.modtime = tvp[1].tv_sec; 103 ub.modtime = tvp[1].tv_sec;
104 104
105 return (utime(filename, &ub)); 105 return(utime(filename, &ub));
106} 106}
107#endif 107#endif
108 108
109#ifndef HAVE_TRUNCATE 109#ifndef HAVE_TRUNCATE
110int truncate(const char *path, off_t length) 110int truncate (const char *path, off_t length)
111{ 111{
112 int fd, ret, saverrno; 112 int fd, ret, saverrno;
113 113
114 fd = open(path, O_WRONLY); 114 fd = open(path, O_WRONLY);
115 if (fd < 0) 115 if (fd < 0)
116 return (-1); 116 return -1;
117 117
118 ret = ftruncate(fd, length); 118 ret = ftruncate(fd, length);
119 saverrno = errno; 119 saverrno = errno;
120 close(fd); 120 (void) close (fd);
121 if (ret == -1) 121 if (ret == -1)
122 errno = saverrno; 122 errno = saverrno;
123
124 return(ret); 123 return(ret);
125} 124}
126#endif /* HAVE_TRUNCATE */ 125#endif /* HAVE_TRUNCATE */
@@ -132,7 +131,7 @@ int truncate(const char *path, off_t length)
132int 131int
133setgroups(size_t size, const gid_t *list) 132setgroups(size_t size, const gid_t *list)
134{ 133{
135 return (0); 134 return 0;
136} 135}
137#endif 136#endif
138 137
@@ -167,62 +166,3 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
167 166
168#endif 167#endif
169 168
170#ifndef HAVE_TCGETPGRP
171pid_t
172tcgetpgrp(int fd)
173{
174 int ctty_pgrp;
175
176 if (ioctl(fd, TIOCGPGRP, &ctty_pgrp) == -1)
177 return(-1);
178 else
179 return(ctty_pgrp);
180}
181#endif /* HAVE_TCGETPGRP */
182
183#ifndef HAVE_TCSENDBREAK
184int
185tcsendbreak(int fd, int duration)
186{
187# if defined(TIOCSBRK) && defined(TIOCCBRK)
188 struct timeval sleepytime;
189
190 sleepytime.tv_sec = 0;
191 sleepytime.tv_usec = 400000;
192 if (ioctl(fd, TIOCSBRK, 0) == -1)
193 return (-1);
194 (void)select(0, 0, 0, 0, &sleepytime);
195 if (ioctl(fd, TIOCCBRK, 0) == -1)
196 return (-1);
197 return (0);
198# else
199 return -1;
200# endif
201}
202#endif /* HAVE_TCSENDBREAK */
203
204mysig_t
205mysignal(int sig, mysig_t act)
206{
207#ifdef HAVE_SIGACTION
208 struct sigaction sa, osa;
209
210 if (sigaction(sig, NULL, &osa) == -1)
211 return (mysig_t) -1;
212 if (osa.sa_handler != act) {
213 memset(&sa, 0, sizeof(sa));
214 sigemptyset(&sa.sa_mask);
215 sa.sa_flags = 0;
216#ifdef SA_INTERRUPT
217 if (sig == SIGALRM)
218 sa.sa_flags |= SA_INTERRUPT;
219#endif
220 sa.sa_handler = act;
221 if (sigaction(sig, &sa, NULL) == -1)
222 return (mysig_t) -1;
223 }
224 return (osa.sa_handler);
225#else
226 return (signal(sig, act));
227#endif
228}
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 6b70473f3..78d9ccdd4 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -1,7 +1,5 @@
1/* $Id: bsd-misc.h,v 1.13 2003/08/29 16:59:52 mouring Exp $ */
2
3/* 1/*
4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 2 * Copyright (c) 1999-2000 Damien Miller. All rights reserved.
5 * 3 *
6 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
@@ -24,39 +22,42 @@
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 23 */
26 24
25/* $Id: bsd-misc.h,v 1.7 2003/03/18 18:21:41 tim Exp $ */
26
27#ifndef _BSD_MISC_H 27#ifndef _BSD_MISC_H
28#define _BSD_MISC_H 28#define _BSD_MISC_H
29 29
30#include "includes.h" 30#include "config.h"
31 31
32char *ssh_get_progname(char *); 32char *get_progname(char *argv0);
33 33
34#ifndef HAVE_SETSID 34#ifndef HAVE_SETSID
35#define setsid() setpgrp(0, getpid()) 35#define setsid() setpgrp(0, getpid())
36#endif /* !HAVE_SETSID */ 36#endif /* !HAVE_SETSID */
37 37
38#ifndef HAVE_SETENV 38#ifndef HAVE_SETENV
39int setenv(const char *, const char *, int); 39int setenv(const char *name, const char *value, int overwrite);
40#endif /* !HAVE_SETENV */ 40#endif /* !HAVE_SETENV */
41 41
42#ifndef HAVE_SETLOGIN 42#ifndef HAVE_SETLOGIN
43int setlogin(const char *); 43int setlogin(const char *name);
44#endif /* !HAVE_SETLOGIN */ 44#endif /* !HAVE_SETLOGIN */
45 45
46#ifndef HAVE_INNETGR 46#ifndef HAVE_INNETGR
47int innetgr(const char *, const char *, const char *, const char *); 47int innetgr(const char *netgroup, const char *host,
48 const char *user, const char *domain);
48#endif /* HAVE_INNETGR */ 49#endif /* HAVE_INNETGR */
49 50
50#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) 51#if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID)
51int seteuid(uid_t); 52int seteuid(uid_t euid);
52#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ 53#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
53 54
54#if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) 55#if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID)
55int setegid(uid_t); 56int setegid(uid_t egid);
56#endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */ 57#endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */
57 58
58#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) 59#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
59const char *strerror(int); 60const char *strerror(int e);
60#endif 61#endif
61 62
62 63
@@ -68,15 +69,15 @@ struct timeval {
68} 69}
69#endif /* HAVE_STRUCT_TIMEVAL */ 70#endif /* HAVE_STRUCT_TIMEVAL */
70 71
71int utimes(char *, struct timeval *); 72int utimes(char *filename, struct timeval *tvp);
72#endif /* HAVE_UTIMES */ 73#endif /* HAVE_UTIMES */
73 74
74#ifndef HAVE_TRUNCATE 75#ifndef HAVE_TRUNCATE
75int truncate (const char *, off_t); 76int truncate (const char *path, off_t length);
76#endif /* HAVE_TRUNCATE */ 77#endif /* HAVE_TRUNCATE */
77 78
78#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP) 79#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP)
79int setgroups(size_t, const gid_t *); 80int setgroups(size_t size, const gid_t *list);
80#endif 81#endif
81 82
82#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP) 83#if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
@@ -86,21 +87,7 @@ struct timespec {
86 long tv_nsec; 87 long tv_nsec;
87}; 88};
88#endif 89#endif
89int nanosleep(const struct timespec *, struct timespec *); 90int nanosleep(const struct timespec *req, struct timespec *rem);
90#endif
91
92#ifndef HAVE_TCGETPGRP
93pid_t tcgetpgrp(int);
94#endif
95
96#ifndef HAVE_TCSENDBREAK
97int tcsendbreak(int, int);
98#endif 91#endif
99 92
100/* wrapper for signal interface */
101typedef void (*mysig_t)(int);
102mysig_t mysignal(int sig, mysig_t act);
103
104#define signal(a,b) mysignal(a,b)
105
106#endif /* _BSD_MISC_H */ 93#endif /* _BSD_MISC_H */
diff --git a/openbsd-compat/bsd-nextstep.c b/openbsd-compat/bsd-nextstep.c
index bd35a3afc..85b298a48 100644
--- a/openbsd-compat/bsd-nextstep.c
+++ b/openbsd-compat/bsd-nextstep.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * Copyright (c) 2000,2001 Ben Lindstrom. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without 2 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 3 * modification, are permitted provided that the following conditions
6 * are met: 4 * are met:
@@ -24,7 +22,7 @@
24 22
25#include "includes.h" 23#include "includes.h"
26 24
27RCSID("$Id: bsd-nextstep.c,v 1.6 2003/06/01 03:23:57 mouring Exp $"); 25RCSID("$Id: bsd-nextstep.c,v 1.4 2001/03/26 05:35:34 mouring Exp $");
28 26
29#ifdef HAVE_NEXT 27#ifdef HAVE_NEXT
30#include <errno.h> 28#include <errno.h>
@@ -42,7 +40,7 @@ posix_wait(int *status)
42 if (status) 40 if (status)
43 *status = (int) statusp.w_status; 41 *status = (int) statusp.w_status;
44 42
45 return (wait_pid); 43 return wait_pid;
46} 44}
47 45
48int 46int
diff --git a/openbsd-compat/bsd-nextstep.h b/openbsd-compat/bsd-nextstep.h
index ca5b4b54a..c6a7019c6 100644
--- a/openbsd-compat/bsd-nextstep.h
+++ b/openbsd-compat/bsd-nextstep.h
@@ -1,8 +1,4 @@
1/* $Id: bsd-nextstep.h,v 1.9 2003/08/29 16:59:52 mouring Exp $ */
2
3/* 1/*
4 * Copyright (c) 2000,2001 Ben Lindstrom. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without 2 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 3 * modification, are permitted provided that the following conditions
8 * are met: 4 * are met:
@@ -25,6 +21,8 @@
25 * 21 *
26 */ 22 */
27 23
24/* $Id: bsd-nextstep.h,v 1.6 2001/03/19 13:42:22 mouring Exp $ */
25
28#ifndef _NEXT_POSIX_H 26#ifndef _NEXT_POSIX_H
29#define _NEXT_POSIX_H 27#define _NEXT_POSIX_H
30 28
@@ -39,21 +37,22 @@
39#define dirent direct 37#define dirent direct
40 38
41/* Swap out NeXT's BSD wait() for a more POSIX complient one */ 39/* Swap out NeXT's BSD wait() for a more POSIX complient one */
42pid_t posix_wait(int *); 40pid_t posix_wait(int *status);
43#define wait(a) posix_wait(a) 41#define wait(a) posix_wait(a)
44 42
45/* #ifdef wrapped functions that need defining for clean compiling */ 43/* #ifdef wrapped functions that need defining for clean compiling */
46pid_t getppid(void); 44pid_t getppid(void);
47void vhangup(void); 45void vhangup(void);
48int innetgr(const char *, const char *, const char *, const char *); 46int innetgr(const char *netgroup, const char *host, const char *user,
47 const char *domain);
49 48
50/* TERMCAP */ 49/* TERMCAP */
51int tcgetattr(int, struct termios *); 50int tcgetattr(int fd, struct termios *t);
52int tcsetattr(int, int, const struct termios *); 51int tcsetattr(int fd, int opt, const struct termios *t);
53int tcsetpgrp(int, pid_t); 52int tcsetpgrp(int fd, pid_t pgrp);
54speed_t cfgetospeed(const struct termios *); 53speed_t cfgetospeed(const struct termios *t);
55speed_t cfgetispeed(const struct termios *); 54speed_t cfgetispeed(const struct termios *t);
56int cfsetospeed(struct termios *, int); 55int cfsetospeed(struct termios *t, int speed);
57int cfsetispeed(struct termios *, int); 56int cfsetispeed(struct termios *t, int speed);
58#endif /* HAVE_NEXT */ 57#endif /* HAVE_NEXT */
59#endif /* _NEXT_POSIX_H */ 58#endif /* _NEXT_POSIX_H */
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index e4d8a439a..2f82180d1 100644
--- a/openbsd-compat/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
@@ -58,7 +58,7 @@
58 58
59#include "includes.h" 59#include "includes.h"
60 60
61RCSID("$Id: bsd-snprintf.c,v 1.7 2003/05/18 14:13:39 djm Exp $"); 61RCSID("$Id: bsd-snprintf.c,v 1.6 2003/04/01 11:31:56 djm Exp $");
62 62
63#if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */ 63#if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */
64# undef HAVE_SNPRINTF 64# undef HAVE_SNPRINTF
@@ -72,15 +72,15 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args);
72 72
73static void 73static void
74fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags, 74fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags,
75 int min, int max); 75 int min, int max);
76 76
77static void 77static void
78fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base, 78fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
79 int min, int max, int flags); 79 int min, int max, int flags);
80 80
81static void 81static void
82fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue, 82fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
83 int min, int max, int flags); 83 int min, int max, int flags);
84 84
85static void 85static void
86dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c); 86dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c);
@@ -121,10 +121,15 @@ dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c);
121static void 121static void
122dopr(char *buffer, size_t maxlen, const char *format, va_list args) 122dopr(char *buffer, size_t maxlen, const char *format, va_list args)
123{ 123{
124 char *strvalue, ch; 124 char *strvalue;
125 char ch;
125 long value; 126 long value;
126 long double fvalue; 127 long double fvalue;
127 int min = 0, max = -1, state = DP_S_DEFAULT, flags = 0, cflags = 0; 128 int min = 0;
129 int max = -1;
130 int state = DP_S_DEFAULT;
131 int flags = 0;
132 int cflags = 0;
128 size_t currlen = 0; 133 size_t currlen = 0;
129 134
130 ch = *format++; 135 ch = *format++;
@@ -134,224 +139,224 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
134 state = DP_S_DONE; 139 state = DP_S_DONE;
135 140
136 switch(state) { 141 switch(state) {
137 case DP_S_DEFAULT: 142 case DP_S_DEFAULT:
138 if (ch == '%') 143 if (ch == '%')
139 state = DP_S_FLAGS; 144 state = DP_S_FLAGS;
140 else 145 else
141 dopr_outch(buffer, &currlen, maxlen, ch); 146 dopr_outch(buffer, &currlen, maxlen, ch);
142 ch = *format++;
143 break;
144 case DP_S_FLAGS:
145 switch (ch) {
146 case '-':
147 flags |= DP_F_MINUS;
148 ch = *format++; 147 ch = *format++;
149 break; 148 break;
150 case '+': 149 case DP_S_FLAGS:
151 flags |= DP_F_PLUS; 150 switch (ch) {
152 ch = *format++; 151 case '-':
153 break; 152 flags |= DP_F_MINUS;
154 case ' ': 153 ch = *format++;
155 flags |= DP_F_SPACE; 154 break;
156 ch = *format++; 155 case '+':
157 break; 156 flags |= DP_F_PLUS;
158 case '#': 157 ch = *format++;
159 flags |= DP_F_NUM; 158 break;
160 ch = *format++; 159 case ' ':
161 break; 160 flags |= DP_F_SPACE;
162 case '0': 161 ch = *format++;
163 flags |= DP_F_ZERO; 162 break;
164 ch = *format++; 163 case '#':
165 break; 164 flags |= DP_F_NUM;
166 default: 165 ch = *format++;
167 state = DP_S_MIN; 166 break;
168 break; 167 case '0':
169 } 168 flags |= DP_F_ZERO;
170 break; 169 ch = *format++;
171 case DP_S_MIN: 170 break;
172 if (isdigit((unsigned char)ch)) { 171 default:
173 min = 10 * min + char_to_int (ch); 172 state = DP_S_MIN;
174 ch = *format++; 173 break;
175 } else if (ch == '*') {
176 min = va_arg (args, int);
177 ch = *format++;
178 state = DP_S_DOT;
179 } else
180 state = DP_S_DOT;
181 break;
182 case DP_S_DOT:
183 if (ch == '.') {
184 state = DP_S_MAX;
185 ch = *format++;
186 } else
187 state = DP_S_MOD;
188 break;
189 case DP_S_MAX:
190 if (isdigit((unsigned char)ch)) {
191 if (max < 0)
192 max = 0;
193 max = 10 * max + char_to_int(ch);
194 ch = *format++;
195 } else if (ch == '*') {
196 max = va_arg (args, int);
197 ch = *format++;
198 state = DP_S_MOD;
199 } else
200 state = DP_S_MOD;
201 break;
202 case DP_S_MOD:
203 switch (ch) {
204 case 'h':
205 cflags = DP_C_SHORT;
206 ch = *format++;
207 break;
208 case 'l':
209 cflags = DP_C_LONG;
210 ch = *format++;
211 if (ch == 'l') {
212 cflags = DP_C_LONG_LONG;
213 ch = *format++;
214 } 174 }
215 break; 175 break;
216 case 'q': 176 case DP_S_MIN:
217 cflags = DP_C_LONG_LONG; 177 if (isdigit((unsigned char)ch)) {
218 ch = *format++; 178 min = 10*min + char_to_int (ch);
219 break; 179 ch = *format++;
220 case 'L': 180 } else if (ch == '*') {
221 cflags = DP_C_LDOUBLE; 181 min = va_arg (args, int);
222 ch = *format++; 182 ch = *format++;
223 break; 183 state = DP_S_DOT;
224 default: 184 } else
225 break; 185 state = DP_S_DOT;
226 }
227 state = DP_S_CONV;
228 break;
229 case DP_S_CONV:
230 switch (ch) {
231 case 'd':
232 case 'i':
233 if (cflags == DP_C_SHORT)
234 value = va_arg(args, int);
235 else if (cflags == DP_C_LONG)
236 value = va_arg(args, long int);
237 else if (cflags == DP_C_LONG_LONG)
238 value = va_arg (args, long long);
239 else
240 value = va_arg (args, int);
241 fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags);
242 break;
243 case 'o':
244 flags |= DP_F_UNSIGNED;
245 if (cflags == DP_C_SHORT)
246 value = va_arg(args, unsigned int);
247 else if (cflags == DP_C_LONG)
248 value = va_arg(args, unsigned long int);
249 else if (cflags == DP_C_LONG_LONG)
250 value = va_arg(args, unsigned long long);
251 else
252 value = va_arg(args, unsigned int);
253 fmtint(buffer, &currlen, maxlen, value, 8, min, max, flags);
254 break;
255 case 'u':
256 flags |= DP_F_UNSIGNED;
257 if (cflags == DP_C_SHORT)
258 value = va_arg(args, unsigned int);
259 else if (cflags == DP_C_LONG)
260 value = va_arg(args, unsigned long int);
261 else if (cflags == DP_C_LONG_LONG)
262 value = va_arg(args, unsigned long long);
263 else
264 value = va_arg(args, unsigned int);
265 fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
266 break;
267 case 'X':
268 flags |= DP_F_UP;
269 case 'x':
270 flags |= DP_F_UNSIGNED;
271 if (cflags == DP_C_SHORT)
272 value = va_arg(args, unsigned int);
273 else if (cflags == DP_C_LONG)
274 value = va_arg(args, unsigned long int);
275 else if (cflags == DP_C_LONG_LONG)
276 value = va_arg(args, unsigned long long);
277 else
278 value = va_arg(args, unsigned int);
279 fmtint(buffer, &currlen, maxlen, value, 16, min, max, flags);
280 break;
281 case 'f':
282 if (cflags == DP_C_LDOUBLE)
283 fvalue = va_arg(args, long double);
284 else
285 fvalue = va_arg(args, double);
286 /* um, floating point? */
287 fmtfp(buffer, &currlen, maxlen, fvalue, min, max, flags);
288 break;
289 case 'E':
290 flags |= DP_F_UP;
291 case 'e':
292 if (cflags == DP_C_LDOUBLE)
293 fvalue = va_arg(args, long double);
294 else
295 fvalue = va_arg(args, double);
296 break;
297 case 'G':
298 flags |= DP_F_UP;
299 case 'g':
300 if (cflags == DP_C_LDOUBLE)
301 fvalue = va_arg(args, long double);
302 else
303 fvalue = va_arg(args, double);
304 break;
305 case 'c':
306 dopr_outch(buffer, &currlen, maxlen, va_arg(args, int));
307 break; 186 break;
308 case 's': 187 case DP_S_DOT:
309 strvalue = va_arg(args, char *); 188 if (ch == '.') {
310 if (max < 0) 189 state = DP_S_MAX;
311 max = maxlen; /* ie, no max */ 190 ch = *format++;
312 fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max); 191 } else
192 state = DP_S_MOD;
313 break; 193 break;
314 case 'p': 194 case DP_S_MAX:
315 strvalue = va_arg(args, void *); 195 if (isdigit((unsigned char)ch)) {
316 fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); 196 if (max < 0)
197 max = 0;
198 max = 10*max + char_to_int(ch);
199 ch = *format++;
200 } else if (ch == '*') {
201 max = va_arg (args, int);
202 ch = *format++;
203 state = DP_S_MOD;
204 } else
205 state = DP_S_MOD;
317 break; 206 break;
318 case 'n': 207 case DP_S_MOD:
319 if (cflags == DP_C_SHORT) { 208 switch (ch) {
320 short int *num; 209 case 'h':
321 num = va_arg(args, short int *); 210 cflags = DP_C_SHORT;
322 *num = currlen; 211 ch = *format++;
323 } else if (cflags == DP_C_LONG) { 212 break;
324 long int *num; 213 case 'l':
325 num = va_arg(args, long int *); 214 cflags = DP_C_LONG;
326 *num = currlen; 215 ch = *format++;
327 } else if (cflags == DP_C_LONG_LONG) { 216 if (ch == 'l') {
328 long long *num; 217 cflags = DP_C_LONG_LONG;
329 num = va_arg(args, long long *); 218 ch = *format++;
330 *num = currlen; 219 }
331 } else { 220 break;
332 int *num; 221 case 'q':
333 num = va_arg(args, int *); 222 cflags = DP_C_LONG_LONG;
334 *num = currlen; 223 ch = *format++;
224 break;
225 case 'L':
226 cflags = DP_C_LDOUBLE;
227 ch = *format++;
228 break;
229 default:
230 break;
335 } 231 }
232 state = DP_S_CONV;
336 break; 233 break;
337 case '%': 234 case DP_S_CONV:
338 dopr_outch(buffer, &currlen, maxlen, ch); 235 switch (ch) {
339 break; 236 case 'd':
340 case 'w': /* not supported yet, treat as next char */ 237 case 'i':
238 if (cflags == DP_C_SHORT)
239 value = va_arg(args, int);
240 else if (cflags == DP_C_LONG)
241 value = va_arg(args, long int);
242 else if (cflags == DP_C_LONG_LONG)
243 value = va_arg (args, long long);
244 else
245 value = va_arg (args, int);
246 fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags);
247 break;
248 case 'o':
249 flags |= DP_F_UNSIGNED;
250 if (cflags == DP_C_SHORT)
251 value = va_arg(args, unsigned int);
252 else if (cflags == DP_C_LONG)
253 value = va_arg(args, unsigned long int);
254 else if (cflags == DP_C_LONG_LONG)
255 value = va_arg(args, unsigned long long);
256 else
257 value = va_arg(args, unsigned int);
258 fmtint(buffer, &currlen, maxlen, value, 8, min, max, flags);
259 break;
260 case 'u':
261 flags |= DP_F_UNSIGNED;
262 if (cflags == DP_C_SHORT)
263 value = va_arg(args, unsigned int);
264 else if (cflags == DP_C_LONG)
265 value = va_arg(args, unsigned long int);
266 else if (cflags == DP_C_LONG_LONG)
267 value = va_arg(args, unsigned long long);
268 else
269 value = va_arg(args, unsigned int);
270 fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
271 break;
272 case 'X':
273 flags |= DP_F_UP;
274 case 'x':
275 flags |= DP_F_UNSIGNED;
276 if (cflags == DP_C_SHORT)
277 value = va_arg(args, unsigned int);
278 else if (cflags == DP_C_LONG)
279 value = va_arg(args, unsigned long int);
280 else if (cflags == DP_C_LONG_LONG)
281 value = va_arg(args, unsigned long long);
282 else
283 value = va_arg(args, unsigned int);
284 fmtint(buffer, &currlen, maxlen, value, 16, min, max, flags);
285 break;
286 case 'f':
287 if (cflags == DP_C_LDOUBLE)
288 fvalue = va_arg(args, long double);
289 else
290 fvalue = va_arg(args, double);
291 /* um, floating point? */
292 fmtfp(buffer, &currlen, maxlen, fvalue, min, max, flags);
293 break;
294 case 'E':
295 flags |= DP_F_UP;
296 case 'e':
297 if (cflags == DP_C_LDOUBLE)
298 fvalue = va_arg(args, long double);
299 else
300 fvalue = va_arg(args, double);
301 break;
302 case 'G':
303 flags |= DP_F_UP;
304 case 'g':
305 if (cflags == DP_C_LDOUBLE)
306 fvalue = va_arg(args, long double);
307 else
308 fvalue = va_arg(args, double);
309 break;
310 case 'c':
311 dopr_outch(buffer, &currlen, maxlen, va_arg(args, int));
312 break;
313 case 's':
314 strvalue = va_arg(args, char *);
315 if (max < 0)
316 max = maxlen; /* ie, no max */
317 fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max);
318 break;
319 case 'p':
320 strvalue = va_arg(args, void *);
321 fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
322 break;
323 case 'n':
324 if (cflags == DP_C_SHORT) {
325 short int *num;
326 num = va_arg(args, short int *);
327 *num = currlen;
328 } else if (cflags == DP_C_LONG) {
329 long int *num;
330 num = va_arg(args, long int *);
331 *num = currlen;
332 } else if (cflags == DP_C_LONG_LONG) {
333 long long *num;
334 num = va_arg(args, long long *);
335 *num = currlen;
336 } else {
337 int *num;
338 num = va_arg(args, int *);
339 *num = currlen;
340 }
341 break;
342 case '%':
343 dopr_outch(buffer, &currlen, maxlen, ch);
344 break;
345 case 'w': /* not supported yet, treat as next char */
346 ch = *format++;
347 break;
348 default: /* Unknown, skip */
349 break;
350 }
341 ch = *format++; 351 ch = *format++;
352 state = DP_S_DEFAULT;
353 flags = cflags = min = 0;
354 max = -1;
342 break; 355 break;
343 default: /* Unknown, skip */ 356 case DP_S_DONE:
344 break; 357 break;
345 } 358 default: /* hmm? */
346 ch = *format++; 359 break; /* some picky compilers need this */
347 state = DP_S_DEFAULT;
348 flags = cflags = min = 0;
349 max = -1;
350 break;
351 case DP_S_DONE:
352 break;
353 default: /* hmm? */
354 break; /* some picky compilers need this */
355 } 360 }
356 } 361 }
357 if (currlen < maxlen - 1) 362 if (currlen < maxlen - 1)
@@ -362,9 +367,10 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
362 367
363static void 368static void
364fmtstr(char *buffer, size_t *currlen, size_t maxlen, 369fmtstr(char *buffer, size_t *currlen, size_t maxlen,
365 char *value, int flags, int min, int max) 370 char *value, int flags, int min, int max)
366{ 371{
367 int cnt = 0, padlen, strln; /* amount to pad */ 372 int padlen, strln; /* amount to pad */
373 int cnt = 0;
368 374
369 if (value == 0) 375 if (value == 0)
370 value = "<NULL>"; 376 value = "<NULL>";
@@ -396,13 +402,15 @@ fmtstr(char *buffer, size_t *currlen, size_t maxlen,
396 402
397static void 403static void
398fmtint(char *buffer, size_t *currlen, size_t maxlen, 404fmtint(char *buffer, size_t *currlen, size_t maxlen,
399 long value, int base, int min, int max, int flags) 405 long value, int base, int min, int max, int flags)
400{ 406{
401 unsigned long uvalue; 407 unsigned long uvalue;
402 char convert[20]; 408 char convert[20];
403 int signvalue = 0, place = 0, caps = 0; 409 int signvalue = 0;
410 int place = 0;
404 int spadlen = 0; /* amount to space pad */ 411 int spadlen = 0; /* amount to space pad */
405 int zpadlen = 0; /* amount to zero pad */ 412 int zpadlen = 0; /* amount to zero pad */
413 int caps = 0;
406 414
407 if (max < 0) 415 if (max < 0)
408 max = 0; 416 max = 0;
@@ -421,10 +429,11 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen,
421 429
422 if (flags & DP_F_UP) 430 if (flags & DP_F_UP)
423 caps = 1; /* Should characters be upper case? */ 431 caps = 1; /* Should characters be upper case? */
432
424 do { 433 do {
425 convert[place++] = 434 convert[place++] =
426 (caps ? "0123456789ABCDEF" : "0123456789abcdef") 435 (caps? "0123456789ABCDEF":"0123456789abcdef")
427 [uvalue % (unsigned)base]; 436 [uvalue % (unsigned)base];
428 uvalue = (uvalue / (unsigned)base ); 437 uvalue = (uvalue / (unsigned)base );
429 } while (uvalue && (place < 20)); 438 } while (uvalue && (place < 20));
430 if (place == 20) 439 if (place == 20)
@@ -444,6 +453,7 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen,
444 if (flags & DP_F_MINUS) 453 if (flags & DP_F_MINUS)
445 spadlen = -spadlen; /* Left Justifty */ 454 spadlen = -spadlen; /* Left Justifty */
446 455
456
447 /* Spaces */ 457 /* Spaces */
448 while (spadlen > 0) { 458 while (spadlen > 0) {
449 dopr_outch(buffer, currlen, maxlen, ' '); 459 dopr_outch(buffer, currlen, maxlen, ' ');
@@ -502,11 +512,16 @@ static void
502fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue, 512fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
503 int min, int max, int flags) 513 int min, int max, int flags)
504{ 514{
505 char iconvert[20], fconvert[20]; 515 char iconvert[20];
506 int signvalue = 0, iplace = 0, fplace = 0; 516 char fconvert[20];
517 int signvalue = 0;
518 int iplace = 0;
519 int fplace = 0;
507 int padlen = 0; /* amount to pad */ 520 int padlen = 0; /* amount to pad */
508 int zpadlen = 0, caps = 0; 521 int zpadlen = 0;
509 long intpart, fracpart; 522 int caps = 0;
523 long intpart;
524 long fracpart;
510 long double ufvalue; 525 long double ufvalue;
511 526
512 /* 527 /*
@@ -547,8 +562,7 @@ fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
547 /* Convert integer part */ 562 /* Convert integer part */
548 do { 563 do {
549 iconvert[iplace++] = 564 iconvert[iplace++] =
550 (caps ? "0123456789ABCDEF" : "0123456789abcdef") 565 (caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10];
551 [intpart % 10];
552 intpart = (intpart / 10); 566 intpart = (intpart / 10);
553 } while(intpart && (iplace < 20)); 567 } while(intpart && (iplace < 20));
554 if (iplace == 20) 568 if (iplace == 20)
@@ -558,8 +572,7 @@ fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
558 /* Convert fractional part */ 572 /* Convert fractional part */
559 do { 573 do {
560 fconvert[fplace++] = 574 fconvert[fplace++] =
561 (caps ? "0123456789ABCDEF" : "0123456789abcdef") 575 (caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10];
562 [fracpart % 10];
563 fracpart = (fracpart / 10); 576 fracpart = (fracpart / 10);
564 } while(fracpart && (fplace < 20)); 577 } while(fracpart && (fplace < 20));
565 if (fplace == 20) 578 if (fplace == 20)
@@ -598,8 +611,8 @@ fmtfp(char *buffer, size_t *currlen, size_t maxlen, long double fvalue,
598 dopr_outch(buffer, currlen, maxlen, iconvert[--iplace]); 611 dopr_outch(buffer, currlen, maxlen, iconvert[--iplace]);
599 612
600 /* 613 /*
601 * Decimal point. This should probably use locale to find the 614 * Decimal point. This should probably use locale to find the correct
602 * correct char to print out. 615 * char to print out.
603 */ 616 */
604 dopr_outch(buffer, currlen, maxlen, '.'); 617 dopr_outch(buffer, currlen, maxlen, '.');
605 618
@@ -649,4 +662,90 @@ snprintf(char *str,size_t count,const char *fmt,...)
649 return(strlen(str)); 662 return(strlen(str));
650} 663}
651 664
665#ifdef TEST_SNPRINTF
666int
667main(void)
668{
669#define LONG_STRING 1024
670 char buf1[LONG_STRING];
671 char buf2[LONG_STRING];
672 char *fp_fmt[] = {
673 "%-1.5f",
674 "%1.5f",
675 "%123.9f",
676 "%10.5f",
677 "% 10.5f",
678 "%+22.9f",
679 "%+4.9f",
680 "%01.3f",
681 "%4f",
682 "%3.1f",
683 "%3.2f",
684 NULL
685 };
686 double fp_nums[] = {
687 -1.5,
688 134.21,
689 91340.2,
690 341.1234,
691 0203.9,
692 0.96,
693 0.996,
694 0.9996,
695 1.996,
696 4.136,
697 0
698 };
699 char *int_fmt[] = {
700 "%-1.5d",
701 "%1.5d",
702 "%123.9d",
703 "%5.5d",
704 "%10.5d",
705 "% 10.5d",
706 "%+22.33d",
707 "%01.3d",
708 "%4d",
709 "%lld",
710 "%qd",
711 NULL
712 };
713 long long int_nums[] = { -1, 134, 91340, 341, 0203, 0, 9999999 };
714 int x, y;
715 int fail = 0;
716 int num = 0;
717
718 printf("Testing snprintf format codes against system sprintf...\n");
719
720 for (x = 0; fp_fmt[x] != NULL ; x++) {
721 for (y = 0; fp_nums[y] != 0 ; y++) {
722 snprintf(buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
723 sprintf (buf2, fp_fmt[x], fp_nums[y]);
724 if (strcmp (buf1, buf2)) {
725 printf("snprintf doesn't match Format: %s\n\t"
726 "snprintf = %s\n\tsprintf = %s\n",
727 fp_fmt[x], buf1, buf2);
728 fail++;
729 }
730 num++;
731 }
732 }
733 for (x = 0; int_fmt[x] != NULL ; x++) {
734 for (y = 0; int_nums[y] != 0 ; y++) {
735 snprintf(buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
736 sprintf(buf2, int_fmt[x], int_nums[y]);
737 if (strcmp (buf1, buf2)) {
738 printf("snprintf doesn't match Format: %s\n\t"
739 "snprintf = %s\n\tsprintf = %s\n",
740 int_fmt[x], buf1, buf2);
741 fail++;
742 }
743 num++;
744 }
745 }
746 printf("%d tests failed out of %d.\n", fail, num);
747 return(0);
748}
749#endif /* SNPRINTF_TEST */
750
652#endif /* !HAVE_SNPRINTF */ 751#endif /* !HAVE_SNPRINTF */
diff --git a/openbsd-compat/bsd-snprintf.h b/openbsd-compat/bsd-snprintf.h
new file mode 100644
index 000000000..002b764e3
--- /dev/null
+++ b/openbsd-compat/bsd-snprintf.h
@@ -0,0 +1,19 @@
1/* $Id: bsd-snprintf.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_SNPRINTF_H
4#define _BSD_SNPRINTF_H
5
6#include "config.h"
7
8#include <sys/types.h> /* For size_t */
9
10#ifndef HAVE_SNPRINTF
11int snprintf(char *str, size_t count, const char *fmt, ...);
12#endif /* !HAVE_SNPRINTF */
13
14#ifndef HAVE_VSNPRINTF
15int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
16#endif /* !HAVE_SNPRINTF */
17
18
19#endif /* _BSD_SNPRINTF_H */
diff --git a/openbsd-compat/bsd-waitpid.c b/openbsd-compat/bsd-waitpid.c
index 93c9ec35e..47b4446dc 100644
--- a/openbsd-compat/bsd-waitpid.c
+++ b/openbsd-compat/bsd-waitpid.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * Copyright (c) 2000 Ben Lindstrom. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without 2 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 3 * modification, are permitted provided that the following conditions
6 * are met: 4 * are met:
@@ -24,7 +22,7 @@
24 22
25#include "includes.h" 23#include "includes.h"
26 24
27RCSID("$Id: bsd-waitpid.c,v 1.5 2003/06/01 03:23:57 mouring Exp $"); 25RCSID("$Id: bsd-waitpid.c,v 1.3 2001/03/26 05:35:34 mouring Exp $");
28 26
29#ifndef HAVE_WAITPID 27#ifndef HAVE_WAITPID
30#include <errno.h> 28#include <errno.h>
@@ -40,16 +38,15 @@ waitpid(int pid, int *stat_loc, int options)
40 if (pid <= 0) { 38 if (pid <= 0) {
41 if (pid != -1) { 39 if (pid != -1) {
42 errno = EINVAL; 40 errno = EINVAL;
43 return (-1); 41 return -1;
44 } 42 }
45 /* wait4() wants pid=0 for indiscriminate wait. */ 43 pid = 0; /* wait4() wants pid=0 for indiscriminate wait. */
46 pid = 0;
47 } 44 }
48 wait_pid = wait4(pid, &statusp, options, NULL); 45 wait_pid = wait4(pid, &statusp, options, NULL);
49 if (stat_loc) 46 if (stat_loc)
50 *stat_loc = (int) statusp.w_status; 47 *stat_loc = (int) statusp.w_status;
51 48
52 return (wait_pid); 49 return wait_pid;
53} 50}
54 51
55#endif /* !HAVE_WAITPID */ 52#endif /* !HAVE_WAITPID */
diff --git a/openbsd-compat/bsd-waitpid.h b/openbsd-compat/bsd-waitpid.h
index 2d853db61..e24edd791 100644
--- a/openbsd-compat/bsd-waitpid.h
+++ b/openbsd-compat/bsd-waitpid.h
@@ -1,8 +1,4 @@
1/* $Id: bsd-waitpid.h,v 1.5 2003/08/29 16:59:52 mouring Exp $ */
2
3/* 1/*
4 * Copyright (c) 2000 Ben Lindstrom. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without 2 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 3 * modification, are permitted provided that the following conditions
8 * are met: 4 * are met:
@@ -25,6 +21,8 @@
25 * 21 *
26 */ 22 */
27 23
24/* $Id: bsd-waitpid.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
25
28#ifndef _BSD_WAITPID_H 26#ifndef _BSD_WAITPID_H
29#define _BSD_WAITPID_H 27#define _BSD_WAITPID_H
30 28
@@ -45,7 +43,7 @@
45#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG) 43#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
46 44
47/* Prototype */ 45/* Prototype */
48pid_t waitpid(int, int *, int); 46pid_t waitpid(int pid, int *stat_loc, int options);
49 47
50#endif /* !HAVE_WAITPID */ 48#endif /* !HAVE_WAITPID */
51#endif /* _BSD_WAITPID_H */ 49#endif /* _BSD_WAITPID_H */
diff --git a/openbsd-compat/daemon.c b/openbsd-compat/daemon.c
index 6dd45f6a7..7d23b2467 100644
--- a/openbsd-compat/daemon.c
+++ b/openbsd-compat/daemon.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -32,11 +36,12 @@
32#ifndef HAVE_DAEMON 36#ifndef HAVE_DAEMON
33 37
34#if defined(LIBC_SCCS) && !defined(lint) 38#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: daemon.c,v 1.5 2003/07/15 17:32:41 deraadt Exp $"; 39static char rcsid[] = "$OpenBSD: daemon.c,v 1.2 1996/08/19 08:22:13 tholo Exp $";
36#endif /* LIBC_SCCS and not lint */ 40#endif /* LIBC_SCCS and not lint */
37 41
38int 42int
39daemon(int nochdir, int noclose) 43daemon(nochdir, noclose)
44 int nochdir, noclose;
40{ 45{
41 int fd; 46 int fd;
42 47
diff --git a/openbsd-compat/daemon.h b/openbsd-compat/daemon.h
new file mode 100644
index 000000000..95a077359
--- /dev/null
+++ b/openbsd-compat/daemon.h
@@ -0,0 +1,11 @@
1/* $Id: daemon.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_DAEMON_H
4#define _BSD_DAEMON_H
5
6#include "config.h"
7#ifndef HAVE_DAEMON
8int daemon(int nochdir, int noclose);
9#endif /* !HAVE_DAEMON */
10
11#endif /* _BSD_DAEMON_H */
diff --git a/openbsd-compat/dirname.c b/openbsd-compat/dirname.c
index 1ab7516d8..35c7d8ec7 100644
--- a/openbsd-compat/dirname.c
+++ b/openbsd-compat/dirname.c
@@ -1,34 +1,46 @@
1/* $OpenBSD: dirname.c,v 1.10 2003/06/17 21:56:23 millert Exp $ */ 1/* $OpenBSD: dirname.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
5 * All rights reserved.
5 * 6 *
6 * Permission to use, copy, modify, and distribute this software for any 7 * Redistribution and use in source and binary forms, with or without
7 * purpose with or without fee is hereby granted, provided that the above 8 * modification, are permitted provided that the following conditions
8 * copyright notice and this permission notice appear in all copies. 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
9 * 17 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 19 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 20 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 21 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 28 */
18 29
19#include "includes.h" 30#include "includes.h"
20#ifndef HAVE_DIRNAME 31#ifndef HAVE_DIRNAME
21 32
22#ifndef lint 33#if defined(LIBC_SCCS) && !defined(lint)
23static char rcsid[] = "$OpenBSD: dirname.c,v 1.10 2003/06/17 21:56:23 millert Exp $"; 34static char rcsid[] = "$OpenBSD: dirname.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $";
24#endif /* not lint */ 35#endif /* LIBC_SCCS and not lint */
25 36
26#include <errno.h> 37#include <errno.h>
27#include <string.h> 38#include <string.h>
28#include <sys/param.h> 39#include <sys/param.h>
29 40
30char * 41char *
31dirname(const char *path) 42dirname(path)
43 const char *path;
32{ 44{
33 static char bname[MAXPATHLEN]; 45 static char bname[MAXPATHLEN];
34 register const char *endp; 46 register const char *endp;
diff --git a/openbsd-compat/dirname.h b/openbsd-compat/dirname.h
new file mode 100644
index 000000000..1d61dd06c
--- /dev/null
+++ b/openbsd-compat/dirname.h
@@ -0,0 +1,5 @@
1#ifndef HAVE_DIRNAME
2
3char *dirname(const char *path);
4
5#endif
diff --git a/openbsd-compat/fake-gai-errnos.h b/openbsd-compat/fake-gai-errnos.h
new file mode 100644
index 000000000..5edc31b59
--- /dev/null
+++ b/openbsd-compat/fake-gai-errnos.h
@@ -0,0 +1,14 @@
1/*
2 * fake library for ssh
3 *
4 * This file is included in getaddrinfo.c and getnameinfo.c.
5 * See getaddrinfo.c and getnameinfo.c.
6 */
7
8/* $Id: fake-gai-errnos.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
9
10/* for old netdb.h */
11#ifndef EAI_NODATA
12#define EAI_NODATA 1
13#define EAI_MEMORY 2
14#endif
diff --git a/openbsd-compat/fake-getaddrinfo.c b/openbsd-compat/fake-getaddrinfo.c
new file mode 100644
index 000000000..e63bda970
--- /dev/null
+++ b/openbsd-compat/fake-getaddrinfo.c
@@ -0,0 +1,135 @@
1/*
2 * fake library for ssh
3 *
4 * This file includes getaddrinfo(), freeaddrinfo() and gai_strerror().
5 * These funtions are defined in rfc2133.
6 *
7 * But these functions are not implemented correctly. The minimum subset
8 * is implemented for ssh use only. For exapmle, this routine assumes
9 * that ai_family is AF_INET. Don't use it for another purpose.
10 */
11
12#include "includes.h"
13#include "ssh.h"
14
15RCSID("$Id: fake-getaddrinfo.c,v 1.5 2003/03/24 02:35:59 djm Exp $");
16
17#ifndef HAVE_GAI_STRERROR
18char *gai_strerror(int ecode)
19{
20 switch (ecode) {
21 case EAI_NODATA:
22 return "no address associated with hostname.";
23 case EAI_MEMORY:
24 return "memory allocation failure.";
25 default:
26 return "unknown error.";
27 }
28}
29#endif /* !HAVE_GAI_STRERROR */
30
31#ifndef HAVE_FREEADDRINFO
32void freeaddrinfo(struct addrinfo *ai)
33{
34 struct addrinfo *next;
35
36 do {
37 next = ai->ai_next;
38 free(ai);
39 } while (NULL != (ai = next));
40}
41#endif /* !HAVE_FREEADDRINFO */
42
43#ifndef HAVE_GETADDRINFO
44static struct addrinfo *malloc_ai(int port, u_long addr)
45{
46 struct addrinfo *ai;
47
48 ai = malloc(sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
49 if (ai == NULL)
50 return(NULL);
51
52 memset(ai, 0, sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
53
54 ai->ai_addr = (struct sockaddr *)(ai + 1);
55 /* XXX -- ssh doesn't use sa_len */
56 ai->ai_addrlen = sizeof(struct sockaddr_in);
57 ai->ai_addr->sa_family = ai->ai_family = AF_INET;
58
59 ((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
60 ((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
61
62 return(ai);
63}
64
65int getaddrinfo(const char *hostname, const char *servname,
66 const struct addrinfo *hints, struct addrinfo **res)
67{
68 struct addrinfo *cur, *prev = NULL;
69 struct hostent *hp;
70 struct servent *sp;
71 struct in_addr in;
72 int i;
73 long int port;
74 u_long addr;
75
76 port = 0;
77 if (servname != NULL) {
78 char *cp;
79
80 port = strtol(servname, &cp, 10);
81 if (port > 0 && port <= 65535 && *cp == '\0')
82 port = htons(port);
83 else if ((sp = getservbyname(servname, NULL)) != NULL)
84 port = sp->s_port;
85 else
86 port = 0;
87 }
88
89 if (hints && hints->ai_flags & AI_PASSIVE) {
90 addr = htonl(0x00000000);
91 if (hostname && inet_aton(hostname, &in) != 0)
92 addr = in.s_addr;
93 if (NULL != (*res = malloc_ai(port, addr)))
94 return 0;
95 else
96 return EAI_MEMORY;
97 }
98
99 if (!hostname) {
100 if (NULL != (*res = malloc_ai(port, htonl(0x7f000001))))
101 return 0;
102 else
103 return EAI_MEMORY;
104 }
105
106 if (inet_aton(hostname, &in)) {
107 if (NULL != (*res = malloc_ai(port, in.s_addr)))
108 return 0;
109 else
110 return EAI_MEMORY;
111 }
112
113 hp = gethostbyname(hostname);
114 if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
115 for (i = 0; hp->h_addr_list[i]; i++) {
116 cur = malloc_ai(port, ((struct in_addr *)hp->h_addr_list[i])->s_addr);
117 if (cur == NULL) {
118 if (*res)
119 freeaddrinfo(*res);
120 return EAI_MEMORY;
121 }
122
123 if (prev)
124 prev->ai_next = cur;
125 else
126 *res = cur;
127
128 prev = cur;
129 }
130 return 0;
131 }
132
133 return EAI_NODATA;
134}
135#endif /* !HAVE_GETADDRINFO */
diff --git a/openbsd-compat/fake-getaddrinfo.h b/openbsd-compat/fake-getaddrinfo.h
new file mode 100644
index 000000000..6943378e9
--- /dev/null
+++ b/openbsd-compat/fake-getaddrinfo.h
@@ -0,0 +1,47 @@
1/* $Id: fake-getaddrinfo.h,v 1.4 2003/02/24 01:35:09 djm Exp $ */
2
3#ifndef _FAKE_GETADDRINFO_H
4#define _FAKE_GETADDRINFO_H
5
6#include "config.h"
7
8#include "fake-gai-errnos.h"
9
10#ifndef AI_PASSIVE
11# define AI_PASSIVE 1
12# define AI_CANONNAME 2
13#endif
14
15#ifndef NI_NUMERICHOST
16# define NI_NUMERICHOST 2
17# define NI_NAMEREQD 4
18# define NI_NUMERICSERV 8
19#endif
20
21#ifndef HAVE_STRUCT_ADDRINFO
22struct addrinfo {
23 int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
24 int ai_family; /* PF_xxx */
25 int ai_socktype; /* SOCK_xxx */
26 int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
27 size_t ai_addrlen; /* length of ai_addr */
28 char *ai_canonname; /* canonical name for hostname */
29 struct sockaddr *ai_addr; /* binary address */
30 struct addrinfo *ai_next; /* next structure in linked list */
31};
32#endif /* !HAVE_STRUCT_ADDRINFO */
33
34#ifndef HAVE_GETADDRINFO
35int getaddrinfo(const char *hostname, const char *servname,
36 const struct addrinfo *hints, struct addrinfo **res);
37#endif /* !HAVE_GETADDRINFO */
38
39#ifndef HAVE_GAI_STRERROR
40char *gai_strerror(int ecode);
41#endif /* !HAVE_GAI_STRERROR */
42
43#ifndef HAVE_FREEADDRINFO
44void freeaddrinfo(struct addrinfo *ai);
45#endif /* !HAVE_FREEADDRINFO */
46
47#endif /* _FAKE_GETADDRINFO_H */
diff --git a/openbsd-compat/fake-getnameinfo.c b/openbsd-compat/fake-getnameinfo.c
new file mode 100644
index 000000000..e255ed333
--- /dev/null
+++ b/openbsd-compat/fake-getnameinfo.c
@@ -0,0 +1,55 @@
1/*
2 * fake library for ssh
3 *
4 * This file includes getnameinfo().
5 * These funtions are defined in rfc2133.
6 *
7 * But these functions are not implemented correctly. The minimum subset
8 * is implemented for ssh use only. For exapmle, this routine assumes
9 * that ai_family is AF_INET. Don't use it for another purpose.
10 */
11
12#include "includes.h"
13#include "ssh.h"
14
15RCSID("$Id: fake-getnameinfo.c,v 1.2 2001/02/09 01:55:36 djm Exp $");
16
17#ifndef HAVE_GETNAMEINFO
18int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
19 size_t hostlen, char *serv, size_t servlen, int flags)
20{
21 struct sockaddr_in *sin = (struct sockaddr_in *)sa;
22 struct hostent *hp;
23 char tmpserv[16];
24
25 if (serv) {
26 snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
27 if (strlen(tmpserv) >= servlen)
28 return EAI_MEMORY;
29 else
30 strcpy(serv, tmpserv);
31 }
32
33 if (host) {
34 if (flags & NI_NUMERICHOST) {
35 if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen)
36 return EAI_MEMORY;
37
38 strcpy(host, inet_ntoa(sin->sin_addr));
39 return 0;
40 } else {
41 hp = gethostbyaddr((char *)&sin->sin_addr,
42 sizeof(struct in_addr), AF_INET);
43 if (hp == NULL)
44 return EAI_NODATA;
45
46 if (strlen(hp->h_name) >= hostlen)
47 return EAI_MEMORY;
48
49 strcpy(host, hp->h_name);
50 return 0;
51 }
52 }
53 return 0;
54}
55#endif /* !HAVE_GETNAMEINFO */
diff --git a/openbsd-compat/fake-getnameinfo.h b/openbsd-compat/fake-getnameinfo.h
new file mode 100644
index 000000000..c9b7908aa
--- /dev/null
+++ b/openbsd-compat/fake-getnameinfo.h
@@ -0,0 +1,20 @@
1/* $Id: fake-getnameinfo.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _FAKE_GETNAMEINFO_H
4#define _FAKE_GETNAMEINFO_H
5
6#include "config.h"
7
8#ifndef HAVE_GETNAMEINFO
9int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
10 size_t hostlen, char *serv, size_t servlen, int flags);
11#endif /* !HAVE_GETNAMEINFO */
12
13#ifndef NI_MAXSERV
14# define NI_MAXSERV 32
15#endif /* !NI_MAXSERV */
16#ifndef NI_MAXHOST
17# define NI_MAXHOST 1025
18#endif /* !NI_MAXHOST */
19
20#endif /* _FAKE_GETNAMEINFO_H */
diff --git a/openbsd-compat/fake-rfc2553.c b/openbsd-compat/fake-rfc2553.c
deleted file mode 100644
index f44924836..000000000
--- a/openbsd-compat/fake-rfc2553.c
+++ /dev/null
@@ -1,220 +0,0 @@
1/*
2 * Copyright (C) 2000-2003 Damien Miller. All rights reserved.
3 * Copyright (C) 1999 WIDE Project. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the project nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30/*
31 * Pseudo-implementation of RFC2553 name / address resolution functions
32 *
33 * But these functions are not implemented correctly. The minimum subset
34 * is implemented for ssh use only. For example, this routine assumes
35 * that ai_family is AF_INET. Don't use it for another purpose.
36 */
37
38#include "includes.h"
39
40RCSID("$Id: fake-rfc2553.c,v 1.4 2003/06/13 22:43:23 djm Exp $");
41
42#ifndef HAVE_GETNAMEINFO
43int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
44 size_t hostlen, char *serv, size_t servlen, int flags)
45{
46 struct sockaddr_in *sin = (struct sockaddr_in *)sa;
47 struct hostent *hp;
48 char tmpserv[16];
49
50 if (serv != NULL) {
51 snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
52 if (strlcpy(serv, tmpserv, servlen) >= servlen)
53 return (EAI_MEMORY);
54 }
55
56 if (host != NULL) {
57 if (flags & NI_NUMERICHOST) {
58 if (strlcpy(host, inet_ntoa(sin->sin_addr),
59 hostlen) >= hostlen)
60 return (EAI_MEMORY);
61 else
62 return (0);
63 } else {
64 hp = gethostbyaddr((char *)&sin->sin_addr,
65 sizeof(struct in_addr), AF_INET);
66 if (hp == NULL)
67 return (EAI_NODATA);
68
69 if (strlcpy(host, hp->h_name, hostlen) >= hostlen)
70 return (EAI_MEMORY);
71 else
72 return (0);
73 }
74 }
75 return (0);
76}
77#endif /* !HAVE_GETNAMEINFO */
78
79#ifndef HAVE_GAI_STRERROR
80char *
81gai_strerror(int err)
82{
83 switch (err) {
84 case EAI_NODATA:
85 return ("no address associated with name");
86 case EAI_MEMORY:
87 return ("memory allocation failure.");
88 case EAI_NONAME:
89 return ("nodename nor servname provided, or not known");
90 default:
91 return ("unknown/invalid error.");
92 }
93}
94#endif /* !HAVE_GAI_STRERROR */
95
96#ifndef HAVE_FREEADDRINFO
97void
98freeaddrinfo(struct addrinfo *ai)
99{
100 struct addrinfo *next;
101
102 for(; ai != NULL;) {
103 next = ai->ai_next;
104 free(ai);
105 ai = next;
106 }
107}
108#endif /* !HAVE_FREEADDRINFO */
109
110#ifndef HAVE_GETADDRINFO
111static struct
112addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
113{
114 struct addrinfo *ai;
115
116 ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
117 if (ai == NULL)
118 return (NULL);
119
120 memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in));
121
122 ai->ai_addr = (struct sockaddr *)(ai + 1);
123 /* XXX -- ssh doesn't use sa_len */
124 ai->ai_addrlen = sizeof(struct sockaddr_in);
125 ai->ai_addr->sa_family = ai->ai_family = AF_INET;
126
127 ((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
128 ((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
129
130 /* XXX: the following is not generally correct, but does what we want */
131 if (hints->ai_socktype)
132 ai->ai_socktype = hints->ai_socktype;
133 else
134 ai->ai_socktype = SOCK_STREAM;
135
136 if (hints->ai_protocol)
137 ai->ai_protocol = hints->ai_protocol;
138
139 return (ai);
140}
141
142int
143getaddrinfo(const char *hostname, const char *servname,
144 const struct addrinfo *hints, struct addrinfo **res)
145{
146 struct hostent *hp;
147 struct servent *sp;
148 struct in_addr in;
149 int i;
150 long int port;
151 u_long addr;
152
153 port = 0;
154 if (servname != NULL) {
155 char *cp;
156
157 port = strtol(servname, &cp, 10);
158 if (port > 0 && port <= 65535 && *cp == '\0')
159 port = htons(port);
160 else if ((sp = getservbyname(servname, NULL)) != NULL)
161 port = sp->s_port;
162 else
163 port = 0;
164 }
165
166 if (hints && hints->ai_flags & AI_PASSIVE) {
167 addr = htonl(0x00000000);
168 if (hostname && inet_aton(hostname, &in) != 0)
169 addr = in.s_addr;
170 *res = malloc_ai(port, addr, hints);
171 if (*res == NULL)
172 return (EAI_MEMORY);
173 return (0);
174 }
175
176 if (!hostname) {
177 *res = malloc_ai(port, htonl(0x7f000001), hints);
178 if (*res == NULL)
179 return (EAI_MEMORY);
180 return (0);
181 }
182
183 if (inet_aton(hostname, &in)) {
184 *res = malloc_ai(port, in.s_addr, hints);
185 if (*res == NULL)
186 return (EAI_MEMORY);
187 return (0);
188 }
189
190 /* Don't try DNS if AI_NUMERICHOST is set */
191 if (hints && hints->ai_flags & AI_NUMERICHOST)
192 return (EAI_NONAME);
193
194 hp = gethostbyname(hostname);
195 if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
196 struct addrinfo *cur, *prev;
197
198 cur = prev = *res = NULL;
199 for (i = 0; hp->h_addr_list[i]; i++) {
200 struct in_addr *in = (struct in_addr *)hp->h_addr_list[i];
201
202 cur = malloc_ai(port, in->s_addr, hints);
203 if (cur == NULL) {
204 if (*res != NULL)
205 freeaddrinfo(*res);
206 return (EAI_MEMORY);
207 }
208 if (prev)
209 prev->ai_next = cur;
210 else
211 *res = cur;
212
213 prev = cur;
214 }
215 return (0);
216 }
217
218 return (EAI_NODATA);
219}
220#endif /* !HAVE_GETADDRINFO */
diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h
deleted file mode 100644
index b70b928f8..000000000
--- a/openbsd-compat/fake-rfc2553.h
+++ /dev/null
@@ -1,154 +0,0 @@
1/* $Id: fake-rfc2553.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */
2
3/*
4 * Copyright (C) 2000-2003 Damien Miller. All rights reserved.
5 * Copyright (C) 1999 WIDE Project. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the project nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32/*
33 * Pseudo-implementation of RFC2553 name / address resolution functions
34 *
35 * But these functions are not implemented correctly. The minimum subset
36 * is implemented for ssh use only. For example, this routine assumes
37 * that ai_family is AF_INET. Don't use it for another purpose.
38 */
39
40#ifndef _FAKE_RFC2553_H
41#define _FAKE_RFC2553_H
42
43#include "includes.h"
44#include "sys/types.h"
45
46/*
47 * First, socket and INET6 related definitions
48 */
49#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
50# define _SS_MAXSIZE 128 /* Implementation specific max size */
51# define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
52struct sockaddr_storage {
53 struct sockaddr ss_sa;
54 char __ss_pad2[_SS_PADSIZE];
55};
56# define ss_family ss_sa.sa_family
57#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
58
59#ifndef IN6_IS_ADDR_LOOPBACK
60# define IN6_IS_ADDR_LOOPBACK(a) \
61 (((u_int32_t *)(a))[0] == 0 && ((u_int32_t *)(a))[1] == 0 && \
62 ((u_int32_t *)(a))[2] == 0 && ((u_int32_t *)(a))[3] == htonl(1))
63#endif /* !IN6_IS_ADDR_LOOPBACK */
64
65#ifndef HAVE_STRUCT_IN6_ADDR
66struct in6_addr {
67 u_int8_t s6_addr[16];
68};
69#endif /* !HAVE_STRUCT_IN6_ADDR */
70
71#ifndef HAVE_STRUCT_SOCKADDR_IN6
72struct sockaddr_in6 {
73 unsigned short sin6_family;
74 u_int16_t sin6_port;
75 u_int32_t sin6_flowinfo;
76 struct in6_addr sin6_addr;
77};
78#endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
79
80#ifndef AF_INET6
81/* Define it to something that should never appear */
82#define AF_INET6 AF_MAX
83#endif
84
85/*
86 * Next, RFC2553 name / address resolution API
87 */
88
89#ifndef NI_NUMERICHOST
90# define NI_NUMERICHOST (1)
91#endif
92#ifndef NI_NAMEREQD
93# define NI_NAMEREQD (1<<1)
94#endif
95#ifndef NI_NUMERICSERV
96# define NI_NUMERICSERV (1<<2)
97#endif
98
99#ifndef AI_PASSIVE
100# define AI_PASSIVE (1)
101#endif
102#ifndef AI_CANONNAME
103# define AI_CANONNAME (1<<1)
104#endif
105#ifndef AI_NUMERICHOST
106# define AI_NUMERICHOST (1<<2)
107#endif
108
109#ifndef NI_MAXSERV
110# define NI_MAXSERV 32
111#endif /* !NI_MAXSERV */
112#ifndef NI_MAXHOST
113# define NI_MAXHOST 1025
114#endif /* !NI_MAXHOST */
115
116#ifndef EAI_NODATA
117# define EAI_NODATA 1
118# define EAI_MEMORY 2
119# define EAI_NONAME 3
120#endif
121
122#ifndef HAVE_STRUCT_ADDRINFO
123struct addrinfo {
124 int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
125 int ai_family; /* PF_xxx */
126 int ai_socktype; /* SOCK_xxx */
127 int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
128 size_t ai_addrlen; /* length of ai_addr */
129 char *ai_canonname; /* canonical name for hostname */
130 struct sockaddr *ai_addr; /* binary address */
131 struct addrinfo *ai_next; /* next structure in linked list */
132};
133#endif /* !HAVE_STRUCT_ADDRINFO */
134
135#ifndef HAVE_GETADDRINFO
136int getaddrinfo(const char *, const char *,
137 const struct addrinfo *, struct addrinfo **);
138#endif /* !HAVE_GETADDRINFO */
139
140#ifndef HAVE_GAI_STRERROR
141char *gai_strerror(int);
142#endif /* !HAVE_GAI_STRERROR */
143
144#ifndef HAVE_FREEADDRINFO
145void freeaddrinfo(struct addrinfo *);
146#endif /* !HAVE_FREEADDRINFO */
147
148#ifndef HAVE_GETNAMEINFO
149int getnameinfo(const struct sockaddr *, size_t, char *, size_t,
150 char *, size_t, int);
151#endif /* !HAVE_GETNAMEINFO */
152
153#endif /* !_FAKE_RFC2553_H */
154
diff --git a/openbsd-compat/fake-socket.h b/openbsd-compat/fake-socket.h
new file mode 100644
index 000000000..f364797fa
--- /dev/null
+++ b/openbsd-compat/fake-socket.h
@@ -0,0 +1,47 @@
1/* $Id: fake-socket.h,v 1.3 2002/04/12 03:35:40 tim Exp $ */
2
3#ifndef _FAKE_SOCKET_H
4#define _FAKE_SOCKET_H
5
6#include "includes.h"
7#include "sys/types.h"
8
9#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
10# define _SS_MAXSIZE 128 /* Implementation specific max size */
11# define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
12
13struct sockaddr_storage {
14 struct sockaddr ss_sa;
15 char __ss_pad2[_SS_PADSIZE];
16};
17# define ss_family ss_sa.sa_family
18#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
19
20#ifndef IN6_IS_ADDR_LOOPBACK
21# define IN6_IS_ADDR_LOOPBACK(a) \
22 (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
23 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
24#endif /* !IN6_IS_ADDR_LOOPBACK */
25
26#ifndef HAVE_STRUCT_IN6_ADDR
27struct in6_addr {
28 u_int8_t s6_addr[16];
29};
30#endif /* !HAVE_STRUCT_IN6_ADDR */
31
32#ifndef HAVE_STRUCT_SOCKADDR_IN6
33struct sockaddr_in6 {
34 unsigned short sin6_family;
35 u_int16_t sin6_port;
36 u_int32_t sin6_flowinfo;
37 struct in6_addr sin6_addr;
38};
39#endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
40
41#ifndef AF_INET6
42/* Define it to something that should never appear */
43#define AF_INET6 AF_MAX
44#endif
45
46#endif /* !_FAKE_SOCKET_H */
47
diff --git a/openbsd-compat/getcwd.c b/openbsd-compat/getcwd.c
index 31d1cfe93..f4b98e824 100644
--- a/openbsd-compat/getcwd.c
+++ b/openbsd-compat/getcwd.c
@@ -10,9 +10,6 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 * 13 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 14 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -32,7 +29,7 @@
32#if !defined(HAVE_GETCWD) 29#if !defined(HAVE_GETCWD)
33 30
34#if defined(LIBC_SCCS) && !defined(lint) 31#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: getcwd.c,v 1.9 2003/06/11 21:03:10 deraadt Exp $"; 32static char rcsid[] = "$OpenBSD: getcwd.c,v 1.7 2002/11/24 01:52:27 cloder Exp $";
36#endif /* LIBC_SCCS and not lint */ 33#endif /* LIBC_SCCS and not lint */
37 34
38#include <sys/param.h> 35#include <sys/param.h>
@@ -50,7 +47,7 @@ static char rcsid[] = "$OpenBSD: getcwd.c,v 1.9 2003/06/11 21:03:10 deraadt Exp
50 (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) 47 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
51 48
52char * 49char *
53getcwd(char *pt, size_t size) 50getcwd(char *pt,size_t size)
54{ 51{
55 register struct dirent *dp; 52 register struct dirent *dp;
56 register DIR *dir = NULL; 53 register DIR *dir = NULL;
diff --git a/openbsd-compat/getcwd.h b/openbsd-compat/getcwd.h
new file mode 100644
index 000000000..1137b3ed5
--- /dev/null
+++ b/openbsd-compat/getcwd.h
@@ -0,0 +1,12 @@
1/* $Id: getcwd.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_GETCWD_H
4#define _BSD_GETCWD_H
5#include "config.h"
6
7#if !defined(HAVE_GETCWD)
8
9char *getcwd(char *pt, size_t size);
10
11#endif /* !defined(HAVE_GETCWD) */
12#endif /* _BSD_GETCWD_H */
diff --git a/openbsd-compat/getgrouplist.c b/openbsd-compat/getgrouplist.c
index 085cda8c3..f7a27c339 100644
--- a/openbsd-compat/getgrouplist.c
+++ b/openbsd-compat/getgrouplist.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -32,7 +36,7 @@
32#ifndef HAVE_GETGROUPLIST 36#ifndef HAVE_GETGROUPLIST
33 37
34#if defined(LIBC_SCCS) && !defined(lint) 38#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.9 2003/06/25 21:16:47 deraadt Exp $"; 39static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.7 1997/08/19 19:13:27 deraadt Exp $";
36#endif /* LIBC_SCCS and not lint */ 40#endif /* LIBC_SCCS and not lint */
37 41
38/* 42/*
@@ -40,7 +44,6 @@ static char rcsid[] = "$OpenBSD: getgrouplist.c,v 1.9 2003/06/25 21:16:47 deraad
40 */ 44 */
41#include <sys/types.h> 45#include <sys/types.h>
42#include <string.h> 46#include <string.h>
43#include <unistd.h>
44#include <grp.h> 47#include <grp.h>
45 48
46int 49int
diff --git a/openbsd-compat/getgrouplist.h b/openbsd-compat/getgrouplist.h
new file mode 100644
index 000000000..27a9703f2
--- /dev/null
+++ b/openbsd-compat/getgrouplist.h
@@ -0,0 +1,16 @@
1/* $Id: getgrouplist.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_GETGROUPLIST_H
4#define _BSD_GETGROUPLIST_H
5
6#include "config.h"
7
8#ifndef HAVE_GETGROUPLIST
9
10#include <grp.h>
11
12int getgrouplist(const char *, gid_t, gid_t *, int *);
13
14#endif
15
16#endif
diff --git a/openbsd-compat/getopt.c b/openbsd-compat/getopt.c
index 2136fbfcc..a3fe807ee 100644
--- a/openbsd-compat/getopt.c
+++ b/openbsd-compat/getopt.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -31,7 +35,7 @@
31#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) 35#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET)
32 36
33#if defined(LIBC_SCCS) && !defined(lint) 37#if defined(LIBC_SCCS) && !defined(lint)
34static char *rcsid = "$OpenBSD: getopt.c,v 1.5 2003/06/02 20:18:37 millert Exp $"; 38static char *rcsid = "$OpenBSD: getopt.c,v 1.4 2002/12/08 22:57:14 millert Exp $";
35#endif /* LIBC_SCCS and not lint */ 39#endif /* LIBC_SCCS and not lint */
36 40
37#include <stdio.h> 41#include <stdio.h>
diff --git a/openbsd-compat/getopt.h b/openbsd-compat/getopt.h
new file mode 100644
index 000000000..9abdae8e9
--- /dev/null
+++ b/openbsd-compat/getopt.h
@@ -0,0 +1,14 @@
1/* $Id: getopt.h,v 1.4 2001/09/18 05:05:21 djm Exp $ */
2
3#ifndef _BSDGETOPT_H
4#define _BSDGETOPT_H
5
6#include "config.h"
7
8#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET)
9
10int BSDgetopt(int argc, char * const *argv, const char *opts);
11
12#endif
13
14#endif /* _BSDGETOPT_H */
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
deleted file mode 100644
index 44fa2755b..000000000
--- a/openbsd-compat/getrrsetbyname.c
+++ /dev/null
@@ -1,578 +0,0 @@
1/* $OpenBSD: getrrsetbyname.c,v 1.7 2003/03/07 07:34:14 itojun Exp $ */
2
3/*
4 * Copyright (c) 2001 Jakob Schlyter. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * Portions Copyright (c) 1999-2001 Internet Software Consortium.
31 *
32 * Permission to use, copy, modify, and distribute this software for any
33 * purpose with or without fee is hereby granted, provided that the above
34 * copyright notice and this permission notice appear in all copies.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
37 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
38 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
39 * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
40 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
41 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
42 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
43 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
44 */
45
46#include "includes.h"
47
48#if defined(DNS) && !defined(HAVE_GETRRSETBYNAME)
49
50#include "getrrsetbyname.h"
51
52/* #include "thread_private.h" */
53
54#define ANSWER_BUFFER_SIZE 1024*64
55
56struct dns_query {
57 char *name;
58 u_int16_t type;
59 u_int16_t class;
60 struct dns_query *next;
61};
62
63struct dns_rr {
64 char *name;
65 u_int16_t type;
66 u_int16_t class;
67 u_int16_t ttl;
68 u_int16_t size;
69 void *rdata;
70 struct dns_rr *next;
71};
72
73struct dns_response {
74 HEADER header;
75 struct dns_query *query;
76 struct dns_rr *answer;
77 struct dns_rr *authority;
78 struct dns_rr *additional;
79};
80
81static struct dns_response *parse_dns_response(const u_char *, int);
82static struct dns_query *parse_dns_qsection(const u_char *, int,
83 const u_char **, int);
84static struct dns_rr *parse_dns_rrsection(const u_char *, int, const u_char **,
85 int);
86
87static void free_dns_query(struct dns_query *);
88static void free_dns_rr(struct dns_rr *);
89static void free_dns_response(struct dns_response *);
90
91static int count_dns_rr(struct dns_rr *, u_int16_t, u_int16_t);
92
93/*
94 * Inline versions of get/put short/long. Pointer is advanced.
95 *
96 * These macros demonstrate the property of C whereby it can be
97 * portable or it can be elegant but rarely both.
98 */
99
100#ifndef INT32SZ
101# define INT32SZ 4
102#endif
103#ifndef INT16SZ
104# define INT16SZ 2
105#endif
106
107#ifndef GETSHORT
108#define GETSHORT(s, cp) { \
109 register u_char *t_cp = (u_char *)(cp); \
110 (s) = ((u_int16_t)t_cp[0] << 8) \
111 | ((u_int16_t)t_cp[1]) \
112 ; \
113 (cp) += INT16SZ; \
114}
115#endif
116
117#ifndef GETLONG
118#define GETLONG(l, cp) { \
119 register u_char *t_cp = (u_char *)(cp); \
120 (l) = ((u_int32_t)t_cp[0] << 24) \
121 | ((u_int32_t)t_cp[1] << 16) \
122 | ((u_int32_t)t_cp[2] << 8) \
123 | ((u_int32_t)t_cp[3]) \
124 ; \
125 (cp) += INT32SZ; \
126}
127#endif
128
129/*
130 * Routines to insert/extract short/long's.
131 */
132
133#ifndef HAVE__GETSHORT
134static u_int16_t
135_getshort(msgp)
136 register const u_char *msgp;
137{
138 register u_int16_t u;
139
140 GETSHORT(u, msgp);
141 return (u);
142}
143#endif
144
145#ifndef HAVE__GETLONG
146static u_int32_t
147_getlong(msgp)
148 register const u_char *msgp;
149{
150 register u_int32_t u;
151
152 GETLONG(u, msgp);
153 return (u);
154}
155#endif
156
157int
158getrrsetbyname(const char *hostname, unsigned int rdclass,
159 unsigned int rdtype, unsigned int flags,
160 struct rrsetinfo **res)
161{
162 struct __res_state *_resp = &_res;
163 int result;
164 struct rrsetinfo *rrset = NULL;
165 struct dns_response *response;
166 struct dns_rr *rr;
167 struct rdatainfo *rdata;
168 int length;
169 unsigned int index_ans, index_sig;
170 u_char answer[ANSWER_BUFFER_SIZE];
171
172 /* check for invalid class and type */
173 if (rdclass > 0xffff || rdtype > 0xffff) {
174 result = ERRSET_INVAL;
175 goto fail;
176 }
177
178 /* don't allow queries of class or type ANY */
179 if (rdclass == 0xff || rdtype == 0xff) {
180 result = ERRSET_INVAL;
181 goto fail;
182 }
183
184 /* don't allow flags yet, unimplemented */
185 if (flags) {
186 result = ERRSET_INVAL;
187 goto fail;
188 }
189
190 /* initialize resolver */
191 if ((_resp->options & RES_INIT) == 0 && res_init() == -1) {
192 result = ERRSET_FAIL;
193 goto fail;
194 }
195
196#ifdef DEBUG
197 _resp->options |= RES_DEBUG;
198#endif /* DEBUG */
199
200#ifdef RES_USE_DNSSEC
201 /* turn on DNSSEC if EDNS0 is configured */
202 if (_resp->options & RES_USE_EDNS0)
203 _resp->options |= RES_USE_DNSSEC;
204#endif /* RES_USE_DNSEC */
205
206 /* make query */
207 length = res_query(hostname, (signed int) rdclass, (signed int) rdtype,
208 answer, sizeof(answer));
209 if (length < 0) {
210 switch(h_errno) {
211 case HOST_NOT_FOUND:
212 result = ERRSET_NONAME;
213 goto fail;
214 case NO_DATA:
215 result = ERRSET_NODATA;
216 goto fail;
217 default:
218 result = ERRSET_FAIL;
219 goto fail;
220 }
221 }
222
223 /* parse result */
224 response = parse_dns_response(answer, length);
225 if (response == NULL) {
226 result = ERRSET_FAIL;
227 goto fail;
228 }
229
230 if (response->header.qdcount != 1) {
231 result = ERRSET_FAIL;
232 goto fail;
233 }
234
235 /* initialize rrset */
236 rrset = calloc(1, sizeof(struct rrsetinfo));
237 if (rrset == NULL) {
238 result = ERRSET_NOMEMORY;
239 goto fail;
240 }
241 rrset->rri_rdclass = response->query->class;
242 rrset->rri_rdtype = response->query->type;
243 rrset->rri_ttl = response->answer->ttl;
244 rrset->rri_nrdatas = response->header.ancount;
245
246#ifdef HAVE_HEADER_AD
247 /* check for authenticated data */
248 if (response->header.ad == 1)
249 rrset->rri_flags |= RRSET_VALIDATED;
250#endif
251
252 /* copy name from answer section */
253 length = strlen(response->answer->name);
254 rrset->rri_name = malloc(length + 1);
255 if (rrset->rri_name == NULL) {
256 result = ERRSET_NOMEMORY;
257 goto fail;
258 }
259 strlcpy(rrset->rri_name, response->answer->name, length + 1);
260
261 /* count answers */
262 rrset->rri_nrdatas = count_dns_rr(response->answer, rrset->rri_rdclass,
263 rrset->rri_rdtype);
264 rrset->rri_nsigs = count_dns_rr(response->answer, rrset->rri_rdclass,
265 T_SIG);
266
267 /* allocate memory for answers */
268 rrset->rri_rdatas = calloc(rrset->rri_nrdatas,
269 sizeof(struct rdatainfo));
270 if (rrset->rri_rdatas == NULL) {
271 result = ERRSET_NOMEMORY;
272 goto fail;
273 }
274
275 /* allocate memory for signatures */
276 rrset->rri_sigs = calloc(rrset->rri_nsigs, sizeof(struct rdatainfo));
277 if (rrset->rri_sigs == NULL) {
278 result = ERRSET_NOMEMORY;
279 goto fail;
280 }
281
282 /* copy answers & signatures */
283 for (rr = response->answer, index_ans = 0, index_sig = 0;
284 rr; rr = rr->next) {
285
286 rdata = NULL;
287
288 if (rr->class == rrset->rri_rdclass &&
289 rr->type == rrset->rri_rdtype)
290 rdata = &rrset->rri_rdatas[index_ans++];
291
292 if (rr->class == rrset->rri_rdclass &&
293 rr->type == T_SIG)
294 rdata = &rrset->rri_sigs[index_sig++];
295
296 if (rdata) {
297 rdata->rdi_length = rr->size;
298 rdata->rdi_data = malloc(rr->size);
299
300 if (rdata->rdi_data == NULL) {
301 result = ERRSET_NOMEMORY;
302 goto fail;
303 }
304 memcpy(rdata->rdi_data, rr->rdata, rr->size);
305 }
306 }
307
308 *res = rrset;
309 return (ERRSET_SUCCESS);
310
311fail:
312 if (rrset != NULL)
313 freerrset(rrset);
314 return (result);
315}
316
317void
318freerrset(struct rrsetinfo *rrset)
319{
320 u_int16_t i;
321
322 if (rrset == NULL)
323 return;
324
325 if (rrset->rri_rdatas) {
326 for (i = 0; i < rrset->rri_nrdatas; i++) {
327 if (rrset->rri_rdatas[i].rdi_data == NULL)
328 break;
329 free(rrset->rri_rdatas[i].rdi_data);
330 }
331 free(rrset->rri_rdatas);
332 }
333
334 if (rrset->rri_sigs) {
335 for (i = 0; i < rrset->rri_nsigs; i++) {
336 if (rrset->rri_sigs[i].rdi_data == NULL)
337 break;
338 free(rrset->rri_sigs[i].rdi_data);
339 }
340 free(rrset->rri_sigs);
341 }
342
343 if (rrset->rri_name)
344 free(rrset->rri_name);
345 free(rrset);
346}
347
348/*
349 * DNS response parsing routines
350 */
351static struct dns_response *
352parse_dns_response(const u_char *answer, int size)
353{
354 struct dns_response *resp;
355 const u_char *cp;
356
357 /* allocate memory for the response */
358 resp = calloc(1, sizeof(*resp));
359 if (resp == NULL)
360 return (NULL);
361
362 /* initialize current pointer */
363 cp = answer;
364
365 /* copy header */
366 memcpy(&resp->header, cp, HFIXEDSZ);
367 cp += HFIXEDSZ;
368
369 /* fix header byte order */
370 resp->header.qdcount = ntohs(resp->header.qdcount);
371 resp->header.ancount = ntohs(resp->header.ancount);
372 resp->header.nscount = ntohs(resp->header.nscount);
373 resp->header.arcount = ntohs(resp->header.arcount);
374
375 /* there must be at least one query */
376 if (resp->header.qdcount < 1) {
377 free_dns_response(resp);
378 return (NULL);
379 }
380
381 /* parse query section */
382 resp->query = parse_dns_qsection(answer, size, &cp,
383 resp->header.qdcount);
384 if (resp->header.qdcount && resp->query == NULL) {
385 free_dns_response(resp);
386 return (NULL);
387 }
388
389 /* parse answer section */
390 resp->answer = parse_dns_rrsection(answer, size, &cp,
391 resp->header.ancount);
392 if (resp->header.ancount && resp->answer == NULL) {
393 free_dns_response(resp);
394 return (NULL);
395 }
396
397 /* parse authority section */
398 resp->authority = parse_dns_rrsection(answer, size, &cp,
399 resp->header.nscount);
400 if (resp->header.nscount && resp->authority == NULL) {
401 free_dns_response(resp);
402 return (NULL);
403 }
404
405 /* parse additional section */
406 resp->additional = parse_dns_rrsection(answer, size, &cp,
407 resp->header.arcount);
408 if (resp->header.arcount && resp->additional == NULL) {
409 free_dns_response(resp);
410 return (NULL);
411 }
412
413 return (resp);
414}
415
416static struct dns_query *
417parse_dns_qsection(const u_char *answer, int size, const u_char **cp, int count)
418{
419 struct dns_query *head, *curr, *prev;
420 int i, length;
421 char name[MAXDNAME];
422
423 for (i = 1, head = NULL, prev = NULL; i <= count; i++, prev = curr) {
424
425 /* allocate and initialize struct */
426 curr = calloc(1, sizeof(struct dns_query));
427 if (curr == NULL) {
428 free_dns_query(head);
429 return (NULL);
430 }
431 if (head == NULL)
432 head = curr;
433 if (prev != NULL)
434 prev->next = curr;
435
436 /* name */
437 length = dn_expand(answer, answer + size, *cp, name,
438 sizeof(name));
439 if (length < 0) {
440 free_dns_query(head);
441 return (NULL);
442 }
443 curr->name = strdup(name);
444 if (curr->name == NULL) {
445 free_dns_query(head);
446 return (NULL);
447 }
448 *cp += length;
449
450 /* type */
451 curr->type = _getshort(*cp);
452 *cp += INT16SZ;
453
454 /* class */
455 curr->class = _getshort(*cp);
456 *cp += INT16SZ;
457 }
458
459 return (head);
460}
461
462static struct dns_rr *
463parse_dns_rrsection(const u_char *answer, int size, const u_char **cp, int count)
464{
465 struct dns_rr *head, *curr, *prev;
466 int i, length;
467 char name[MAXDNAME];
468
469 for (i = 1, head = NULL, prev = NULL; i <= count; i++, prev = curr) {
470
471 /* allocate and initialize struct */
472 curr = calloc(1, sizeof(struct dns_rr));
473 if (curr == NULL) {
474 free_dns_rr(head);
475 return (NULL);
476 }
477 if (head == NULL)
478 head = curr;
479 if (prev != NULL)
480 prev->next = curr;
481
482 /* name */
483 length = dn_expand(answer, answer + size, *cp, name,
484 sizeof(name));
485 if (length < 0) {
486 free_dns_rr(head);
487 return (NULL);
488 }
489 curr->name = strdup(name);
490 if (curr->name == NULL) {
491 free_dns_rr(head);
492 return (NULL);
493 }
494 *cp += length;
495
496 /* type */
497 curr->type = _getshort(*cp);
498 *cp += INT16SZ;
499
500 /* class */
501 curr->class = _getshort(*cp);
502 *cp += INT16SZ;
503
504 /* ttl */
505 curr->ttl = _getlong(*cp);
506 *cp += INT32SZ;
507
508 /* rdata size */
509 curr->size = _getshort(*cp);
510 *cp += INT16SZ;
511
512 /* rdata itself */
513 curr->rdata = malloc(curr->size);
514 if (curr->rdata == NULL) {
515 free_dns_rr(head);
516 return (NULL);
517 }
518 memcpy(curr->rdata, *cp, curr->size);
519 *cp += curr->size;
520 }
521
522 return (head);
523}
524
525static void
526free_dns_query(struct dns_query *p)
527{
528 if (p == NULL)
529 return;
530
531 if (p->name)
532 free(p->name);
533 free_dns_query(p->next);
534 free(p);
535}
536
537static void
538free_dns_rr(struct dns_rr *p)
539{
540 if (p == NULL)
541 return;
542
543 if (p->name)
544 free(p->name);
545 if (p->rdata)
546 free(p->rdata);
547 free_dns_rr(p->next);
548 free(p);
549}
550
551static void
552free_dns_response(struct dns_response *p)
553{
554 if (p == NULL)
555 return;
556
557 free_dns_query(p->query);
558 free_dns_rr(p->answer);
559 free_dns_rr(p->authority);
560 free_dns_rr(p->additional);
561 free(p);
562}
563
564static int
565count_dns_rr(struct dns_rr *p, u_int16_t class, u_int16_t type)
566{
567 int n = 0;
568
569 while(p) {
570 if (p->class == class && p->type == type)
571 n++;
572 p = p->next;
573 }
574
575 return (n);
576}
577
578#endif /* defined(DNS) && !defined(HAVE_GETRRSETBYNAME) */
diff --git a/openbsd-compat/getrrsetbyname.h b/openbsd-compat/getrrsetbyname.h
deleted file mode 100644
index 6466a54d6..000000000
--- a/openbsd-compat/getrrsetbyname.h
+++ /dev/null
@@ -1,100 +0,0 @@
1/* $OpenBSD: getrrsetbyname.c,v 1.4 2001/08/16 18:16:43 ho Exp $ */
2
3/*
4 * Copyright (c) 2001 Jakob Schlyter. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/*
30 * Portions Copyright (c) 1999-2001 Internet Software Consortium.
31 *
32 * Permission to use, copy, modify, and distribute this software for any
33 * purpose with or without fee is hereby granted, provided that the above
34 * copyright notice and this permission notice appear in all copies.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
37 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
38 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
39 * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
40 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
41 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
42 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
43 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
44 */
45
46#ifndef _GETRRSETBYNAME_H
47#define _GETRRSETBYNAME_H
48
49#include "includes.h"
50
51#if defined(DNS) && !defined(HAVE_GETRRSETBYNAME)
52
53#include <sys/types.h>
54#include <netinet/in.h>
55#include <arpa/nameser.h>
56#include <netdb.h>
57#include <resolv.h>
58
59/*
60 * Flags for getrrsetbyname()
61 */
62#ifndef RRSET_VALIDATED
63# define RRSET_VALIDATED 1
64#endif
65
66/*
67 * Return codes for getrrsetbyname()
68 */
69#ifndef ERRSET_SUCCESS
70# define ERRSET_SUCCESS 0
71# define ERRSET_NOMEMORY 1
72# define ERRSET_FAIL 2
73# define ERRSET_INVAL 3
74# define ERRSET_NONAME 4
75# define ERRSET_NODATA 5
76#endif
77
78struct rdatainfo {
79 unsigned int rdi_length; /* length of data */
80 unsigned char *rdi_data; /* record data */
81};
82
83struct rrsetinfo {
84 unsigned int rri_flags; /* RRSET_VALIDATED ... */
85 unsigned int rri_rdclass; /* class number */
86 unsigned int rri_rdtype; /* RR type number */
87 unsigned int rri_ttl; /* time to live */
88 unsigned int rri_nrdatas; /* size of rdatas array */
89 unsigned int rri_nsigs; /* size of sigs array */
90 char *rri_name; /* canonical name */
91 struct rdatainfo *rri_rdatas; /* individual records */
92 struct rdatainfo *rri_sigs; /* individual signatures */
93};
94
95int getrrsetbyname(const char *, unsigned int, unsigned int, unsigned int, struct rrsetinfo **);
96void freerrset(struct rrsetinfo *);
97
98#endif /* defined(DNS) && !defined(HAVE_GETRRSETBYNAME) */
99
100#endif /* _GETRRSETBYNAME_H */
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index 50f35c304..e928a2272 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -13,7 +13,11 @@
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the University nor the names of its contributors 16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software 21 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission. 22 * without specific prior written permission.
19 * 23 *
@@ -52,7 +56,7 @@ get_arg_max(void)
52#if 0 56#if 0
53static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; 57static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
54#else 58#else
55static char rcsid[] = "$OpenBSD: glob.c,v 1.22 2003/06/25 21:16:47 deraadt Exp $"; 59static char rcsid[] = "$OpenBSD: glob.c,v 1.20 2002/06/14 21:34:58 todd Exp $";
56#endif 60#endif
57#endif /* LIBC_SCCS and not lint */ 61#endif /* LIBC_SCCS and not lint */
58 62
@@ -611,7 +615,7 @@ glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last,
611 * and dirent.h as taking pointers to differently typed opaque 615 * and dirent.h as taking pointers to differently typed opaque
612 * structures. 616 * structures.
613 */ 617 */
614 struct dirent *(*readdirfunc)(void *); 618 struct dirent *(*readdirfunc)();
615 619
616 if (pathend > pathend_last) 620 if (pathend > pathend_last)
617 return (1); 621 return (1);
@@ -636,7 +640,7 @@ glob3(pathbuf, pathbuf_last, pathend, pathend_last, pattern, pattern_last,
636 if (pglob->gl_flags & GLOB_ALTDIRFUNC) 640 if (pglob->gl_flags & GLOB_ALTDIRFUNC)
637 readdirfunc = pglob->gl_readdir; 641 readdirfunc = pglob->gl_readdir;
638 else 642 else
639 readdirfunc = (struct dirent *(*)(void *))readdir; 643 readdirfunc = readdir;
640 while ((dp = (*readdirfunc)(dirp))) { 644 while ((dp = (*readdirfunc)(dirp))) {
641 register u_char *sc; 645 register u_char *sc;
642 register Char *dc; 646 register Char *dc;
diff --git a/openbsd-compat/glob.h b/openbsd-compat/glob.h
index aceddbc48..6421f7049 100644
--- a/openbsd-compat/glob.h
+++ b/openbsd-compat/glob.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: glob.h,v 1.8 2003/06/02 19:34:12 millert Exp $ */ 1/* $OpenBSD: glob.h,v 1.7 2002/02/17 19:42:21 millert Exp $ */
2/* $NetBSD: glob.h,v 1.5 1994/10/26 00:55:56 cgd Exp $ */ 2/* $NetBSD: glob.h,v 1.5 1994/10/26 00:55:56 cgd Exp $ */
3 3
4/* 4/*
@@ -16,7 +16,11 @@
16 * 2. Redistributions in binary form must reproduce the above copyright 16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the 17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution. 18 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the University nor the names of its contributors 19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software 24 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission. 25 * without specific prior written permission.
22 * 26 *
diff --git a/openbsd-compat/inet_aton.c b/openbsd-compat/inet_aton.c
index 5de49868d..1fc001da6 100644
--- a/openbsd-compat/inet_aton.c
+++ b/openbsd-compat/inet_aton.c
@@ -1,6 +1,8 @@
1/* $OpenBSD: inet_addr.c,v 1.7 2003/06/02 20:18:35 millert Exp $ */ 1/* $OpenBSD: inet_addr.c,v 1.6 1999/05/03 22:31:14 yanick Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1983, 1990, 1993
5 * -
4 * Copyright (c) 1983, 1990, 1993 6 * Copyright (c) 1983, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 7 * The Regents of the University of California. All rights reserved.
6 * 8 *
@@ -12,7 +14,11 @@
12 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 15 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 16 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors 17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by the University of
20 * California, Berkeley and its contributors.
21 * 4. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software 22 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission. 23 * without specific prior written permission.
18 * 24 *
@@ -58,7 +64,7 @@
58static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; 64static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
59static char rcsid[] = "$From: inet_addr.c,v 8.5 1996/08/05 08:31:35 vixie Exp $"; 65static char rcsid[] = "$From: inet_addr.c,v 8.5 1996/08/05 08:31:35 vixie Exp $";
60#else 66#else
61static char rcsid[] = "$OpenBSD: inet_addr.c,v 1.7 2003/06/02 20:18:35 millert Exp $"; 67static char rcsid[] = "$OpenBSD: inet_addr.c,v 1.6 1999/05/03 22:31:14 yanick Exp $";
62#endif 68#endif
63#endif /* LIBC_SCCS and not lint */ 69#endif /* LIBC_SCCS and not lint */
64 70
diff --git a/openbsd-compat/inet_aton.h b/openbsd-compat/inet_aton.h
new file mode 100644
index 000000000..9b59cb908
--- /dev/null
+++ b/openbsd-compat/inet_aton.h
@@ -0,0 +1,12 @@
1/* $Id: inet_aton.h,v 1.4 2001/07/16 02:07:51 tim Exp $ */
2
3#ifndef _BSD_INET_ATON_H
4#define _BSD_INET_ATON_H
5
6#include "config.h"
7
8#ifndef HAVE_INET_ATON
9int inet_aton(const char *cp, struct in_addr *addr);
10#endif /* HAVE_INET_ATON */
11
12#endif /* _BSD_INET_ATON_H */
diff --git a/openbsd-compat/inet_ntoa.c b/openbsd-compat/inet_ntoa.c
index e0384491d..ac5f56708 100644
--- a/openbsd-compat/inet_ntoa.c
+++ b/openbsd-compat/inet_ntoa.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -32,7 +36,7 @@
32#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) 36#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA)
33 37
34#if defined(LIBC_SCCS) && !defined(lint) 38#if defined(LIBC_SCCS) && !defined(lint)
35static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.4 2003/06/02 20:18:35 millert Exp $"; 39static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.3 2002/06/27 10:14:01 itojun Exp $";
36#endif /* LIBC_SCCS and not lint */ 40#endif /* LIBC_SCCS and not lint */
37 41
38/* 42/*
diff --git a/openbsd-compat/inet_ntoa.h b/openbsd-compat/inet_ntoa.h
new file mode 100644
index 000000000..85bc3d6fe
--- /dev/null
+++ b/openbsd-compat/inet_ntoa.h
@@ -0,0 +1,12 @@
1/* $Id: inet_ntoa.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_INET_NTOA_H
4#define _BSD_INET_NTOA_H
5
6#include "config.h"
7
8#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA)
9char *inet_ntoa(struct in_addr in);
10#endif /* defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) */
11
12#endif /* _BSD_INET_NTOA_H */
diff --git a/openbsd-compat/inet_ntop.c b/openbsd-compat/inet_ntop.c
index 075eac44f..3bea519af 100644
--- a/openbsd-compat/inet_ntop.c
+++ b/openbsd-compat/inet_ntop.c
@@ -31,6 +31,7 @@ static char rcsid[] = "$OpenBSD: inet_ntop.c,v 1.5 2002/08/23 16:27:31 itojun Ex
31#include <sys/param.h> 31#include <sys/param.h>
32#include <sys/types.h> 32#include <sys/types.h>
33#include <sys/socket.h> 33#include <sys/socket.h>
34#include "openbsd-compat/fake-socket.h"
34#include <netinet/in.h> 35#include <netinet/in.h>
35#include <arpa/inet.h> 36#include <arpa/inet.h>
36#ifndef HAVE_CYGWIN 37#ifndef HAVE_CYGWIN
diff --git a/openbsd-compat/inet_ntop.h b/openbsd-compat/inet_ntop.h
new file mode 100644
index 000000000..c774df95c
--- /dev/null
+++ b/openbsd-compat/inet_ntop.h
@@ -0,0 +1,13 @@
1/* $Id: inet_ntop.h,v 1.4 2001/08/09 00:56:53 mouring Exp $ */
2
3#ifndef _BSD_INET_NTOP_H
4#define _BSD_INET_NTOP_H
5
6#include "config.h"
7
8#ifndef HAVE_INET_NTOP
9const char *
10inet_ntop(int af, const void *src, char *dst, size_t size);
11#endif /* !HAVE_INET_NTOP */
12
13#endif /* _BSD_INET_NTOP_H */
diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c
index 2cd747835..c951050c0 100644
--- a/openbsd-compat/mktemp.c
+++ b/openbsd-compat/mktemp.c
@@ -13,7 +13,11 @@
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the University nor the names of its contributors 16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software 21 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission. 22 * without specific prior written permission.
19 * 23 *
@@ -35,7 +39,7 @@
35#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) 39#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
36 40
37#if defined(LIBC_SCCS) && !defined(lint) 41#if defined(LIBC_SCCS) && !defined(lint)
38static char rcsid[] = "$OpenBSD: mktemp.c,v 1.17 2003/06/02 20:18:37 millert Exp $"; 42static char rcsid[] = "$OpenBSD: mktemp.c,v 1.16 2002/05/27 18:20:45 millert Exp $";
39#endif /* LIBC_SCCS and not lint */ 43#endif /* LIBC_SCCS and not lint */
40 44
41#ifdef HAVE_CYGWIN 45#ifdef HAVE_CYGWIN
diff --git a/openbsd-compat/mktemp.h b/openbsd-compat/mktemp.h
new file mode 100644
index 000000000..505ca6a1f
--- /dev/null
+++ b/openbsd-compat/mktemp.h
@@ -0,0 +1,13 @@
1/* $Id: mktemp.h,v 1.3 2003/01/07 04:18:33 djm Exp $ */
2
3#ifndef _BSD_MKTEMP_H
4#define _BSD_MKTEMP_H
5
6#include "config.h"
7#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
8int mkstemps(char *path, int slen);
9int mkstemp(char *path);
10char *mkdtemp(char *path);
11#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
12
13#endif /* _BSD_MKTEMP_H */
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 852948c54..c3e19b9cb 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,168 +1,49 @@
1/* $Id: openbsd-compat.h,v 1.24 2003/08/29 16:59:52 mouring Exp $ */ 1/* $Id: openbsd-compat.h,v 1.19 2003/02/24 01:55:56 djm Exp $ */
2 2
3/* 3#ifndef _OPENBSD_H
4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 4#define _OPENBSD_H
5 * Copyright (c) 2003 Ben Lindstrom. All rights reserved.
6 * Copyright (c) 2002 Tim Rice. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 5
29#ifndef _OPENBSD_COMPAT_H 6#include "config.h"
30#define _OPENBSD_COMPAT_H
31
32#include "includes.h"
33 7
34/* OpenBSD function replacements */ 8/* OpenBSD function replacements */
9#include "basename.h"
10#include "bindresvport.h"
11#include "getcwd.h"
12#include "realpath.h"
13#include "rresvport.h"
14#include "strlcpy.h"
15#include "strlcat.h"
16#include "strmode.h"
17#include "mktemp.h"
18#include "daemon.h"
19#include "dirname.h"
35#include "base64.h" 20#include "base64.h"
36#include "sigact.h" 21#include "sigact.h"
22#include "inet_ntoa.h"
23#include "inet_ntop.h"
24#include "strsep.h"
25#include "setproctitle.h"
26#include "getgrouplist.h"
37#include "glob.h" 27#include "glob.h"
38#include "readpassphrase.h" 28#include "readpassphrase.h"
29#include "getopt.h"
39#include "vis.h" 30#include "vis.h"
40#include "getrrsetbyname.h"
41
42
43#ifndef HAVE_BASENAME
44char *basename(const char *path);
45#endif
46
47#ifndef HAVE_BINDRESVPORT_SA
48int bindresvport_sa(int sd, struct sockaddr *sa);
49#endif
50
51#ifndef HAVE_GETCWD
52char *getcwd(char *pt, size_t size);
53#endif
54
55#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
56char *realpath(const char *path, char *resolved);
57#endif
58
59#ifndef HAVE_RRESVPORT_AF
60int rresvport_af(int *alport, sa_family_t af);
61#endif
62
63#ifndef HAVE_STRLCPY
64/* #include <sys/types.h> XXX Still needed? */
65size_t strlcpy(char *dst, const char *src, size_t siz);
66#endif
67
68#ifndef HAVE_STRLCAT
69/* #include <sys/types.h> XXX Still needed? */
70size_t strlcat(char *dst, const char *src, size_t siz);
71#endif
72
73#ifndef HAVE_SETENV
74int setenv(register const char *name, register const char *value, int rewrite);
75#endif
76
77#ifndef HAVE_STRMODE
78void strmode(int mode, char *p);
79#endif
80
81#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
82int mkstemps(char *path, int slen);
83int mkstemp(char *path);
84char *mkdtemp(char *path);
85#endif
86
87#ifndef HAVE_DAEMON
88int daemon(int nochdir, int noclose);
89#endif
90
91#ifndef HAVE_DIRNAME
92char *dirname(const char *path);
93#endif
94
95#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA)
96char *inet_ntoa(struct in_addr in);
97#endif
98
99#ifndef HAVE_INET_NTOP
100const char *inet_ntop(int af, const void *src, char *dst, size_t size);
101#endif
102
103#ifndef HAVE_INET_ATON
104int inet_aton(const char *cp, struct in_addr *addr);
105#endif
106
107#ifndef HAVE_STRSEP
108char *strsep(char **stringp, const char *delim);
109#endif
110
111#ifndef HAVE_SETPROCTITLE
112void setproctitle(const char *fmt, ...);
113void compat_init_setproctitle(int argc, char *argv[]);
114#endif
115
116#ifndef HAVE_GETGROUPLIST
117/* #include <grp.h> XXXX Still needed ? */
118int getgrouplist(const char *, gid_t, gid_t *, int *);
119#endif
120
121#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET)
122int BSDgetopt(int argc, char * const *argv, const char *opts);
123#endif
124
125 31
126/* Home grown routines */ 32/* Home grown routines */
33#include "bsd-arc4random.h"
34#include "bsd-getpeereid.h"
127#include "bsd-misc.h" 35#include "bsd-misc.h"
36#include "bsd-snprintf.h"
128#include "bsd-waitpid.h" 37#include "bsd-waitpid.h"
129 38
130/*#include <sys/types.h> XXX Still needed? * For uid_t, gid_t * */
131
132#ifndef HAVE_GETPEEREID
133int getpeereid(int , uid_t *, gid_t *);
134#endif
135
136#ifndef HAVE_ARC4RANDOM
137unsigned int arc4random(void);
138void arc4random_stir(void);
139#endif /* !HAVE_ARC4RANDOM */
140
141
142
143
144/* #include <sys/types.h> XXX needed? For size_t */
145
146#ifndef HAVE_SNPRINTF
147int snprintf(char *, size_t, const char *, ...);
148#endif
149
150#ifndef HAVE_VSNPRINTF
151int vsnprintf(char *, size_t, const char *, va_list);
152#endif
153
154void *xmmap(size_t size);
155char *xcrypt(const char *password, const char *salt);
156char *shadow_pw(struct passwd *pw);
157
158
159/* rfc2553 socket API replacements */ 39/* rfc2553 socket API replacements */
160#include "fake-rfc2553.h" 40#include "fake-getaddrinfo.h"
41#include "fake-getnameinfo.h"
42#include "fake-socket.h"
161 43
162/* Routines for a single OS platform */ 44/* Routines for a single OS platform */
163#include "bsd-cray.h" 45#include "bsd-cray.h"
164#include "bsd-cygwin_util.h"
165#include "port-irix.h" 46#include "port-irix.h"
166#include "port-aix.h" 47#include "port-aix.h"
167 48
168#endif /* _OPENBSD_COMPAT_H */ 49#endif /* _OPENBSD_H */
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index 7a981634b..4c96a3171 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -24,17 +24,11 @@
24 * 24 *
25 */ 25 */
26#include "includes.h" 26#include "includes.h"
27#include "ssh.h"
28#include "log.h"
29#include "servconf.h"
30 27
31#ifdef _AIX 28#ifdef _AIX
32 29
33#include <uinfo.h> 30#include <uinfo.h>
34#include <../xmalloc.h> 31#include <../xmalloc.h>
35#include "port-aix.h"
36
37extern ServerOptions options;
38 32
39/* 33/*
40 * AIX has a "usrinfo" area where logname and other stuff is stored - 34 * AIX has a "usrinfo" area where logname and other stuff is stored -
@@ -47,95 +41,16 @@ void
47aix_usrinfo(struct passwd *pw) 41aix_usrinfo(struct passwd *pw)
48{ 42{
49 u_int i; 43 u_int i;
50 size_t len;
51 char *cp; 44 char *cp;
52 45
53 len = sizeof("LOGNAME= NAME= ") + (2 * strlen(pw->pw_name)); 46 cp = xmalloc(16 + 2 * strlen(pw->pw_name));
54 cp = xmalloc(len); 47 i = sprintf(cp, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, 0,
55 48 pw->pw_name, 0);
56 i = snprintf(cp, len, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, '\0',
57 pw->pw_name, '\0');
58 if (usrinfo(SETUINFO, cp, i) == -1) 49 if (usrinfo(SETUINFO, cp, i) == -1)
59 fatal("Couldn't set usrinfo: %s", strerror(errno)); 50 fatal("Couldn't set usrinfo: %s", strerror(errno));
60 debug3("AIX/UsrInfo: set len %d", i); 51 debug3("AIX/UsrInfo: set len %d", i);
61
62 xfree(cp); 52 xfree(cp);
63} 53}
64 54
65#ifdef WITH_AIXAUTHENTICATE
66/*
67 * Remove embedded newlines in string (if any).
68 * Used before logging messages returned by AIX authentication functions
69 * so the message is logged on one line.
70 */
71void
72aix_remove_embedded_newlines(char *p)
73{
74 if (p == NULL)
75 return;
76
77 for (; *p; p++) {
78 if (*p == '\n')
79 *p = ' ';
80 }
81 /* Remove trailing whitespace */
82 if (*--p == ' ')
83 *p = '\0';
84}
85#endif /* WITH_AIXAUTHENTICATE */
86
87# ifdef CUSTOM_FAILED_LOGIN
88/*
89 * record_failed_login: generic "login failed" interface function
90 */
91void
92record_failed_login(const char *user, const char *ttyname)
93{
94 char *hostname = get_canonical_hostname(options.use_dns);
95
96 if (geteuid() != 0)
97 return;
98
99 aix_setauthdb(user);
100# ifdef AIX_LOGINFAILED_4ARG
101 loginfailed((char *)user, hostname, (char *)ttyname, AUDIT_FAIL_AUTH);
102# else
103 loginfailed((char *)user, hostname, (char *)ttyname);
104# endif
105}
106
107/*
108 * If we have setauthdb, retrieve the password registry for the user's
109 * account then feed it to setauthdb. This may load registry-specific method
110 * code. If we don't have setauthdb or have already called it this is a no-op.
111 */
112void
113aix_setauthdb(const char *user)
114{
115# ifdef HAVE_SETAUTHDB
116 static char *registry = NULL;
117
118 if (registry != NULL) /* have already done setauthdb */
119 return;
120
121 if (setuserdb(S_READ) == -1) {
122 debug3("%s: Could not open userdb to read", __func__);
123 return;
124 }
125
126 if (getuserattr((char *)user, S_REGISTRY, &registry, SEC_CHAR) == 0) {
127 if (setauthdb(registry, NULL) == 0)
128 debug3("%s: AIX/setauthdb set registry %s", __func__,
129 registry);
130 else
131 debug3("%s: AIX/setauthdb set registry %s failed: %s",
132 __func__, registry, strerror(errno));
133 } else
134 debug3("%s: Could not read S_REGISTRY for user: %s", __func__,
135 strerror(errno));
136 enduserdb();
137# endif
138}
139# endif /* CUSTOM_FAILED_LOGIN */
140#endif /* _AIX */ 55#endif /* _AIX */
141 56
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index 09e7f9e97..4abe00316 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -1,5 +1,3 @@
1/* $Id: port-aix.h,v 1.14 2003/08/29 16:59:52 mouring Exp $ */
2
3/* 1/*
4 * 2 *
5 * Copyright (c) 2001 Gert Doering. All rights reserved. 3 * Copyright (c) 2001 Gert Doering. All rights reserved.
@@ -23,24 +21,11 @@
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
26 */ 25 */
27 26
28#ifdef _AIX 27#ifdef _AIX
29 28
30#ifdef WITH_AIXAUTHENTICATE
31# include <login.h>
32# include <userpw.h>
33# include <usersec.h>
34# ifdef HAVE_SYS_AUDIT_H
35# include <sys/audit.h>
36# endif
37#endif
38
39/* Some versions define r_type in the above headers, which causes a conflict */
40#ifdef r_type
41# undef r_type
42#endif
43
44/* AIX 4.2.x doesn't have nanosleep but does have nsleep which is equivalent */ 29/* AIX 4.2.x doesn't have nanosleep but does have nsleep which is equivalent */
45#if !defined(HAVE_NANOSLEEP) && defined(HAVE_NSLEEP) 30#if !defined(HAVE_NANOSLEEP) && defined(HAVE_NSLEEP)
46# define nanosleep(a,b) nsleep(a,b) 31# define nanosleep(a,b) nsleep(a,b)
@@ -51,12 +36,5 @@
51# include <sys/timers.h> 36# include <sys/timers.h>
52#endif 37#endif
53 38
54#ifdef WITH_AIXAUTHENTICATE 39void aix_usrinfo(struct passwd *pw);
55# define CUSTOM_FAILED_LOGIN 1
56void record_failed_login(const char *, const char *);
57void aix_setauthdb(const char *);
58#endif
59
60void aix_usrinfo(struct passwd *);
61void aix_remove_embedded_newlines(char *);
62#endif /* _AIX */ 40#endif /* _AIX */
diff --git a/openbsd-compat/port-irix.c b/openbsd-compat/port-irix.c
index aa6db1cf8..a63ec429a 100644
--- a/openbsd-compat/port-irix.c
+++ b/openbsd-compat/port-irix.c
@@ -1,42 +1,15 @@
1/*
2 * Copyright (c) 2000 Denis Parker. All rights reserved.
3 * Copyright (c) 2000 Michael Stone. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "includes.h" 1#include "includes.h"
27 2
28#if defined(WITH_IRIX_PROJECT) || \ 3#if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
29 defined(WITH_IRIX_JOBS) || \
30 defined(WITH_IRIX_ARRAY)
31 4
32#ifdef WITH_IRIX_PROJECT 5#ifdef WITH_IRIX_PROJECT
33# include <proj.h> 6#include <proj.h>
34#endif /* WITH_IRIX_PROJECT */ 7#endif /* WITH_IRIX_PROJECT */
35#ifdef WITH_IRIX_JOBS 8#ifdef WITH_IRIX_JOBS
36# include <sys/resource.h> 9#include <sys/resource.h>
37#endif 10#endif
38#ifdef WITH_IRIX_AUDIT 11#ifdef WITH_IRIX_AUDIT
39# include <sat.h> 12#include <sat.h>
40#endif /* WITH_IRIX_AUDIT */ 13#endif /* WITH_IRIX_AUDIT */
41 14
42void 15void
@@ -44,12 +17,14 @@ irix_setusercontext(struct passwd *pw)
44{ 17{
45#ifdef WITH_IRIX_PROJECT 18#ifdef WITH_IRIX_PROJECT
46 prid_t projid; 19 prid_t projid;
47#endif 20#endif /* WITH_IRIX_PROJECT */
48#ifdef WITH_IRIX_JOBS 21#ifdef WITH_IRIX_JOBS
49 jid_t jid = 0; 22 jid_t jid = 0;
50#elif defined(WITH_IRIX_ARRAY) 23#else
24# ifdef WITH_IRIX_ARRAY
51 int jid = 0; 25 int jid = 0;
52#endif 26# endif /* WITH_IRIX_ARRAY */
27#endif /* WITH_IRIX_JOBS */
53 28
54#ifdef WITH_IRIX_JOBS 29#ifdef WITH_IRIX_JOBS
55 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive"); 30 jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
diff --git a/openbsd-compat/port-irix.h b/openbsd-compat/port-irix.h
index 67c486307..2dd3c2e25 100644
--- a/openbsd-compat/port-irix.h
+++ b/openbsd-compat/port-irix.h
@@ -1,39 +1,5 @@
1/* $Id: port-irix.h,v 1.4 2003/08/29 16:59:52 mouring Exp $ */ 1#if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
2
3/*
4 * Copyright (c) 2000 Denis Parker. All rights reserved.
5 * Copyright (c) 2000 Michael Stone. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#ifndef _PORT_IRIX_H
29#define _PORT_IRIX_H
30
31#if defined(WITH_IRIX_PROJECT) || \
32 defined(WITH_IRIX_JOBS) || \
33 defined(WITH_IRIX_ARRAY)
34 2
35void irix_setusercontext(struct passwd *pw); 3void irix_setusercontext(struct passwd *pw);
36 4
37#endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */ 5#endif /* defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) */
38
39#endif /* ! _PORT_IRIX_H */
diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c
index 0d0baf569..4e549b62b 100644
--- a/openbsd-compat/readpassphrase.c
+++ b/openbsd-compat/readpassphrase.c
@@ -1,27 +1,34 @@
1/* $OpenBSD: readpassphrase.c,v 1.16 2003/06/17 21:56:23 millert Exp $ */ 1/* $OpenBSD: readpassphrase.c,v 1.14 2002/06/28 01:43:58 millert Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000-2002 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 2000-2002 Todd C. Miller <Todd.Miller@courtesan.com>
5 * All rights reserved.
5 * 6 *
6 * Permission to use, copy, modify, and distribute this software for any 7 * Redistribution and use in source and binary forms, with or without
7 * purpose with or without fee is hereby granted, provided that the above 8 * modification, are permitted provided that the following conditions
8 * copyright notice and this permission notice appear in all copies. 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
9 * 17 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 19 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 20 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 21 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
17 * 25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
18 * Sponsored in part by the Defense Advanced Research Projects 26 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
19 * Agency (DARPA) and Air Force Research Laboratory, Air Force 27 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 * Materiel Command, USAF, under agreement number F39502-99-1-0512.
21 */ 28 */
22 29
23#if defined(LIBC_SCCS) && !defined(lint) 30#if defined(LIBC_SCCS) && !defined(lint)
24static const char rcsid[] = "$OpenBSD: readpassphrase.c,v 1.16 2003/06/17 21:56:23 millert Exp $"; 31static const char rcsid[] = "$OpenBSD: readpassphrase.c,v 1.14 2002/06/28 01:43:58 millert Exp $";
25#endif /* LIBC_SCCS and not lint */ 32#endif /* LIBC_SCCS and not lint */
26 33
27#include "includes.h" 34#include "includes.h"
@@ -178,7 +185,6 @@ getpass(const char *prompt)
178 185
179static void handler(int s) 186static void handler(int s)
180{ 187{
181
182 signo = s; 188 signo = s;
183} 189}
184#endif /* HAVE_READPASSPHRASE */ 190#endif /* HAVE_READPASSPHRASE */
diff --git a/openbsd-compat/realpath.c b/openbsd-compat/realpath.c
index 77da14e7c..b9035ca22 100644
--- a/openbsd-compat/realpath.c
+++ b/openbsd-compat/realpath.c
@@ -13,9 +13,6 @@
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
19 * 16 *
20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -35,7 +32,7 @@
35#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) 32#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
36 33
37#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
38static char *rcsid = "$OpenBSD: realpath.c,v 1.10 2003/08/01 21:04:59 millert Exp $"; 35static char *rcsid = "$OpenBSD: realpath.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $";
39#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
40 37
41#include <sys/param.h> 38#include <sys/param.h>
@@ -65,7 +62,7 @@ char *
65realpath(const char *path, char *resolved) 62realpath(const char *path, char *resolved)
66{ 63{
67 struct stat sb; 64 struct stat sb;
68 int fd, n, needslash, serrno = 0; 65 int fd, n, rootd, serrno = 0;
69 char *p, *q, wbuf[MAXPATHLEN], start[MAXPATHLEN]; 66 char *p, *q, wbuf[MAXPATHLEN], start[MAXPATHLEN];
70 int symlinks = 0; 67 int symlinks = 0;
71 68
@@ -141,18 +138,18 @@ loop:
141 * happens if the last component is empty, or the dirname is root. 138 * happens if the last component is empty, or the dirname is root.
142 */ 139 */
143 if (resolved[0] == '/' && resolved[1] == '\0') 140 if (resolved[0] == '/' && resolved[1] == '\0')
144 needslash = 0; 141 rootd = 1;
145 else 142 else
146 needslash = 1; 143 rootd = 0;
147 144
148 if (*wbuf) { 145 if (*wbuf) {
149 if (strlen(resolved) + strlen(wbuf) + needslash >= MAXPATHLEN) { 146 if (strlen(resolved) + strlen(wbuf) + rootd + 1 > MAXPATHLEN) {
150 serrno = ENAMETOOLONG; 147 serrno = ENAMETOOLONG;
151 goto err1; 148 goto err1;
152 } 149 }
153 if (needslash == 0) 150 if (rootd == 0)
154 strlcat(resolved, "/", MAXPATHLEN); 151 (void)strcat(resolved, "/");
155 strlcat(resolved, wbuf, MAXPATHLEN); 152 (void)strcat(resolved, wbuf);
156 } 153 }
157 154
158 /* Go back to where we came from. */ 155 /* Go back to where we came from. */
diff --git a/openbsd-compat/realpath.h b/openbsd-compat/realpath.h
new file mode 100644
index 000000000..25e4075d7
--- /dev/null
+++ b/openbsd-compat/realpath.h
@@ -0,0 +1,13 @@
1/* $Id: realpath.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_REALPATH_H
4#define _BSD_REALPATH_H
5
6#include "config.h"
7
8#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
9
10char *realpath(const char *path, char *resolved);
11
12#endif /* !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) */
13#endif /* _BSD_REALPATH_H */
diff --git a/openbsd-compat/rresvport.c b/openbsd-compat/rresvport.c
index 608a3b184..9f058961d 100644
--- a/openbsd-compat/rresvport.c
+++ b/openbsd-compat/rresvport.c
@@ -11,7 +11,12 @@
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors 14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by the University of
17 * California, Berkeley and its contributors.
18 * This product includes software developed by Theo de Raadt.
19 * 4. Neither the name of the University nor the names of its contributors
15 * may be used to endorse or promote products derived from this software 20 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission. 21 * without specific prior written permission.
17 * 22 *
@@ -33,7 +38,7 @@
33#ifndef HAVE_RRESVPORT_AF 38#ifndef HAVE_RRESVPORT_AF
34 39
35#if defined(LIBC_SCCS) && !defined(lint) 40#if defined(LIBC_SCCS) && !defined(lint)
36static char *rcsid = "$OpenBSD: rresvport.c,v 1.6 2003/06/03 02:11:35 deraadt Exp $"; 41static char *rcsid = "$OpenBSD: rresvport.c,v 1.5 2000/01/26 03:43:20 deraadt Exp $";
37#endif /* LIBC_SCCS and not lint */ 42#endif /* LIBC_SCCS and not lint */
38 43
39#include "includes.h" 44#include "includes.h"
diff --git a/openbsd-compat/rresvport.h b/openbsd-compat/rresvport.h
new file mode 100644
index 000000000..a52e4515b
--- /dev/null
+++ b/openbsd-compat/rresvport.h
@@ -0,0 +1,12 @@
1/* $Id: rresvport.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_RRESVPORT_H
4#define _BSD_RRESVPORT_H
5
6#include "config.h"
7
8#ifndef HAVE_RRESVPORT_AF
9int rresvport_af(int *alport, sa_family_t af);
10#endif /* !HAVE_RRESVPORT_AF */
11
12#endif /* _BSD_RRESVPORT_H */
diff --git a/openbsd-compat/setenv.c b/openbsd-compat/setenv.c
index c9941c195..e5c5de62e 100644
--- a/openbsd-compat/setenv.c
+++ b/openbsd-compat/setenv.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -31,7 +35,7 @@
31#ifndef HAVE_SETENV 35#ifndef HAVE_SETENV
32 36
33#if defined(LIBC_SCCS) && !defined(lint) 37#if defined(LIBC_SCCS) && !defined(lint)
34static char *rcsid = "$OpenBSD: setenv.c,v 1.6 2003/06/02 20:18:38 millert Exp $"; 38static char *rcsid = "$OpenBSD: setenv.c,v 1.5 2002/12/10 22:44:13 mickey Exp $";
35#endif /* LIBC_SCCS and not lint */ 39#endif /* LIBC_SCCS and not lint */
36 40
37#include <stdlib.h> 41#include <stdlib.h>
diff --git a/openbsd-compat/setenv.h b/openbsd-compat/setenv.h
new file mode 100644
index 000000000..77256d802
--- /dev/null
+++ b/openbsd-compat/setenv.h
@@ -0,0 +1,14 @@
1/* $Id: setenv.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_SETENV_H
4#define _BSD_SETENV_H
5
6#include "config.h"
7
8#ifndef HAVE_SETENV
9
10int setenv(register const char *name, register const char *value, int rewrite);
11
12#endif /* !HAVE_SETENV */
13
14#endif /* _BSD_SETENV_H */
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c
index b41100fc6..07af7e9c0 100644
--- a/openbsd-compat/setproctitle.c
+++ b/openbsd-compat/setproctitle.c
@@ -1,34 +1,41 @@
1/* Based on conf.c from UCB sendmail 8.8.8 */
2
3/* 1/*
4 * Copyright 2003 Damien Miller 2 * Based on src/backend/utils/misc/pg_status.c from
5 * Copyright (c) 1983, 1995-1997 Eric P. Allman 3 * PostgreSQL Database Management System
6 * Copyright (c) 1988, 1993 4 *
7 * The Regents of the University of California. All rights reserved. 5 * Portions Copyright (c) 1996-2001, The PostgreSQL Global Development Group
6 *
7 * Portions Copyright (c) 1994, The Regents of the University of California
8 *
9 * Permission to use, copy, modify, and distribute this software and its
10 * documentation for any purpose, without fee, and without a written agreement
11 * is hereby granted, provided that the above copyright notice and this
12 * paragraph and the following two paragraphs appear in all copies.
13 *
14 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
15 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
16 * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
17 * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
18 * POSSIBILITY OF SUCH DAMAGE.
19 *
20 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
21 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
24 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
25 */
26
27/*--------------------------------------------------------------------
28 * ps_status.c
8 * 29 *
9 * Redistribution and use in source and binary forms, with or without 30 * Routines to support changing the ps display of PostgreSQL backends
10 * modification, are permitted provided that the following conditions 31 * to contain some useful information. Mechanism differs wildly across
11 * are met: 32 * platforms.
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 * 33 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 34 * $Header: /var/cvs/openssh/openbsd-compat/setproctitle.c,v 1.5 2003/01/20 02:15:11 djm Exp $
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 35 *
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 36 * Copyright 2000 by PostgreSQL Global Development Group
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 37 * various details abducted from various places
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 38 *--------------------------------------------------------------------
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */ 39 */
33 40
34#include "includes.h" 41#include "includes.h"
@@ -37,121 +44,200 @@
37 44
38#include <unistd.h> 45#include <unistd.h>
39#ifdef HAVE_SYS_PSTAT_H 46#ifdef HAVE_SYS_PSTAT_H
40#include <sys/pstat.h> 47#include <sys/pstat.h> /* for HP-UX */
48#endif
49#ifdef HAVE_PS_STRINGS
50#include <machine/vmparam.h> /* for old BSD */
51#include <sys/exec.h>
41#endif 52#endif
42 53
43#define SPT_NONE 0 /* don't use it at all */ 54/*------
44#define SPT_PSTAT 1 /* cover argv with title information */ 55 * Alternative ways of updating ps display:
45#define SPT_REUSEARGV 2 /* use pstat(PSTAT_SETCMD, ...) */ 56 *
57 * SETPROCTITLE_STRATEGY == PS_USE_PSTAT
58 * use the pstat(PSTAT_SETCMD, )
59 * (HPUX)
60 * SETPROCTITLE_STRATEGY == PS_USE_PS_STRINGS
61 * assign PS_STRINGS->ps_argvstr = "string"
62 * (some BSD systems)
63 * SETPROCTITLE_STRATEGY == PS_USE_CHANGE_ARGV
64 * assign argv[0] = "string"
65 * (some other BSD systems)
66 * SETPROCTITLE_STRATEGY == PS_USE_CLOBBER_ARGV
67 * write over the argv and environment area
68 * (most SysV-like systems)
69 * SETPROCTITLE_STRATEGY == PS_USE_NONE
70 * don't update ps display
71 * (This is the default, as it is safest.)
72 */
46 73
47#ifndef SPT_TYPE 74#define PS_USE_NONE 0
48# define SPT_TYPE SPT_NONE 75#define PS_USE_PSTAT 1
76#define PS_USE_PS_STRINGS 2
77#define PS_USE_CHANGE_ARGV 3
78#define PS_USE_CLOBBER_ARGV 4
79
80#ifndef SETPROCTITLE_STRATEGY
81# define SETPROCTITLE_STRATEGY PS_USE_NONE
49#endif 82#endif
50 83
51#ifndef SPT_PADCHAR 84#ifndef SETPROCTITLE_PS_PADDING
52# define SPT_PADCHAR '\0' 85# define SETPROCTITLE_PS_PADDING ' '
53#endif 86#endif
87#endif /* HAVE_SETPROCTITLE */
54 88
55#if SPT_TYPE == SPT_REUSEARGV 89extern char **environ;
56static char *argv_start = NULL; 90
57static size_t argv_env_len = 0; 91/*
92 * argv clobbering uses existing argv space, all other methods need a buffer
93 */
94#if SETPROCTITLE_STRATEGY != PS_USE_CLOBBER_ARGV
95static char ps_buffer[256];
96static const size_t ps_buffer_size = sizeof(ps_buffer);
97#else
98static char *ps_buffer; /* will point to argv area */
99static size_t ps_buffer_size; /* space determined at run time */
58#endif 100#endif
59 101
60#endif /* HAVE_SETPROCTITLE */ 102/* save the original argv[] location here */
103static int save_argc;
104static char **save_argv;
105
106extern char *__progname;
61 107
108#ifndef HAVE_SETPROCTITLE
109/*
110 * Call this to update the ps status display to a fixed prefix plus an
111 * indication of what you're currently doing passed in the argument.
112 */
62void 113void
63compat_init_setproctitle(int argc, char *argv[]) 114setproctitle(const char *fmt, ...)
64{ 115{
65#if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV 116#if SETPROCTITLE_STRATEGY == PS_USE_PSTAT
66 extern char **environ; 117 union pstun pst;
67 char *lastargv = NULL; 118#endif
68 char **envp = environ; 119#if SETPROCTITLE_STRATEGY != PS_USE_NONE
69 int i; 120 ssize_t used;
121 va_list ap;
122
123 /* no ps display if you didn't call save_ps_display_args() */
124 if (save_argv == NULL)
125 return;
126#if SETPROCTITLE_STRATEGY == PS_USE_CLOBBER_ARGV
127 /* If ps_buffer is a pointer, it might still be null */
128 if (ps_buffer == NULL)
129 return;
130#endif /* PS_USE_CLOBBER_ARGV */
70 131
71 /* 132 /*
72 * NB: This assumes that argv has already been copied out of the 133 * Overwrite argv[] to point at appropriate space, if needed
73 * way. This is true for sshd, but may not be true for other
74 * programs. Beware.
75 */ 134 */
135#if SETPROCTITLE_STRATEGY == PS_USE_CHANGE_ARGV
136 save_argv[0] = ps_buffer;
137 save_argv[1] = NULL;
138#endif /* PS_USE_CHANGE_ARGV */
76 139
77 if (argc == 0 || argv[0] == NULL) 140#if SETPROCTITLE_STRATEGY == PS_USE_CLOBBER_ARGV
78 return; 141 save_argv[1] = NULL;
79 142#endif /* PS_USE_CLOBBER_ARGV */
80 /* Fail if we can't allocate room for the new environment */
81 for (i = 0; envp[i] != NULL; i++)
82 ;
83 if ((environ = malloc(sizeof(*environ) * (i + 1))) == NULL) {
84 environ = envp; /* put it back */
85 return;
86 }
87 143
88 /* 144 /*
89 * Find the last argv string or environment variable within 145 * Make fixed prefix of ps display.
90 * our process memory area.
91 */ 146 */
92 for (i = 0; i < argc; i++) { 147
93 if (lastargv == NULL || lastargv + 1 == argv[i]) 148 va_start(ap, fmt);
94 lastargv = argv[i] + strlen(argv[i]); 149 if (fmt == NULL)
95 } 150 snprintf(ps_buffer, ps_buffer_size, "%s", __progname);
96 for (i = 0; envp[i] != NULL; i++) { 151 else {
97 if (lastargv + 1 == envp[i]) 152 used = snprintf(ps_buffer, ps_buffer_size, "%s: ", __progname);
98 lastargv = envp[i] + strlen(envp[i]); 153 if (used == -1 || used >= ps_buffer_size)
154 used = ps_buffer_size;
155 vsnprintf(ps_buffer + used, ps_buffer_size - used, fmt, ap);
99 } 156 }
157 va_end(ap);
100 158
101 argv[1] = NULL; 159#if SETPROCTITLE_STRATEGY == PS_USE_PSTAT
102 argv_start = argv[0]; 160 pst.pst_command = ps_buffer;
103 argv_env_len = lastargv - argv[0] - 1; 161 pstat(PSTAT_SETCMD, pst, strlen(ps_buffer), 0, 0);
162#endif /* PS_USE_PSTAT */
104 163
105 /* 164#if SETPROCTITLE_STRATEGY == PS_USE_PS_STRINGS
106 * Copy environment 165 PS_STRINGS->ps_nargvstr = 1;
107 * XXX - will truncate env on strdup fail 166 PS_STRINGS->ps_argvstr = ps_buffer;
108 */ 167#endif /* PS_USE_PS_STRINGS */
109 for (i = 0; envp[i] != NULL; i++) 168
110 environ[i] = strdup(envp[i]); 169#if SETPROCTITLE_STRATEGY == PS_USE_CLOBBER_ARGV
111 environ[i] = NULL; 170 /* pad unused memory */
112#endif /* SPT_REUSEARGV */ 171 used = strlen(ps_buffer);
172 memset(ps_buffer + used, SETPROCTITLE_PS_PADDING,
173 ps_buffer_size - used);
174#endif /* PS_USE_CLOBBER_ARGV */
175
176#endif /* PS_USE_NONE */
113} 177}
114 178
115#ifndef HAVE_SETPROCTITLE 179#endif /* HAVE_SETPROCTITLE */
180
181/*
182 * Call this early in startup to save the original argc/argv values.
183 *
184 * argv[] will not be overwritten by this routine, but may be overwritten
185 * during setproctitle. Also, the physical location of the environment
186 * strings may be moved, so this should be called before any code that
187 * might try to hang onto a getenv() result.
188 */
116void 189void
117setproctitle(const char *fmt, ...) 190compat_init_setproctitle(int argc, char *argv[])
118{ 191{
119#if SPT_TYPE != SPT_NONE 192#if SETPROCTITLE_STRATEGY == PS_USE_CLOBBER_ARGV
120 va_list ap; 193 char *end_of_area = NULL;
121 char buf[1024]; 194 char **new_environ;
122 size_t len; 195 int i;
123 extern char *__progname;
124#if SPT_TYPE == SPT_PSTAT
125 union pstun pst;
126#endif 196#endif
127 197
128#if SPT_TYPE == SPT_REUSEARGV 198 save_argc = argc;
129 if (argv_env_len <= 0) 199 save_argv = argv;
130 return; 200
131#endif 201#if SETPROCTITLE_STRATEGY == PS_USE_CLOBBER_ARGV
202 /*
203 * If we're going to overwrite the argv area, count the available
204 * space. Also move the environment to make additional room.
205 */
132 206
133 strlcpy(buf, __progname, sizeof(buf)); 207 /*
208 * check for contiguous argv strings
209 */
210 for (i = 0; i < argc; i++) {
211 if (i == 0 || end_of_area + 1 == argv[i])
212 end_of_area = argv[i] + strlen(argv[i]);
213 }
134 214
135 va_start(ap, fmt); 215 /* probably can't happen? */
136 if (fmt != NULL) { 216 if (end_of_area == NULL) {
137 len = strlcat(buf, ": ", sizeof(buf)); 217 ps_buffer = NULL;
138 if (len < sizeof(buf)) 218 ps_buffer_size = 0;
139 vsnprintf(buf + len, sizeof(buf) - len , fmt, ap); 219 return;
140 } 220 }
141 va_end(ap);
142 221
143#if SPT_TYPE == SPT_PSTAT 222 /*
144 pst.pst_command = buf; 223 * check for contiguous environ strings following argv
145 pstat(PSTAT_SETCMD, pst, strlen(buf), 0, 0); 224 */
146#elif SPT_TYPE == SPT_REUSEARGV 225 for (i = 0; environ[i] != NULL; i++) {
147/* debug("setproctitle: copy \"%s\" into len %d", 226 if (end_of_area + 1 == environ[i])
148 buf, argv_env_len); */ 227 end_of_area = environ[i] + strlen(environ[i]);
149 len = strlcpy(argv_start, buf, argv_env_len); 228 }
150 for(; len < argv_env_len; len++)
151 argv_start[len] = SPT_PADCHAR;
152#endif
153 229
154#endif /* SPT_NONE */ 230 ps_buffer = argv[0];
231 ps_buffer_size = end_of_area - argv[0] - 1;
232
233 /*
234 * Duplicate and move the environment out of the way
235 */
236 new_environ = malloc(sizeof(char *) * (i + 1));
237 for (i = 0; environ[i] != NULL; i++)
238 new_environ[i] = strdup(environ[i]);
239 new_environ[i] = NULL;
240 environ = new_environ;
241#endif /* PS_USE_CLOBBER_ARGV */
155} 242}
156 243
157#endif /* HAVE_SETPROCTITLE */
diff --git a/openbsd-compat/setproctitle.h b/openbsd-compat/setproctitle.h
new file mode 100644
index 000000000..48d26c6ea
--- /dev/null
+++ b/openbsd-compat/setproctitle.h
@@ -0,0 +1,13 @@
1/* $Id: setproctitle.h,v 1.3 2003/01/09 22:53:13 djm Exp $ */
2
3#ifndef _BSD_SETPROCTITLE_H
4#define _BSD_SETPROCTITLE_H
5
6#include "config.h"
7
8#ifndef HAVE_SETPROCTITLE
9void setproctitle(const char *fmt, ...);
10void compat_init_setproctitle(int argc, char *argv[]);
11#endif
12
13#endif /* _BSD_SETPROCTITLE_H */
diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c
index cae16657c..3a9b5d1a7 100644
--- a/openbsd-compat/strlcat.c
+++ b/openbsd-compat/strlcat.c
@@ -1,30 +1,42 @@
1/* $OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $ */ 1/* $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
5 * All rights reserved.
5 * 6 *
6 * Permission to use, copy, modify, and distribute this software for any 7 * Redistribution and use in source and binary forms, with or without
7 * purpose with or without fee is hereby granted, provided that the above 8 * modification, are permitted provided that the following conditions
8 * copyright notice and this permission notice appear in all copies. 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
9 * 17 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 19 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 20 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 21 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 28 */
18 29
19#include "includes.h" 30#include "includes.h"
20#ifndef HAVE_STRLCAT 31#ifndef HAVE_STRLCAT
21 32
22#if defined(LIBC_SCCS) && !defined(lint) 33#if defined(LIBC_SCCS) && !defined(lint)
23static char *rcsid = "$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp $"; 34static char *rcsid = "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $";
24#endif /* LIBC_SCCS and not lint */ 35#endif /* LIBC_SCCS and not lint */
25 36
26#include <sys/types.h> 37#include <sys/types.h>
27#include <string.h> 38#include <string.h>
39#include "strlcat.h"
28 40
29/* 41/*
30 * Appends src to string dst of size siz (unlike strncat, siz is the 42 * Appends src to string dst of size siz (unlike strncat, siz is the
@@ -34,7 +46,10 @@ static char *rcsid = "$OpenBSD: strlcat.c,v 1.11 2003/06/17 21:56:24 millert Exp
34 * If retval >= siz, truncation occurred. 46 * If retval >= siz, truncation occurred.
35 */ 47 */
36size_t 48size_t
37strlcat(char *dst, const char *src, size_t siz) 49strlcat(dst, src, siz)
50 char *dst;
51 const char *src;
52 size_t siz;
38{ 53{
39 register char *d = dst; 54 register char *d = dst;
40 register const char *s = src; 55 register const char *s = src;
diff --git a/openbsd-compat/strlcat.h b/openbsd-compat/strlcat.h
new file mode 100644
index 000000000..753668563
--- /dev/null
+++ b/openbsd-compat/strlcat.h
@@ -0,0 +1,12 @@
1/* $Id: strlcat.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_STRLCAT_H
4#define _BSD_STRLCAT_H
5
6#include "config.h"
7#ifndef HAVE_STRLCAT
8#include <sys/types.h>
9size_t strlcat(char *dst, const char *src, size_t siz);
10#endif /* !HAVE_STRLCAT */
11
12#endif /* _BSD_STRLCAT_H */
diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c
index c8fe29987..2f87eca44 100644
--- a/openbsd-compat/strlcpy.c
+++ b/openbsd-compat/strlcpy.c
@@ -1,30 +1,42 @@
1/* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $ */ 1/* $OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 4 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
5 * All rights reserved.
5 * 6 *
6 * Permission to use, copy, modify, and distribute this software for any 7 * Redistribution and use in source and binary forms, with or without
7 * purpose with or without fee is hereby granted, provided that the above 8 * modification, are permitted provided that the following conditions
8 * copyright notice and this permission notice appear in all copies. 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
9 * 17 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 19 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 20 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 21 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 28 */
18 29
19#include "includes.h" 30#include "includes.h"
20#ifndef HAVE_STRLCPY 31#ifndef HAVE_STRLCPY
21 32
22#if defined(LIBC_SCCS) && !defined(lint) 33#if defined(LIBC_SCCS) && !defined(lint)
23static char *rcsid = "$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $"; 34static char *rcsid = "$OpenBSD: strlcpy.c,v 1.5 2001/05/13 15:40:16 deraadt Exp $";
24#endif /* LIBC_SCCS and not lint */ 35#endif /* LIBC_SCCS and not lint */
25 36
26#include <sys/types.h> 37#include <sys/types.h>
27#include <string.h> 38#include <string.h>
39#include "strlcpy.h"
28 40
29/* 41/*
30 * Copy src to string dst of size siz. At most siz-1 characters 42 * Copy src to string dst of size siz. At most siz-1 characters
@@ -32,7 +44,10 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp
32 * Returns strlen(src); if retval >= siz, truncation occurred. 44 * Returns strlen(src); if retval >= siz, truncation occurred.
33 */ 45 */
34size_t 46size_t
35strlcpy(char *dst, const char *src, size_t siz) 47strlcpy(dst, src, siz)
48 char *dst;
49 const char *src;
50 size_t siz;
36{ 51{
37 register char *d = dst; 52 register char *d = dst;
38 register const char *s = src; 53 register const char *s = src;
diff --git a/openbsd-compat/strlcpy.h b/openbsd-compat/strlcpy.h
new file mode 100644
index 000000000..3b137670d
--- /dev/null
+++ b/openbsd-compat/strlcpy.h
@@ -0,0 +1,12 @@
1/* $Id: strlcpy.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_STRLCPY_H
4#define _BSD_STRLCPY_H
5
6#include "config.h"
7#ifndef HAVE_STRLCPY
8#include <sys/types.h>
9size_t strlcpy(char *dst, const char *src, size_t siz);
10#endif /* !HAVE_STRLCPY */
11
12#endif /* _BSD_STRLCPY_H */
diff --git a/openbsd-compat/strmode.c b/openbsd-compat/strmode.c
index adf5e273e..e64d19869 100644
--- a/openbsd-compat/strmode.c
+++ b/openbsd-compat/strmode.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -31,17 +35,15 @@
31#ifndef HAVE_STRMODE 35#ifndef HAVE_STRMODE
32 36
33#if defined(LIBC_SCCS) && !defined(lint) 37#if defined(LIBC_SCCS) && !defined(lint)
34static char *rcsid = "$OpenBSD: strmode.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $"; 38static char *rcsid = "$OpenBSD: strmode.c,v 1.3 1997/06/13 13:57:20 deraadt Exp $";
35#endif /* LIBC_SCCS and not lint */ 39#endif /* LIBC_SCCS and not lint */
36 40
37#include <sys/types.h> 41#include <sys/types.h>
38#include <sys/stat.h> 42#include <sys/stat.h>
39#include <string.h> 43#include <string.h>
40 44
41/* XXX mode should be mode_t */
42
43void 45void
44strmode(int mode, char *p) 46strmode(register mode_t mode, register char *p)
45{ 47{
46 /* print type */ 48 /* print type */
47 switch (mode & S_IFMT) { 49 switch (mode & S_IFMT) {
diff --git a/openbsd-compat/strmode.h b/openbsd-compat/strmode.h
new file mode 100644
index 000000000..64f7c8aae
--- /dev/null
+++ b/openbsd-compat/strmode.h
@@ -0,0 +1,7 @@
1/* $Id: strmode.h,v 1.3 2001/06/09 02:22:17 mouring Exp $ */
2
3#ifndef HAVE_STRMODE
4
5void strmode(register mode_t mode, register char *p);
6
7#endif
diff --git a/openbsd-compat/strsep.c b/openbsd-compat/strsep.c
index b13671343..d0afc44ae 100644
--- a/openbsd-compat/strsep.c
+++ b/openbsd-compat/strsep.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strsep.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $ */ 1/* $OpenBSD: strsep.c,v 1.3 1997/08/20 04:28:14 millert Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990, 1993 4 * Copyright (c) 1990, 1993
@@ -12,7 +12,11 @@
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors 15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 * 4. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software 20 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission. 21 * without specific prior written permission.
18 * 22 *
@@ -40,7 +44,7 @@
40#if 0 44#if 0
41static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93"; 45static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
42#else 46#else
43static char *rcsid = "$OpenBSD: strsep.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $"; 47static char *rcsid = "$OpenBSD: strsep.c,v 1.3 1997/08/20 04:28:14 millert Exp $";
44#endif 48#endif
45#endif /* LIBC_SCCS and not lint */ 49#endif /* LIBC_SCCS and not lint */
46 50
@@ -58,9 +62,9 @@ static char *rcsid = "$OpenBSD: strsep.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $
58char * 62char *
59strsep(char **stringp, const char *delim) 63strsep(char **stringp, const char *delim)
60{ 64{
61 char *s; 65 register char *s;
62 const char *spanp; 66 register const char *spanp;
63 int c, sc; 67 register int c, sc;
64 char *tok; 68 char *tok;
65 69
66 if ((s = *stringp) == NULL) 70 if ((s = *stringp) == NULL)
diff --git a/openbsd-compat/strsep.h b/openbsd-compat/strsep.h
new file mode 100644
index 000000000..6ed810ac1
--- /dev/null
+++ b/openbsd-compat/strsep.h
@@ -0,0 +1,12 @@
1/* $Id: strsep.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_STRSEP_H
4#define _BSD_STRSEP_H
5
6#include "config.h"
7
8#ifndef HAVE_STRSEP
9char *strsep(char **stringp, const char *delim);
10#endif /* HAVE_STRSEP */
11
12#endif /* _BSD_STRSEP_H */
diff --git a/openbsd-compat/sys-queue.h b/openbsd-compat/sys-queue.h
index dd5c47525..176fe3174 100644
--- a/openbsd-compat/sys-queue.h
+++ b/openbsd-compat/sys-queue.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: queue.h,v 1.23 2003/06/02 23:28:21 millert Exp $ */ 1/* $OpenBSD: queue.h,v 1.22 2001/06/23 04:39:35 angelos Exp $ */
2/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */ 2/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
3 3
4/* 4/*
@@ -13,7 +13,11 @@
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the University nor the names of its contributors 16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software 21 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission. 22 * without specific prior written permission.
19 * 23 *
diff --git a/openbsd-compat/vis.c b/openbsd-compat/vis.c
index e6a2ce98d..fc5741390 100644
--- a/openbsd-compat/vis.c
+++ b/openbsd-compat/vis.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -26,15 +30,14 @@
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE. 31 * SUCH DAMAGE.
28 */ 32 */
29#include "includes.h" 33#include "config.h"
30#if !defined(HAVE_STRNVIS) 34#if !defined(HAVE_STRNVIS)
31 35
32#if defined(LIBC_SCCS) && !defined(lint) 36#if defined(LIBC_SCCS) && !defined(lint)
33static char rcsid[] = "$OpenBSD: vis.c,v 1.12 2003/06/02 20:18:35 millert Exp $"; 37static char rcsid[] = "$OpenBSD: vis.c,v 1.8 2002/02/19 19:39:36 millert Exp $";
34#endif /* LIBC_SCCS and not lint */ 38#endif /* LIBC_SCCS and not lint */
35 39
36#include <ctype.h> 40#include <ctype.h>
37#include <string.h>
38 41
39#include "vis.h" 42#include "vis.h"
40 43
@@ -44,9 +47,8 @@ static char rcsid[] = "$OpenBSD: vis.c,v 1.12 2003/06/02 20:18:35 millert Exp $"
44 ((flag & VIS_SP) == 0 && (c) == ' ') || \ 47 ((flag & VIS_SP) == 0 && (c) == ' ') || \
45 ((flag & VIS_TAB) == 0 && (c) == '\t') || \ 48 ((flag & VIS_TAB) == 0 && (c) == '\t') || \
46 ((flag & VIS_NL) == 0 && (c) == '\n') || \ 49 ((flag & VIS_NL) == 0 && (c) == '\n') || \
47 ((flag & VIS_SAFE) && ((c) == '\b' || \ 50 ((flag & VIS_SAFE) && \
48 (c) == '\007' || (c) == '\r' || \ 51 ((c) == '\b' || (c) == '\007' || (c) == '\r')))
49 isgraph((u_char)(c)))))
50 52
51/* 53/*
52 * vis - visually encode characters 54 * vis - visually encode characters
@@ -167,20 +169,16 @@ strvis(dst, src, flag)
167 169
168int 170int
169strnvis(dst, src, siz, flag) 171strnvis(dst, src, siz, flag)
170 char *dst; 172 register char *dst;
171 const char *src; 173 register const char *src;
172 size_t siz; 174 size_t siz;
173 int flag; 175 int flag;
174{ 176{
175 char c; 177 register char c;
176 char *start, *end; 178 char *start, *end;
177 char tbuf[5];
178 int i;
179 179
180 i = 0;
181 for (start = dst, end = start + siz - 1; (c = *src) && dst < end; ) { 180 for (start = dst, end = start + siz - 1; (c = *src) && dst < end; ) {
182 if (isvisible(c)) { 181 if (isvisible(c)) {
183 i = 1;
184 *dst++ = c; 182 *dst++ = c;
185 if (c == '\\' && (flag & VIS_NOSLASH) == 0) { 183 if (c == '\\' && (flag & VIS_NOSLASH) == 0) {
186 /* need space for the extra '\\' */ 184 /* need space for the extra '\\' */
@@ -188,25 +186,22 @@ strnvis(dst, src, siz, flag)
188 *dst++ = '\\'; 186 *dst++ = '\\';
189 else { 187 else {
190 dst--; 188 dst--;
191 i = 2;
192 break; 189 break;
193 } 190 }
194 } 191 }
195 src++; 192 src++;
196 } else { 193 } else {
197 i = vis(tbuf, c, flag, *++src) - tbuf; 194 /* vis(3) requires up to 4 chars */
198 if (dst + i <= end) { 195 if (dst + 3 < end)
199 memcpy(dst, tbuf, i); 196 dst = vis(dst, c, flag, *++src);
200 dst += i; 197 else
201 } else {
202 src--;
203 break; 198 break;
204 }
205 } 199 }
206 } 200 }
207 if (siz > 0) 201 *dst = '\0';
208 *dst = '\0'; 202 if (dst >= end) {
209 if (dst + i > end) { 203 char tbuf[5];
204
210 /* adjust return value for truncation */ 205 /* adjust return value for truncation */
211 while ((c = *src)) 206 while ((c = *src))
212 dst += vis(tbuf, c, flag, *++src) - tbuf; 207 dst += vis(tbuf, c, flag, *++src) - tbuf;
diff --git a/openbsd-compat/vis.h b/openbsd-compat/vis.h
index 1c131cc85..5df6f3694 100644
--- a/openbsd-compat/vis.h
+++ b/openbsd-compat/vis.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: vis.h,v 1.6 2003/06/02 19:34:12 millert Exp $ */ 1/* $OpenBSD: vis.h,v 1.5 2002/02/16 21:27:17 millert Exp $ */
2/* $NetBSD: vis.h,v 1.4 1994/10/26 00:56:41 cgd Exp $ */ 2/* $NetBSD: vis.h,v 1.4 1994/10/26 00:56:41 cgd Exp $ */
3 3
4/*- 4/*-
@@ -13,7 +13,11 @@
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution. 15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the University nor the names of its contributors 16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software 21 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission. 22 * without specific prior written permission.
19 * 23 *
@@ -31,8 +35,7 @@
31 * 35 *
32 * @(#)vis.h 5.9 (Berkeley) 4/3/91 36 * @(#)vis.h 5.9 (Berkeley) 4/3/91
33 */ 37 */
34 38#include "config.h"
35#include "includes.h"
36#if !defined(HAVE_STRNVIS) 39#if !defined(HAVE_STRNVIS)
37 40
38#ifndef _VIS_H_ 41#ifndef _VIS_H_
diff --git a/openbsd-compat/xcrypt.c b/openbsd-compat/xcrypt.c
deleted file mode 100644
index 5b5d69c72..000000000
--- a/openbsd-compat/xcrypt.c
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * Copyright (c) 2003 Ben Lindstrom. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26
27#if !defined(HAVE_OSF_SIA)
28
29# ifdef HAVE_CRYPT_H
30# include <crypt.h>
31# endif
32
33# ifdef __hpux
34# include <hpsecurity.h>
35# include <prot.h>
36# endif
37
38# ifdef HAVE_SECUREWARE
39# include <sys/security.h>
40# include <sys/audit.h>
41# include <prot.h>
42# endif
43
44# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
45# include <shadow.h>
46# endif
47
48# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
49# include <sys/label.h>
50# include <sys/audit.h>
51# include <pwdadj.h>
52# endif
53
54# if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
55# include "md5crypt.h"
56# endif
57
58char *
59xcrypt(const char *password, const char *salt)
60{
61 char *crypted;
62
63# ifdef HAVE_MD5_PASSWORDS
64 if (is_md5_salt(salt))
65 crypted = md5_crypt(password, salt);
66 else
67 crypted = crypt(password, salt);
68# elif defined(__hpux) && !defined(HAVE_SECUREWARE)
69 if (iscomsec())
70 crypted = bigcrypt(password, salt);
71 else
72 crypted = crypt(password, salt);
73# elif defined(HAVE_SECUREWARE)
74 crypted = bigcrypt(password, salt);
75# else
76 crypted = crypt(password, salt);
77# endif
78
79 return crypted;
80}
81
82/*
83 * Handle shadowed password systems in a cleaner way for portable
84 * version.
85 */
86
87char *
88shadow_pw(struct passwd *pw)
89{
90 char *pw_password = pw->pw_passwd;
91
92# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
93 struct spwd *spw = getspnam(pw->pw_name);
94
95 if (spw != NULL)
96 pw_password = spw->sp_pwdp;
97# endif
98# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
99 struct passwd_adjunct *spw;
100 if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
101 pw_password = spw->pwa_passwd;
102# elif defined(HAVE_SECUREWARE)
103 struct pr_passwd *spw = getprpwnam(pw->pw_name);
104
105 if (spw != NULL)
106 pw_password = spw->ufld.fd_encrypt;
107# elif defined(__hpux) && !defined(HAVE_SECUREWARE)
108 struct pr_passwd *spw;
109 if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
110 pw_password = spw->ufld.fd_encrypt;
111# endif
112
113 return pw_password;
114}
115
116#endif /* !defined(HAVE_OSF_SIA) */
diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c
index 9dc4340a7..8f1d2022c 100644
--- a/openbsd-compat/xmmap.c
+++ b/openbsd-compat/xmmap.c
@@ -1,7 +1,4 @@
1/* 1/*
2 * Copyright (c) 2002 Tim Rice. All rights reserved.
3 * MAP_FAILED code by Solar Designer.
4 *
5 * Redistribution and use in source and binary forms, with or without 2 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 3 * modification, are permitted provided that the following conditions
7 * are met: 4 * are met:
@@ -23,8 +20,6 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 21 */
25 22
26/* $Id: xmmap.c,v 1.3 2003/06/02 02:25:27 tim Exp $ */
27
28#include "includes.h" 23#include "includes.h"
29 24
30#ifdef HAVE_SYS_MMAN_H 25#ifdef HAVE_SYS_MMAN_H
diff --git a/openbsd-compat/xmmap.h b/openbsd-compat/xmmap.h
new file mode 100644
index 000000000..c0fa04aca
--- /dev/null
+++ b/openbsd-compat/xmmap.h
@@ -0,0 +1,23 @@
1/*
2 * Redistribution and use in source and binary forms, with or without
3 * modification, are permitted provided that the following conditions
4 * are met:
5 * 1. Redistributions of source code must retain the above copyright
6 * notice, this list of conditions and the following disclaimer.
7 * 2. Redistributions in binary form must reproduce the above copyright
8 * notice, this list of conditions and the following disclaimer in the
9 * documentation and/or other materials provided with the distribution.
10 *
11 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
12 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
13 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
14 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 */
22
23void *xmmap(size_t size);
diff --git a/packet.c b/packet.c
index fd436d56f..dae1226a6 100644
--- a/packet.c
+++ b/packet.c
@@ -37,9 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.110 2003/09/19 09:02:02 markus Exp $"); 40RCSID("$OpenBSD: packet.c,v 1.104 2003/04/01 10:22:21 markus Exp $");
41
42#include "openbsd-compat/sys-queue.h"
43 41
44#include "xmalloc.h" 42#include "xmalloc.h"
45#include "buffer.h" 43#include "buffer.h"
@@ -110,7 +108,7 @@ static int compression_buffer_ready = 0;
110static int packet_compression = 0; 108static int packet_compression = 0;
111 109
112/* default maximum packet size */ 110/* default maximum packet size */
113u_int max_packet_size = 32768; 111int max_packet_size = 32768;
114 112
115/* Flag indicating whether this module has been initialized. */ 113/* Flag indicating whether this module has been initialized. */
116static int initialized = 0; 114static int initialized = 0;
@@ -120,14 +118,8 @@ static int interactive_mode = 0;
120 118
121/* Session key information for Encryption and MAC */ 119/* Session key information for Encryption and MAC */
122Newkeys *newkeys[MODE_MAX]; 120Newkeys *newkeys[MODE_MAX];
123static struct packet_state { 121static u_int32_t read_seqnr = 0;
124 u_int32_t seqnr; 122static u_int32_t send_seqnr = 0;
125 u_int32_t packets;
126 u_int64_t blocks;
127} p_read, p_send;
128
129static u_int64_t max_blocks_in, max_blocks_out;
130static u_int32_t rekey_limit;
131 123
132/* Session key for protocol v1 */ 124/* Session key for protocol v1 */
133static u_char ssh1_key[SSH_SESSION_KEY_LENGTH]; 125static u_char ssh1_key[SSH_SESSION_KEY_LENGTH];
@@ -136,13 +128,6 @@ static u_int ssh1_keylen;
136/* roundup current message to extra_pad bytes */ 128/* roundup current message to extra_pad bytes */
137static u_char extra_pad = 0; 129static u_char extra_pad = 0;
138 130
139struct packet {
140 TAILQ_ENTRY(packet) next;
141 u_char type;
142 Buffer payload;
143};
144TAILQ_HEAD(, packet) outgoing;
145
146/* 131/*
147 * Sets the descriptors used for communication. Disables encryption until 132 * Sets the descriptors used for communication. Disables encryption until
148 * packet_set_encryption_key is called. 133 * packet_set_encryption_key is called.
@@ -166,7 +151,6 @@ packet_set_connection(int fd_in, int fd_out, int new_setup_timeout)
166 buffer_init(&output); 151 buffer_init(&output);
167 buffer_init(&outgoing_packet); 152 buffer_init(&outgoing_packet);
168 buffer_init(&incoming_packet); 153 buffer_init(&incoming_packet);
169 TAILQ_INIT(&outgoing);
170 } 154 }
171 /* Kludge: arrange the close function to be called from fatal(). */ 155 /* Kludge: arrange the close function to be called from fatal(). */
172 fatal_add_cleanup((void (*) (void *)) packet_close, NULL); 156 fatal_add_cleanup((void (*) (void *)) packet_close, NULL);
@@ -268,31 +252,27 @@ packet_set_iv(int mode, u_char *dat)
268 cipher_set_keyiv(cc, dat); 252 cipher_set_keyiv(cc, dat);
269} 253}
270int 254int
271packet_get_ssh1_cipher(void) 255packet_get_ssh1_cipher()
272{ 256{
273 return (cipher_get_number(receive_context.cipher)); 257 return (cipher_get_number(receive_context.cipher));
274} 258}
275 259
276void
277packet_get_state(int mode, u_int32_t *seqnr, u_int64_t *blocks, u_int32_t *packets)
278{
279 struct packet_state *state;
280 260
281 state = (mode == MODE_IN) ? &p_read : &p_send; 261u_int32_t
282 *seqnr = state->seqnr; 262packet_get_seqnr(int mode)
283 *blocks = state->blocks; 263{
284 *packets = state->packets; 264 return (mode == MODE_IN ? read_seqnr : send_seqnr);
285} 265}
286 266
287void 267void
288packet_set_state(int mode, u_int32_t seqnr, u_int64_t blocks, u_int32_t packets) 268packet_set_seqnr(int mode, u_int32_t seqnr)
289{ 269{
290 struct packet_state *state; 270 if (mode == MODE_IN)
291 271 read_seqnr = seqnr;
292 state = (mode == MODE_IN) ? &p_read : &p_send; 272 else if (mode == MODE_OUT)
293 state->seqnr = seqnr; 273 send_seqnr = seqnr;
294 state->blocks = blocks; 274 else
295 state->packets = packets; 275 fatal("packet_set_seqnr: bad mode %d", mode);
296} 276}
297 277
298/* returns 1 if connection is via ipv4 */ 278/* returns 1 if connection is via ipv4 */
@@ -585,7 +565,6 @@ set_newkeys(int mode)
585 Mac *mac; 565 Mac *mac;
586 Comp *comp; 566 Comp *comp;
587 CipherContext *cc; 567 CipherContext *cc;
588 u_int64_t *max_blocks;
589 int encrypt; 568 int encrypt;
590 569
591 debug2("set_newkeys: mode %d", mode); 570 debug2("set_newkeys: mode %d", mode);
@@ -593,13 +572,9 @@ set_newkeys(int mode)
593 if (mode == MODE_OUT) { 572 if (mode == MODE_OUT) {
594 cc = &send_context; 573 cc = &send_context;
595 encrypt = CIPHER_ENCRYPT; 574 encrypt = CIPHER_ENCRYPT;
596 p_send.packets = p_send.blocks = 0;
597 max_blocks = &max_blocks_out;
598 } else { 575 } else {
599 cc = &receive_context; 576 cc = &receive_context;
600 encrypt = CIPHER_DECRYPT; 577 encrypt = CIPHER_DECRYPT;
601 p_read.packets = p_read.blocks = 0;
602 max_blocks = &max_blocks_in;
603 } 578 }
604 if (newkeys[mode] != NULL) { 579 if (newkeys[mode] != NULL) {
605 debug("set_newkeys: rekeying"); 580 debug("set_newkeys: rekeying");
@@ -638,23 +613,13 @@ set_newkeys(int mode)
638 buffer_compress_init_recv(); 613 buffer_compress_init_recv();
639 comp->enabled = 1; 614 comp->enabled = 1;
640 } 615 }
641 /*
642 * The 2^(blocksize*2) limit is too expensive for 3DES,
643 * blowfish, etc, so enforce a 1GB limit for small blocksizes.
644 */
645 if (enc->block_size >= 16)
646 *max_blocks = (u_int64_t)1 << (enc->block_size*2);
647 else
648 *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
649 if (rekey_limit)
650 *max_blocks = MIN(*max_blocks, rekey_limit / enc->block_size);
651} 616}
652 617
653/* 618/*
654 * Finalize packet in SSH2 format (compress, mac, encrypt, enqueue) 619 * Finalize packet in SSH2 format (compress, mac, encrypt, enqueue)
655 */ 620 */
656static void 621static void
657packet_send2_wrapped(void) 622packet_send2(void)
658{ 623{
659 u_char type, *cp, *macbuf = NULL; 624 u_char type, *cp, *macbuf = NULL;
660 u_char padlen, pad; 625 u_char padlen, pad;
@@ -736,10 +701,10 @@ packet_send2_wrapped(void)
736 701
737 /* compute MAC over seqnr and packet(length fields, payload, padding) */ 702 /* compute MAC over seqnr and packet(length fields, payload, padding) */
738 if (mac && mac->enabled) { 703 if (mac && mac->enabled) {
739 macbuf = mac_compute(mac, p_send.seqnr, 704 macbuf = mac_compute(mac, send_seqnr,
740 buffer_ptr(&outgoing_packet), 705 buffer_ptr(&outgoing_packet),
741 buffer_len(&outgoing_packet)); 706 buffer_len(&outgoing_packet));
742 DBG(debug("done calc MAC out #%d", p_send.seqnr)); 707 DBG(debug("done calc MAC out #%d", send_seqnr));
743 } 708 }
744 /* encrypt packet and append to output buffer. */ 709 /* encrypt packet and append to output buffer. */
745 cp = buffer_append_space(&output, buffer_len(&outgoing_packet)); 710 cp = buffer_append_space(&output, buffer_len(&outgoing_packet));
@@ -753,64 +718,14 @@ packet_send2_wrapped(void)
753 buffer_dump(&output); 718 buffer_dump(&output);
754#endif 719#endif
755 /* increment sequence number for outgoing packets */ 720 /* increment sequence number for outgoing packets */
756 if (++p_send.seqnr == 0) 721 if (++send_seqnr == 0)
757 logit("outgoing seqnr wraps around"); 722 log("outgoing seqnr wraps around");
758 if (++p_send.packets == 0)
759 if (!(datafellows & SSH_BUG_NOREKEY))
760 fatal("XXX too many packets with same key");
761 p_send.blocks += (packet_length + 4) / block_size;
762 buffer_clear(&outgoing_packet); 723 buffer_clear(&outgoing_packet);
763 724
764 if (type == SSH2_MSG_NEWKEYS) 725 if (type == SSH2_MSG_NEWKEYS)
765 set_newkeys(MODE_OUT); 726 set_newkeys(MODE_OUT);
766} 727}
767 728
768static void
769packet_send2(void)
770{
771 static int rekeying = 0;
772 struct packet *p;
773 u_char type, *cp;
774
775 cp = buffer_ptr(&outgoing_packet);
776 type = cp[5];
777
778 /* during rekeying we can only send key exchange messages */
779 if (rekeying) {
780 if (!((type >= SSH2_MSG_TRANSPORT_MIN) &&
781 (type <= SSH2_MSG_TRANSPORT_MAX))) {
782 debug("enqueue packet: %u", type);
783 p = xmalloc(sizeof(*p));
784 p->type = type;
785 memcpy(&p->payload, &outgoing_packet, sizeof(Buffer));
786 buffer_init(&outgoing_packet);
787 TAILQ_INSERT_TAIL(&outgoing, p, next);
788 return;
789 }
790 }
791
792 /* rekeying starts with sending KEXINIT */
793 if (type == SSH2_MSG_KEXINIT)
794 rekeying = 1;
795
796 packet_send2_wrapped();
797
798 /* after a NEWKEYS message we can send the complete queue */
799 if (type == SSH2_MSG_NEWKEYS) {
800 rekeying = 0;
801 while ((p = TAILQ_FIRST(&outgoing))) {
802 type = p->type;
803 debug("dequeue packet: %u", type);
804 buffer_free(&outgoing_packet);
805 memcpy(&outgoing_packet, &p->payload,
806 sizeof(Buffer));
807 TAILQ_REMOVE(&outgoing, p, next);
808 xfree(p);
809 packet_send2_wrapped();
810 }
811 }
812}
813
814void 729void
815packet_send(void) 730packet_send(void)
816{ 731{
@@ -883,7 +798,7 @@ packet_read_seqnr(u_int32_t *seqnr_p)
883 /* Read data from the socket. */ 798 /* Read data from the socket. */
884 len = read(connection_in, buf, sizeof(buf)); 799 len = read(connection_in, buf, sizeof(buf));
885 if (len == 0) { 800 if (len == 0) {
886 logit("Connection closed by %.200s", get_remote_ipaddr()); 801 log("Connection closed by %.200s", get_remote_ipaddr());
887 fatal_cleanup(); 802 fatal_cleanup();
888 } 803 }
889 if (len < 0) 804 if (len < 0)
@@ -1034,9 +949,7 @@ packet_read_poll2(u_int32_t *seqnr_p)
1034 cp = buffer_ptr(&incoming_packet); 949 cp = buffer_ptr(&incoming_packet);
1035 packet_length = GET_32BIT(cp); 950 packet_length = GET_32BIT(cp);
1036 if (packet_length < 1 + 4 || packet_length > 256 * 1024) { 951 if (packet_length < 1 + 4 || packet_length > 256 * 1024) {
1037#ifdef PACKET_DEBUG
1038 buffer_dump(&incoming_packet); 952 buffer_dump(&incoming_packet);
1039#endif
1040 packet_disconnect("Bad packet length %u.", packet_length); 953 packet_disconnect("Bad packet length %u.", packet_length);
1041 } 954 }
1042 DBG(debug("input: packet len %u", packet_length+4)); 955 DBG(debug("input: packet len %u", packet_length+4));
@@ -1067,22 +980,18 @@ packet_read_poll2(u_int32_t *seqnr_p)
1067 * increment sequence number for incoming packet 980 * increment sequence number for incoming packet
1068 */ 981 */
1069 if (mac && mac->enabled) { 982 if (mac && mac->enabled) {
1070 macbuf = mac_compute(mac, p_read.seqnr, 983 macbuf = mac_compute(mac, read_seqnr,
1071 buffer_ptr(&incoming_packet), 984 buffer_ptr(&incoming_packet),
1072 buffer_len(&incoming_packet)); 985 buffer_len(&incoming_packet));
1073 if (memcmp(macbuf, buffer_ptr(&input), mac->mac_len) != 0) 986 if (memcmp(macbuf, buffer_ptr(&input), mac->mac_len) != 0)
1074 packet_disconnect("Corrupted MAC on input."); 987 packet_disconnect("Corrupted MAC on input.");
1075 DBG(debug("MAC #%d ok", p_read.seqnr)); 988 DBG(debug("MAC #%d ok", read_seqnr));
1076 buffer_consume(&input, mac->mac_len); 989 buffer_consume(&input, mac->mac_len);
1077 } 990 }
1078 if (seqnr_p != NULL) 991 if (seqnr_p != NULL)
1079 *seqnr_p = p_read.seqnr; 992 *seqnr_p = read_seqnr;
1080 if (++p_read.seqnr == 0) 993 if (++read_seqnr == 0)
1081 logit("incoming seqnr wraps around"); 994 log("incoming seqnr wraps around");
1082 if (++p_read.packets == 0)
1083 if (!(datafellows & SSH_BUG_NOREKEY))
1084 fatal("XXX too many packets with same key");
1085 p_read.blocks += (packet_length + 4) / block_size;
1086 995
1087 /* get padlen */ 996 /* get padlen */
1088 cp = buffer_ptr(&incoming_packet); 997 cp = buffer_ptr(&incoming_packet);
@@ -1147,7 +1056,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1147 case SSH2_MSG_DISCONNECT: 1056 case SSH2_MSG_DISCONNECT:
1148 reason = packet_get_int(); 1057 reason = packet_get_int();
1149 msg = packet_get_string(NULL); 1058 msg = packet_get_string(NULL);
1150 logit("Received disconnect from %s: %u: %.400s", 1059 log("Received disconnect from %s: %u: %.400s",
1151 get_remote_ipaddr(), reason, msg); 1060 get_remote_ipaddr(), reason, msg);
1152 xfree(msg); 1061 xfree(msg);
1153 fatal_cleanup(); 1062 fatal_cleanup();
@@ -1173,7 +1082,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1173 break; 1082 break;
1174 case SSH_MSG_DISCONNECT: 1083 case SSH_MSG_DISCONNECT:
1175 msg = packet_get_string(NULL); 1084 msg = packet_get_string(NULL);
1176 logit("Received disconnect from %s: %.400s", 1085 log("Received disconnect from %s: %.400s",
1177 get_remote_ipaddr(), msg); 1086 get_remote_ipaddr(), msg);
1178 fatal_cleanup(); 1087 fatal_cleanup();
1179 xfree(msg); 1088 xfree(msg);
@@ -1332,7 +1241,7 @@ packet_disconnect(const char *fmt,...)
1332 va_end(args); 1241 va_end(args);
1333 1242
1334 /* Display the error locally */ 1243 /* Display the error locally */
1335 logit("Disconnecting: %.100s", buf); 1244 log("Disconnecting: %.100s", buf);
1336 1245
1337 /* Send the disconnect message to the other side, and wait for it to get sent. */ 1246 /* Send the disconnect message to the other side, and wait for it to get sent. */
1338 if (compat20) { 1247 if (compat20) {
@@ -1419,8 +1328,6 @@ packet_not_very_much_data_to_write(void)
1419 return buffer_len(&output) < 128 * 1024; 1328 return buffer_len(&output) < 128 * 1024;
1420} 1329}
1421 1330
1422
1423#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN)
1424static void 1331static void
1425packet_set_tos(int interactive) 1332packet_set_tos(int interactive)
1426{ 1333{
@@ -1434,7 +1341,6 @@ packet_set_tos(int interactive)
1434 error("setsockopt IP_TOS %d: %.100s:", 1341 error("setsockopt IP_TOS %d: %.100s:",
1435 tos, strerror(errno)); 1342 tos, strerror(errno));
1436} 1343}
1437#endif
1438 1344
1439/* Informs that the current session is interactive. Sets IP flags for that. */ 1345/* Informs that the current session is interactive. Sets IP flags for that. */
1440 1346
@@ -1469,18 +1375,18 @@ packet_is_interactive(void)
1469 return interactive_mode; 1375 return interactive_mode;
1470} 1376}
1471 1377
1472u_int 1378int
1473packet_set_maxsize(u_int s) 1379packet_set_maxsize(int s)
1474{ 1380{
1475 static int called = 0; 1381 static int called = 0;
1476 1382
1477 if (called) { 1383 if (called) {
1478 logit("packet_set_maxsize: called twice: old %d new %d", 1384 log("packet_set_maxsize: called twice: old %d new %d",
1479 max_packet_size, s); 1385 max_packet_size, s);
1480 return -1; 1386 return -1;
1481 } 1387 }
1482 if (s < 4 * 1024 || s > 1024 * 1024) { 1388 if (s < 4 * 1024 || s > 1024 * 1024) {
1483 logit("packet_set_maxsize: bad size %d", s); 1389 log("packet_set_maxsize: bad size %d", s);
1484 return -1; 1390 return -1;
1485 } 1391 }
1486 called = 1; 1392 called = 1;
@@ -1522,22 +1428,3 @@ packet_send_ignore(int nbytes)
1522 rand >>= 8; 1428 rand >>= 8;
1523 } 1429 }
1524} 1430}
1525
1526#define MAX_PACKETS (1<<31)
1527int
1528packet_need_rekeying(void)
1529{
1530 if (datafellows & SSH_BUG_NOREKEY)
1531 return 0;
1532 return
1533 (p_send.packets > MAX_PACKETS) ||
1534 (p_read.packets > MAX_PACKETS) ||
1535 (max_blocks_out && (p_send.blocks > max_blocks_out)) ||
1536 (max_blocks_in && (p_read.blocks > max_blocks_in));
1537}
1538
1539void
1540packet_set_rekey_limit(u_int32_t bytes)
1541{
1542 rekey_limit = bytes;
1543}
diff --git a/packet.h b/packet.h
index 676ed8aaa..7ff2812fe 100644
--- a/packet.h
+++ b/packet.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.h,v 1.40 2003/06/24 08:23:46 markus Exp $ */ 1/* $OpenBSD: packet.h,v 1.37 2003/04/01 10:22:21 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -62,8 +62,8 @@ int packet_get_keyiv_len(int);
62void packet_get_keyiv(int, u_char *, u_int); 62void packet_get_keyiv(int, u_char *, u_int);
63int packet_get_keycontext(int, u_char *); 63int packet_get_keycontext(int, u_char *);
64void packet_set_keycontext(int, u_char *); 64void packet_set_keycontext(int, u_char *);
65void packet_get_state(int, u_int32_t *, u_int64_t *, u_int32_t *); 65u_int32_t packet_get_seqnr(int);
66void packet_set_state(int, u_int32_t, u_int64_t, u_int32_t); 66void packet_set_seqnr(int, u_int32_t);
67int packet_get_ssh1_cipher(void); 67int packet_get_ssh1_cipher(void);
68void packet_set_iv(int, u_char *); 68void packet_set_iv(int, u_char *);
69 69
@@ -81,8 +81,8 @@ void packet_add_padding(u_char);
81void tty_make_modes(int, struct termios *); 81void tty_make_modes(int, struct termios *);
82void tty_parse_modes(int, int *); 82void tty_parse_modes(int, int *);
83 83
84extern u_int max_packet_size; 84extern int max_packet_size;
85u_int packet_set_maxsize(u_int); 85int packet_set_maxsize(int);
86#define packet_get_maxsize() max_packet_size 86#define packet_get_maxsize() max_packet_size
87 87
88/* don't allow remaining bytes after the end of the message */ 88/* don't allow remaining bytes after the end of the message */
@@ -90,13 +90,10 @@ u_int packet_set_maxsize(u_int);
90do { \ 90do { \
91 int _len = packet_remaining(); \ 91 int _len = packet_remaining(); \
92 if (_len > 0) { \ 92 if (_len > 0) { \
93 logit("Packet integrity error (%d bytes remaining) at %s:%d", \ 93 log("Packet integrity error (%d bytes remaining) at %s:%d", \
94 _len ,__FILE__, __LINE__); \ 94 _len ,__FILE__, __LINE__); \
95 packet_disconnect("Packet integrity error."); \ 95 packet_disconnect("Packet integrity error."); \
96 } \ 96 } \
97} while (0) 97} while (0)
98 98
99int packet_need_rekeying(void);
100void packet_set_rekey_limit(u_int32_t);
101
102#endif /* PACKET_H */ 99#endif /* PACKET_H */
diff --git a/progressmeter.c b/progressmeter.c
index c315464ee..90eb97f37 100644
--- a/progressmeter.c
+++ b/progressmeter.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (c) 2003 Nils Nordman. All rights reserved. 2 * Copyright (c) 1999 Theo de Raadt. All rights reserved.
3 * Copyright (c) 1999 Aaron Campbell. All rights reserved.
3 * 4 *
4 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -22,244 +23,260 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 24 */
24 25
25#include "includes.h" 26/*
26RCSID("$OpenBSD: progressmeter.c,v 1.15 2003/08/31 12:14:22 markus Exp $"); 27 * Parts from:
27 28 *
28#include "progressmeter.h" 29 * Copyright (c) 1983, 1990, 1992, 1993, 1995
29#include "atomicio.h" 30 * The Regents of the University of California. All rights reserved.
30#include "misc.h" 31 *
32 * Redistribution and use in source and binary forms, with or without
33 * modification, are permitted provided that the following conditions
34 * are met:
35 * 1. Redistributions of source code must retain the above copyright
36 * notice, this list of conditions and the following disclaimer.
37 * 2. Redistributions in binary form must reproduce the above copyright
38 * notice, this list of conditions and the following disclaimer in the
39 * documentation and/or other materials provided with the distribution.
40 * 3. All advertising materials mentioning features or use of this software
41 * must display the following acknowledgement:
42 * This product includes software developed by the University of
43 * California, Berkeley and its contributors.
44 * 4. Neither the name of the University nor the names of its contributors
45 * may be used to endorse or promote products derived from this software
46 * without specific prior written permission.
47 *
48 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
49 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
50 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
51 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
52 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE.
59 *
60 */
31 61
32#define DEFAULT_WINSIZE 80 62#include "includes.h"
33#define MAX_WINSIZE 512 63RCSID("$OpenBSD: progressmeter.c,v 1.3 2003/03/17 10:38:38 markus Exp $");
34#define PADDING 1 /* padding between the progress indicators */
35#define UPDATE_INTERVAL 1 /* update the progress meter every second */
36#define STALL_TIME 5 /* we're stalled after this many seconds */
37 64
38/* determines whether we can output to the terminal */ 65#ifdef HAVE_LIBGEN_H
39static int can_output(void); 66#include <libgen.h>
67#endif
40 68
41/* formats and inserts the specified size into the given buffer */ 69#include "atomicio.h"
42static void format_size(char *, int, off_t); 70#include "progressmeter.h"
43static void format_rate(char *, int, off_t);
44 71
45/* updates the progressmeter to reflect the current state of the transfer */ 72/* Number of seconds before xfer considered "stalled". */
46void refresh_progress_meter(void); 73#define STALLTIME 5
74/* alarm() interval for updating progress meter. */
75#define PROGRESSTIME 1
47 76
48/* signal handler for updating the progress meter */ 77/* Signal handler used for updating the progress meter. */
49static void update_progress_meter(int); 78static void update_progress_meter(int);
50 79
51static time_t start; /* start progress */ 80/* Returns non-zero if we are the foreground process. */
52static time_t last_update; /* last progress update */ 81static int foregroundproc(void);
53static char *file; /* name of the file being transferred */
54static off_t end_pos; /* ending position of transfer */
55static off_t cur_pos; /* transfer position as of last refresh */
56static volatile off_t *counter; /* progress counter */
57static long stalled; /* how long we have been stalled */
58static int bytes_per_second; /* current speed in bytes per second */
59static int win_size; /* terminal window size */
60 82
61/* units for format_size */ 83/* Returns width of the terminal (for progress meter calculations). */
62static const char unit[] = " KMGT"; 84static int get_tty_width(void);
63 85
64static int 86/* Visual statistics about files as they are transferred. */
65can_output(void) 87static void draw_progress_meter(void);
66{
67 return (getpgrp() == tcgetpgrp(STDOUT_FILENO));
68}
69 88
70static void 89/* Time a transfer started. */
71format_rate(char *buf, int size, off_t bytes) 90static struct timeval start;
72{
73 int i;
74
75 bytes *= 100;
76 for (i = 0; bytes >= 100*1000 && unit[i] != 'T'; i++)
77 bytes = (bytes + 512) / 1024;
78 if (i == 0) {
79 i++;
80 bytes = (bytes + 512) / 1024;
81 }
82 snprintf(buf, size, "%3lld.%1lld%c%s",
83 (int64_t) bytes / 100,
84 (int64_t) (bytes + 5) / 10 % 10,
85 unit[i],
86 i ? "B" : " ");
87}
88 91
89static void 92/* Number of bytes of current file transferred so far. */
90format_size(char *buf, int size, off_t bytes) 93static volatile off_t *statbytes;
91{
92 int i;
93
94 for (i = 0; bytes >= 10000 && unit[i] != 'T'; i++)
95 bytes = (bytes + 512) / 1024;
96 snprintf(buf, size, "%4lld%c%s",
97 (int64_t) bytes,
98 unit[i],
99 i ? "B" : " ");
100}
101 94
102void 95/* Total size of current file. */
103refresh_progress_meter(void) 96static off_t totalbytes;
104{
105 char buf[MAX_WINSIZE + 1];
106 time_t now;
107 off_t transferred;
108 double elapsed;
109 int percent;
110 int bytes_left;
111 int cur_speed;
112 int hours, minutes, seconds;
113 int i, len;
114 int file_len;
115
116 transferred = *counter - cur_pos;
117 cur_pos = *counter;
118 now = time(NULL);
119 bytes_left = end_pos - cur_pos;
120
121 if (bytes_left > 0)
122 elapsed = now - last_update;
123 else
124 elapsed = now - start;
125 97
126 /* calculate speed */ 98/* Name of current file being transferred. */
127 if (elapsed != 0) 99static char *curfile;
128 cur_speed = (transferred / elapsed);
129 else
130 cur_speed = 0;
131 100
132#define AGE_FACTOR 0.9 101/* Time of last update. */
133 if (bytes_per_second != 0) { 102static struct timeval lastupdate;
134 bytes_per_second = (bytes_per_second * AGE_FACTOR) +
135 (cur_speed * (1.0 - AGE_FACTOR));
136 } else
137 bytes_per_second = cur_speed;
138
139 /* filename */
140 buf[0] = '\0';
141 file_len = win_size - 35;
142 if (file_len > 0) {
143 len = snprintf(buf, file_len + 1, "\r%s", file);
144 if (len < 0)
145 len = 0;
146 for (i = len; i < file_len; i++ )
147 buf[i] = ' ';
148 buf[file_len] = '\0';
149 }
150 103
151 /* percent of transfer done */ 104/* Size at the time of the last update. */
152 if (end_pos != 0) 105static off_t lastsize;
153 percent = ((float)cur_pos / end_pos) * 100;
154 else
155 percent = 100;
156 snprintf(buf + strlen(buf), win_size - strlen(buf),
157 " %3d%% ", percent);
158
159 /* amount transferred */
160 format_size(buf + strlen(buf), win_size - strlen(buf),
161 cur_pos);
162 strlcat(buf, " ", win_size);
163
164 /* bandwidth usage */
165 format_rate(buf + strlen(buf), win_size - strlen(buf),
166 bytes_per_second);
167 strlcat(buf, "/s ", win_size);
168
169 /* ETA */
170 if (!transferred)
171 stalled += elapsed;
172 else
173 stalled = 0;
174
175 if (stalled >= STALL_TIME)
176 strlcat(buf, "- stalled -", win_size);
177 else if (bytes_per_second == 0 && bytes_left)
178 strlcat(buf, " --:-- ETA", win_size);
179 else {
180 if (bytes_left > 0)
181 seconds = bytes_left / bytes_per_second;
182 else
183 seconds = elapsed;
184 106
185 hours = seconds / 3600; 107void
186 seconds -= hours * 3600; 108start_progress_meter(char *file, off_t filesize, off_t *counter)
187 minutes = seconds / 60; 109{
188 seconds -= minutes * 60; 110 if ((curfile = basename(file)) == NULL)
111 curfile = file;
189 112
190 if (hours != 0) 113 totalbytes = filesize;
191 snprintf(buf + strlen(buf), win_size - strlen(buf), 114 statbytes = counter;
192 "%d:%02d:%02d", hours, minutes, seconds); 115 (void) gettimeofday(&start, (struct timezone *) 0);
193 else 116 lastupdate = start;
194 snprintf(buf + strlen(buf), win_size - strlen(buf), 117 lastsize = 0;
195 " %02d:%02d", minutes, seconds);
196 118
197 if (bytes_left > 0) 119 draw_progress_meter();
198 strlcat(buf, " ETA", win_size); 120 signal(SIGALRM, update_progress_meter);
199 else 121 alarm(PROGRESSTIME);
200 strlcat(buf, " ", win_size); 122}
201 }
202 123
203 atomicio(vwrite, STDOUT_FILENO, buf, win_size); 124void
204 last_update = now; 125stop_progress_meter()
126{
127 alarm(0);
128 draw_progress_meter();
129 if (foregroundproc() != 0)
130 atomicio(write, fileno(stdout), "\n", 1);
205} 131}
206 132
207static void 133static void
208update_progress_meter(int ignore) 134update_progress_meter(int ignore)
209{ 135{
210 int save_errno; 136 int save_errno = errno;
211
212 save_errno = errno;
213
214 if (can_output())
215 refresh_progress_meter();
216 137
138 draw_progress_meter();
217 signal(SIGALRM, update_progress_meter); 139 signal(SIGALRM, update_progress_meter);
218 alarm(UPDATE_INTERVAL); 140 alarm(PROGRESSTIME);
219 errno = save_errno; 141 errno = save_errno;
220} 142}
221 143
222void 144static int
223start_progress_meter(char *f, off_t filesize, off_t *stat) 145foregroundproc(void)
224{ 146{
225 struct winsize winsize; 147 static pid_t pgrp = -1;
148 int ctty_pgrp;
149
150 if (pgrp == -1)
151 pgrp = getpgrp();
152
153#ifdef HAVE_TCGETPGRP
154 return ((ctty_pgrp = tcgetpgrp(STDOUT_FILENO)) != -1 &&
155 ctty_pgrp == pgrp);
156#else
157 return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
158 ctty_pgrp == pgrp));
159#endif
160}
226 161
227 start = last_update = time(NULL); 162static void
228 file = f; 163draw_progress_meter()
229 end_pos = filesize; 164{
230 cur_pos = 0; 165 static const char spaces[] = " "
231 counter = stat; 166 " "
232 stalled = 0; 167 " "
233 bytes_per_second = 0; 168 " "
234 169 " "
235 if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &winsize) != -1 && 170 " ";
236 winsize.ws_col != 0) { 171 static const char prefixes[] = " KMGTP";
237 if (winsize.ws_col > MAX_WINSIZE) 172 struct timeval now, td, wait;
238 win_size = MAX_WINSIZE; 173 off_t cursize, abbrevsize, bytespersec;
239 else 174 double elapsed;
240 win_size = winsize.ws_col; 175 int ratio, remaining, i, ai, bi, nspaces;
176 char buf[512];
177
178 if (foregroundproc() == 0)
179 return;
180
181 (void) gettimeofday(&now, (struct timezone *) 0);
182 cursize = *statbytes;
183 if (totalbytes != 0) {
184 ratio = 100.0 * cursize / totalbytes;
185 ratio = MAX(ratio, 0);
186 ratio = MIN(ratio, 100);
241 } else 187 } else
242 win_size = DEFAULT_WINSIZE; 188 ratio = 100;
243 win_size += 1; /* trailing \0 */
244 189
245 if (can_output()) 190 abbrevsize = cursize;
246 refresh_progress_meter(); 191 for (ai = 0; abbrevsize >= 10000 && ai < sizeof(prefixes); ai++)
192 abbrevsize >>= 10;
247 193
248 signal(SIGALRM, update_progress_meter); 194 timersub(&now, &lastupdate, &wait);
249 alarm(UPDATE_INTERVAL); 195 if (cursize > lastsize) {
196 lastupdate = now;
197 lastsize = cursize;
198 wait.tv_sec = 0;
199 }
200 timersub(&now, &start, &td);
201 elapsed = td.tv_sec + (td.tv_usec / 1000000.0);
202
203 bytespersec = 0;
204 if (cursize > 0) {
205 bytespersec = cursize;
206 if (elapsed > 0.0)
207 bytespersec /= elapsed;
208 }
209 for (bi = 1; bytespersec >= 1024000 && bi < sizeof(prefixes); bi++)
210 bytespersec >>= 10;
211
212 nspaces = MIN(get_tty_width() - 79, sizeof(spaces) - 1);
213
214#ifdef HAVE_LONG_LONG_INT
215 snprintf(buf, sizeof(buf),
216 "\r%-45.45s%.*s%3d%% %4lld%c%c %3lld.%01d%cB/s",
217 curfile,
218 nspaces,
219 spaces,
220 ratio,
221 (long long)abbrevsize,
222 prefixes[ai],
223 ai == 0 ? ' ' : 'B',
224 (long long)(bytespersec / 1024),
225 (int)((bytespersec % 1024) * 10 / 1024),
226 prefixes[bi]
227 );
228#else
229 /* XXX: Handle integer overflow? */
230 snprintf(buf, sizeof(buf),
231 "\r%-45.45s%.*s%3d%% %4lu%c%c %3lu.%01d%cB/s",
232 curfile,
233 nspaces,
234 spaces,
235 ratio,
236 (u_long)abbrevsize,
237 prefixes[ai],
238 ai == 0 ? ' ' : 'B',
239 (u_long)(bytespersec / 1024),
240 (int)((bytespersec % 1024) * 10 / 1024),
241 prefixes[bi]
242 );
243#endif
244
245 if (cursize <= 0 || elapsed <= 0.0 || cursize > totalbytes) {
246 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
247 " --:-- ETA");
248 } else if (wait.tv_sec >= STALLTIME) {
249 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
250 " - stalled -");
251 } else {
252 if (cursize != totalbytes)
253 remaining = (int)(totalbytes / (cursize / elapsed) -
254 elapsed);
255 else
256 remaining = elapsed;
257
258 i = remaining / 3600;
259 if (i)
260 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
261 "%2d:", i);
262 else
263 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
264 " ");
265 i = remaining % 3600;
266 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
267 "%02d:%02d%s", i / 60, i % 60,
268 (cursize != totalbytes) ? " ETA" : " ");
269 }
270 atomicio(write, fileno(stdout), buf, strlen(buf));
250} 271}
251 272
252void 273static int
253stop_progress_meter(void) 274get_tty_width(void)
254{ 275{
255 alarm(0); 276 struct winsize winsize;
256
257 if (!can_output())
258 return;
259
260 /* Ensure we complete the progress */
261 if (cur_pos != end_pos)
262 refresh_progress_meter();
263 277
264 atomicio(vwrite, STDOUT_FILENO, "\n", 1); 278 if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1)
279 return (winsize.ws_col ? winsize.ws_col : 80);
280 else
281 return (80);
265} 282}
diff --git a/radix.c b/radix.c
new file mode 100644
index 000000000..c680d6bf3
--- /dev/null
+++ b/radix.c
@@ -0,0 +1,158 @@
1/*
2 * Copyright (c) 1999 Dug Song. All rights reserved.
3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "includes.h"
27#include "uuencode.h"
28
29RCSID("$OpenBSD: radix.c,v 1.22 2002/09/09 14:54:15 markus Exp $");
30
31#ifdef AFS
32#include <krb.h>
33
34#include <radix.h>
35#include "bufaux.h"
36
37int
38creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen)
39{
40 Buffer b;
41 int ret;
42
43 buffer_init(&b);
44
45 buffer_put_char(&b, 1); /* version */
46
47 buffer_append(&b, creds->service, strlen(creds->service));
48 buffer_put_char(&b, '\0');
49 buffer_append(&b, creds->instance, strlen(creds->instance));
50 buffer_put_char(&b, '\0');
51 buffer_append(&b, creds->realm, strlen(creds->realm));
52 buffer_put_char(&b, '\0');
53 buffer_append(&b, creds->pname, strlen(creds->pname));
54 buffer_put_char(&b, '\0');
55 buffer_append(&b, creds->pinst, strlen(creds->pinst));
56 buffer_put_char(&b, '\0');
57
58 /* Null string to repeat the realm. */
59 buffer_put_char(&b, '\0');
60
61 buffer_put_int(&b, creds->issue_date);
62 buffer_put_int(&b, krb_life_to_time(creds->issue_date,
63 creds->lifetime));
64 buffer_append(&b, creds->session, sizeof(creds->session));
65 buffer_put_short(&b, creds->kvno);
66
67 /* 32 bit size + data */
68 buffer_put_string(&b, creds->ticket_st.dat, creds->ticket_st.length);
69
70 ret = uuencode(buffer_ptr(&b), buffer_len(&b), (char *)buf, buflen);
71
72 buffer_free(&b);
73 return ret;
74}
75
76#define GETSTRING(b, t, tlen) \
77 do { \
78 int i, found = 0; \
79 for (i = 0; i < tlen; i++) { \
80 if (buffer_len(b) == 0) \
81 goto done; \
82 t[i] = buffer_get_char(b); \
83 if (t[i] == '\0') { \
84 found = 1; \
85 break; \
86 } \
87 } \
88 if (!found) \
89 goto done; \
90 } while(0)
91
92int
93radix_to_creds(const char *buf, CREDENTIALS *creds)
94{
95 Buffer b;
96 u_char *space;
97 char c, version, *p;
98 u_int endTime, len;
99 int blen, ret;
100
101 ret = 0;
102 blen = strlen(buf);
103
104 /* sanity check for size */
105 if (blen > 8192)
106 return 0;
107
108 buffer_init(&b);
109 space = buffer_append_space(&b, blen);
110
111 /* check version and length! */
112 len = uudecode(buf, space, blen);
113 if (len < 1)
114 goto done;
115
116 version = buffer_get_char(&b);
117
118 GETSTRING(&b, creds->service, sizeof creds->service);
119 GETSTRING(&b, creds->instance, sizeof creds->instance);
120 GETSTRING(&b, creds->realm, sizeof creds->realm);
121 GETSTRING(&b, creds->pname, sizeof creds->pname);
122 GETSTRING(&b, creds->pinst, sizeof creds->pinst);
123
124 if (buffer_len(&b) == 0)
125 goto done;
126
127 /* Ignore possibly different realm. */
128 while (buffer_len(&b) > 0 && (c = buffer_get_char(&b)) != '\0')
129 ;
130
131 if (buffer_len(&b) == 0)
132 goto done;
133
134 creds->issue_date = buffer_get_int(&b);
135
136 endTime = buffer_get_int(&b);
137 creds->lifetime = krb_time_to_life(creds->issue_date, endTime);
138
139 len = buffer_len(&b);
140 if (len < sizeof(creds->session))
141 goto done;
142 memcpy(&creds->session, buffer_ptr(&b), sizeof(creds->session));
143 buffer_consume(&b, sizeof(creds->session));
144
145 creds->kvno = buffer_get_short(&b);
146
147 p = buffer_get_string(&b, &len);
148 if (len < 0 || len > sizeof(creds->ticket_st.dat))
149 goto done;
150 memcpy(&creds->ticket_st.dat, p, len);
151 creds->ticket_st.length = len;
152
153 ret = 1;
154done:
155 buffer_free(&b);
156 return ret;
157}
158#endif /* AFS */
diff --git a/radix.h b/radix.h
new file mode 100644
index 000000000..e94e4acc6
--- /dev/null
+++ b/radix.h
@@ -0,0 +1,28 @@
1/* $OpenBSD: radix.h,v 1.4 2001/06/26 17:27:24 markus Exp $ */
2
3/*
4 * Copyright (c) 1999 Dug Song. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27int creds_to_radix(CREDENTIALS *, u_char *, size_t);
28int radix_to_creds(const char *, CREDENTIALS *);
diff --git a/readconf.c b/readconf.c
index 0a1788ba0..899ff3f0e 100644
--- a/readconf.c
+++ b/readconf.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: readconf.c,v 1.121 2003/09/01 18:15:50 markus Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.104 2003/04/01 10:22:21 markus Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -57,6 +57,7 @@ RCSID("$OpenBSD: readconf.c,v 1.121 2003/09/01 18:15:50 markus Exp $");
57 Host fascist.blob.com 57 Host fascist.blob.com
58 Port 23123 58 Port 23123
59 User tylonen 59 User tylonen
60 RhostsAuthentication no
60 PasswordAuthentication no 61 PasswordAuthentication no
61 62
62 Host puukko.hut.fi 63 Host puukko.hut.fi
@@ -74,6 +75,7 @@ RCSID("$OpenBSD: readconf.c,v 1.121 2003/09/01 18:15:50 markus Exp $");
74 Host * 75 Host *
75 ForwardAgent no 76 ForwardAgent no
76 ForwardX11 no 77 ForwardX11 no
78 RhostsAuthentication yes
77 PasswordAuthentication yes 79 PasswordAuthentication yes
78 RSAAuthentication yes 80 RSAAuthentication yes
79 RhostsRSAAuthentication yes 81 RhostsRSAAuthentication yes
@@ -91,9 +93,18 @@ RCSID("$OpenBSD: readconf.c,v 1.121 2003/09/01 18:15:50 markus Exp $");
91 93
92typedef enum { 94typedef enum {
93 oBadOption, 95 oBadOption,
94 oForwardAgent, oForwardX11, oGatewayPorts, 96 oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication,
95 oPasswordAuthentication, oRSAAuthentication, 97 oPasswordAuthentication, oRSAAuthentication,
96 oChallengeResponseAuthentication, oXAuthLocation, 98 oChallengeResponseAuthentication, oXAuthLocation,
99#if defined(KRB4) || defined(KRB5)
100 oKerberosAuthentication,
101#endif
102#if defined(AFS) || defined(KRB5)
103 oKerberosTgtPassing,
104#endif
105#ifdef AFS
106 oAFSTokenPassing,
107#endif
97 oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, 108 oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,
98 oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, 109 oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
99 oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, 110 oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
@@ -105,10 +116,9 @@ typedef enum {
105 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, 116 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
106 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, 117 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
107 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 118 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
108 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, 119 oEnableSSHKeysign,
109 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
110 oProtocolKeepAlives, oSetupTimeOut, 120 oProtocolKeepAlives, oSetupTimeOut,
111 oDeprecated, oUnsupported 121 oDeprecated
112} OpCodes; 122} OpCodes;
113 123
114/* Textual representations of the tokens. */ 124/* Textual representations of the tokens. */
@@ -122,7 +132,7 @@ static struct {
122 { "xauthlocation", oXAuthLocation }, 132 { "xauthlocation", oXAuthLocation },
123 { "gatewayports", oGatewayPorts }, 133 { "gatewayports", oGatewayPorts },
124 { "useprivilegedport", oUsePrivilegedPort }, 134 { "useprivilegedport", oUsePrivilegedPort },
125 { "rhostsauthentication", oDeprecated }, 135 { "rhostsauthentication", oRhostsAuthentication },
126 { "passwordauthentication", oPasswordAuthentication }, 136 { "passwordauthentication", oPasswordAuthentication },
127 { "kbdinteractiveauthentication", oKbdInteractiveAuthentication }, 137 { "kbdinteractiveauthentication", oKbdInteractiveAuthentication },
128 { "kbdinteractivedevices", oKbdInteractiveDevices }, 138 { "kbdinteractivedevices", oKbdInteractiveDevices },
@@ -134,15 +144,14 @@ static struct {
134 { "challengeresponseauthentication", oChallengeResponseAuthentication }, 144 { "challengeresponseauthentication", oChallengeResponseAuthentication },
135 { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */ 145 { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */
136 { "tisauthentication", oChallengeResponseAuthentication }, /* alias */ 146 { "tisauthentication", oChallengeResponseAuthentication }, /* alias */
137 { "kerberosauthentication", oUnsupported }, 147#if defined(KRB4) || defined(KRB5)
138 { "kerberostgtpassing", oUnsupported }, 148 { "kerberosauthentication", oKerberosAuthentication },
139 { "afstokenpassing", oUnsupported }, 149#endif
140#if defined(GSSAPI) 150#if defined(AFS) || defined(KRB5)
141 { "gssapiauthentication", oGssAuthentication }, 151 { "kerberostgtpassing", oKerberosTgtPassing },
142 { "gssapidelegatecredentials", oGssDelegateCreds }, 152#endif
143#else 153#ifdef AFS
144 { "gssapiauthentication", oUnsupported }, 154 { "afstokenpassing", oAFSTokenPassing },
145 { "gssapidelegatecredentials", oUnsupported },
146#endif 155#endif
147 { "fallbacktorsh", oDeprecated }, 156 { "fallbacktorsh", oDeprecated },
148 { "usersh", oDeprecated }, 157 { "usersh", oDeprecated },
@@ -178,22 +187,10 @@ static struct {
178 { "preferredauthentications", oPreferredAuthentications }, 187 { "preferredauthentications", oPreferredAuthentications },
179 { "hostkeyalgorithms", oHostKeyAlgorithms }, 188 { "hostkeyalgorithms", oHostKeyAlgorithms },
180 { "bindaddress", oBindAddress }, 189 { "bindaddress", oBindAddress },
181#ifdef SMARTCARD
182 { "smartcarddevice", oSmartcardDevice }, 190 { "smartcarddevice", oSmartcardDevice },
183#else
184 { "smartcarddevice", oUnsupported },
185#endif
186 { "clearallforwardings", oClearAllForwardings }, 191 { "clearallforwardings", oClearAllForwardings },
187 { "enablesshkeysign", oEnableSSHKeysign }, 192 { "enablesshkeysign", oEnableSSHKeysign },
188#ifdef DNS
189 { "verifyhostkeydns", oVerifyHostKeyDNS },
190#else
191 { "verifyhostkeydns", oUnsupported },
192#endif
193 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, 193 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },
194 { "rekeylimit", oRekeyLimit },
195 { "connecttimeout", oConnectTimeout },
196 { "addressfamily", oAddressFamily },
197 { "protocolkeepalives", oProtocolKeepAlives }, 194 { "protocolkeepalives", oProtocolKeepAlives },
198 { "setuptimeout", oSetupTimeOut }, 195 { "setuptimeout", oSetupTimeOut },
199 { NULL, oBadOption } 196 { NULL, oBadOption }
@@ -312,20 +309,6 @@ process_config_line(Options *options, const char *host,
312 /* don't panic, but count bad options */ 309 /* don't panic, but count bad options */
313 return -1; 310 return -1;
314 /* NOTREACHED */ 311 /* NOTREACHED */
315 case oConnectTimeout:
316 intptr = &options->connection_timeout;
317/* parse_time: */
318 arg = strdelim(&s);
319 if (!arg || *arg == '\0')
320 fatal("%s line %d: missing time value.",
321 filename, linenum);
322 if ((value = convtime(arg)) == -1)
323 fatal("%s line %d: invalid time value.",
324 filename, linenum);
325 if (*intptr == -1)
326 *intptr = value;
327 break;
328
329 case oForwardAgent: 312 case oForwardAgent:
330 intptr = &options->forward_agent; 313 intptr = &options->forward_agent;
331parse_flag: 314parse_flag:
@@ -355,6 +338,10 @@ parse_flag:
355 intptr = &options->use_privileged_port; 338 intptr = &options->use_privileged_port;
356 goto parse_flag; 339 goto parse_flag;
357 340
341 case oRhostsAuthentication:
342 intptr = &options->rhosts_authentication;
343 goto parse_flag;
344
358 case oPasswordAuthentication: 345 case oPasswordAuthentication:
359 intptr = &options->password_authentication; 346 intptr = &options->password_authentication;
360 goto parse_flag; 347 goto parse_flag;
@@ -386,15 +373,21 @@ parse_flag:
386 case oChallengeResponseAuthentication: 373 case oChallengeResponseAuthentication:
387 intptr = &options->challenge_response_authentication; 374 intptr = &options->challenge_response_authentication;
388 goto parse_flag; 375 goto parse_flag;
389 376#if defined(KRB4) || defined(KRB5)
390 case oGssAuthentication: 377 case oKerberosAuthentication:
391 intptr = &options->gss_authentication; 378 intptr = &options->kerberos_authentication;
392 goto parse_flag; 379 goto parse_flag;
393 380#endif
394 case oGssDelegateCreds: 381#if defined(AFS) || defined(KRB5)
395 intptr = &options->gss_deleg_creds; 382 case oKerberosTgtPassing:
383 intptr = &options->kerberos_tgt_passing;
396 goto parse_flag; 384 goto parse_flag;
397 385#endif
386#ifdef AFS
387 case oAFSTokenPassing:
388 intptr = &options->afs_token_passing;
389 goto parse_flag;
390#endif
398 case oBatchMode: 391 case oBatchMode:
399 intptr = &options->batch_mode; 392 intptr = &options->batch_mode;
400 goto parse_flag; 393 goto parse_flag;
@@ -403,10 +396,6 @@ parse_flag:
403 intptr = &options->check_host_ip; 396 intptr = &options->check_host_ip;
404 goto parse_flag; 397 goto parse_flag;
405 398
406 case oVerifyHostKeyDNS:
407 intptr = &options->verify_host_key_dns;
408 goto parse_flag;
409
410 case oStrictHostKeyChecking: 399 case oStrictHostKeyChecking:
411 intptr = &options->strict_host_key_checking; 400 intptr = &options->strict_host_key_checking;
412 arg = strdelim(&s); 401 arg = strdelim(&s);
@@ -454,31 +443,6 @@ parse_flag:
454 intptr = &options->compression_level; 443 intptr = &options->compression_level;
455 goto parse_int; 444 goto parse_int;
456 445
457 case oRekeyLimit:
458 intptr = &options->rekey_limit;
459 arg = strdelim(&s);
460 if (!arg || *arg == '\0')
461 fatal("%.200s line %d: Missing argument.", filename, linenum);
462 if (arg[0] < '0' || arg[0] > '9')
463 fatal("%.200s line %d: Bad number.", filename, linenum);
464 value = strtol(arg, &endofnumber, 10);
465 if (arg == endofnumber)
466 fatal("%.200s line %d: Bad number.", filename, linenum);
467 switch (toupper(*endofnumber)) {
468 case 'K':
469 value *= 1<<10;
470 break;
471 case 'M':
472 value *= 1<<20;
473 break;
474 case 'G':
475 value *= 1<<30;
476 break;
477 }
478 if (*activep && *intptr == -1)
479 *intptr = value;
480 break;
481
482 case oIdentityFile: 446 case oIdentityFile:
483 arg = strdelim(&s); 447 arg = strdelim(&s);
484 if (!arg || *arg == '\0') 448 if (!arg || *arg == '\0')
@@ -545,8 +509,6 @@ parse_string:
545 goto parse_string; 509 goto parse_string;
546 510
547 case oProxyCommand: 511 case oProxyCommand:
548 if (s == NULL)
549 fatal("%.200s line %d: Missing argument.", filename, linenum);
550 charptr = &options->proxy_command; 512 charptr = &options->proxy_command;
551 len = strspn(s, WHITESPACE "="); 513 len = strspn(s, WHITESPACE "=");
552 if (*activep && *charptr == NULL) 514 if (*activep && *charptr == NULL)
@@ -684,7 +646,7 @@ parse_int:
684 fatal("%.200s line %d: Badly formatted port number.", 646 fatal("%.200s line %d: Badly formatted port number.",
685 filename, linenum); 647 filename, linenum);
686 if (*activep) 648 if (*activep)
687 add_local_forward(options, fwd_port, "socks", 0); 649 add_local_forward(options, fwd_port, "socks4", 0);
688 break; 650 break;
689 651
690 case oClearAllForwardings: 652 case oClearAllForwardings:
@@ -724,21 +686,6 @@ parse_int:
724 *intptr = value; 686 *intptr = value;
725 break; 687 break;
726 688
727 case oAddressFamily:
728 arg = strdelim(&s);
729 intptr = &options->address_family;
730 if (strcasecmp(arg, "inet") == 0)
731 value = AF_INET;
732 else if (strcasecmp(arg, "inet6") == 0)
733 value = AF_INET6;
734 else if (strcasecmp(arg, "any") == 0)
735 value = AF_UNSPEC;
736 else
737 fatal("Unsupported AddressFamily \"%s\"", arg);
738 if (*activep && *intptr == -1)
739 *intptr = value;
740 break;
741
742 case oEnableSSHKeysign: 689 case oEnableSSHKeysign:
743 intptr = &options->enable_ssh_keysign; 690 intptr = &options->enable_ssh_keysign;
744 goto parse_flag; 691 goto parse_flag;
@@ -748,11 +695,6 @@ parse_int:
748 filename, linenum, keyword); 695 filename, linenum, keyword);
749 return 0; 696 return 0;
750 697
751 case oUnsupported:
752 error("%s line %d: Unsupported option \"%s\"",
753 filename, linenum, keyword);
754 return 0;
755
756 default: 698 default:
757 fatal("process_config_line: Unimplemented opcode %d", opcode); 699 fatal("process_config_line: Unimplemented opcode %d", opcode);
758 } 700 }
@@ -822,11 +764,19 @@ initialize_options(Options * options)
822 options->xauth_location = NULL; 764 options->xauth_location = NULL;
823 options->gateway_ports = -1; 765 options->gateway_ports = -1;
824 options->use_privileged_port = -1; 766 options->use_privileged_port = -1;
767 options->rhosts_authentication = -1;
825 options->rsa_authentication = -1; 768 options->rsa_authentication = -1;
826 options->pubkey_authentication = -1; 769 options->pubkey_authentication = -1;
827 options->challenge_response_authentication = -1; 770 options->challenge_response_authentication = -1;
828 options->gss_authentication = -1; 771#if defined(KRB4) || defined(KRB5)
829 options->gss_deleg_creds = -1; 772 options->kerberos_authentication = -1;
773#endif
774#if defined(AFS) || defined(KRB5)
775 options->kerberos_tgt_passing = -1;
776#endif
777#ifdef AFS
778 options->afs_token_passing = -1;
779#endif
830 options->password_authentication = -1; 780 options->password_authentication = -1;
831 options->kbd_interactive_authentication = -1; 781 options->kbd_interactive_authentication = -1;
832 options->kbd_interactive_devices = NULL; 782 options->kbd_interactive_devices = NULL;
@@ -841,9 +791,7 @@ initialize_options(Options * options)
841 options->setuptimeout = -1; 791 options->setuptimeout = -1;
842 options->compression_level = -1; 792 options->compression_level = -1;
843 options->port = -1; 793 options->port = -1;
844 options->address_family = -1;
845 options->connection_attempts = -1; 794 options->connection_attempts = -1;
846 options->connection_timeout = -1;
847 options->number_of_password_prompts = -1; 795 options->number_of_password_prompts = -1;
848 options->cipher = -1; 796 options->cipher = -1;
849 options->ciphers = NULL; 797 options->ciphers = NULL;
@@ -869,8 +817,6 @@ initialize_options(Options * options)
869 options->smartcard_device = NULL; 817 options->smartcard_device = NULL;
870 options->enable_ssh_keysign = - 1; 818 options->enable_ssh_keysign = - 1;
871 options->no_host_authentication_for_localhost = - 1; 819 options->no_host_authentication_for_localhost = - 1;
872 options->rekey_limit = - 1;
873 options->verify_host_key_dns = -1;
874} 820}
875 821
876/* 822/*
@@ -893,16 +839,26 @@ fill_default_options(Options * options)
893 options->gateway_ports = 0; 839 options->gateway_ports = 0;
894 if (options->use_privileged_port == -1) 840 if (options->use_privileged_port == -1)
895 options->use_privileged_port = 0; 841 options->use_privileged_port = 0;
842 if (options->rhosts_authentication == -1)
843 options->rhosts_authentication = 0;
896 if (options->rsa_authentication == -1) 844 if (options->rsa_authentication == -1)
897 options->rsa_authentication = 1; 845 options->rsa_authentication = 1;
898 if (options->pubkey_authentication == -1) 846 if (options->pubkey_authentication == -1)
899 options->pubkey_authentication = 1; 847 options->pubkey_authentication = 1;
900 if (options->challenge_response_authentication == -1) 848 if (options->challenge_response_authentication == -1)
901 options->challenge_response_authentication = 1; 849 options->challenge_response_authentication = 1;
902 if (options->gss_authentication == -1) 850#if defined(KRB4) || defined(KRB5)
903 options->gss_authentication = 1; 851 if (options->kerberos_authentication == -1)
904 if (options->gss_deleg_creds == -1) 852 options->kerberos_authentication = 1;
905 options->gss_deleg_creds = 0; 853#endif
854#if defined(AFS) || defined(KRB5)
855 if (options->kerberos_tgt_passing == -1)
856 options->kerberos_tgt_passing = 1;
857#endif
858#ifdef AFS
859 if (options->afs_token_passing == -1)
860 options->afs_token_passing = 1;
861#endif
906 if (options->password_authentication == -1) 862 if (options->password_authentication == -1)
907 options->password_authentication = 1; 863 options->password_authentication = 1;
908 if (options->kbd_interactive_authentication == -1) 864 if (options->kbd_interactive_authentication == -1)
@@ -933,8 +889,6 @@ fill_default_options(Options * options)
933 options->compression_level = 6; 889 options->compression_level = 6;
934 if (options->port == -1) 890 if (options->port == -1)
935 options->port = 0; /* Filled in ssh_connect. */ 891 options->port = 0; /* Filled in ssh_connect. */
936 if (options->address_family == -1)
937 options->address_family = AF_UNSPEC;
938 if (options->connection_attempts == -1) 892 if (options->connection_attempts == -1)
939 options->connection_attempts = 1; 893 options->connection_attempts = 1;
940 if (options->number_of_password_prompts == -1) 894 if (options->number_of_password_prompts == -1)
@@ -987,10 +941,6 @@ fill_default_options(Options * options)
987 options->no_host_authentication_for_localhost = 0; 941 options->no_host_authentication_for_localhost = 0;
988 if (options->enable_ssh_keysign == -1) 942 if (options->enable_ssh_keysign == -1)
989 options->enable_ssh_keysign = 0; 943 options->enable_ssh_keysign = 0;
990 if (options->rekey_limit == -1)
991 options->rekey_limit = 0;
992 if (options->verify_host_key_dns == -1)
993 options->verify_host_key_dns = 0;
994 /* options->proxy_command should not be set by default */ 944 /* options->proxy_command should not be set by default */
995 /* options->user will be set in the main program if appropriate */ 945 /* options->user will be set in the main program if appropriate */
996 /* options->hostname will be set in the main program if appropriate */ 946 /* options->hostname will be set in the main program if appropriate */
diff --git a/readconf.h b/readconf.h
index 56cbec539..6066d4635 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.55 2003/09/01 18:15:50 markus Exp $ */ 1/* $OpenBSD: readconf.h,v 1.46 2003/04/01 10:22:21 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -33,6 +33,7 @@ typedef struct {
33 char *xauth_location; /* Location for xauth program */ 33 char *xauth_location; /* Location for xauth program */
34 int gateway_ports; /* Allow remote connects to forwarded ports. */ 34 int gateway_ports; /* Allow remote connects to forwarded ports. */
35 int use_privileged_port; /* Don't use privileged port if false. */ 35 int use_privileged_port; /* Don't use privileged port if false. */
36 int rhosts_authentication; /* Try rhosts authentication. */
36 int rhosts_rsa_authentication; /* Try rhosts with RSA 37 int rhosts_rsa_authentication; /* Try rhosts with RSA
37 * authentication. */ 38 * authentication. */
38 int rsa_authentication; /* Try RSA authentication. */ 39 int rsa_authentication; /* Try RSA authentication. */
@@ -40,8 +41,15 @@ typedef struct {
40 int hostbased_authentication; /* ssh2's rhosts_rsa */ 41 int hostbased_authentication; /* ssh2's rhosts_rsa */
41 int challenge_response_authentication; 42 int challenge_response_authentication;
42 /* Try S/Key or TIS, authentication. */ 43 /* Try S/Key or TIS, authentication. */
43 int gss_authentication; /* Try GSS authentication */ 44#if defined(KRB4) || defined(KRB5)
44 int gss_deleg_creds; /* Delegate GSS credentials */ 45 int kerberos_authentication; /* Try Kerberos authentication. */
46#endif
47#if defined(AFS) || defined(KRB5)
48 int kerberos_tgt_passing; /* Try Kerberos TGT passing. */
49#endif
50#ifdef AFS
51 int afs_token_passing; /* Try AFS token passing. */
52#endif
45 int password_authentication; /* Try password 53 int password_authentication; /* Try password
46 * authentication. */ 54 * authentication. */
47 int kbd_interactive_authentication; /* Try keyboard-interactive auth. */ 55 int kbd_interactive_authentication; /* Try keyboard-interactive auth. */
@@ -58,11 +66,8 @@ typedef struct {
58 LogLevel log_level; /* Level for logging. */ 66 LogLevel log_level; /* Level for logging. */
59 67
60 int port; /* Port to connect. */ 68 int port; /* Port to connect. */
61 int address_family;
62 int connection_attempts; /* Max attempts (seconds) before 69 int connection_attempts; /* Max attempts (seconds) before
63 * giving up */ 70 * giving up */
64 int connection_timeout; /* Max time (seconds) before
65 * aborting connection attempt */
66 int number_of_password_prompts; /* Max number of password 71 int number_of_password_prompts; /* Max number of password
67 * prompts. */ 72 * prompts. */
68 int cipher; /* Cipher to use. */ 73 int cipher; /* Cipher to use. */
@@ -83,7 +88,6 @@ typedef struct {
83 char *preferred_authentications; 88 char *preferred_authentications;
84 char *bind_address; /* local socket address for connection to sshd */ 89 char *bind_address; /* local socket address for connection to sshd */
85 char *smartcard_device; /* Smartcard reader device */ 90 char *smartcard_device; /* Smartcard reader device */
86 int verify_host_key_dns; /* Verify host key using DNS */
87 91
88 int num_identity_files; /* Number of files for RSA/DSA identities. */ 92 int num_identity_files; /* Number of files for RSA/DSA identities. */
89 char *identity_files[SSH_MAX_IDENTITY_FILES]; 93 char *identity_files[SSH_MAX_IDENTITY_FILES];
@@ -99,7 +103,6 @@ typedef struct {
99 int clear_forwardings; 103 int clear_forwardings;
100 104
101 int enable_ssh_keysign; 105 int enable_ssh_keysign;
102 int rekey_limit;
103 int no_host_authentication_for_localhost; 106 int no_host_authentication_for_localhost;
104} Options; 107} Options;
105 108
diff --git a/regress/Makefile b/regress/Makefile
index 623be8d82..6e2029348 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -1,11 +1,8 @@
1# $OpenBSD: Makefile,v 1.24 2003/07/03 08:24:13 markus Exp $ 1# $OpenBSD: Makefile,v 1.20 2003/01/08 23:54:22 djm Exp $
2 2
3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec 3REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7
4tests: $(REGRESS_TARGETS)
5 4
6clean: 5CLEANFILES+= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2
7 for F in $(CLEANFILES); do rm -f $(OBJ)$$F; done
8distclean: clean
9 6
10LTESTS= connect \ 7LTESTS= connect \
11 proxy-connect \ 8 proxy-connect \
@@ -14,7 +11,6 @@ LTESTS= connect \
14 proto-mismatch \ 11 proto-mismatch \
15 exit-status \ 12 exit-status \
16 transfer \ 13 transfer \
17 rekey \
18 stderr-data \ 14 stderr-data \
19 stderr-after-eof \ 15 stderr-after-eof \
20 broken-pipe \ 16 broken-pipe \
@@ -28,34 +24,30 @@ LTESTS= connect \
28 keygen-change \ 24 keygen-change \
29 sftp \ 25 sftp \
30 sftp-cmds \ 26 sftp-cmds \
31 sftp-badcmds \
32 sftp-batch \ 27 sftp-batch \
33 reconfigure \
34 dynamic-forward \
35 forwarding 28 forwarding
36 29
37USER!= id -un 30USER!= id -un
38CLEANFILES= t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \ 31CLEANFILES+= authorized_keys_${USER} known_hosts pidfile \
39 authorized_keys_${USER} known_hosts pidfile \
40 ssh_config ssh_proxy sshd_config sshd_proxy \ 32 ssh_config ssh_proxy sshd_config sshd_proxy \
41 rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \ 33 rsa.pub rsa rsa1.pub rsa1 host.rsa host.rsa1 \
42 rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \ 34 rsa-agent rsa-agent.pub rsa1-agent rsa1-agent.pub \
43 ls.copy remote_pid 35 ls.copy
44 36
45#LTESTS += ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp 37#LTESTS+= ssh-com ssh-com-client ssh-com-keygen ssh-com-sftp
46 38
47t1: 39t1:
48 ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv 40 ssh-keygen -if ${.CURDIR}/rsa_ssh2.prv | diff - ${.CURDIR}/rsa_openssh.prv
49 41
50t2: 42t2:
51 cat ${.CURDIR}/rsa_openssh.prv > $(OBJ)/t2.out 43 cat ${.CURDIR}/rsa_openssh.prv > t2.out
52 chmod 600 $(OBJ)/t2.out 44 chmod 600 t2.out
53 ssh-keygen -yf $(OBJ)/t2.out | diff - ${.CURDIR}/rsa_openssh.pub 45 ssh-keygen -yf t2.out | diff - ${.CURDIR}/rsa_openssh.pub
54 46
55t3: 47t3:
56 ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub >$(OBJ)/rsa_secsh.pub 48 ssh-keygen -ef ${.CURDIR}/rsa_openssh.pub |\
57 ssh-keygen -if $(OBJ)/rsa_secsh.pub | diff - ${.CURDIR}/rsa_openssh.pub 49 ssh-keygen -if /dev/stdin |\
58 rm -f ${.CURDIR}/rsa_secsh.pub 50 diff - ${.CURDIR}/rsa_openssh.pub
59 51
60t4: 52t4:
61 ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\ 53 ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\
@@ -66,21 +58,22 @@ t5:
66 awk '{print $$2}' | diff - ${.CURDIR}/t5.ok 58 awk '{print $$2}' | diff - ${.CURDIR}/t5.ok
67 59
68t6: 60t6:
69 ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1 61 ssh-keygen -if ${.CURDIR}/dsa_ssh2.prv > t6.out1
70 ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2 62 ssh-keygen -if ${.CURDIR}/dsa_ssh2.pub > t6.out2
71 chmod 600 $(OBJ)/t6.out1 63 chmod 600 t6.out1
72 ssh-keygen -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2 64 ssh-keygen -yf t6.out1 | diff - t6.out2
73 65
74$(OBJ)/t7.out: 66t7.out:
75 ssh-keygen -q -t rsa -N '' -f $@ 67 ssh-keygen -q -t rsa -N '' -f $@
76 68
77t7: $(OBJ)/t7.out 69t7: t7.out
78 ssh-keygen -lf $(OBJ)/t7.out > /dev/null 70 ssh-keygen -lf t7.out > /dev/null
79 ssh-keygen -Bf $(OBJ)/t7.out > /dev/null 71 ssh-keygen -Bf t7.out > /dev/null
80 72
81t-exec: ${LTESTS:=.sh} 73.for t in ${LTESTS}
82 @if [ "x$?" = "x" ]; then exit 0; fi; \ 74REGRESS_TARGETS+=t-${t}
83 for TEST in ""$?; do \ 75t-${t}:
84 echo "run test $${TEST}" ... 1>&2; \ 76 sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/${t}.sh
85 (sh ${.CURDIR}/test-exec.sh ${.OBJDIR} ${.CURDIR}/$${TEST}) || exit $$?; \ 77.endfor
86 done 78
79.include "bsd.regress.mk"
diff --git a/regress/README.regress b/regress/README.regress
deleted file mode 100644
index 916894a88..000000000
--- a/regress/README.regress
+++ /dev/null
@@ -1,86 +0,0 @@
1Overview.
2
3$ ./configure && make tests
4
5You'll see some progress info. A failure will cause either the make to
6abort or the driver script to report a "FATAL" failure.
7
8The test consists of 2 parts. The first is the file-based tests which is
9driven by the Makefile, and the second is a set of network or proxycommand
10based tests, which are driven by a driver script (test-exec.sh) which is
11called multiple times by the Makefile.
12
13Failures in the first part will cause the Makefile to return an error.
14Failures in the second part will print a "FATAL" message for the failed
15test and continue.
16
17OpenBSD has a system-wide regression test suite. OpenSSH Portable's test
18suite is based on OpenBSD's with modifications.
19
20
21Environment variables.
22
23SUDO: path to sudo command, if desired. Note that some systems (notably
24 systems using PAM) require sudo to execute some tests.
25TEST_SSH_TRACE: set yo "yes" for verbose output from tests
26TEST_SSH_QUIET: set to "yes" to suppress non-fatal output.
27TEST_SSH_x: path to "ssh" command under test, where x=SSH,SSHD,SSHAGENT,SSHADD
28 SSHKEYGEN,SSHKEYSCAN,SFTP,SFTPSERVER
29OBJ: used by test scripts to access build dir.
30
31
32Individual tests.
33
34You can invoke test-exec.sh directly if you set up the path to find the
35binaries under test and the test scripts themselves, for example:
36
37$ cd regress
38$ PATH=`pwd`/..:$PATH:. sh test-exec.sh `pwd` agent-timeout.sh
39ok agent timeout test
40
41
42Files.
43
44test-exec.sh: the main test driver. Sets environment, creates config files
45and keys and runs the specified test.
46
47At the time of writing, the individual tests are:
48agent-timeout.sh: agent timeout test
49agent.sh: simple agent test
50broken-pipe.sh: broken pipe test
51connect-privsep.sh: proxy connect with privsep
52connect.sh: simple connect
53exit-status.sh: remote exit status
54forwarding.sh: local and remote forwarding
55keygen-change.sh: change passphrase for key
56keyscan.sh: keyscan
57proto-mismatch.sh: protocol version mismatch
58proto-version.sh: sshd version with different protocol combinations
59proxy-connect.sh: proxy connect
60sftp.sh: basic sftp put/get
61ssh-com-client.sh: connect with ssh.com client
62ssh-com-keygen.sh: ssh.com key import
63ssh-com-sftp.sh: basic sftp put/get with ssh.com server
64ssh-com.sh: connect to ssh.com server
65stderr-after-eof.sh: stderr data after eof
66stderr-data.sh: stderr data transfer
67transfer.sh: transfer data
68try-ciphers.sh: try ciphers
69yes-head.sh: yes pipe head
70
71
72Problems?
73
74Run the failing test with shell tracing (-x) turned on:
75$ PATH=`pwd`/..:$PATH:. sh -x test-exec.sh `pwd` agent-timeout.sh
76
77Failed tests can be difficult to diagnose. Suggestions:
78- run the individual test via ./test-exec.sh `pwd` [testname]
79- set LogLevel to VERBOSE in test-exec.sh and enable syslogging of
80 auth.debug (eg to /var/log/authlog).
81
82
83Known Issues.
84
85
86$Id: README.regress,v 1.1 2003/09/04 05:39:54 dtucker Exp $
diff --git a/regress/agent-getpeereid.sh b/regress/agent-getpeereid.sh
index 46d20dc2b..0889fe80e 100644
--- a/regress/agent-getpeereid.sh
+++ b/regress/agent-getpeereid.sh
@@ -7,12 +7,6 @@ UNPRIV=nobody
7ASOCK=${OBJ}/agent 7ASOCK=${OBJ}/agent
8SSH_AUTH_SOCK=/nonexistant 8SSH_AUTH_SOCK=/nonexistant
9 9
10if grep "#undef.*HAVE_GETPEEREID" ${BUILDDIR}/config.h >/dev/null 2>&1
11then
12 echo "skipped (not supported on this platform)"
13 exit 0
14fi
15
16trace "start agent" 10trace "start agent"
17eval `${SSHAGENT} -s -a ${ASOCK}` > /dev/null 11eval `${SSHAGENT} -s -a ${ASOCK}` > /dev/null
18r=$? 12r=$?
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
index cd9c0023d..9f9c99960 100644
--- a/regress/agent-ptrace.sh
+++ b/regress/agent-ptrace.sh
@@ -3,22 +3,6 @@
3 3
4tid="disallow agent ptrace attach" 4tid="disallow agent ptrace attach"
5 5
6if have_prog uname ; then
7 case `uname` in
8 Linux|HP-UX|SunOS|NetBSD|AIX|CYGWIN*)
9 echo "skipped (not supported on this platform)"
10 exit 0
11 ;;
12 esac
13fi
14
15if have_prog gdb ; then
16 : ok
17else
18 echo "skipped (gdb not found)"
19 exit 0
20fi
21
22trace "start agent" 6trace "start agent"
23eval `${SSHAGENT} -s` > /dev/null 7eval `${SSHAGENT} -s` > /dev/null
24r=$? 8r=$?
@@ -32,7 +16,7 @@ EOF
32 if [ $? -ne 0 ]; then 16 if [ $? -ne 0 ]; then
33 fail "gdb failed: exit code $?" 17 fail "gdb failed: exit code $?"
34 fi 18 fi
35 grep 'ptrace: Operation not permitted.' >/dev/null ${OBJ}/gdb.out 19 grep -q 'ptrace: Operation not permitted.' ${OBJ}/gdb.out
36 r=$? 20 r=$?
37 rm -f ${OBJ}/gdb.out 21 rm -f ${OBJ}/gdb.out
38 if [ $r -ne 0 ]; then 22 if [ $r -ne 0 ]; then
diff --git a/regress/agent-timeout.sh b/regress/agent-timeout.sh
index 3a40e7af8..28b1be028 100644
--- a/regress/agent-timeout.sh
+++ b/regress/agent-timeout.sh
@@ -3,7 +3,7 @@
3 3
4tid="agent timeout test" 4tid="agent timeout test"
5 5
6SSHAGENT_TIMEOUT=10 6TIMEOUT=5
7 7
8trace "start agent" 8trace "start agent"
9eval `${SSHAGENT} -s` > /dev/null 9eval `${SSHAGENT} -s` > /dev/null
@@ -13,7 +13,7 @@ if [ $r -ne 0 ]; then
13else 13else
14 trace "add keys with timeout" 14 trace "add keys with timeout"
15 for t in rsa rsa1; do 15 for t in rsa rsa1; do
16 ${SSHADD} -t ${SSHAGENT_TIMEOUT} $OBJ/$t > /dev/null 2>&1 16 ${SSHADD} -t ${TIMEOUT} $OBJ/$t > /dev/null 2>&1
17 if [ $? -ne 0 ]; then 17 if [ $? -ne 0 ]; then
18 fail "ssh-add did succeed exit code 0" 18 fail "ssh-add did succeed exit code 0"
19 fi 19 fi
@@ -23,10 +23,10 @@ else
23 if [ $n -ne 2 ]; then 23 if [ $n -ne 2 ]; then
24 fail "ssh-add -l did not return 2 keys: $n" 24 fail "ssh-add -l did not return 2 keys: $n"
25 fi 25 fi
26 trace "sleeping 2*${SSHAGENT_TIMEOUT} seconds" 26 trace "sleeping 2*${TIMEOUT} seconds"
27 sleep ${SSHAGENT_TIMEOUT} 27 sleep ${TIMEOUT}
28 sleep ${SSHAGENT_TIMEOUT} 28 sleep ${TIMEOUT}
29 ${SSHADD} -l 2> /dev/null | grep 'The agent has no identities.' >/dev/null 29 ${SSHADD} -l 2> /dev/null | grep -q 'The agent has no identities.'
30 if [ $? -ne 0 ]; then 30 if [ $? -ne 0 ]; then
31 fail "ssh-add -l still returns keys after timeout" 31 fail "ssh-add -l still returns keys after timeout"
32 fi 32 fi
diff --git a/regress/agent.sh b/regress/agent.sh
index b34487767..7e9b4cb18 100644
--- a/regress/agent.sh
+++ b/regress/agent.sh
@@ -19,7 +19,7 @@ else
19 fail "ssh-add -l did not fail with exit code 1" 19 fail "ssh-add -l did not fail with exit code 1"
20 fi 20 fi
21 trace "overwrite authorized keys" 21 trace "overwrite authorized keys"
22 echon > $OBJ/authorized_keys_$USER 22 echo -n > $OBJ/authorized_keys_$USER
23 for t in rsa rsa1; do 23 for t in rsa rsa1; do
24 # generate user key for agent 24 # generate user key for agent
25 rm -f $OBJ/$t-agent 25 rm -f $OBJ/$t-agent
diff --git a/regress/authorized_keys_root b/regress/authorized_keys_root
new file mode 100644
index 000000000..328537120
--- /dev/null
+++ b/regress/authorized_keys_root
@@ -0,0 +1,2 @@
1ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAt6ttBacbgvLPsF1VWWfT51t55/5Mj62Xp8EaoH5SNSaLiGIgrrja077lKEept75U4uKFUYU5JJX9GPE9A7Y43LXv+/A6Jm4rEj/U0s4H8tf0UmzVC3t6xh0sRK0hYVNILyoHnIAgdY8CmOiybw7p6DxJY8MRAehD3n9+kFcachU= root@xenon
21024 35 132789427207755621599908461558918671787816692978751485815532032934821830960131244604702969298486352138126114080367609979552547448841583955126231410604842765726397407176910594168641969541792069550006878863592030567875913190224374005367884774859544943329148178663694126456638431428703289837638970464685771819219 root@xenon
diff --git a/regress/copy.1 b/regress/copy.1
new file mode 100755
index 000000000..92d4d20f9
--- /dev/null
+++ b/regress/copy.1
Binary files differ
diff --git a/regress/copy.2 b/regress/copy.2
new file mode 100755
index 000000000..92d4d20f9
--- /dev/null
+++ b/regress/copy.2
Binary files differ
diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh
deleted file mode 100644
index 2b0b825d0..000000000
--- a/regress/dynamic-forward.sh
+++ /dev/null
@@ -1,47 +0,0 @@
1# $OpenBSD: dynamic-forward.sh,v 1.2 2003/07/03 08:21:46 markus Exp $
2# Placed in the Public Domain.
3
4tid="dynamic forwarding"
5
6PORT=4242
7FWDPORT=4243
8DATA=/bin/ls${EXEEXT}
9
10if have_prog nc && nc -h 2>&1 | grep "x proxy address" >/dev/null; then
11 proxycmd="nc -x 127.0.0.1:$FWDPORT -X"
12elif have_prog connect; then
13 proxycmd="connect -S 127.0.0.1:$FWDPORT -"
14else
15 echo "skipped (no suitable ProxyCommand found)"
16 exit 0
17fi
18trace "will use ProxyCommand $proxycmd"
19
20start_sshd
21
22for p in 1 2; do
23 trace "start dynamic forwarding, fork to background"
24 ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q somehost \
25 exec sh -c \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\'
26
27 for s in 4 5; do
28 for h in 127.0.0.1 localhost; do
29 trace "testing ssh protocol $p socks version $s host $h"
30 ${SSH} -F $OBJ/ssh_config \
31 -o "ProxyCommand ${proxycmd}${s} $h $PORT" \
32 somehost cat $DATA > $OBJ/ls.copy
33 test -f $OBJ/ls.copy || fail "failed copy $DATA"
34 cmp $DATA $OBJ/ls.copy || fail "corrupted copy of $DATA"
35 done
36 done
37
38 if [ -f $OBJ/remote_pid ]; then
39 remote=`cat $OBJ/remote_pid`
40 trace "terminate remote shell, pid $remote"
41 if [ $remote -gt 1 ]; then
42 kill -HUP $remote
43 fi
44 else
45 fail "no pid file: $OBJ/remote_pid"
46 fi
47done
diff --git a/regress/forwarding.sh b/regress/forwarding.sh
index dfe065dd6..7b281c013 100644
--- a/regress/forwarding.sh
+++ b/regress/forwarding.sh
@@ -2,7 +2,6 @@
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="local and remote forwarding" 4tid="local and remote forwarding"
5DATA=/bin/ls${EXEEXT}
6 5
7start_sshd 6start_sshd
8 7
@@ -26,9 +25,9 @@ for p in 1 2; do
26 25
27 trace "transfer over forwarded channels and check result" 26 trace "transfer over forwarded channels and check result"
28 ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \ 27 ${SSH} -$q -F $OBJ/ssh_config -p$last -o 'ConnectionAttempts=4' \
29 somehost cat $DATA > $OBJ/ls.copy 28 somehost cat /bin/ls > $OBJ/ls.copy
30 test -f $OBJ/ls.copy || fail "failed copy $DATA" 29 test -f $OBJ/ls.copy || fail "failed copy /bin/ls"
31 cmp $DATA $OBJ/ls.copy || fail "corrupted copy of $DATA" 30 cmp /bin/ls $OBJ/ls.copy || fail "corrupted copy of /bin/ls"
32 31
33 sleep 10 32 sleep 10
34done 33done
diff --git a/regress/proto-version.sh b/regress/proto-version.sh
index 1651a69e1..7dc616f5f 100644
--- a/regress/proto-version.sh
+++ b/regress/proto-version.sh
@@ -8,7 +8,7 @@ check_version ()
8{ 8{
9 version=$1 9 version=$1
10 expect=$2 10 expect=$2
11 banner=`echon | ${SSHD} -o "Protocol=${version}" -i -f ${OBJ}/sshd_proxy` 11 banner=`echo -n | ${SSHD} -o "Protocol=${version}" -i -f ${OBJ}/sshd_proxy`
12 case ${banner} in 12 case ${banner} in
13 SSH-1.99-*) 13 SSH-1.99-*)
14 proto=199 14 proto=199
diff --git a/regress/reconfigure.sh b/regress/reconfigure.sh
deleted file mode 100644
index ba6dbc6f5..000000000
--- a/regress/reconfigure.sh
+++ /dev/null
@@ -1,35 +0,0 @@
1# $OpenBSD: reconfigure.sh,v 1.2 2003/06/21 09:14:05 markus Exp $
2# Placed in the Public Domain.
3
4tid="simple connect after reconfigure"
5
6# we need the full path to sshd for -HUP
7case $SSHD in
8/*)
9 # full path is OK
10 ;;
11*)
12 # otherwise make fully qualified
13 SSHD=$OBJ/$SSHD
14esac
15
16start_sshd
17
18$SUDO kill -HUP `cat $PIDFILE`
19sleep 1
20
21trace "wait for sshd to restart"
22i=0;
23while [ ! -f $PIDFILE -a $i -lt 10 ]; do
24 i=`expr $i + 1`
25 sleep $i
26done
27
28test -f $PIDFILE || fatal "sshd did not restart"
29
30for p in 1 2; do
31 ${SSH} -o "Protocol=$p" -F $OBJ/ssh_config somehost true
32 if [ $? -ne 0 ]; then
33 fail "ssh connect with protocol $p failed after reconfigure"
34 fi
35done
diff --git a/regress/rekey.sh b/regress/rekey.sh
deleted file mode 100644
index 6b7e845ec..000000000
--- a/regress/rekey.sh
+++ /dev/null
@@ -1,31 +0,0 @@
1# $OpenBSD: rekey.sh,v 1.1 2003/03/28 13:58:28 markus Exp $
2# Placed in the Public Domain.
3
4tid="rekey during transfer data"
5
6DATA=${OBJ}/data
7COPY=${OBJ}/copy
8LOG=${OBJ}/log
9
10rm -f ${COPY} ${LOG} ${DATA}
11dd if=/bin/ls${EXEEXT} of=${DATA} bs=1k seek=511 count=1 > /dev/null 2>&1
12
13for s in 16 1k 128k 256k; do
14 trace "rekeylimit ${s}"
15 rm -f ${COPY}
16 cat $DATA | \
17 ${SSH} -oCompression=no -oRekeyLimit=$s \
18 -v -F $OBJ/ssh_proxy somehost "cat > ${COPY}" \
19 2> ${LOG}
20 if [ $? -ne 0 ]; then
21 fail "ssh failed"
22 fi
23 cmp $DATA ${COPY} || fail "corrupted copy"
24 n=`grep 'NEWKEYS sent' ${LOG} | wc -l`
25 n=`expr $n - 1`
26 trace "$n rekeying(s)"
27 if [ $n -lt 1 ]; then
28 fail "no rekeying occured"
29 fi
30done
31rm -f ${COPY} ${LOG} ${DATA}
diff --git a/regress/sftp-badcmds.sh b/regress/sftp-badcmds.sh
deleted file mode 100644
index a6a19409d..000000000
--- a/regress/sftp-badcmds.sh
+++ /dev/null
@@ -1,78 +0,0 @@
1# $OpenBSD: sftp-badcmds.sh,v 1.2 2003/05/15 04:07:12 mouring Exp $
2# Placed in the Public Domain.
3
4tid="sftp invalid commands"
5
6DATA=/bin/ls${EXEEXT}
7DATA2=/bin/cat${EXEEXT}
8NONEXIST=/NONEXIST.$$
9COPY=${OBJ}/copy
10GLOBFILES=`(cd /bin;echo l*)`
11
12rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd
13
14rm -f ${COPY}
15verbose "$tid: get nonexistent"
16echo "get $NONEXIST $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
17 || fail "get nonexistent failed"
18test -f ${COPY} && fail "existing copy after get nonexistent"
19
20rm -f ${COPY}.dd/*
21verbose "$tid: glob get to nonexistent directory"
22echo "get /bin/l* $NONEXIST" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
23 || fail "get nonexistent failed"
24for x in $GLOBFILES; do
25 test -f ${COPY}.dd/$x && fail "existing copy after get nonexistent"
26done
27
28rm -f ${COPY}
29verbose "$tid: put nonexistent"
30echo "put $NONEXIST $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
31 || fail "put nonexistent failed"
32test -f ${COPY} && fail "existing copy after put nonexistent"
33
34rm -f ${COPY}.dd/*
35verbose "$tid: glob put to nonexistent directory"
36echo "put /bin/l* ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
37 || fail "put nonexistent failed"
38for x in $GLOBFILES; do
39 test -f ${COPY}.dd/$x && fail "existing copy after nonexistent"
40done
41
42rm -f ${COPY}
43verbose "$tid: rename nonexistent"
44echo "rename $NONEXIST ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
45 || fail "rename nonexist failed"
46test -f ${COPY}.1 && fail "file exists after rename nonexistent"
47
48rm -f ${COPY} ${COPY}.1
49cp $DATA $COPY
50cp $DATA2 ${COPY}.1
51verbose "$tid: rename target exists"
52echo "rename $COPY ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
53 || fail "rename target exists failed"
54test -f ${COPY} || fail "oldname missing after rename target exists"
55test -f ${COPY}.1 || fail "newname missing after rename target exists"
56cmp $DATA ${COPY} >/dev/null 2>&1 || fail "corrupted oldname after rename target exists"
57cmp $DATA2 ${COPY}.1 >/dev/null 2>&1 || fail "corrupted newname after rename target exists"
58
59rm -rf ${COPY} ${COPY}.dd
60cp $DATA $COPY
61mkdir ${COPY}.dd
62verbose "$tid: rename target exists (directory)"
63echo "rename $COPY ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
64 || fail "rename target exists (directory) failed"
65test -f ${COPY} || fail "oldname missing after rename target exists (directory)"
66test -d ${COPY}.dd || fail "newname missing after rename target exists (directory)"
67cmp $DATA ${COPY} >/dev/null 2>&1 || fail "corrupted oldname after rename target exists (directory)"
68
69rm -f ${COPY}.dd/*
70rm -rf ${COPY}
71cp ${DATA2} ${COPY}
72verbose "$tid: glob put files to local file"
73echo "put /bin/l* $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1
74cmp ${DATA2} ${COPY} || fail "put successed when it should have failed"
75
76rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd
77
78
diff --git a/regress/sftp-batch.sh b/regress/sftp-batch.sh
index f648eae80..cffacb6df 100644
--- a/regress/sftp-batch.sh
+++ b/regress/sftp-batch.sh
@@ -3,9 +3,9 @@
3 3
4tid="sftp batchfile" 4tid="sftp batchfile"
5 5
6DATA=/bin/ls${EXEEXT} 6DATA=/bin/ls
7COPY=${OBJ}/copy 7COPY=${OBJ}/copy
8BATCH=${OBJ}/sftp-batch.tmp 8BATCH=${OBJ}/sftp-batch
9 9
10rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.* 10rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.*
11 11
diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh
index 1256aeb2d..462c6802f 100644
--- a/regress/sftp-cmds.sh
+++ b/regress/sftp-cmds.sh
@@ -1,42 +1,17 @@
1# $OpenBSD: sftp-cmds.sh,v 1.5 2003/07/19 00:46:31 djm Exp $ 1# $OpenBSD: sftp-cmds.sh,v 1.2 2003/01/10 07:52:41 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4# XXX - TODO: 4# XXX - TODO:
5# - globbed operations
5# - chmod / chown / chgrp 6# - chmod / chown / chgrp
6# - -p flag for get & put 7# - -p flag for get & put
7 8
8tid="sftp commands" 9tid="sftp commands"
9 10
10DATA=/bin/ls${EXEEXT} 11DATA=/bin/ls
11COPY=${OBJ}/copy 12COPY=${OBJ}/copy
12# test that these files are readable! 13
13for i in `(cd /bin;echo l*)` 14rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.*
14do
15 if [ -r $i ]; then
16 GLOBFILES="$GLOBFILES $i"
17 fi
18done
19
20if have_prog uname
21then
22 case `uname` in
23 CYGWIN*)
24 os=cygwin
25 ;;
26 *)
27 os=`uname`
28 ;;
29 esac
30else
31 os="unknown"
32fi
33
34# Path with embedded quote
35QUOTECOPY=${COPY}".\"blah\""
36QUOTECOPY_ARG=${COPY}'.\"blah\"'
37
38rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2
39mkdir ${COPY}.dd
40 15
41verbose "$tid: lls" 16verbose "$tid: lls"
42echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 17echo "lls ${OBJ}" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
@@ -79,91 +54,21 @@ echo "get $DATA $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
79 || fail "get failed" 54 || fail "get failed"
80cmp $DATA ${COPY} || fail "corrupted copy after get" 55cmp $DATA ${COPY} || fail "corrupted copy after get"
81 56
82rm -f ${COPY}.dd/*
83verbose "$tid: get to directory"
84echo "get $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
85 || fail "get failed"
86cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get"
87
88rm -f ${COPY}.dd/*
89verbose "$tid: glob get to directory"
90echo "get /bin/l* ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
91 || fail "get failed"
92for x in $GLOBFILES; do
93 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get"
94done
95
96rm -f ${COPY}.dd/*
97verbose "$tid: get to local dir"
98(echo "lcd ${COPY}.dd"; echo "get $DATA" ) | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
99 || fail "get failed"
100cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after get"
101
102rm -f ${COPY}.dd/*
103verbose "$tid: glob get to local dir"
104(echo "lcd ${COPY}.dd"; echo "get /bin/l*") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
105 || fail "get failed"
106for x in $GLOBFILES; do
107 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after get"
108done
109
110rm -f ${COPY} 57rm -f ${COPY}
111verbose "$tid: put" 58verbose "$tid: put"
112echo "put $DATA $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 59echo "put $DATA $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
113 || fail "put failed" 60 || fail "put failed"
114cmp $DATA ${COPY} || fail "corrupted copy after put" 61cmp $DATA ${COPY} || fail "corrupted copy after put"
115 62
116if [ "$os" != "cygwin" ]; then
117rm -f ${QUOTECOPY}
118verbose "$tid: put filename with quotes"
119echo "put $DATA \"$QUOTECOPY_ARG\"" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
120 || fail "put failed"
121cmp $DATA ${QUOTECOPY} || fail "corrupted copy after put with quotes"
122fi
123
124rm -f ${COPY}.dd/*
125verbose "$tid: put to directory"
126echo "put $DATA ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
127 || fail "put failed"
128cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put"
129
130rm -f ${COPY}.dd/*
131verbose "$tid: glob put to directory"
132echo "put /bin/l* ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
133 || fail "put failed"
134for x in $GLOBFILES; do
135 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put"
136done
137
138rm -f ${COPY}.dd/*
139verbose "$tid: put to local dir"
140(echo "cd ${COPY}.dd"; echo "put $DATA") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
141 || fail "put failed"
142cmp $DATA ${COPY}.dd/`basename $DATA` || fail "corrupted copy after put"
143
144rm -f ${COPY}.dd/*
145verbose "$tid: glob put to local dir"
146(echo "cd ${COPY}.dd"; echo "put /bin/l*") | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
147 || fail "put failed"
148for x in $GLOBFILES; do
149 cmp /bin/$x ${COPY}.dd/$x || fail "corrupted copy after put"
150done
151
152verbose "$tid: rename" 63verbose "$tid: rename"
153echo "rename $COPY ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 64echo "rename $COPY ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
154 || fail "rename failed" 65 || fail "rename failed"
155test -f ${COPY}.1 || fail "missing file after rename" 66test -f ${COPY}.1 || fail "missing file after rename"
156cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename" 67cmp $DATA ${COPY}.1 >/dev/null 2>&1 || fail "corrupted copy after rename"
157 68
158verbose "$tid: rename directory"
159echo "rename ${COPY}.dd ${COPY}.dd2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
160 || fail "rename directory failed"
161test -d ${COPY}.dd && fail "oldname exists after rename directory"
162test -d ${COPY}.dd2 || fail "missing newname after rename directory"
163
164verbose "$tid: ln" 69verbose "$tid: ln"
165echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed" 70echo "ln ${COPY}.1 ${COPY}.2" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 || fail "ln failed"
166test -h ${COPY}.2 || fail "missing file after ln" 71test -L ${COPY}.2 || fail "missing file after ln"
167 72
168verbose "$tid: mkdir" 73verbose "$tid: mkdir"
169echo "mkdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 74echo "mkdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
@@ -190,6 +95,6 @@ verbose "$tid: lchdir"
190echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 95echo "lchdir ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \
191 || fail "lchdir failed" 96 || fail "lchdir failed"
192 97
193rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${COPY}.dd2 98rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd ${BATCH}.*
194 99
195 100
diff --git a/regress/sftp.sh b/regress/sftp.sh
index 0e22f8f6b..e8d473123 100644
--- a/regress/sftp.sh
+++ b/regress/sftp.sh
@@ -3,33 +3,27 @@
3 3
4tid="basic sftp put/get" 4tid="basic sftp put/get"
5 5
6DATA=/bin/ls${EXEEXT} 6DATA=/bin/ls
7COPY=${OBJ}/copy 7COPY=${OBJ}/copy
8 8
9SFTPCMDFILE=${OBJ}/batch
10cat >$SFTPCMDFILE <<EOF
11version
12get $DATA ${COPY}.1
13put $DATA ${COPY}.2
14EOF
15
16BUFFERSIZE="5 1000 32000 64000" 9BUFFERSIZE="5 1000 32000 64000"
17REQUESTS="1 2 10" 10REQUESTS="1 2 10"
18 11
19for B in ${BUFFERSIZE}; do 12for B in ${BUFFERSIZE}; do
20 for R in ${REQUESTS}; do 13 for R in ${REQUESTS}; do
21 verbose "test $tid: buffer_size $B num_requests $R" 14 verbose "test $tid: buffer_size $B num_requests $R"
22 rm -f ${COPY}.1 ${COPY}.2 15 rm -f ${COPY}.1 ${COPY}.2
23 ${SFTP} -P ${SFTPSERVER} -B $B -R $R -b $SFTPCMDFILE \ 16 ${SFTP} -P ${SFTPSERVER} -B $B -R $R -b /dev/stdin \
24 > /dev/null 2>&1 17 > /dev/null 2>&1 << EOF
18 version
19 get $DATA ${COPY}.1
20 put $DATA ${COPY}.2
21EOF
25 r=$? 22 r=$?
26 if [ $r -ne 0 ]; then 23 if [ $r -ne 0 ]; then
27 fail "sftp failed with $r" 24 fail "sftp failed with $r"
28 else
29 cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
30 cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
31 fi 25 fi
26 cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
27 cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
32 done 28 done
33done 29done
34rm -f ${COPY}.1 ${COPY}.2
35rm -f $SFTPCMDFILE
diff --git a/regress/ssh-com-client.sh b/regress/ssh-com-client.sh
index fc953228e..015ebbb8c 100644
--- a/regress/ssh-com-client.sh
+++ b/regress/ssh-com-client.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: ssh-com-client.sh,v 1.5 2003/05/14 22:08:27 markus Exp $ 1# $OpenBSD: ssh-com-client.sh,v 1.4 2002/07/16 08:58:16 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="connect with ssh.com client" 4tid="connect with ssh.com client"
@@ -17,8 +17,6 @@ VERSIONS="
17 3.0.0 17 3.0.0
18 3.1.0 18 3.1.0
19 3.2.0 19 3.2.0
20 3.2.2
21 3.2.3
22 3.3.0" 20 3.3.0"
23 21
24# 2.0.10 2.0.12 2.0.13 don't like the test setup 22# 2.0.10 2.0.12 2.0.13 don't like the test setup
@@ -64,7 +62,7 @@ EOF
64# we need a real server (no ProxyConnect option) 62# we need a real server (no ProxyConnect option)
65start_sshd 63start_sshd
66 64
67DATA=/bin/ls${EXEEXT} 65DATA=/bin/ls
68COPY=${OBJ}/copy 66COPY=${OBJ}/copy
69rm -f ${COPY} 67rm -f ${COPY}
70 68
diff --git a/regress/ssh-com-keygen.sh b/regress/ssh-com-keygen.sh
index dbe9b0a6b..e93dc78c9 100644
--- a/regress/ssh-com-keygen.sh
+++ b/regress/ssh-com-keygen.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: ssh-com-keygen.sh,v 1.3 2003/05/14 22:08:27 markus Exp $ 1# $OpenBSD: ssh-com-keygen.sh,v 1.2 2002/07/16 08:58:16 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="ssh.com key import" 4tid="ssh.com key import"
@@ -20,8 +20,6 @@ VERSIONS="
20 3.0.0 20 3.0.0
21 3.1.0 21 3.1.0
22 3.2.0 22 3.2.0
23 3.2.2
24 3.2.3
25 3.3.0" 23 3.3.0"
26 24
27COMPRV=${OBJ}/comkey 25COMPRV=${OBJ}/comkey
diff --git a/regress/ssh-com-sftp.sh b/regress/ssh-com-sftp.sh
index 6ca7dad51..f08018b84 100644
--- a/regress/ssh-com-sftp.sh
+++ b/regress/ssh-com-sftp.sh
@@ -1,17 +1,10 @@
1# $OpenBSD: ssh-com-sftp.sh,v 1.4 2003/05/14 22:08:27 markus Exp $ 1# $OpenBSD: ssh-com-sftp.sh,v 1.3 2002/07/16 08:58:16 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="basic sftp put/get with ssh.com server" 4tid="basic sftp put/get with ssh.com server"
5 5
6DATA=/bin/ls${EXEEXT} 6DATA=/bin/ls
7COPY=${OBJ}/copy 7COPY=${OBJ}/copy
8SFTPCMDFILE=${OBJ}/batch
9
10cat >$SFTPCMDFILE <<EOF
11version
12get $DATA ${COPY}.1
13put $DATA ${COPY}.2
14EOF
15 8
16BUFFERSIZE="5 1000 32000 64000" 9BUFFERSIZE="5 1000 32000 64000"
17REQUESTS="1 2 10" 10REQUESTS="1 2 10"
@@ -33,8 +26,6 @@ VERSIONS="
33 3.0.0 26 3.0.0
34 3.1.0 27 3.1.0
35 3.2.0 28 3.2.0
36 3.2.2
37 3.2.3
38 3.3.0" 29 3.3.0"
39 30
40# go for it 31# go for it
@@ -48,17 +39,18 @@ for v in ${VERSIONS}; do
48 for R in ${REQUESTS}; do 39 for R in ${REQUESTS}; do
49 verbose "test $tid: buffer_size $B num_requests $R" 40 verbose "test $tid: buffer_size $B num_requests $R"
50 rm -f ${COPY}.1 ${COPY}.2 41 rm -f ${COPY}.1 ${COPY}.2
51 ${SFTP} -P ${server} -B $B -R $R -b $SFTPCMDFILE \ 42 ${SFTP} -P ${server} -B $B -R $R -b /dev/stdin \
52 > /dev/null 2>&1 43 > /dev/null 2>&1 << EOF
44 version
45 get $DATA ${COPY}.1
46 put $DATA ${COPY}.2
47EOF
53 r=$? 48 r=$?
54 if [ $r -ne 0 ]; then 49 if [ $r -ne 0 ]; then
55 fail "sftp failed with $r" 50 fail "sftp failed with $r"
56 else
57 cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
58 cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
59 fi 51 fi
52 cmp $DATA ${COPY}.1 || fail "corrupted copy after get"
53 cmp $DATA ${COPY}.2 || fail "corrupted copy after put"
60 done 54 done
61 done 55 done
62done 56done
63rm -f ${COPY}.1 ${COPY}.2
64rm -f $SFTPCMDFILE
diff --git a/regress/ssh-com.sh b/regress/ssh-com.sh
index 78ae6e9e1..c2bd15380 100644
--- a/regress/ssh-com.sh
+++ b/regress/ssh-com.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: ssh-com.sh,v 1.5 2003/05/14 22:08:27 markus Exp $ 1# $OpenBSD: ssh-com.sh,v 1.4 2002/07/16 08:58:16 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="connect to ssh.com server" 4tid="connect to ssh.com server"
@@ -18,8 +18,6 @@ VERSIONS="
18 3.0.0 18 3.0.0
19 3.1.0 19 3.1.0
20 3.2.0 20 3.2.0
21 3.2.2
22 3.2.3
23 3.3.0" 21 3.3.0"
24# 2.0.10 does not support UserConfigDirectory 22# 2.0.10 does not support UserConfigDirectory
25# 2.3.1 requires a config in $HOME/.ssh2 23# 2.3.1 requires a config in $HOME/.ssh2
@@ -67,7 +65,7 @@ done
67 65
68# convert and append DSA hostkey 66# convert and append DSA hostkey
69( 67(
70 echon 'ssh2-localhost-with-alias,127.0.0.1,::1 ' 68 echo -n 'ssh2-localhost-with-alias,127.0.0.1,::1 '
71 ${SSHKEYGEN} -if ${SRC}/dsa_ssh2.pub 69 ${SSHKEYGEN} -if ${SRC}/dsa_ssh2.pub
72) >> $OBJ/known_hosts 70) >> $OBJ/known_hosts
73 71
diff --git a/regress/stderr-after-eof.sh b/regress/stderr-after-eof.sh
index 05a5ea56d..bebd700bf 100644
--- a/regress/stderr-after-eof.sh
+++ b/regress/stderr-after-eof.sh
@@ -7,23 +7,13 @@ DATA=/etc/motd
7DATA=${OBJ}/data 7DATA=${OBJ}/data
8COPY=${OBJ}/copy 8COPY=${OBJ}/copy
9 9
10if have_prog md5sum; then 10MD5=md5sum
11 CHECKSUM=md5sum
12elif have_prog openssl; then
13 CHECKSUM="openssl md5"
14elif have_prog cksum; then
15 CHECKSUM=cksum
16elif have_prog sum; then
17 CHECKSUM=sum
18else
19 fatal "No checksum program available, aborting $tid test"
20fi
21 11
22# setup data 12# setup data
23rm -f ${DATA} ${COPY} 13rm -f ${DATA} ${COPY}
24cp /dev/null ${DATA} 14cp /dev/null ${DATA}
25for i in 1 2 3 4 5 6; do 15for i in 1 2 3 4 5 6; do
26 (date;echo $i) | $CHECKSUM >> ${DATA} 16 (date;echo $i) | $MD5 >> ${DATA}
27done 17done
28 18
29${SSH} -2 -F $OBJ/ssh_proxy otherhost \ 19${SSH} -2 -F $OBJ/ssh_proxy otherhost \
diff --git a/regress/stderr-data.sh b/regress/stderr-data.sh
index 1daf79bb5..0157690b0 100644
--- a/regress/stderr-data.sh
+++ b/regress/stderr-data.sh
@@ -3,7 +3,7 @@
3 3
4tid="stderr data transfer" 4tid="stderr data transfer"
5 5
6DATA=/bin/ls${EXEEXT} 6DATA=/bin/ls
7COPY=${OBJ}/copy 7COPY=${OBJ}/copy
8rm -f ${COPY} 8rm -f ${COPY}
9 9
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index cc7ea67fe..a7a8ddbe6 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -2,16 +2,10 @@
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4PORT=4242 4PORT=4242
5USER=`id -un`
6SUDO=
5#SUDO=sudo 7#SUDO=sudo
6 8
7if [ -x /usr/ucb/whoami ]; then
8 USER=`/usr/ucb/whoami`
9elif whoami >/dev/null 2>&1; then
10 USER=`whoami`
11else
12 USER=`id -un`
13fi
14
15OBJ=$1 9OBJ=$1
16if [ "x$OBJ" = "x" ]; then 10if [ "x$OBJ" = "x" ]; then
17 echo '$OBJ not defined' 11 echo '$OBJ not defined'
@@ -78,32 +72,6 @@ export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER
78#echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER 72#echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER
79 73
80# helper 74# helper
81echon()
82{
83 if [ "x`echo -n`" = "x" ]; then
84 echo -n "$@"
85 elif [ "x`echo '\c'`" = "x" ]; then
86 echo "$@\c"
87 else
88 fatal "Don't know how to echo without newline."
89 fi
90}
91
92have_prog()
93{
94 saved_IFS="$IFS"
95 IFS=":"
96 for i in $PATH
97 do
98 if [ -x $i/$1 ]; then
99 IFS="$saved_IFS"
100 return 0
101 fi
102 done
103 IFS="$saved_IFS"
104 return 1
105}
106
107cleanup () 75cleanup ()
108{ 76{
109 if [ -f $PIDFILE ]; then 77 if [ -f $PIDFILE ]; then
@@ -143,7 +111,7 @@ fail ()
143 111
144fatal () 112fatal ()
145{ 113{
146 echon "FATAL: " 114 echo -n "FATAL: "
147 fail "$@" 115 fail "$@"
148 cleanup 116 cleanup
149 exit $RESULT 117 exit $RESULT
@@ -162,7 +130,6 @@ cat << EOF > $OBJ/sshd_config
162 PidFile $PIDFILE 130 PidFile $PIDFILE
163 AuthorizedKeysFile $OBJ/authorized_keys_%u 131 AuthorizedKeysFile $OBJ/authorized_keys_%u
164 LogLevel QUIET 132 LogLevel QUIET
165 StrictModes no
166EOF 133EOF
167 134
168# server config for proxy connects 135# server config for proxy connects
@@ -202,7 +169,7 @@ for t in rsa rsa1; do
202 169
203 # known hosts file for client 170 # known hosts file for client
204 ( 171 (
205 echon 'localhost-with-alias,127.0.0.1,::1 ' 172 echo -n 'localhost-with-alias,127.0.0.1,::1 '
206 cat $OBJ/$t.pub 173 cat $OBJ/$t.pub
207 ) >> $OBJ/known_hosts 174 ) >> $OBJ/known_hosts
208 175
@@ -222,7 +189,7 @@ chmod 644 $OBJ/authorized_keys_$USER
222# create a proxy version of the client config 189# create a proxy version of the client config
223( 190(
224 cat $OBJ/ssh_config 191 cat $OBJ/ssh_config
225 echo proxycommand ${SUDO} ${SSHD} -i -f $OBJ/sshd_proxy 192 echo proxycommand ${SSHD} -i -f $OBJ/sshd_proxy
226) > $OBJ/ssh_proxy 193) > $OBJ/ssh_proxy
227 194
228# check proxy config 195# check proxy config
@@ -236,7 +203,7 @@ start_sshd ()
236 203
237 trace "wait for sshd" 204 trace "wait for sshd"
238 i=0; 205 i=0;
239 while [ ! -f $PIDFILE -a $i -lt 10 ]; do 206 while [ ! -f $PIDFILE -a $i -lt 5 ]; do
240 i=`expr $i + 1` 207 i=`expr $i + 1`
241 sleep $i 208 sleep $i
242 done 209 done
diff --git a/regress/transfer.sh b/regress/transfer.sh
index 13ea367d5..31cdc0ce3 100644
--- a/regress/transfer.sh
+++ b/regress/transfer.sh
@@ -3,7 +3,7 @@
3 3
4tid="transfer data" 4tid="transfer data"
5 5
6DATA=/bin/ls${EXEEXT} 6DATA=/bin/ls
7COPY=${OBJ}/copy 7COPY=${OBJ}/copy
8 8
9for p in 1 2; do 9for p in 1 2; do
diff --git a/regress/try-ciphers.sh b/regress/try-ciphers.sh
index 2c727f66c..161f039c0 100644
--- a/regress/try-ciphers.sh
+++ b/regress/try-ciphers.sh
@@ -1,11 +1,10 @@
1# $OpenBSD: try-ciphers.sh,v 1.8 2003/06/12 15:40:01 markus Exp $ 1# $OpenBSD: try-ciphers.sh,v 1.7 2002/04/03 09:30:01 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="try ciphers" 4tid="try ciphers"
5 5
6ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour 6ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour
7 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se 7 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se"
8 aes128-ctr aes192-ctr aes256-ctr"
9macs="hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96" 8macs="hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96"
10 9
11for c in $ciphers; do 10for c in $ciphers; do
diff --git a/regress/yes-head.sh b/regress/yes-head.sh
index 17a4d0dd4..f213f6863 100644
--- a/regress/yes-head.sh
+++ b/regress/yes-head.sh
@@ -4,7 +4,7 @@
4tid="yes pipe head" 4tid="yes pipe head"
5 5
6for p in 1 2; do 6for p in 1 2; do
7 lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | head -2000"' | (sleep 3 ; wc -l)` 7 lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'yes | head -2000' | (sleep 3 ; wc -l)`
8 if [ $? -ne 0 ]; then 8 if [ $? -ne 0 ]; then
9 fail "yes|head test failed" 9 fail "yes|head test failed"
10 lines = 0; 10 lines = 0;
diff --git a/scard-opensc.c b/scard-opensc.c
index 2489fec45..dd21de39a 100644
--- a/scard-opensc.c
+++ b/scard-opensc.c
@@ -89,12 +89,6 @@ sc_init(void)
89 r = sc_establish_context(&ctx, "openssh"); 89 r = sc_establish_context(&ctx, "openssh");
90 if (r) 90 if (r)
91 goto err; 91 goto err;
92 if (sc_reader_id >= ctx->reader_count) {
93 r = SC_ERROR_NO_READERS_FOUND;
94 error("Illegal reader number %d (max %d)", sc_reader_id,
95 ctx->reader_count -1);
96 goto err;
97 }
98 r = sc_connect_card(ctx->reader[sc_reader_id], 0, &card); 92 r = sc_connect_card(ctx->reader[sc_reader_id], 0, &card);
99 if (r) 93 if (r)
100 goto err; 94 goto err;
@@ -110,8 +104,7 @@ err:
110/* private key operations */ 104/* private key operations */
111 105
112static int 106static int
113sc_prkey_op_init(RSA *rsa, struct sc_pkcs15_object **key_obj_out, 107sc_prkey_op_init(RSA *rsa, struct sc_pkcs15_object **key_obj_out)
114 unsigned int usage)
115{ 108{
116 int r; 109 int r;
117 struct sc_priv_data *priv; 110 struct sc_priv_data *priv;
@@ -131,8 +124,7 @@ sc_prkey_op_init(RSA *rsa, struct sc_pkcs15_object **key_obj_out,
131 goto err; 124 goto err;
132 } 125 }
133 } 126 }
134 r = sc_pkcs15_find_prkey_by_id_usage(p15card, &priv->cert_id, 127 r = sc_pkcs15_find_prkey_by_id(p15card, &priv->cert_id, &key_obj);
135 usage, &key_obj);
136 if (r) { 128 if (r) {
137 error("Unable to find private key from SmartCard: %s", 129 error("Unable to find private key from SmartCard: %s",
138 sc_strerror(r)); 130 sc_strerror(r));
@@ -141,16 +133,7 @@ sc_prkey_op_init(RSA *rsa, struct sc_pkcs15_object **key_obj_out,
141 key = key_obj->data; 133 key = key_obj->data;
142 r = sc_pkcs15_find_pin_by_auth_id(p15card, &key_obj->auth_id, 134 r = sc_pkcs15_find_pin_by_auth_id(p15card, &key_obj->auth_id,
143 &pin_obj); 135 &pin_obj);
144 if (r == SC_ERROR_OBJECT_NOT_FOUND) { 136 if (r) {
145 /* no pin required */
146 r = sc_lock(card);
147 if (r) {
148 error("Unable to lock smartcard: %s", sc_strerror(r));
149 goto err;
150 }
151 *key_obj_out = key_obj;
152 return 0;
153 } else if (r) {
154 error("Unable to find PIN object from SmartCard: %s", 137 error("Unable to find PIN object from SmartCard: %s",
155 sc_strerror(r)); 138 sc_strerror(r));
156 goto err; 139 goto err;
@@ -178,9 +161,6 @@ err:
178 return -1; 161 return -1;
179} 162}
180 163
181#define SC_USAGE_DECRYPT SC_PKCS15_PRKEY_USAGE_DECRYPT | \
182 SC_PKCS15_PRKEY_USAGE_UNWRAP
183
184static int 164static int
185sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa, 165sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
186 int padding) 166 int padding)
@@ -190,11 +170,10 @@ sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
190 170
191 if (padding != RSA_PKCS1_PADDING) 171 if (padding != RSA_PKCS1_PADDING)
192 return -1; 172 return -1;
193 r = sc_prkey_op_init(rsa, &key_obj, SC_USAGE_DECRYPT); 173 r = sc_prkey_op_init(rsa, &key_obj);
194 if (r) 174 if (r)
195 return -1; 175 return -1;
196 r = sc_pkcs15_decipher(p15card, key_obj, SC_ALGORITHM_RSA_PAD_PKCS1, 176 r = sc_pkcs15_decipher(p15card, key_obj, 0, from, flen, to, flen);
197 from, flen, to, flen);
198 sc_unlock(card); 177 sc_unlock(card);
199 if (r < 0) { 178 if (r < 0) {
200 error("sc_pkcs15_decipher() failed: %s", sc_strerror(r)); 179 error("sc_pkcs15_decipher() failed: %s", sc_strerror(r));
@@ -206,9 +185,6 @@ err:
206 return -1; 185 return -1;
207} 186}
208 187
209#define SC_USAGE_SIGN SC_PKCS15_PRKEY_USAGE_SIGN | \
210 SC_PKCS15_PRKEY_USAGE_SIGNRECOVER
211
212static int 188static int
213sc_sign(int type, u_char *m, unsigned int m_len, 189sc_sign(int type, u_char *m, unsigned int m_len,
214 unsigned char *sigret, unsigned int *siglen, RSA *rsa) 190 unsigned char *sigret, unsigned int *siglen, RSA *rsa)
@@ -217,15 +193,7 @@ sc_sign(int type, u_char *m, unsigned int m_len,
217 int r; 193 int r;
218 unsigned long flags = 0; 194 unsigned long flags = 0;
219 195
220 /* XXX: sc_prkey_op_init will search for a pkcs15 private 196 r = sc_prkey_op_init(rsa, &key_obj);
221 * key object with the sign or signrecover usage flag set.
222 * If the signing key has only the non-repudiation flag set
223 * the key will be rejected as using a non-repudiation key
224 * for authentication is not recommended. Note: This does not
225 * prevent the use of a non-repudiation key for authentication
226 * if the sign or signrecover flag is set as well.
227 */
228 r = sc_prkey_op_init(rsa, &key_obj, SC_USAGE_SIGN);
229 if (r) 197 if (r)
230 return -1; 198 return -1;
231 /* FIXME: length of sigret correct? */ 199 /* FIXME: length of sigret correct? */
@@ -353,7 +321,7 @@ sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj)
353 debug("sc_read_pubkey() with cert id %02X", cinfo->id.value[0]); 321 debug("sc_read_pubkey() with cert id %02X", cinfo->id.value[0]);
354 r = sc_pkcs15_read_certificate(p15card, cinfo, &cert); 322 r = sc_pkcs15_read_certificate(p15card, cinfo, &cert);
355 if (r) { 323 if (r) {
356 logit("Certificate read failed: %s", sc_strerror(r)); 324 log("Certificate read failed: %s", sc_strerror(r));
357 goto err; 325 goto err;
358 } 326 }
359 x509 = X509_new(); 327 x509 = X509_new();
@@ -363,7 +331,7 @@ sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj)
363 } 331 }
364 p = cert->data; 332 p = cert->data;
365 if (!d2i_X509(&x509, &p, cert->data_len)) { 333 if (!d2i_X509(&x509, &p, cert->data_len)) {
366 logit("Unable to parse X.509 certificate"); 334 log("Unable to parse X.509 certificate");
367 r = -1; 335 r = -1;
368 goto err; 336 goto err;
369 } 337 }
@@ -373,7 +341,7 @@ sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj)
373 X509_free(x509); 341 X509_free(x509);
374 x509 = NULL; 342 x509 = NULL;
375 if (pubkey->type != EVP_PKEY_RSA) { 343 if (pubkey->type != EVP_PKEY_RSA) {
376 logit("Public key is of unknown type"); 344 log("Public key is of unknown type");
377 r = -1; 345 r = -1;
378 goto err; 346 goto err;
379 } 347 }
@@ -445,7 +413,7 @@ sc_get_keys(const char *id, const char *pin)
445 r = sc_pkcs15_get_objects(p15card, SC_PKCS15_TYPE_CERT_X509, 413 r = sc_pkcs15_get_objects(p15card, SC_PKCS15_TYPE_CERT_X509,
446 certs, 32); 414 certs, 32);
447 if (r == 0) { 415 if (r == 0) {
448 logit("No certificates found on smartcard"); 416 log("No certificates found on smartcard");
449 r = -1; 417 r = -1;
450 goto err; 418 goto err;
451 } else if (r < 0) { 419 } else if (r < 0) {
@@ -455,14 +423,9 @@ sc_get_keys(const char *id, const char *pin)
455 } 423 }
456 key_count = r; 424 key_count = r;
457 } 425 }
426 /* FIXME: only keep entries with a corresponding private key */
458 keys = xmalloc(sizeof(Key *) * (key_count*2+1)); 427 keys = xmalloc(sizeof(Key *) * (key_count*2+1));
459 for (i = 0; i < key_count; i++) { 428 for (i = 0; i < key_count; i++) {
460 sc_pkcs15_object_t *tmp_obj = NULL;
461 cert_id = ((sc_pkcs15_cert_info_t *)(certs[i]->data))->id;
462 if (sc_pkcs15_find_prkey_by_id(p15card, &cert_id, &tmp_obj))
463 /* skip the public key (certificate) if no
464 * corresponding private key is present */
465 continue;
466 k = key_new(KEY_RSA); 429 k = key_new(KEY_RSA);
467 if (k == NULL) 430 if (k == NULL)
468 break; 431 break;
@@ -496,30 +459,4 @@ sc_put_key(Key *prv, const char *id)
496 return -1; 459 return -1;
497} 460}
498 461
499char *
500sc_get_key_label(Key *key)
501{
502 int r;
503 const struct sc_priv_data *priv;
504 struct sc_pkcs15_object *key_obj;
505
506 priv = (const struct sc_priv_data *) RSA_get_app_data(key->rsa);
507 if (priv == NULL || p15card == NULL) {
508 logit("SmartCard key not loaded");
509 /* internal error => return default label */
510 return xstrdup("smartcard key");
511 }
512 r = sc_pkcs15_find_prkey_by_id(p15card, &priv->cert_id, &key_obj);
513 if (r) {
514 logit("Unable to find private key from SmartCard: %s",
515 sc_strerror(r));
516 return xstrdup("smartcard key");
517 }
518 if (key_obj == NULL || key_obj->label == NULL)
519 /* the optional PKCS#15 label does not exists
520 * => return the default label */
521 return xstrdup("smartcard key");
522 return xstrdup(key_obj->label);
523}
524
525#endif /* SMARTCARD */ 462#endif /* SMARTCARD */
diff --git a/scard.c b/scard.c
index 906287ba2..9791938c0 100644
--- a/scard.c
+++ b/scard.c
@@ -24,7 +24,7 @@
24 24
25#include "includes.h" 25#include "includes.h"
26#if defined(SMARTCARD) && defined(USE_SECTOK) 26#if defined(SMARTCARD) && defined(USE_SECTOK)
27RCSID("$OpenBSD: scard.c,v 1.28 2003/06/12 19:12:02 markus Exp $"); 27RCSID("$OpenBSD: scard.c,v 1.26 2002/06/23 03:30:17 deraadt Exp $");
28 28
29#include <openssl/evp.h> 29#include <openssl/evp.h>
30#include <sectok.h> 30#include <sectok.h>
@@ -526,7 +526,7 @@ sc_put_key(Key *prv, const char *id)
526 } 526 }
527 if (!sectok_swOK(sw)) 527 if (!sectok_swOK(sw))
528 goto done; 528 goto done;
529 logit("cyberflex_load_rsa_priv done"); 529 log("cyberflex_load_rsa_priv done");
530 key_fid[0] = 0x73; 530 key_fid[0] = 0x73;
531 key_fid[1] = 0x68; 531 key_fid[1] = 0x68;
532 if (cyberflex_load_rsa_pub(fd, cla, key_fid, len, elements[5], 532 if (cyberflex_load_rsa_pub(fd, cla, key_fid, len, elements[5],
@@ -536,7 +536,7 @@ sc_put_key(Key *prv, const char *id)
536 } 536 }
537 if (!sectok_swOK(sw)) 537 if (!sectok_swOK(sw))
538 goto done; 538 goto done;
539 logit("cyberflex_load_rsa_pub done"); 539 log("cyberflex_load_rsa_pub done");
540 status = 0; 540 status = 0;
541 541
542done: 542done:
@@ -554,11 +554,4 @@ done:
554 sectok_close(fd); 554 sectok_close(fd);
555 return (status); 555 return (status);
556} 556}
557
558char *
559sc_get_key_label(Key *key)
560{
561 return xstrdup("smartcard key");
562}
563
564#endif /* SMARTCARD && USE_SECTOK */ 557#endif /* SMARTCARD && USE_SECTOK */
diff --git a/scard.h b/scard.h
index 9ba20a361..00999cb09 100644
--- a/scard.h
+++ b/scard.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: scard.h,v 1.12 2003/06/12 19:12:03 markus Exp $ */ 1/* $OpenBSD: scard.h,v 1.11 2002/06/30 21:59:45 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -36,6 +36,5 @@
36Key **sc_get_keys(const char *, const char *); 36Key **sc_get_keys(const char *, const char *);
37void sc_close(void); 37void sc_close(void);
38int sc_put_key(Key *, const char *); 38int sc_put_key(Key *, const char *);
39char *sc_get_key_label(Key *);
40 39
41#endif 40#endif
diff --git a/scp.0 b/scp.0
index 2ebff48d0..7a653c687 100644
--- a/scp.0
+++ b/scp.0
@@ -79,16 +79,15 @@ DESCRIPTION
79DIAGNOSTICS 79DIAGNOSTICS
80 scp exits with 0 on success or >0 if an error occurred. 80 scp exits with 0 on success or >0 if an error occurred.
81 81
82SEE ALSO 82AUTHORS
83 rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), 83 Timo Rinne <tri@iki.fi> and Tatu Ylonen <ylo@cs.hut.fi>
84 ssh_config(5), sshd(8)
85 84
86HISTORY 85HISTORY
87 scp is based on the rcp(1) program in BSD source code from the Regents of 86 scp is based on the rcp(1) program in BSD source code from the Regents of
88 the University of California. 87 the University of California.
89 88
90AUTHORS 89SEE ALSO
91 Timo Rinne M-bM-^LM-)tri@iki.fiM-bM-^LM-* and 90 rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
92 Tatu Ylonen M-bM-^LM-)ylo@cs.hut.fiM-bM-^LM-* 91 ssh_config(5), sshd(8)
93 92
94BSD September 25, 1999 BSD 93BSD September 25, 1999 BSD
diff --git a/scp.1 b/scp.1
index a971500ee..a3ec2e0c6 100644
--- a/scp.1
+++ b/scp.1
@@ -9,7 +9,7 @@
9.\" 9.\"
10.\" Created: Sun May 7 00:14:37 1995 ylo 10.\" Created: Sun May 7 00:14:37 1995 ylo
11.\" 11.\"
12.\" $OpenBSD: scp.1,v 1.28 2003/06/10 09:12:11 jmc Exp $ 12.\" $OpenBSD: scp.1,v 1.27 2003/03/28 10:11:43 jmc Exp $
13.\" 13.\"
14.Dd September 25, 1999 14.Dd September 25, 1999
15.Dt SCP 1 15.Dt SCP 1
@@ -148,6 +148,14 @@ to use IPv6 addresses only.
148.Sh DIAGNOSTICS 148.Sh DIAGNOSTICS
149.Nm 149.Nm
150exits with 0 on success or >0 if an error occurred. 150exits with 0 on success or >0 if an error occurred.
151.Sh AUTHORS
152Timo Rinne <tri@iki.fi> and Tatu Ylonen <ylo@cs.hut.fi>
153.Sh HISTORY
154.Nm
155is based on the
156.Xr rcp 1
157program in BSD source code from the Regents of the University of
158California.
151.Sh SEE ALSO 159.Sh SEE ALSO
152.Xr rcp 1 , 160.Xr rcp 1 ,
153.Xr sftp 1 , 161.Xr sftp 1 ,
@@ -157,13 +165,3 @@ exits with 0 on success or >0 if an error occurred.
157.Xr ssh-keygen 1 , 165.Xr ssh-keygen 1 ,
158.Xr ssh_config 5 , 166.Xr ssh_config 5 ,
159.Xr sshd 8 167.Xr sshd 8
160.Sh HISTORY
161.Nm
162is based on the
163.Xr rcp 1
164program in BSD source code from the Regents of the University of
165California.
166.Sh AUTHORS
167.An Timo Rinne Aq tri@iki.fi
168and
169.An Tatu Ylonen Aq ylo@cs.hut.fi
diff --git a/scp.c b/scp.c
index 4f9247c2d..35d4c5f71 100644
--- a/scp.c
+++ b/scp.c
@@ -52,7 +52,11 @@
52 * 2. Redistributions in binary form must reproduce the above copyright 52 * 2. Redistributions in binary form must reproduce the above copyright
53 * notice, this list of conditions and the following disclaimer in the 53 * notice, this list of conditions and the following disclaimer in the
54 * documentation and/or other materials provided with the distribution. 54 * documentation and/or other materials provided with the distribution.
55 * 3. Neither the name of the University nor the names of its contributors 55 * 3. All advertising materials mentioning features or use of this software
56 * must display the following acknowledgement:
57 * This product includes software developed by the University of
58 * California, Berkeley and its contributors.
59 * 4. Neither the name of the University nor the names of its contributors
56 * may be used to endorse or promote products derived from this software 60 * may be used to endorse or promote products derived from this software
57 * without specific prior written permission. 61 * without specific prior written permission.
58 * 62 *
@@ -71,7 +75,7 @@
71 */ 75 */
72 76
73#include "includes.h" 77#include "includes.h"
74RCSID("$OpenBSD: scp.c,v 1.108 2003/07/18 01:54:25 deraadt Exp $"); 78RCSID("$OpenBSD: scp.c,v 1.102 2003/03/05 22:33:43 markus Exp $");
75 79
76#include "xmalloc.h" 80#include "xmalloc.h"
77#include "atomicio.h" 81#include "atomicio.h"
@@ -107,16 +111,7 @@ int showprogress = 1;
107char *ssh_program = _PATH_SSH_PROGRAM; 111char *ssh_program = _PATH_SSH_PROGRAM;
108 112
109/* This is used to store the pid of ssh_program */ 113/* This is used to store the pid of ssh_program */
110pid_t do_cmd_pid = -1; 114pid_t do_cmd_pid;
111
112static void
113killchild(int signo)
114{
115 if (do_cmd_pid > 1)
116 kill(do_cmd_pid, signo);
117
118 _exit(1);
119}
120 115
121/* 116/*
122 * This function executes the given command as the specified user on the 117 * This function executes the given command as the specified user on the
@@ -151,7 +146,7 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc)
151 close(reserved[0]); 146 close(reserved[0]);
152 close(reserved[1]); 147 close(reserved[1]);
153 148
154 /* Fork a child to execute the command on the remote host using ssh. */ 149 /* For a child to execute the command on the remote host using ssh. */
155 do_cmd_pid = fork(); 150 do_cmd_pid = fork();
156 if (do_cmd_pid == 0) { 151 if (do_cmd_pid == 0) {
157 /* Child. */ 152 /* Child. */
@@ -179,9 +174,6 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc)
179 *fdout = pin[1]; 174 *fdout = pin[1];
180 close(pout[1]); 175 close(pout[1]);
181 *fdin = pout[0]; 176 *fdin = pout[0];
182 signal(SIGTERM, killchild);
183 signal(SIGINT, killchild);
184 signal(SIGHUP, killchild);
185 return 0; 177 return 0;
186} 178}
187 179
@@ -214,7 +206,9 @@ void toremote(char *, int, char *[]);
214void usage(void); 206void usage(void);
215 207
216int 208int
217main(int argc, char **argv) 209main(argc, argv)
210 int argc;
211 char *argv[];
218{ 212{
219 int ch, fflag, tflag, status; 213 int ch, fflag, tflag, status;
220 double speed; 214 double speed;
@@ -222,7 +216,7 @@ main(int argc, char **argv)
222 extern char *optarg; 216 extern char *optarg;
223 extern int optind; 217 extern int optind;
224 218
225 __progname = ssh_get_progname(argv[0]); 219 __progname = get_progname(argv[0]);
226 220
227 args.list = NULL; 221 args.list = NULL;
228 addargs(&args, "ssh"); /* overwritten with ssh_program */ 222 addargs(&args, "ssh"); /* overwritten with ssh_program */
@@ -298,7 +292,7 @@ main(int argc, char **argv)
298 argv += optind; 292 argv += optind;
299 293
300 if ((pwd = getpwuid(userid = getuid())) == NULL) 294 if ((pwd = getpwuid(userid = getuid())) == NULL)
301 fatal("unknown user %u", (u_int) userid); 295 fatal("unknown user %d", (int) userid);
302 296
303 if (!isatty(STDERR_FILENO)) 297 if (!isatty(STDERR_FILENO))
304 showprogress = 0; 298 showprogress = 0;
@@ -359,7 +353,9 @@ main(int argc, char **argv)
359} 353}
360 354
361void 355void
362toremote(char *targ, int argc, char **argv) 356toremote(targ, argc, argv)
357 char *targ, *argv[];
358 int argc;
363{ 359{
364 int i, len; 360 int i, len;
365 char *bp, *host, *src, *suser, *thost, *tuser; 361 char *bp, *host, *src, *suser, *thost, *tuser;
@@ -447,7 +443,9 @@ toremote(char *targ, int argc, char **argv)
447} 443}
448 444
449void 445void
450tolocal(int argc, char **argv) 446tolocal(argc, argv)
447 int argc;
448 char *argv[];
451{ 449{
452 int i, len; 450 int i, len;
453 char *bp, *host, *src, *suser; 451 char *bp, *host, *src, *suser;
@@ -496,7 +494,9 @@ tolocal(int argc, char **argv)
496} 494}
497 495
498void 496void
499source(int argc, char **argv) 497source(argc, argv)
498 int argc;
499 char *argv[];
500{ 500{
501 struct stat stb; 501 struct stat stb;
502 static BUF buffer; 502 static BUF buffer;
@@ -549,18 +549,25 @@ syserr: run_err("%s: %s", name, strerror(errno));
549 (void) snprintf(buf, sizeof buf, "T%lu 0 %lu 0\n", 549 (void) snprintf(buf, sizeof buf, "T%lu 0 %lu 0\n",
550 (u_long) stb.st_mtime, 550 (u_long) stb.st_mtime,
551 (u_long) stb.st_atime); 551 (u_long) stb.st_atime);
552 (void) atomicio(vwrite, remout, buf, strlen(buf)); 552 (void) atomicio(write, remout, buf, strlen(buf));
553 if (response() < 0) 553 if (response() < 0)
554 goto next; 554 goto next;
555 } 555 }
556#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO) 556#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
557#ifdef HAVE_LONG_LONG_INT
557 snprintf(buf, sizeof buf, "C%04o %lld %s\n", 558 snprintf(buf, sizeof buf, "C%04o %lld %s\n",
558 (u_int) (stb.st_mode & FILEMODEMASK), 559 (u_int) (stb.st_mode & FILEMODEMASK),
559 (int64_t)stb.st_size, last); 560 (long long)stb.st_size, last);
561#else
562 /* XXX: Handle integer overflow? */
563 snprintf(buf, sizeof buf, "C%04o %lu %s\n",
564 (u_int) (stb.st_mode & FILEMODEMASK),
565 (u_long) stb.st_size, last);
566#endif
560 if (verbose_mode) { 567 if (verbose_mode) {
561 fprintf(stderr, "Sending file modes: %s", buf); 568 fprintf(stderr, "Sending file modes: %s", buf);
562 } 569 }
563 (void) atomicio(vwrite, remout, buf, strlen(buf)); 570 (void) atomicio(write, remout, buf, strlen(buf));
564 if (response() < 0) 571 if (response() < 0)
565 goto next; 572 goto next;
566 if ((bp = allocbuf(&buffer, fd, 2048)) == NULL) { 573 if ((bp = allocbuf(&buffer, fd, 2048)) == NULL) {
@@ -580,9 +587,9 @@ next: (void) close(fd);
580 haderr = result >= 0 ? EIO : errno; 587 haderr = result >= 0 ? EIO : errno;
581 } 588 }
582 if (haderr) 589 if (haderr)
583 (void) atomicio(vwrite, remout, bp->buf, amt); 590 (void) atomicio(write, remout, bp->buf, amt);
584 else { 591 else {
585 result = atomicio(vwrite, remout, bp->buf, amt); 592 result = atomicio(write, remout, bp->buf, amt);
586 if (result != amt) 593 if (result != amt)
587 haderr = result >= 0 ? EIO : errno; 594 haderr = result >= 0 ? EIO : errno;
588 statbytes += result; 595 statbytes += result;
@@ -596,7 +603,7 @@ next: (void) close(fd);
596 if (close(fd) < 0 && !haderr) 603 if (close(fd) < 0 && !haderr)
597 haderr = errno; 604 haderr = errno;
598 if (!haderr) 605 if (!haderr)
599 (void) atomicio(vwrite, remout, "", 1); 606 (void) atomicio(write, remout, "", 1);
600 else 607 else
601 run_err("%s: %s", name, strerror(haderr)); 608 run_err("%s: %s", name, strerror(haderr));
602 (void) response(); 609 (void) response();
@@ -604,7 +611,9 @@ next: (void) close(fd);
604} 611}
605 612
606void 613void
607rsource(char *name, struct stat *statp) 614rsource(name, statp)
615 char *name;
616 struct stat *statp;
608{ 617{
609 DIR *dirp; 618 DIR *dirp;
610 struct dirent *dp; 619 struct dirent *dp;
@@ -623,7 +632,7 @@ rsource(char *name, struct stat *statp)
623 (void) snprintf(path, sizeof(path), "T%lu 0 %lu 0\n", 632 (void) snprintf(path, sizeof(path), "T%lu 0 %lu 0\n",
624 (u_long) statp->st_mtime, 633 (u_long) statp->st_mtime,
625 (u_long) statp->st_atime); 634 (u_long) statp->st_atime);
626 (void) atomicio(vwrite, remout, path, strlen(path)); 635 (void) atomicio(write, remout, path, strlen(path));
627 if (response() < 0) { 636 if (response() < 0) {
628 closedir(dirp); 637 closedir(dirp);
629 return; 638 return;
@@ -633,7 +642,7 @@ rsource(char *name, struct stat *statp)
633 (u_int) (statp->st_mode & FILEMODEMASK), 0, last); 642 (u_int) (statp->st_mode & FILEMODEMASK), 0, last);
634 if (verbose_mode) 643 if (verbose_mode)
635 fprintf(stderr, "Entering directory: %s", path); 644 fprintf(stderr, "Entering directory: %s", path);
636 (void) atomicio(vwrite, remout, path, strlen(path)); 645 (void) atomicio(write, remout, path, strlen(path));
637 if (response() < 0) { 646 if (response() < 0) {
638 closedir(dirp); 647 closedir(dirp);
639 return; 648 return;
@@ -652,7 +661,7 @@ rsource(char *name, struct stat *statp)
652 source(1, vect); 661 source(1, vect);
653 } 662 }
654 (void) closedir(dirp); 663 (void) closedir(dirp);
655 (void) atomicio(vwrite, remout, "E\n", 2); 664 (void) atomicio(write, remout, "E\n", 2);
656 (void) response(); 665 (void) response();
657} 666}
658 667
@@ -711,7 +720,9 @@ bwlimit(int amount)
711} 720}
712 721
713void 722void
714sink(int argc, char **argv) 723sink(argc, argv)
724 int argc;
725 char *argv[];
715{ 726{
716 static BUF buffer; 727 static BUF buffer;
717 struct stat stb; 728 struct stat stb;
@@ -742,7 +753,7 @@ sink(int argc, char **argv)
742 if (targetshouldbedirectory) 753 if (targetshouldbedirectory)
743 verifydir(targ); 754 verifydir(targ);
744 755
745 (void) atomicio(vwrite, remout, "", 1); 756 (void) atomicio(write, remout, "", 1);
746 if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode)) 757 if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
747 targisdir = 1; 758 targisdir = 1;
748 for (first = 1;; first = 0) { 759 for (first = 1;; first = 0) {
@@ -760,7 +771,7 @@ sink(int argc, char **argv)
760 771
761 if (buf[0] == '\01' || buf[0] == '\02') { 772 if (buf[0] == '\01' || buf[0] == '\02') {
762 if (iamremote == 0) 773 if (iamremote == 0)
763 (void) atomicio(vwrite, STDERR_FILENO, 774 (void) atomicio(write, STDERR_FILENO,
764 buf + 1, strlen(buf + 1)); 775 buf + 1, strlen(buf + 1));
765 if (buf[0] == '\02') 776 if (buf[0] == '\02')
766 exit(1); 777 exit(1);
@@ -768,7 +779,7 @@ sink(int argc, char **argv)
768 continue; 779 continue;
769 } 780 }
770 if (buf[0] == 'E') { 781 if (buf[0] == 'E') {
771 (void) atomicio(vwrite, remout, "", 1); 782 (void) atomicio(write, remout, "", 1);
772 return; 783 return;
773 } 784 }
774 if (ch == '\n') 785 if (ch == '\n')
@@ -790,7 +801,7 @@ sink(int argc, char **argv)
790 atime.tv_usec = strtol(cp, &cp, 10); 801 atime.tv_usec = strtol(cp, &cp, 10);
791 if (!cp || *cp++ != '\0') 802 if (!cp || *cp++ != '\0')
792 SCREWUP("atime.usec not delimited"); 803 SCREWUP("atime.usec not delimited");
793 (void) atomicio(vwrite, remout, "", 1); 804 (void) atomicio(write, remout, "", 1);
794 continue; 805 continue;
795 } 806 }
796 if (*cp != 'C' && *cp != 'D') { 807 if (*cp != 'C' && *cp != 'D') {
@@ -875,7 +886,7 @@ sink(int argc, char **argv)
875bad: run_err("%s: %s", np, strerror(errno)); 886bad: run_err("%s: %s", np, strerror(errno));
876 continue; 887 continue;
877 } 888 }
878 (void) atomicio(vwrite, remout, "", 1); 889 (void) atomicio(write, remout, "", 1);
879 if ((bp = allocbuf(&buffer, ofd, 4096)) == NULL) { 890 if ((bp = allocbuf(&buffer, ofd, 4096)) == NULL) {
880 (void) close(ofd); 891 (void) close(ofd);
881 continue; 892 continue;
@@ -912,7 +923,7 @@ bad: run_err("%s: %s", np, strerror(errno));
912 if (count == bp->cnt) { 923 if (count == bp->cnt) {
913 /* Keep reading so we stay sync'd up. */ 924 /* Keep reading so we stay sync'd up. */
914 if (wrerr == NO) { 925 if (wrerr == NO) {
915 j = atomicio(vwrite, ofd, bp->buf, count); 926 j = atomicio(write, ofd, bp->buf, count);
916 if (j != count) { 927 if (j != count) {
917 wrerr = YES; 928 wrerr = YES;
918 wrerrno = j >= 0 ? EIO : errno; 929 wrerrno = j >= 0 ? EIO : errno;
@@ -925,7 +936,7 @@ bad: run_err("%s: %s", np, strerror(errno));
925 if (showprogress) 936 if (showprogress)
926 stop_progress_meter(); 937 stop_progress_meter();
927 if (count != 0 && wrerr == NO && 938 if (count != 0 && wrerr == NO &&
928 (j = atomicio(vwrite, ofd, bp->buf, count)) != count) { 939 (j = atomicio(write, ofd, bp->buf, count)) != count) {
929 wrerr = YES; 940 wrerr = YES;
930 wrerrno = j >= 0 ? EIO : errno; 941 wrerrno = j >= 0 ? EIO : errno;
931 } 942 }
@@ -970,7 +981,7 @@ bad: run_err("%s: %s", np, strerror(errno));
970 run_err("%s: %s", np, strerror(wrerrno)); 981 run_err("%s: %s", np, strerror(wrerrno));
971 break; 982 break;
972 case NO: 983 case NO:
973 (void) atomicio(vwrite, remout, "", 1); 984 (void) atomicio(write, remout, "", 1);
974 break; 985 break;
975 case DISPLAYED: 986 case DISPLAYED:
976 break; 987 break;
@@ -1005,7 +1016,7 @@ response(void)
1005 } while (cp < &rbuf[sizeof(rbuf) - 1] && ch != '\n'); 1016 } while (cp < &rbuf[sizeof(rbuf) - 1] && ch != '\n');
1006 1017
1007 if (!iamremote) 1018 if (!iamremote)
1008 (void) atomicio(vwrite, STDERR_FILENO, rbuf, cp - rbuf); 1019 (void) atomicio(write, STDERR_FILENO, rbuf, cp - rbuf);
1009 ++errs; 1020 ++errs;
1010 if (resp == 1) 1021 if (resp == 1)
1011 return (-1); 1022 return (-1);
@@ -1050,7 +1061,8 @@ run_err(const char *fmt,...)
1050} 1061}
1051 1062
1052void 1063void
1053verifydir(char *cp) 1064verifydir(cp)
1065 char *cp;
1054{ 1066{
1055 struct stat stb; 1067 struct stat stb;
1056 1068
@@ -1064,7 +1076,8 @@ verifydir(char *cp)
1064} 1076}
1065 1077
1066int 1078int
1067okname(char *cp0) 1079okname(cp0)
1080 char *cp0;
1068{ 1081{
1069 int c; 1082 int c;
1070 char *cp; 1083 char *cp;
@@ -1094,7 +1107,9 @@ bad: fprintf(stderr, "%s: invalid user name\n", cp0);
1094} 1107}
1095 1108
1096BUF * 1109BUF *
1097allocbuf(BUF *bp, int fd, int blksize) 1110allocbuf(bp, fd, blksize)
1111 BUF *bp;
1112 int fd, blksize;
1098{ 1113{
1099 size_t size; 1114 size_t size;
1100#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE 1115#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
@@ -1122,7 +1137,8 @@ allocbuf(BUF *bp, int fd, int blksize)
1122} 1137}
1123 1138
1124void 1139void
1125lostconn(int signo) 1140lostconn(signo)
1141 int signo;
1126{ 1142{
1127 if (!iamremote) 1143 if (!iamremote)
1128 write(STDERR_FILENO, "lost connection\n", 16); 1144 write(STDERR_FILENO, "lost connection\n", 16);
diff --git a/servconf.c b/servconf.c
index 71e28b3cb..2510659ee 100644
--- a/servconf.c
+++ b/servconf.c
@@ -10,7 +10,23 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.127 2003/09/01 18:15:50 markus Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.116 2003/02/21 09:05:53 markus Exp $");
14
15#if defined(KRB4)
16#include <krb.h>
17#endif
18#if defined(KRB5)
19#ifdef HEIMDAL
20#include <krb.h>
21#else
22/* Bodge - but then, so is using the kerberos IV KEYFILE to get a Kerberos V
23 * keytab */
24#define KEYFILE "/etc/krb5.keytab"
25#endif
26#endif
27#ifdef AFS
28#include <kafs.h>
29#endif
14 30
15#include "ssh.h" 31#include "ssh.h"
16#include "log.h" 32#include "log.h"
@@ -40,7 +56,7 @@ initialize_server_options(ServerOptions *options)
40 memset(options, 0, sizeof(*options)); 56 memset(options, 0, sizeof(*options));
41 57
42 /* Portable-specific options */ 58 /* Portable-specific options */
43 options->use_pam = -1; 59 options->pam_authentication_via_kbd_int = -1;
44 60
45 /* Standard Options */ 61 /* Standard Options */
46 options->num_ports = 0; 62 options->num_ports = 0;
@@ -64,16 +80,23 @@ initialize_server_options(ServerOptions *options)
64 options->keepalives = -1; 80 options->keepalives = -1;
65 options->log_facility = SYSLOG_FACILITY_NOT_SET; 81 options->log_facility = SYSLOG_FACILITY_NOT_SET;
66 options->log_level = SYSLOG_LEVEL_NOT_SET; 82 options->log_level = SYSLOG_LEVEL_NOT_SET;
83 options->rhosts_authentication = -1;
67 options->rhosts_rsa_authentication = -1; 84 options->rhosts_rsa_authentication = -1;
68 options->hostbased_authentication = -1; 85 options->hostbased_authentication = -1;
69 options->hostbased_uses_name_from_packet_only = -1; 86 options->hostbased_uses_name_from_packet_only = -1;
70 options->rsa_authentication = -1; 87 options->rsa_authentication = -1;
71 options->pubkey_authentication = -1; 88 options->pubkey_authentication = -1;
89#if defined(KRB4) || defined(KRB5)
72 options->kerberos_authentication = -1; 90 options->kerberos_authentication = -1;
73 options->kerberos_or_local_passwd = -1; 91 options->kerberos_or_local_passwd = -1;
74 options->kerberos_ticket_cleanup = -1; 92 options->kerberos_ticket_cleanup = -1;
75 options->gss_authentication=-1; 93#endif
76 options->gss_cleanup_creds = -1; 94#if defined(AFS) || defined(KRB5)
95 options->kerberos_tgt_passing = -1;
96#endif
97#ifdef AFS
98 options->afs_token_passing = -1;
99#endif
77 options->password_authentication = -1; 100 options->password_authentication = -1;
78 options->kbd_interactive_authentication = -1; 101 options->kbd_interactive_authentication = -1;
79 options->challenge_response_authentication = -1; 102 options->challenge_response_authentication = -1;
@@ -95,7 +118,7 @@ initialize_server_options(ServerOptions *options)
95 options->max_startups_rate = -1; 118 options->max_startups_rate = -1;
96 options->max_startups = -1; 119 options->max_startups = -1;
97 options->banner = NULL; 120 options->banner = NULL;
98 options->use_dns = -1; 121 options->verify_reverse_mapping = -1;
99 options->client_alive_interval = -1; 122 options->client_alive_interval = -1;
100 options->client_alive_count_max = -1; 123 options->client_alive_count_max = -1;
101 options->authorized_keys_file = NULL; 124 options->authorized_keys_file = NULL;
@@ -109,8 +132,8 @@ void
109fill_default_server_options(ServerOptions *options) 132fill_default_server_options(ServerOptions *options)
110{ 133{
111 /* Portable-specific options */ 134 /* Portable-specific options */
112 if (options->use_pam == -1) 135 if (options->pam_authentication_via_kbd_int == -1)
113 options->use_pam = 1; 136 options->pam_authentication_via_kbd_int = 0;
114 137
115 /* Standard Options */ 138 /* Standard Options */
116 if (options->protocol == SSH_PROTO_UNKNOWN) 139 if (options->protocol == SSH_PROTO_UNKNOWN)
@@ -165,6 +188,8 @@ fill_default_server_options(ServerOptions *options)
165 options->log_facility = SYSLOG_FACILITY_AUTH; 188 options->log_facility = SYSLOG_FACILITY_AUTH;
166 if (options->log_level == SYSLOG_LEVEL_NOT_SET) 189 if (options->log_level == SYSLOG_LEVEL_NOT_SET)
167 options->log_level = SYSLOG_LEVEL_INFO; 190 options->log_level = SYSLOG_LEVEL_INFO;
191 if (options->rhosts_authentication == -1)
192 options->rhosts_authentication = 0;
168 if (options->rhosts_rsa_authentication == -1) 193 if (options->rhosts_rsa_authentication == -1)
169 options->rhosts_rsa_authentication = 0; 194 options->rhosts_rsa_authentication = 0;
170 if (options->hostbased_authentication == -1) 195 if (options->hostbased_authentication == -1)
@@ -175,16 +200,22 @@ fill_default_server_options(ServerOptions *options)
175 options->rsa_authentication = 1; 200 options->rsa_authentication = 1;
176 if (options->pubkey_authentication == -1) 201 if (options->pubkey_authentication == -1)
177 options->pubkey_authentication = 1; 202 options->pubkey_authentication = 1;
203#if defined(KRB4) || defined(KRB5)
178 if (options->kerberos_authentication == -1) 204 if (options->kerberos_authentication == -1)
179 options->kerberos_authentication = 0; 205 options->kerberos_authentication = 0;
180 if (options->kerberos_or_local_passwd == -1) 206 if (options->kerberos_or_local_passwd == -1)
181 options->kerberos_or_local_passwd = 1; 207 options->kerberos_or_local_passwd = 1;
182 if (options->kerberos_ticket_cleanup == -1) 208 if (options->kerberos_ticket_cleanup == -1)
183 options->kerberos_ticket_cleanup = 1; 209 options->kerberos_ticket_cleanup = 1;
184 if (options->gss_authentication == -1) 210#endif
185 options->gss_authentication = 0; 211#if defined(AFS) || defined(KRB5)
186 if (options->gss_cleanup_creds == -1) 212 if (options->kerberos_tgt_passing == -1)
187 options->gss_cleanup_creds = 1; 213 options->kerberos_tgt_passing = 0;
214#endif
215#ifdef AFS
216 if (options->afs_token_passing == -1)
217 options->afs_token_passing = 0;
218#endif
188 if (options->password_authentication == -1) 219 if (options->password_authentication == -1)
189 options->password_authentication = 1; 220 options->password_authentication = 1;
190 if (options->kbd_interactive_authentication == -1) 221 if (options->kbd_interactive_authentication == -1)
@@ -209,8 +240,8 @@ fill_default_server_options(ServerOptions *options)
209 options->max_startups_rate = 100; /* 100% */ 240 options->max_startups_rate = 100; /* 100% */
210 if (options->max_startups_begin == -1) 241 if (options->max_startups_begin == -1)
211 options->max_startups_begin = options->max_startups; 242 options->max_startups_begin = options->max_startups;
212 if (options->use_dns == -1) 243 if (options->verify_reverse_mapping == -1)
213 options->use_dns = 1; 244 options->verify_reverse_mapping = 0;
214 if (options->client_alive_interval == -1) 245 if (options->client_alive_interval == -1)
215 options->client_alive_interval = 0; 246 options->client_alive_interval = 0;
216 if (options->client_alive_count_max == -1) 247 if (options->client_alive_count_max == -1)
@@ -244,13 +275,21 @@ fill_default_server_options(ServerOptions *options)
244typedef enum { 275typedef enum {
245 sBadOption, /* == unknown option */ 276 sBadOption, /* == unknown option */
246 /* Portable-specific options */ 277 /* Portable-specific options */
247 sUsePAM, 278 sPAMAuthenticationViaKbdInt,
248 /* Standard Options */ 279 /* Standard Options */
249 sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime, 280 sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime,
250 sPermitRootLogin, sLogFacility, sLogLevel, 281 sPermitRootLogin, sLogFacility, sLogLevel,
251 sRhostsRSAAuthentication, sRSAAuthentication, 282 sRhostsAuthentication, sRhostsRSAAuthentication, sRSAAuthentication,
283#if defined(KRB4) || defined(KRB5)
252 sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup, 284 sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup,
253 sKerberosTgtPassing, sChallengeResponseAuthentication, 285#endif
286#if defined(AFS) || defined(KRB5)
287 sKerberosTgtPassing,
288#endif
289#ifdef AFS
290 sAFSTokenPassing,
291#endif
292 sChallengeResponseAuthentication,
254 sPasswordAuthentication, sKbdInteractiveAuthentication, sListenAddress, 293 sPasswordAuthentication, sKbdInteractiveAuthentication, sListenAddress,
255 sPrintMotd, sPrintLastLog, sIgnoreRhosts, 294 sPrintMotd, sPrintLastLog, sIgnoreRhosts,
256 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, 295 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
@@ -259,12 +298,11 @@ typedef enum {
259 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, 298 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
260 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, 299 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
261 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, 300 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups,
262 sBanner, sUseDNS, sHostbasedAuthentication, 301 sBanner, sVerifyReverseMapping, sHostbasedAuthentication,
263 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 302 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
264 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, 303 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
265 sGssAuthentication, sGssCleanupCreds,
266 sUsePrivilegeSeparation, 304 sUsePrivilegeSeparation,
267 sDeprecated, sUnsupported 305 sDeprecated
268} ServerOpCodes; 306} ServerOpCodes;
269 307
270/* Textual representation of the tokens. */ 308/* Textual representation of the tokens. */
@@ -273,12 +311,7 @@ static struct {
273 ServerOpCodes opcode; 311 ServerOpCodes opcode;
274} keywords[] = { 312} keywords[] = {
275 /* Portable-specific options */ 313 /* Portable-specific options */
276#ifdef USE_PAM 314 { "PAMAuthenticationViaKbdInt", sPAMAuthenticationViaKbdInt },
277 { "usepam", sUsePAM },
278#else
279 { "usepam", sUnsupported },
280#endif
281 { "pamauthenticationviakbdint", sDeprecated },
282 /* Standard Options */ 315 /* Standard Options */
283 { "port", sPort }, 316 { "port", sPort },
284 { "hostkey", sHostKeyFile }, 317 { "hostkey", sHostKeyFile },
@@ -290,30 +323,23 @@ static struct {
290 { "permitrootlogin", sPermitRootLogin }, 323 { "permitrootlogin", sPermitRootLogin },
291 { "syslogfacility", sLogFacility }, 324 { "syslogfacility", sLogFacility },
292 { "loglevel", sLogLevel }, 325 { "loglevel", sLogLevel },
293 { "rhostsauthentication", sDeprecated }, 326 { "rhostsauthentication", sRhostsAuthentication },
294 { "rhostsrsaauthentication", sRhostsRSAAuthentication }, 327 { "rhostsrsaauthentication", sRhostsRSAAuthentication },
295 { "hostbasedauthentication", sHostbasedAuthentication }, 328 { "hostbasedauthentication", sHostbasedAuthentication },
296 { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly }, 329 { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly },
297 { "rsaauthentication", sRSAAuthentication }, 330 { "rsaauthentication", sRSAAuthentication },
298 { "pubkeyauthentication", sPubkeyAuthentication }, 331 { "pubkeyauthentication", sPubkeyAuthentication },
299 { "dsaauthentication", sPubkeyAuthentication }, /* alias */ 332 { "dsaauthentication", sPubkeyAuthentication }, /* alias */
300#ifdef KRB5 333#if defined(KRB4) || defined(KRB5)
301 { "kerberosauthentication", sKerberosAuthentication }, 334 { "kerberosauthentication", sKerberosAuthentication },
302 { "kerberosorlocalpasswd", sKerberosOrLocalPasswd }, 335 { "kerberosorlocalpasswd", sKerberosOrLocalPasswd },
303 { "kerberosticketcleanup", sKerberosTicketCleanup }, 336 { "kerberosticketcleanup", sKerberosTicketCleanup },
304#else
305 { "kerberosauthentication", sUnsupported },
306 { "kerberosorlocalpasswd", sUnsupported },
307 { "kerberosticketcleanup", sUnsupported },
308#endif 337#endif
309 { "kerberostgtpassing", sUnsupported }, 338#if defined(AFS) || defined(KRB5)
310 { "afstokenpassing", sUnsupported }, 339 { "kerberostgtpassing", sKerberosTgtPassing },
311#ifdef GSSAPI 340#endif
312 { "gssapiauthentication", sGssAuthentication }, 341#ifdef AFS
313 { "gssapicleanupcreds", sGssCleanupCreds }, 342 { "afstokenpassing", sAFSTokenPassing },
314#else
315 { "gssapiauthentication", sUnsupported },
316 { "gssapicleanupcreds", sUnsupported },
317#endif 343#endif
318 { "passwordauthentication", sPasswordAuthentication }, 344 { "passwordauthentication", sPasswordAuthentication },
319 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication }, 345 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication },
@@ -347,9 +373,8 @@ static struct {
347 { "subsystem", sSubsystem }, 373 { "subsystem", sSubsystem },
348 { "maxstartups", sMaxStartups }, 374 { "maxstartups", sMaxStartups },
349 { "banner", sBanner }, 375 { "banner", sBanner },
350 { "usedns", sUseDNS }, 376 { "verifyreversemapping", sVerifyReverseMapping },
351 { "verifyreversemapping", sDeprecated }, 377 { "reversemappingcheck", sVerifyReverseMapping },
352 { "reversemappingcheck", sDeprecated },
353 { "clientaliveinterval", sClientAliveInterval }, 378 { "clientaliveinterval", sClientAliveInterval },
354 { "clientalivecountmax", sClientAliveCountMax }, 379 { "clientalivecountmax", sClientAliveCountMax },
355 { "authorizedkeysfile", sAuthorizedKeysFile }, 380 { "authorizedkeysfile", sAuthorizedKeysFile },
@@ -433,8 +458,8 @@ process_server_config_line(ServerOptions *options, char *line,
433 opcode = parse_token(arg, filename, linenum); 458 opcode = parse_token(arg, filename, linenum);
434 switch (opcode) { 459 switch (opcode) {
435 /* Portable-specific options */ 460 /* Portable-specific options */
436 case sUsePAM: 461 case sPAMAuthenticationViaKbdInt:
437 intptr = &options->use_pam; 462 intptr = &options->pam_authentication_via_kbd_int;
438 goto parse_flag; 463 goto parse_flag;
439 464
440 /* Standard Options */ 465 /* Standard Options */
@@ -597,6 +622,10 @@ parse_flag:
597 intptr = &options->ignore_user_known_hosts; 622 intptr = &options->ignore_user_known_hosts;
598 goto parse_flag; 623 goto parse_flag;
599 624
625 case sRhostsAuthentication:
626 intptr = &options->rhosts_authentication;
627 goto parse_flag;
628
600 case sRhostsRSAAuthentication: 629 case sRhostsRSAAuthentication:
601 intptr = &options->rhosts_rsa_authentication; 630 intptr = &options->rhosts_rsa_authentication;
602 goto parse_flag; 631 goto parse_flag;
@@ -616,7 +645,7 @@ parse_flag:
616 case sPubkeyAuthentication: 645 case sPubkeyAuthentication:
617 intptr = &options->pubkey_authentication; 646 intptr = &options->pubkey_authentication;
618 goto parse_flag; 647 goto parse_flag;
619 648#if defined(KRB4) || defined(KRB5)
620 case sKerberosAuthentication: 649 case sKerberosAuthentication:
621 intptr = &options->kerberos_authentication; 650 intptr = &options->kerberos_authentication;
622 goto parse_flag; 651 goto parse_flag;
@@ -628,14 +657,17 @@ parse_flag:
628 case sKerberosTicketCleanup: 657 case sKerberosTicketCleanup:
629 intptr = &options->kerberos_ticket_cleanup; 658 intptr = &options->kerberos_ticket_cleanup;
630 goto parse_flag; 659 goto parse_flag;
631 660#endif
632 case sGssAuthentication: 661#if defined(AFS) || defined(KRB5)
633 intptr = &options->gss_authentication; 662 case sKerberosTgtPassing:
663 intptr = &options->kerberos_tgt_passing;
634 goto parse_flag; 664 goto parse_flag;
635 665#endif
636 case sGssCleanupCreds: 666#ifdef AFS
637 intptr = &options->gss_cleanup_creds; 667 case sAFSTokenPassing:
668 intptr = &options->afs_token_passing;
638 goto parse_flag; 669 goto parse_flag;
670#endif
639 671
640 case sPasswordAuthentication: 672 case sPasswordAuthentication:
641 intptr = &options->password_authentication; 673 intptr = &options->password_authentication;
@@ -701,8 +733,8 @@ parse_flag:
701 intptr = &options->gateway_ports; 733 intptr = &options->gateway_ports;
702 goto parse_flag; 734 goto parse_flag;
703 735
704 case sUseDNS: 736 case sVerifyReverseMapping:
705 intptr = &options->use_dns; 737 intptr = &options->verify_reverse_mapping;
706 goto parse_flag; 738 goto parse_flag;
707 739
708 case sLogFacility: 740 case sLogFacility:
@@ -878,14 +910,7 @@ parse_flag:
878 goto parse_int; 910 goto parse_int;
879 911
880 case sDeprecated: 912 case sDeprecated:
881 logit("%s line %d: Deprecated option %s", 913 log("%s line %d: Deprecated option %s",
882 filename, linenum, arg);
883 while (arg)
884 arg = strdelim(&cp);
885 break;
886
887 case sUnsupported:
888 logit("%s line %d: Unsupported option %s",
889 filename, linenum, arg); 914 filename, linenum, arg);
890 while (arg) 915 while (arg)
891 arg = strdelim(&cp); 916 arg = strdelim(&cp);
diff --git a/servconf.h b/servconf.h
index 828e94c5c..024987dd6 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.65 2003/09/01 18:15:50 markus Exp $ */ 1/* $OpenBSD: servconf.h,v 1.59 2002/07/30 17:03:55 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -65,12 +65,15 @@ typedef struct {
65 int gateway_ports; /* If true, allow remote connects to forwarded ports. */ 65 int gateway_ports; /* If true, allow remote connects to forwarded ports. */
66 SyslogFacility log_facility; /* Facility for system logging. */ 66 SyslogFacility log_facility; /* Facility for system logging. */
67 LogLevel log_level; /* Level for system logging. */ 67 LogLevel log_level; /* Level for system logging. */
68 int rhosts_authentication; /* If true, permit rhosts
69 * authentication. */
68 int rhosts_rsa_authentication; /* If true, permit rhosts RSA 70 int rhosts_rsa_authentication; /* If true, permit rhosts RSA
69 * authentication. */ 71 * authentication. */
70 int hostbased_authentication; /* If true, permit ssh2 hostbased auth */ 72 int hostbased_authentication; /* If true, permit ssh2 hostbased auth */
71 int hostbased_uses_name_from_packet_only; /* experimental */ 73 int hostbased_uses_name_from_packet_only; /* experimental */
72 int rsa_authentication; /* If true, permit RSA authentication. */ 74 int rsa_authentication; /* If true, permit RSA authentication. */
73 int pubkey_authentication; /* If true, permit ssh2 pubkey authentication. */ 75 int pubkey_authentication; /* If true, permit ssh2 pubkey authentication. */
76#if defined(KRB4) || defined(KRB5)
74 int kerberos_authentication; /* If true, permit Kerberos 77 int kerberos_authentication; /* If true, permit Kerberos
75 * authentication. */ 78 * authentication. */
76 int kerberos_or_local_passwd; /* If true, permit kerberos 79 int kerberos_or_local_passwd; /* If true, permit kerberos
@@ -80,8 +83,14 @@ typedef struct {
80 * /etc/passwd */ 83 * /etc/passwd */
81 int kerberos_ticket_cleanup; /* If true, destroy ticket 84 int kerberos_ticket_cleanup; /* If true, destroy ticket
82 * file on logout. */ 85 * file on logout. */
83 int gss_authentication; /* If true, permit GSSAPI authentication */ 86#endif
84 int gss_cleanup_creds; /* If true, destroy cred cache on logout */ 87#if defined(AFS) || defined(KRB5)
88 int kerberos_tgt_passing; /* If true, permit Kerberos TGT
89 * passing. */
90#endif
91#ifdef AFS
92 int afs_token_passing; /* If true, permit AFS token passing. */
93#endif
85 int password_authentication; /* If true, permit password 94 int password_authentication; /* If true, permit password
86 * authentication. */ 95 * authentication. */
87 int kbd_interactive_authentication; /* If true, permit */ 96 int kbd_interactive_authentication; /* If true, permit */
@@ -109,7 +118,7 @@ typedef struct {
109 int max_startups_rate; 118 int max_startups_rate;
110 int max_startups; 119 int max_startups;
111 char *banner; /* SSH-2 banner message */ 120 char *banner; /* SSH-2 banner message */
112 int use_dns; 121 int verify_reverse_mapping; /* cross-check ip and dns */
113 int client_alive_interval; /* 122 int client_alive_interval; /*
114 * poke the client this often to 123 * poke the client this often to
115 * see if it's still there 124 * see if it's still there
@@ -122,7 +131,7 @@ typedef struct {
122 131
123 char *authorized_keys_file; /* File containing public keys */ 132 char *authorized_keys_file; /* File containing public keys */
124 char *authorized_keys_file2; 133 char *authorized_keys_file2;
125 int use_pam; /* Enable auth via PAM */ 134 int pam_authentication_via_kbd_int;
126} ServerOptions; 135} ServerOptions;
127 136
128void initialize_server_options(ServerOptions *); 137void initialize_server_options(ServerOptions *);
diff --git a/serverloop.c b/serverloop.c
index 6dbb4fd12..050081018 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.110 2003/06/24 08:23:46 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.106 2003/04/01 10:22:21 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -158,7 +158,7 @@ sigchld_handler(int sig)
158static void 158static void
159make_packets_from_stderr_data(void) 159make_packets_from_stderr_data(void)
160{ 160{
161 u_int len; 161 int len;
162 162
163 /* Send buffered stderr data to the client. */ 163 /* Send buffered stderr data to the client. */
164 while (buffer_len(&stderr_buffer) > 0 && 164 while (buffer_len(&stderr_buffer) > 0 &&
@@ -187,7 +187,7 @@ make_packets_from_stderr_data(void)
187static void 187static void
188make_packets_from_stdout_data(void) 188make_packets_from_stdout_data(void)
189{ 189{
190 u_int len; 190 int len;
191 191
192 /* Send buffered stdout data to the client. */ 192 /* Send buffered stdout data to the client. */
193 while (buffer_len(&stdout_buffer) > 0 && 193 while (buffer_len(&stdout_buffer) > 0 &&
@@ -771,14 +771,8 @@ server_loop2(Authctxt *authctxt)
771 &nalloc, 0); 771 &nalloc, 0);
772 772
773 collect_children(); 773 collect_children();
774 if (!rekeying) { 774 if (!rekeying)
775 channel_after_select(readset, writeset); 775 channel_after_select(readset, writeset);
776 if (packet_need_rekeying()) {
777 debug("need rekeying");
778 xxx_kex->done = 0;
779 kex_send_kexinit(xxx_kex);
780 }
781 }
782 process_input(readset); 776 process_input(readset);
783 if (connection_closed) 777 if (connection_closed)
784 break; 778 break;
@@ -880,7 +874,7 @@ server_request_direct_tcpip(char *ctype)
880 return NULL; 874 return NULL;
881 c = channel_new(ctype, SSH_CHANNEL_CONNECTING, 875 c = channel_new(ctype, SSH_CHANNEL_CONNECTING,
882 sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT, 876 sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT,
883 CHAN_TCP_PACKET_DEFAULT, 0, "direct-tcpip", 1); 877 CHAN_TCP_PACKET_DEFAULT, 0, xstrdup("direct-tcpip"), 1);
884 return c; 878 return c;
885} 879}
886 880
@@ -899,7 +893,7 @@ server_request_session(char *ctype)
899 */ 893 */
900 c = channel_new(ctype, SSH_CHANNEL_LARVAL, 894 c = channel_new(ctype, SSH_CHANNEL_LARVAL,
901 -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT, 895 -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT,
902 0, "server-session", 1); 896 0, xstrdup("server-session"), 1);
903 if (session_open(xxx_authctxt, c->self) != 1) { 897 if (session_open(xxx_authctxt, c->self) != 1) {
904 debug("session open failed, free channel %d", c->self); 898 debug("session open failed, free channel %d", c->self);
905 channel_free(c); 899 channel_free(c);
@@ -977,7 +971,7 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
977 pw = auth_get_user(); 971 pw = auth_get_user();
978 if (pw == NULL) 972 if (pw == NULL)
979 fatal("server_input_global_request: no user"); 973 fatal("server_input_global_request: no user");
980 listen_address = packet_get_string(NULL); 974 listen_address = packet_get_string(NULL); /* XXX currently ignored */
981 listen_port = (u_short)packet_get_int(); 975 listen_port = (u_short)packet_get_int();
982 debug("server_input_global_request: tcpip-forward listen %s port %d", 976 debug("server_input_global_request: tcpip-forward listen %s port %d",
983 listen_address, listen_port); 977 listen_address, listen_port);
diff --git a/session.c b/session.c
index 4497f5c0b..ec4a23ac5 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.163 2003/08/31 13:29:05 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.154 2003/03/05 22:33:43 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -58,8 +58,10 @@ RCSID("$OpenBSD: session.c,v 1.163 2003/08/31 13:29:05 markus Exp $");
58#include "session.h" 58#include "session.h"
59#include "monitor_wrap.h" 59#include "monitor_wrap.h"
60 60
61#ifdef GSSAPI 61#ifdef HAVE_CYGWIN
62#include "ssh-gss.h" 62#include <windows.h>
63#include <sys/cygwin.h>
64#define is_winnt (GetVersion() < 0x80000000)
63#endif 65#endif
64 66
65/* func */ 67/* func */
@@ -93,7 +95,6 @@ extern int debug_flag;
93extern u_int utmp_len; 95extern u_int utmp_len;
94extern int startup_pipe; 96extern int startup_pipe;
95extern void destroy_sensitive_data(void); 97extern void destroy_sensitive_data(void);
96extern Buffer loginmsg;
97 98
98/* original command from peer. */ 99/* original command from peer. */
99const char *original_command = NULL; 100const char *original_command = NULL;
@@ -102,6 +103,10 @@ const char *original_command = NULL;
102#define MAX_SESSIONS 10 103#define MAX_SESSIONS 10
103Session sessions[MAX_SESSIONS]; 104Session sessions[MAX_SESSIONS];
104 105
106#ifdef WITH_AIXAUTHENTICATE
107char *aixloginmsg;
108#endif /* WITH_AIXAUTHENTICATE */
109
105#ifdef HAVE_LOGIN_CAP 110#ifdef HAVE_LOGIN_CAP
106login_cap_t *lc; 111login_cap_t *lc;
107#endif 112#endif
@@ -187,7 +192,7 @@ auth_input_request_forwarding(struct passwd * pw)
187 nc = channel_new("auth socket", 192 nc = channel_new("auth socket",
188 SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1, 193 SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1,
189 CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT, 194 CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
190 0, "auth socket", 1); 195 0, xstrdup("auth socket"), 1);
191 strlcpy(nc->path, auth_sock_name, sizeof(nc->path)); 196 strlcpy(nc->path, auth_sock_name, sizeof(nc->path));
192 return 1; 197 return 1;
193} 198}
@@ -220,6 +225,10 @@ do_authenticated(Authctxt *authctxt)
220 /* remove agent socket */ 225 /* remove agent socket */
221 if (auth_sock_name != NULL) 226 if (auth_sock_name != NULL)
222 auth_sock_cleanup_proc(authctxt->pw); 227 auth_sock_cleanup_proc(authctxt->pw);
228#ifdef KRB4
229 if (options.kerberos_ticket_cleanup)
230 krb4_cleanup_proc(authctxt);
231#endif
223#ifdef KRB5 232#ifdef KRB5
224 if (options.kerberos_ticket_cleanup) 233 if (options.kerberos_ticket_cleanup)
225 krb5_cleanup_proc(authctxt); 234 krb5_cleanup_proc(authctxt);
@@ -332,6 +341,58 @@ do_authenticated1(Authctxt *authctxt)
332 success = 1; 341 success = 1;
333 break; 342 break;
334 343
344#if defined(AFS) || defined(KRB5)
345 case SSH_CMSG_HAVE_KERBEROS_TGT:
346 if (!options.kerberos_tgt_passing) {
347 verbose("Kerberos TGT passing disabled.");
348 } else {
349 char *kdata = packet_get_string(&dlen);
350 packet_check_eom();
351
352 /* XXX - 0x41, see creds_to_radix version */
353 if (kdata[0] != 0x41) {
354#ifdef KRB5
355 krb5_data tgt;
356 tgt.data = kdata;
357 tgt.length = dlen;
358
359 if (auth_krb5_tgt(s->authctxt, &tgt))
360 success = 1;
361 else
362 verbose("Kerberos v5 TGT refused for %.100s", s->authctxt->user);
363#endif /* KRB5 */
364 } else {
365#ifdef AFS
366 if (auth_krb4_tgt(s->authctxt, kdata))
367 success = 1;
368 else
369 verbose("Kerberos v4 TGT refused for %.100s", s->authctxt->user);
370#endif /* AFS */
371 }
372 xfree(kdata);
373 }
374 break;
375#endif /* AFS || KRB5 */
376
377#ifdef AFS
378 case SSH_CMSG_HAVE_AFS_TOKEN:
379 if (!options.afs_token_passing || !k_hasafs()) {
380 verbose("AFS token passing disabled.");
381 } else {
382 /* Accept AFS token. */
383 char *token = packet_get_string(&dlen);
384 packet_check_eom();
385
386 if (auth_afs_token(s->authctxt, token))
387 success = 1;
388 else
389 verbose("AFS token refused for %.100s",
390 s->authctxt->user);
391 xfree(token);
392 }
393 break;
394#endif /* AFS */
395
335 case SSH_CMSG_EXEC_SHELL: 396 case SSH_CMSG_EXEC_SHELL:
336 case SSH_CMSG_EXEC_CMD: 397 case SSH_CMSG_EXEC_CMD:
337 if (type == SSH_CMSG_EXEC_CMD) { 398 if (type == SSH_CMSG_EXEC_CMD) {
@@ -351,7 +412,7 @@ do_authenticated1(Authctxt *authctxt)
351 * Any unknown messages in this phase are ignored, 412 * Any unknown messages in this phase are ignored,
352 * and a failure message is returned. 413 * and a failure message is returned.
353 */ 414 */
354 logit("Unknown packet type received after authentication: %d", type); 415 log("Unknown packet type received after authentication: %d", type);
355 } 416 }
356 packet_start(success ? SSH_SMSG_SUCCESS : SSH_SMSG_FAILURE); 417 packet_start(success ? SSH_SMSG_SUCCESS : SSH_SMSG_FAILURE);
357 packet_send(); 418 packet_send();
@@ -395,12 +456,11 @@ do_exec_no_pty(Session *s, const char *command)
395 session_proctitle(s); 456 session_proctitle(s);
396 457
397#if defined(USE_PAM) 458#if defined(USE_PAM)
398 if (options.use_pam) { 459 do_pam_session(s->pw->pw_name, NULL);
399 do_pam_setcred(1); 460 do_pam_setcred(1);
400 if (is_pam_password_change_required()) 461 if (is_pam_password_change_required())
401 packet_disconnect("Password change required but no " 462 packet_disconnect("Password change required but no "
402 "TTY available"); 463 "TTY available");
403 }
404#endif /* USE_PAM */ 464#endif /* USE_PAM */
405 465
406 /* Fork the child. */ 466 /* Fork the child. */
@@ -523,10 +583,8 @@ do_exec_pty(Session *s, const char *command)
523 ttyfd = s->ttyfd; 583 ttyfd = s->ttyfd;
524 584
525#if defined(USE_PAM) 585#if defined(USE_PAM)
526 if (options.use_pam) { 586 do_pam_session(s->pw->pw_name, s->tty);
527 do_pam_set_tty(s->tty); 587 do_pam_setcred(1);
528 do_pam_setcred(1);
529 }
530#endif 588#endif
531 589
532 /* Fork the child. */ 590 /* Fork the child. */
@@ -632,7 +690,7 @@ do_pre_login(Session *s)
632 } 690 }
633 691
634 record_utmp_only(pid, s->tty, s->pw->pw_name, 692 record_utmp_only(pid, s->tty, s->pw->pw_name,
635 get_remote_name_or_ip(utmp_len, options.use_dns), 693 get_remote_name_or_ip(utmp_len, options.verify_reverse_mapping),
636 (struct sockaddr *)&from, fromlen); 694 (struct sockaddr *)&from, fromlen);
637} 695}
638#endif 696#endif
@@ -650,14 +708,6 @@ do_exec(Session *s, const char *command)
650 debug("Forced command '%.900s'", command); 708 debug("Forced command '%.900s'", command);
651 } 709 }
652 710
653#ifdef GSSAPI
654 if (options.gss_authentication) {
655 temporarily_use_uid(s->pw);
656 ssh_gssapi_storecreds();
657 restore_uid();
658 }
659#endif
660
661 if (s->ttyfd != -1) 711 if (s->ttyfd != -1)
662 do_exec_pty(s, command); 712 do_exec_pty(s, command);
663 else 713 else
@@ -695,7 +745,7 @@ do_login(Session *s, const char *command)
695 if (!use_privsep) 745 if (!use_privsep)
696 record_login(pid, s->tty, pw->pw_name, pw->pw_uid, 746 record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
697 get_remote_name_or_ip(utmp_len, 747 get_remote_name_or_ip(utmp_len,
698 options.use_dns), 748 options.verify_reverse_mapping),
699 (struct sockaddr *)&from, fromlen); 749 (struct sockaddr *)&from, fromlen);
700 750
701#ifdef USE_PAM 751#ifdef USE_PAM
@@ -703,10 +753,9 @@ do_login(Session *s, const char *command)
703 * If password change is needed, do it now. 753 * If password change is needed, do it now.
704 * This needs to occur before the ~/.hushlogin check. 754 * This needs to occur before the ~/.hushlogin check.
705 */ 755 */
706 if (options.use_pam && is_pam_password_change_required()) { 756 if (is_pam_password_change_required()) {
707 print_pam_messages(); 757 print_pam_messages();
708 do_pam_chauthtok(); 758 do_pam_chauthtok();
709 /* XXX - signal [net] parent to enable forwardings */
710 } 759 }
711#endif 760#endif
712 761
@@ -714,16 +763,13 @@ do_login(Session *s, const char *command)
714 return; 763 return;
715 764
716#ifdef USE_PAM 765#ifdef USE_PAM
717 if (options.use_pam && !is_pam_password_change_required()) 766 if (!is_pam_password_change_required())
718 print_pam_messages(); 767 print_pam_messages();
719#endif /* USE_PAM */ 768#endif /* USE_PAM */
720 769#ifdef WITH_AIXAUTHENTICATE
721 /* display post-login message */ 770 if (aixloginmsg && *aixloginmsg)
722 if (buffer_len(&loginmsg) > 0) { 771 printf("%s\n", aixloginmsg);
723 buffer_append(&loginmsg, "\0", 1); 772#endif /* WITH_AIXAUTHENTICATE */
724 printf("%s\n", (char *)buffer_ptr(&loginmsg));
725 }
726 buffer_free(&loginmsg);
727 773
728#ifndef NO_SSH_LASTLOG 774#ifndef NO_SSH_LASTLOG
729 if (options.print_lastlog && s->last_login_time != 0) { 775 if (options.print_lastlog && s->last_login_time != 0) {
@@ -794,22 +840,13 @@ check_quietlogin(Session *s, const char *command)
794 * Sets the value of the given variable in the environment. If the variable 840 * Sets the value of the given variable in the environment. If the variable
795 * already exists, its value is overriden. 841 * already exists, its value is overriden.
796 */ 842 */
797void 843static void
798child_set_env(char ***envp, u_int *envsizep, const char *name, 844child_set_env(char ***envp, u_int *envsizep, const char *name,
799 const char *value) 845 const char *value)
800{ 846{
801 u_int i, namelen;
802 char **env; 847 char **env;
803 848 u_int envsize;
804 /* 849 u_int i, namelen;
805 * If we're passed an uninitialized list, allocate a single null
806 * entry before continuing.
807 */
808 if (*envp == NULL && *envsizep == 0) {
809 *envp = xmalloc(sizeof(char *));
810 *envp[0] = NULL;
811 *envsizep = 1;
812 }
813 850
814 /* 851 /*
815 * Find the slot where the value should be stored. If the variable 852 * Find the slot where the value should be stored. If the variable
@@ -826,12 +863,13 @@ child_set_env(char ***envp, u_int *envsizep, const char *name,
826 xfree(env[i]); 863 xfree(env[i]);
827 } else { 864 } else {
828 /* New variable. Expand if necessary. */ 865 /* New variable. Expand if necessary. */
829 if (i >= (*envsizep) - 1) { 866 envsize = *envsizep;
830 if (*envsizep >= 1000) 867 if (i >= envsize - 1) {
831 fatal("child_set_env: too many env vars," 868 if (envsize >= 1000)
832 " skipping: %.100s", name); 869 fatal("child_set_env: too many env vars");
833 (*envsizep) += 50; 870 envsize += 50;
834 env = (*envp) = xrealloc(env, (*envsizep) * sizeof(char *)); 871 env = (*envp) = xrealloc(env, envsize * sizeof(char *));
872 *envsizep = envsize;
835 } 873 }
836 /* Need to set the NULL pointer at end of array beyond the new slot. */ 874 /* Need to set the NULL pointer at end of array beyond the new slot. */
837 env[i + 1] = NULL; 875 env[i + 1] = NULL;
@@ -887,59 +925,6 @@ read_environment_file(char ***env, u_int *envsize,
887 fclose(f); 925 fclose(f);
888} 926}
889 927
890#ifdef HAVE_ETC_DEFAULT_LOGIN
891/*
892 * Return named variable from specified environment, or NULL if not present.
893 */
894static char *
895child_get_env(char **env, const char *name)
896{
897 int i;
898 size_t len;
899
900 len = strlen(name);
901 for (i=0; env[i] != NULL; i++)
902 if (strncmp(name, env[i], len) == 0 && env[i][len] == '=')
903 return(env[i] + len + 1);
904 return NULL;
905}
906
907/*
908 * Read /etc/default/login.
909 * We pick up the PATH (or SUPATH for root) and UMASK.
910 */
911static void
912read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
913{
914 char **tmpenv = NULL, *var;
915 u_int i;
916 size_t tmpenvsize = 0;
917 mode_t mask;
918
919 /*
920 * We don't want to copy the whole file to the child's environment,
921 * so we use a temporary environment and copy the variables we're
922 * interested in.
923 */
924 read_environment_file(&tmpenv, &tmpenvsize, "/etc/default/login");
925
926 if (uid == 0)
927 var = child_get_env(tmpenv, "SUPATH");
928 else
929 var = child_get_env(tmpenv, "PATH");
930 if (var != NULL)
931 child_set_env(env, envsize, "PATH", var);
932
933 if ((var = child_get_env(tmpenv, "UMASK")) != NULL)
934 if (sscanf(var, "%5lo", &mask) == 1)
935 umask(mask);
936
937 for (i = 0; tmpenv[i] != NULL; i++)
938 xfree(tmpenv[i]);
939 xfree(tmpenv);
940}
941#endif /* HAVE_ETC_DEFAULT_LOGIN */
942
943void copy_environment(char **source, char ***env, u_int *envsize) 928void copy_environment(char **source, char ***env, u_int *envsize)
944{ 929{
945 char *var_name, *var_val; 930 char *var_name, *var_val;
@@ -968,7 +953,7 @@ do_setup_env(Session *s, const char *shell)
968{ 953{
969 char buf[256]; 954 char buf[256];
970 u_int i, envsize; 955 u_int i, envsize;
971 char **env, *laddr, *path = NULL; 956 char **env, *laddr;
972 struct passwd *pw = s->pw; 957 struct passwd *pw = s->pw;
973 958
974 /* Initialize the environment. */ 959 /* Initialize the environment. */
@@ -984,13 +969,6 @@ do_setup_env(Session *s, const char *shell)
984 copy_environment(environ, &env, &envsize); 969 copy_environment(environ, &env, &envsize);
985#endif 970#endif
986 971
987#ifdef GSSAPI
988 /* Allow any GSSAPI methods that we've used to alter
989 * the childs environment as they see fit
990 */
991 ssh_gssapi_do_child(&env, &envsize);
992#endif
993
994 if (!options.use_login) { 972 if (!options.use_login) {
995 /* Set basic environment. */ 973 /* Set basic environment. */
996 child_set_env(&env, &envsize, "USER", pw->pw_name); 974 child_set_env(&env, &envsize, "USER", pw->pw_name);
@@ -1012,15 +990,12 @@ do_setup_env(Session *s, const char *shell)
1012 * needed for loading shared libraries. So the path better 990 * needed for loading shared libraries. So the path better
1013 * remains intact here. 991 * remains intact here.
1014 */ 992 */
1015# ifdef HAVE_ETC_DEFAULT_LOGIN 993# ifdef SUPERUSER_PATH
1016 read_etc_default_login(&env, &envsize, pw->pw_uid); 994 child_set_env(&env, &envsize, "PATH",
1017 path = child_get_env(env, "PATH"); 995 s->pw->pw_uid == 0 ? SUPERUSER_PATH : _PATH_STDPATH);
1018# endif /* HAVE_ETC_DEFAULT_LOGIN */ 996# else
1019 if (path == NULL || *path == '\0') { 997 child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
1020 child_set_env(&env, &envsize, "PATH", 998# endif /* SUPERUSER_PATH */
1021 s->pw->pw_uid == 0 ?
1022 SUPERUSER_PATH : _PATH_STDPATH);
1023 }
1024# endif /* HAVE_CYGWIN */ 999# endif /* HAVE_CYGWIN */
1025#endif /* HAVE_LOGIN_CAP */ 1000#endif /* HAVE_LOGIN_CAP */
1026 1001
@@ -1089,6 +1064,11 @@ do_setup_env(Session *s, const char *shell)
1089 read_environment_file(&env, &envsize, "/etc/environment"); 1064 read_environment_file(&env, &envsize, "/etc/environment");
1090 } 1065 }
1091#endif 1066#endif
1067#ifdef KRB4
1068 if (s->authctxt->krb4_ticket_file)
1069 child_set_env(&env, &envsize, "KRBTKFILE",
1070 s->authctxt->krb4_ticket_file);
1071#endif
1092#ifdef KRB5 1072#ifdef KRB5
1093 if (s->authctxt->krb5_ticket_file) 1073 if (s->authctxt->krb5_ticket_file)
1094 child_set_env(&env, &envsize, "KRB5CCNAME", 1074 child_set_env(&env, &envsize, "KRB5CCNAME",
@@ -1099,9 +1079,10 @@ do_setup_env(Session *s, const char *shell)
1099 * Pull in any environment variables that may have 1079 * Pull in any environment variables that may have
1100 * been set by PAM. 1080 * been set by PAM.
1101 */ 1081 */
1102 if (options.use_pam) { 1082 {
1103 char **p = fetch_pam_environment(); 1083 char **p;
1104 1084
1085 p = fetch_pam_environment();
1105 copy_environment(p, &env, &envsize); 1086 copy_environment(p, &env, &envsize);
1106 free_pam_environment(p); 1087 free_pam_environment(p);
1107 } 1088 }
@@ -1213,7 +1194,7 @@ do_nologin(struct passwd *pw)
1213#endif 1194#endif
1214 if (f) { 1195 if (f) {
1215 /* /etc/nologin exists. Print its contents and exit. */ 1196 /* /etc/nologin exists. Print its contents and exit. */
1216 logit("User %.100s not allowed because %s exists", 1197 log("User %.100s not allowed because %s exists",
1217 pw->pw_name, _PATH_NOLOGIN); 1198 pw->pw_name, _PATH_NOLOGIN);
1218 while (fgets(buf, sizeof(buf), f)) 1199 while (fgets(buf, sizeof(buf), f))
1219 fputs(buf, stderr); 1200 fputs(buf, stderr);
@@ -1233,8 +1214,7 @@ do_setusercontext(struct passwd *pw)
1233 { 1214 {
1234 1215
1235#ifdef HAVE_SETPCRED 1216#ifdef HAVE_SETPCRED
1236 if (setpcred(pw->pw_name, (char **)NULL) == -1) 1217 setpcred(pw->pw_name);
1237 fatal("Failed to set process credentials");
1238#endif /* HAVE_SETPCRED */ 1218#endif /* HAVE_SETPCRED */
1239#ifdef HAVE_LOGIN_CAP 1219#ifdef HAVE_LOGIN_CAP
1240# ifdef __bsdi__ 1220# ifdef __bsdi__
@@ -1270,10 +1250,7 @@ do_setusercontext(struct passwd *pw)
1270 * These will have been wiped by the above initgroups() call. 1250 * These will have been wiped by the above initgroups() call.
1271 * Reestablish them here. 1251 * Reestablish them here.
1272 */ 1252 */
1273 if (options.use_pam) { 1253 do_pam_setcred(0);
1274 do_pam_session();
1275 do_pam_setcred(0);
1276 }
1277# endif /* USE_PAM */ 1254# endif /* USE_PAM */
1278# if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY) 1255# if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
1279 irix_setusercontext(pw); 1256 irix_setusercontext(pw);
@@ -1374,7 +1351,7 @@ do_child(Session *s, const char *command)
1374 /* we have to stash the hostname before we close our socket. */ 1351 /* we have to stash the hostname before we close our socket. */
1375 if (options.use_login) 1352 if (options.use_login)
1376 hostname = get_remote_name_or_ip(utmp_len, 1353 hostname = get_remote_name_or_ip(utmp_len,
1377 options.use_dns); 1354 options.verify_reverse_mapping);
1378 /* 1355 /*
1379 * Close the connection descriptors; note that this is the child, and 1356 * Close the connection descriptors; note that this is the child, and
1380 * the server will still have the socket open, and it is important 1357 * the server will still have the socket open, and it is important
@@ -1416,6 +1393,18 @@ do_child(Session *s, const char *command)
1416 */ 1393 */
1417 environ = env; 1394 environ = env;
1418 1395
1396#ifdef AFS
1397 /* Try to get AFS tokens for the local cell. */
1398 if (k_hasafs()) {
1399 char cell[64];
1400
1401 if (k_afs_cell_of_file(pw->pw_dir, cell, sizeof(cell)) == 0)
1402 krb_afslog(cell, 0);
1403
1404 krb_afslog(0, 0);
1405 }
1406#endif /* AFS */
1407
1419 /* Change current directory to the user\'s home directory. */ 1408 /* Change current directory to the user\'s home directory. */
1420 if (chdir(pw->pw_dir) < 0) { 1409 if (chdir(pw->pw_dir) < 0) {
1421 fprintf(stderr, "Could not chdir to home directory %s: %s\n", 1410 fprintf(stderr, "Could not chdir to home directory %s: %s\n",
@@ -1685,7 +1674,7 @@ session_subsystem_req(Session *s)
1685 int i; 1674 int i;
1686 1675
1687 packet_check_eom(); 1676 packet_check_eom();
1688 logit("subsystem request for %.100s", subsys); 1677 log("subsystem request for %.100s", subsys);
1689 1678
1690 for (i = 0; i < options.num_subsystems; i++) { 1679 for (i = 0; i < options.num_subsystems; i++) {
1691 if (strcmp(subsys, options.subsystem_name[i]) == 0) { 1680 if (strcmp(subsys, options.subsystem_name[i]) == 0) {
@@ -1704,7 +1693,7 @@ session_subsystem_req(Session *s)
1704 } 1693 }
1705 1694
1706 if (!success) 1695 if (!success)
1707 logit("subsystem request for %.100s failed, subsystem not found", 1696 log("subsystem request for %.100s failed, subsystem not found",
1708 subsys); 1697 subsys);
1709 1698
1710 xfree(subsys); 1699 xfree(subsys);
@@ -1752,20 +1741,6 @@ session_exec_req(Session *s)
1752} 1741}
1753 1742
1754static int 1743static int
1755session_break_req(Session *s)
1756{
1757 u_int break_length;
1758
1759 break_length = packet_get_int(); /* ignored */
1760 packet_check_eom();
1761
1762 if (s->ttyfd == -1 ||
1763 tcsendbreak(s->ttyfd, 0) < 0)
1764 return 0;
1765 return 1;
1766}
1767
1768static int
1769session_auth_agent_req(Session *s) 1744session_auth_agent_req(Session *s)
1770{ 1745{
1771 static int called = 0; 1746 static int called = 0;
@@ -1789,7 +1764,7 @@ session_input_channel_req(Channel *c, const char *rtype)
1789 Session *s; 1764 Session *s;
1790 1765
1791 if ((s = session_by_channel(c->self)) == NULL) { 1766 if ((s = session_by_channel(c->self)) == NULL) {
1792 logit("session_input_channel_req: no session %d req %.100s", 1767 log("session_input_channel_req: no session %d req %.100s",
1793 c->self, rtype); 1768 c->self, rtype);
1794 return 0; 1769 return 0;
1795 } 1770 }
@@ -1812,8 +1787,6 @@ session_input_channel_req(Channel *c, const char *rtype)
1812 success = session_auth_agent_req(s); 1787 success = session_auth_agent_req(s);
1813 } else if (strcmp(rtype, "subsystem") == 0) { 1788 } else if (strcmp(rtype, "subsystem") == 0) {
1814 success = session_subsystem_req(s); 1789 success = session_subsystem_req(s);
1815 } else if (strcmp(rtype, "break") == 0) {
1816 success = session_break_req(s);
1817 } 1790 }
1818 } 1791 }
1819 if (strcmp(rtype, "window-change") == 0) { 1792 if (strcmp(rtype, "window-change") == 0) {
@@ -2150,8 +2123,4 @@ static void
2150do_authenticated2(Authctxt *authctxt) 2123do_authenticated2(Authctxt *authctxt)
2151{ 2124{
2152 server_loop2(authctxt); 2125 server_loop2(authctxt);
2153#if defined(GSSAPI)
2154 if (options.gss_cleanup_creds)
2155 ssh_gssapi_cleanup_creds(NULL);
2156#endif
2157} 2126}
diff --git a/session.h b/session.h
index 525e47f64..d3ddfab75 100644
--- a/session.h
+++ b/session.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.h,v 1.20 2003/08/22 10:56:09 markus Exp $ */ 1/* $OpenBSD: session.h,v 1.19 2002/06/30 21:59:45 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -68,7 +68,4 @@ Session *session_new(void);
68Session *session_by_tty(char *); 68Session *session_by_tty(char *);
69void session_close(Session *); 69void session_close(Session *);
70void do_setusercontext(struct passwd *); 70void do_setusercontext(struct passwd *);
71void child_set_env(char ***envp, u_int *envsizep, const char *name,
72 const char *value);
73
74#endif 71#endif
diff --git a/sftp-client.c b/sftp-client.c
index ffff0fe5a..3b3279e65 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -28,7 +28,7 @@
28/* XXX: copy between two remote sites */ 28/* XXX: copy between two remote sites */
29 29
30#include "includes.h" 30#include "includes.h"
31RCSID("$OpenBSD: sftp-client.c,v 1.44 2003/06/28 16:23:06 deraadt Exp $"); 31RCSID("$OpenBSD: sftp-client.c,v 1.42 2003/03/05 22:33:43 markus Exp $");
32 32
33#include "openbsd-compat/sys-queue.h" 33#include "openbsd-compat/sys-queue.h"
34 34
@@ -71,10 +71,10 @@ send_msg(int fd, Buffer *m)
71 71
72 /* Send length first */ 72 /* Send length first */
73 PUT_32BIT(mlen, buffer_len(m)); 73 PUT_32BIT(mlen, buffer_len(m));
74 if (atomicio(vwrite, fd, mlen, sizeof(mlen)) <= 0) 74 if (atomicio(write, fd, mlen, sizeof(mlen)) <= 0)
75 fatal("Couldn't send packet: %s", strerror(errno)); 75 fatal("Couldn't send packet: %s", strerror(errno));
76 76
77 if (atomicio(vwrite, fd, buffer_ptr(m), buffer_len(m)) <= 0) 77 if (atomicio(write, fd, buffer_ptr(m), buffer_len(m)) <= 0)
78 fatal("Couldn't send packet: %s", strerror(errno)); 78 fatal("Couldn't send packet: %s", strerror(errno));
79 79
80 buffer_clear(m); 80 buffer_clear(m);
@@ -507,7 +507,7 @@ do_lstat(struct sftp_conn *conn, char *path, int quiet)
507 if (quiet) 507 if (quiet)
508 debug("Server version does not support lstat operation"); 508 debug("Server version does not support lstat operation");
509 else 509 else
510 logit("Server version does not support lstat operation"); 510 log("Server version does not support lstat operation");
511 return(do_stat(conn, path, quiet)); 511 return(do_stat(conn, path, quiet));
512 } 512 }
513 513
@@ -875,7 +875,7 @@ do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
875 fatal("Received more data than asked for " 875 fatal("Received more data than asked for "
876 "%u > %u", len, req->len); 876 "%u > %u", len, req->len);
877 if ((lseek(local_fd, req->offset, SEEK_SET) == -1 || 877 if ((lseek(local_fd, req->offset, SEEK_SET) == -1 ||
878 atomicio(vwrite, local_fd, data, len) != len) && 878 atomicio(write, local_fd, data, len) != len) &&
879 !write_error) { 879 !write_error) {
880 write_errno = errno; 880 write_errno = errno;
881 write_error = 1; 881 write_error = 1;
diff --git a/sftp-common.c b/sftp-common.c
index 5313b134d..31d41385b 100644
--- a/sftp-common.c
+++ b/sftp-common.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: sftp-common.c,v 1.9 2003/05/24 09:30:40 djm Exp $"); 27RCSID("$OpenBSD: sftp-common.c,v 1.8 2002/10/16 14:31:48 itojun Exp $");
28 28
29#include "buffer.h" 29#include "buffer.h"
30#include "bufaux.h" 30#include "bufaux.h"
@@ -206,8 +206,8 @@ ls_file(char *name, struct stat *st, int remote)
206 tbuf[0] = '\0'; 206 tbuf[0] = '\0';
207 ulen = MAX(strlen(user), 8); 207 ulen = MAX(strlen(user), 8);
208 glen = MAX(strlen(group), 8); 208 glen = MAX(strlen(group), 8);
209 snprintf(buf, sizeof buf, "%s %3u %-*s %-*s %8llu %s %s", mode, 209 snprintf(buf, sizeof buf, "%s %3d %-*s %-*s %8llu %s %s", mode,
210 (u_int)st->st_nlink, ulen, user, glen, group, 210 st->st_nlink, ulen, user, glen, group,
211 (unsigned long long)st->st_size, tbuf, name); 211 (unsigned long long)st->st_size, tbuf, name);
212 return xstrdup(buf); 212 return xstrdup(buf);
213} 213}
diff --git a/sftp-int.c b/sftp-int.c
index 94299aa43..6987de9a3 100644
--- a/sftp-int.c
+++ b/sftp-int.c
@@ -25,7 +25,7 @@
25/* XXX: recursive operations */ 25/* XXX: recursive operations */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: sftp-int.c,v 1.62 2003/08/25 08:13:09 fgsch Exp $"); 28RCSID("$OpenBSD: sftp-int.c,v 1.57 2003/03/05 22:33:43 markus Exp $");
29 29
30#include "buffer.h" 30#include "buffer.h"
31#include "xmalloc.h" 31#include "xmalloc.h"
@@ -53,10 +53,6 @@ int showprogress = 1;
53/* Seperators for interactive commands */ 53/* Seperators for interactive commands */
54#define WHITESPACE " \t\r\n" 54#define WHITESPACE " \t\r\n"
55 55
56/* Define what type of ls view (0 - multi-column) */
57#define LONG_VIEW 1 /* Full view ala ls -l */
58#define SHORT_VIEW 2 /* Single row view ala ls -1 */
59
60/* Commands for interactive mode */ 56/* Commands for interactive mode */
61#define I_CHDIR 1 57#define I_CHDIR 1
62#define I_CHGRP 2 58#define I_CHGRP 2
@@ -311,10 +307,7 @@ parse_ls_flags(const char **cpp, int *lflag)
311 for(; strchr(WHITESPACE, *cp) == NULL; cp++) { 307 for(; strchr(WHITESPACE, *cp) == NULL; cp++) {
312 switch (*cp) { 308 switch (*cp) {
313 case 'l': 309 case 'l':
314 *lflag = LONG_VIEW; 310 *lflag = 1;
315 break;
316 case '1':
317 *lflag = SHORT_VIEW;
318 break; 311 break;
319 default: 312 default:
320 error("Invalid flag -%c", *cp); 313 error("Invalid flag -%c", *cp);
@@ -332,7 +325,7 @@ get_pathname(const char **cpp, char **path)
332{ 325{
333 const char *cp = *cpp, *end; 326 const char *cp = *cpp, *end;
334 char quot; 327 char quot;
335 int i, j; 328 int i;
336 329
337 cp += strspn(cp, WHITESPACE); 330 cp += strspn(cp, WHITESPACE);
338 if (!*cp) { 331 if (!*cp) {
@@ -341,54 +334,37 @@ get_pathname(const char **cpp, char **path)
341 return (0); 334 return (0);
342 } 335 }
343 336
344 *path = xmalloc(strlen(cp) + 1);
345
346 /* Check for quoted filenames */ 337 /* Check for quoted filenames */
347 if (*cp == '\"' || *cp == '\'') { 338 if (*cp == '\"' || *cp == '\'') {
348 quot = *cp++; 339 quot = *cp++;
349 340
350 /* Search for terminating quote, unescape some chars */ 341 end = strchr(cp, quot);
351 for (i = j = 0; i <= strlen(cp); i++) { 342 if (end == NULL) {
352 if (cp[i] == quot) { /* Found quote */ 343 error("Unterminated quote");
353 (*path)[j] = '\0'; 344 goto fail;
354 break;
355 }
356 if (cp[i] == '\0') { /* End of string */
357 error("Unterminated quote");
358 goto fail;
359 }
360 if (cp[i] == '\\') { /* Escaped characters */
361 i++;
362 if (cp[i] != '\'' && cp[i] != '\"' &&
363 cp[i] != '\\') {
364 error("Bad escaped character '\%c'",
365 cp[i]);
366 goto fail;
367 }
368 }
369 (*path)[j++] = cp[i];
370 } 345 }
371 346 if (cp == end) {
372 if (j == 0) {
373 error("Empty quotes"); 347 error("Empty quotes");
374 goto fail; 348 goto fail;
375 } 349 }
376 *cpp = cp + i + strspn(cp + i, WHITESPACE); 350 *cpp = end + 1 + strspn(end + 1, WHITESPACE);
377 } else { 351 } else {
378 /* Read to end of filename */ 352 /* Read to end of filename */
379 end = strpbrk(cp, WHITESPACE); 353 end = strpbrk(cp, WHITESPACE);
380 if (end == NULL) 354 if (end == NULL)
381 end = strchr(cp, '\0'); 355 end = strchr(cp, '\0');
382 *cpp = end + strspn(end, WHITESPACE); 356 *cpp = end + strspn(end, WHITESPACE);
383
384 memcpy(*path, cp, end - cp);
385 (*path)[end - cp] = '\0';
386 } 357 }
387 return (0); 358
359 i = end - cp;
360
361 *path = xmalloc(i + 1);
362 memcpy(*path, cp, i);
363 (*path)[i] = '\0';
364 return(0);
388 365
389 fail: 366 fail:
390 xfree(*path); 367 *path = NULL;
391 *path = NULL;
392 return (-1); 368 return (-1);
393} 369}
394 370
@@ -449,8 +425,29 @@ process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
449 goto out; 425 goto out;
450 } 426 }
451 427
452 /* If multiple matches, dst must be a directory or unspecified */ 428 /* Only one match, dst may be file, directory or unspecified */
453 if (g.gl_matchc > 1 && dst && !is_dir(dst)) { 429 if (g.gl_pathv[0] && g.gl_matchc == 1) {
430 if (dst) {
431 /* If directory specified, append filename */
432 if (is_dir(dst)) {
433 if (infer_path(g.gl_pathv[0], &tmp)) {
434 err = 1;
435 goto out;
436 }
437 abs_dst = path_append(dst, tmp);
438 xfree(tmp);
439 } else
440 abs_dst = xstrdup(dst);
441 } else if (infer_path(g.gl_pathv[0], &abs_dst)) {
442 err = -1;
443 goto out;
444 }
445 err = do_download(conn, g.gl_pathv[0], abs_dst, pflag);
446 goto out;
447 }
448
449 /* Multiple matches, dst may be directory or unspecified */
450 if (dst && !is_dir(dst)) {
454 error("Multiple files match, but \"%s\" is not a directory", 451 error("Multiple files match, but \"%s\" is not a directory",
455 dst); 452 dst);
456 err = -1; 453 err = -1;
@@ -462,19 +459,7 @@ process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
462 err = -1; 459 err = -1;
463 goto out; 460 goto out;
464 } 461 }
465 462 if (dst) {
466 if (g.gl_matchc == 1 && dst) {
467 /* If directory specified, append filename */
468 if (is_dir(dst)) {
469 if (infer_path(g.gl_pathv[0], &tmp)) {
470 err = 1;
471 goto out;
472 }
473 abs_dst = path_append(dst, tmp);
474 xfree(tmp);
475 } else
476 abs_dst = xstrdup(dst);
477 } else if (dst) {
478 abs_dst = path_append(dst, tmp); 463 abs_dst = path_append(dst, tmp);
479 xfree(tmp); 464 xfree(tmp);
480 } else 465 } else
@@ -518,8 +503,38 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
518 goto out; 503 goto out;
519 } 504 }
520 505
521 /* If multiple matches, dst may be directory or unspecified */ 506 /* Only one match, dst may be file, directory or unspecified */
522 if (g.gl_matchc > 1 && tmp_dst && !remote_is_dir(conn, tmp_dst)) { 507 if (g.gl_pathv[0] && g.gl_matchc == 1) {
508 if (!is_reg(g.gl_pathv[0])) {
509 error("Can't upload %s: not a regular file",
510 g.gl_pathv[0]);
511 err = 1;
512 goto out;
513 }
514 if (tmp_dst) {
515 /* If directory specified, append filename */
516 if (remote_is_dir(conn, tmp_dst)) {
517 if (infer_path(g.gl_pathv[0], &tmp)) {
518 err = 1;
519 goto out;
520 }
521 abs_dst = path_append(tmp_dst, tmp);
522 xfree(tmp);
523 } else
524 abs_dst = xstrdup(tmp_dst);
525 } else {
526 if (infer_path(g.gl_pathv[0], &abs_dst)) {
527 err = -1;
528 goto out;
529 }
530 abs_dst = make_absolute(abs_dst, pwd);
531 }
532 err = do_upload(conn, g.gl_pathv[0], abs_dst, pflag);
533 goto out;
534 }
535
536 /* Multiple matches, dst may be directory or unspecified */
537 if (tmp_dst && !remote_is_dir(conn, tmp_dst)) {
523 error("Multiple files match, but \"%s\" is not a directory", 538 error("Multiple files match, but \"%s\" is not a directory",
524 tmp_dst); 539 tmp_dst);
525 err = -1; 540 err = -1;
@@ -536,20 +551,7 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
536 err = -1; 551 err = -1;
537 goto out; 552 goto out;
538 } 553 }
539 554 if (tmp_dst) {
540 if (g.gl_matchc == 1 && tmp_dst) {
541 /* If directory specified, append filename */
542 if (remote_is_dir(conn, tmp_dst)) {
543 if (infer_path(g.gl_pathv[0], &tmp)) {
544 err = 1;
545 goto out;
546 }
547 abs_dst = path_append(tmp_dst, tmp);
548 xfree(tmp);
549 } else
550 abs_dst = xstrdup(tmp_dst);
551
552 } else if (tmp_dst) {
553 abs_dst = path_append(tmp_dst, tmp); 555 abs_dst = path_append(tmp_dst, tmp);
554 xfree(tmp); 556 xfree(tmp);
555 } else 557 } else
@@ -565,7 +567,6 @@ out:
565 xfree(abs_dst); 567 xfree(abs_dst);
566 if (tmp_dst) 568 if (tmp_dst)
567 xfree(tmp_dst); 569 xfree(tmp_dst);
568 globfree(&g);
569 return(err); 570 return(err);
570} 571}
571 572
@@ -582,27 +583,15 @@ sdirent_comp(const void *aa, const void *bb)
582static int 583static int
583do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag) 584do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
584{ 585{
585 int n, c = 1, colspace = 0, columns = 1; 586 int n;
586 SFTP_DIRENT **d; 587 SFTP_DIRENT **d;
587 588
588 if ((n = do_readdir(conn, path, &d)) != 0) 589 if ((n = do_readdir(conn, path, &d)) != 0)
589 return (n); 590 return (n);
590 591
591 if (!(lflag & SHORT_VIEW)) { 592 /* Count entries for sort */
592 int m = 0, width = 80; 593 for (n = 0; d[n] != NULL; n++)
593 struct winsize ws; 594 ;
594
595 /* Count entries for sort and find longest filename */
596 for (n = 0; d[n] != NULL; n++)
597 m = MAX(m, strlen(d[n]->filename));
598
599 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)
600 width = ws.ws_col;
601
602 columns = width / (m + 2);
603 columns = MAX(columns, 1);
604 colspace = width / columns;
605 }
606 595
607 qsort(d, n, sizeof(*d), sdirent_comp); 596 qsort(d, n, sizeof(*d), sdirent_comp);
608 597
@@ -613,7 +602,7 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
613 fname = path_strip(tmp, strip_path); 602 fname = path_strip(tmp, strip_path);
614 xfree(tmp); 603 xfree(tmp);
615 604
616 if (lflag & LONG_VIEW) { 605 if (lflag) {
617 char *lname; 606 char *lname;
618 struct stat sb; 607 struct stat sb;
619 608
@@ -623,20 +612,13 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag)
623 printf("%s\n", lname); 612 printf("%s\n", lname);
624 xfree(lname); 613 xfree(lname);
625 } else { 614 } else {
626 printf("%-*s", colspace, fname); 615 /* XXX - multicolumn display would be nice here */
627 if (c >= columns) { 616 printf("%s\n", fname);
628 printf("\n");
629 c = 1;
630 } else
631 c++;
632 } 617 }
633 618
634 xfree(fname); 619 xfree(fname);
635 } 620 }
636 621
637 if (!(lflag & LONG_VIEW) && (c != 1))
638 printf("\n");
639
640 free_sftp_dirents(d); 622 free_sftp_dirents(d);
641 return (0); 623 return (0);
642} 624}
@@ -647,8 +629,9 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
647 int lflag) 629 int lflag)
648{ 630{
649 glob_t g; 631 glob_t g;
650 int i, c = 1, colspace = 0, columns = 1; 632 int i;
651 Attrib *a; 633 Attrib *a;
634 struct stat sb;
652 635
653 memset(&g, 0, sizeof(g)); 636 memset(&g, 0, sizeof(g));
654 637
@@ -675,31 +658,12 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
675 } 658 }
676 } 659 }
677 660
678 if (!(lflag & SHORT_VIEW)) {
679 int m = 0, width = 80;
680 struct winsize ws;
681
682 /* Count entries for sort and find longest filename */
683 for (i = 0; g.gl_pathv[i]; i++)
684 m = MAX(m, strlen(g.gl_pathv[i]));
685
686 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)
687 width = ws.ws_col;
688
689 columns = width / (m + 2);
690 columns = MAX(columns, 1);
691 colspace = width / columns;
692 }
693
694 for (i = 0; g.gl_pathv[i]; i++) { 661 for (i = 0; g.gl_pathv[i]; i++) {
695 char *fname; 662 char *fname, *lname;
696 663
697 fname = path_strip(g.gl_pathv[i], strip_path); 664 fname = path_strip(g.gl_pathv[i], strip_path);
698 665
699 if (lflag & LONG_VIEW) { 666 if (lflag) {
700 char *lname;
701 struct stat sb;
702
703 /* 667 /*
704 * XXX: this is slow - 1 roundtrip per path 668 * XXX: this is slow - 1 roundtrip per path
705 * A solution to this is to fork glob() and 669 * A solution to this is to fork glob() and
@@ -715,19 +679,12 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
715 printf("%s\n", lname); 679 printf("%s\n", lname);
716 xfree(lname); 680 xfree(lname);
717 } else { 681 } else {
718 printf("%-*s", colspace, fname); 682 /* XXX - multicolumn display would be nice here */
719 if (c >= columns) { 683 printf("%s\n", fname);
720 printf("\n");
721 c = 1;
722 } else
723 c++;
724 } 684 }
725 xfree(fname); 685 xfree(fname);
726 } 686 }
727 687
728 if (!(lflag & LONG_VIEW) && (c != 1))
729 printf("\n");
730
731 if (g.gl_pathc) 688 if (g.gl_pathc)
732 globfree(&g); 689 globfree(&g);
733 690
diff --git a/sftp-server.0 b/sftp-server.0
index fc57814f5..37dcb5beb 100644
--- a/sftp-server.0
+++ b/sftp-server.0
@@ -19,7 +19,7 @@ SEE ALSO
19 filexfer-00.txt, January 2001, work in progress material. 19 filexfer-00.txt, January 2001, work in progress material.
20 20
21AUTHORS 21AUTHORS
22 Markus Friedl M-bM-^LM-)markus@openbsd.orgM-bM-^LM-* 22 Markus Friedl <markus@openbsd.org>
23 23
24HISTORY 24HISTORY
25 sftp-server first appeared in OpenBSD 2.8 . 25 sftp-server first appeared in OpenBSD 2.8 .
diff --git a/sftp-server.8 b/sftp-server.8
index 871f83796..0a0210a34 100644
--- a/sftp-server.8
+++ b/sftp-server.8
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp-server.8,v 1.9 2003/06/10 09:12:11 jmc Exp $ 1.\" $OpenBSD: sftp-server.8,v 1.8 2001/06/23 05:57:08 deraadt Exp $
2.\" 2.\"
3.\" Copyright (c) 2000 Markus Friedl. All rights reserved. 3.\" Copyright (c) 2000 Markus Friedl. All rights reserved.
4.\" 4.\"
@@ -56,7 +56,7 @@ for more information.
56.%O work in progress material 56.%O work in progress material
57.Re 57.Re
58.Sh AUTHORS 58.Sh AUTHORS
59.An Markus Friedl Aq markus@openbsd.org 59Markus Friedl <markus@openbsd.org>
60.Sh HISTORY 60.Sh HISTORY
61.Nm 61.Nm
62first appeared in OpenBSD 2.8 . 62first appeared in OpenBSD 2.8 .
diff --git a/sftp-server.c b/sftp-server.c
index 9166853ed..9a66b4de7 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: sftp-server.c,v 1.43 2003/06/25 22:39:36 miod Exp $"); 25RCSID("$OpenBSD: sftp-server.c,v 1.41 2003/03/26 04:02:51 deraadt Exp $");
26 26
27#include "buffer.h" 27#include "buffer.h"
28#include "bufaux.h" 28#include "bufaux.h"
@@ -52,7 +52,7 @@ Buffer oqueue;
52/* Version of client */ 52/* Version of client */
53int version; 53int version;
54 54
55/* portable attributes, etc. */ 55/* portable attibutes, etc. */
56 56
57typedef struct Stat Stat; 57typedef struct Stat Stat;
58 58
@@ -442,7 +442,7 @@ process_read(void)
442 (u_int64_t)off, len); 442 (u_int64_t)off, len);
443 if (len > sizeof buf) { 443 if (len > sizeof buf) {
444 len = sizeof buf; 444 len = sizeof buf;
445 logit("read change len %d", len); 445 log("read change len %d", len);
446 } 446 }
447 fd = handle_to_fd(handle); 447 fd = handle_to_fd(handle);
448 if (fd >= 0) { 448 if (fd >= 0) {
@@ -495,7 +495,7 @@ process_write(void)
495 } else if (ret == len) { 495 } else if (ret == len) {
496 status = SSH2_FX_OK; 496 status = SSH2_FX_OK;
497 } else { 497 } else {
498 logit("nothing at all written"); 498 log("nothing at all written");
499 } 499 }
500 } 500 }
501 } 501 }
@@ -1030,7 +1030,7 @@ main(int ac, char **av)
1030 1030
1031 /* XXX should use getopt */ 1031 /* XXX should use getopt */
1032 1032
1033 __progname = ssh_get_progname(av[0]); 1033 __progname = get_progname(av[0]);
1034 handle_init(); 1034 handle_init();
1035 1035
1036#ifdef DEBUG_SFTP_SERVER 1036#ifdef DEBUG_SFTP_SERVER
diff --git a/sftp.0 b/sftp.0
index b72ea4700..479751215 100644
--- a/sftp.0
+++ b/sftp.0
@@ -1,7 +1,7 @@
1SFTP(1) BSD General Commands Manual SFTP(1) 1SFTP(1) BSD General Commands Manual SFTP(1)
2 2
3NAME 3NAME
4 sftp - secure file transfer program 4 sftp - Secure file transfer program
5 5
6SYNOPSIS 6SYNOPSIS
7 sftp [-vC1] [-b batchfile] [-o ssh_option] [-s subsystem | sftp_server] 7 sftp [-vC1] [-b batchfile] [-o ssh_option] [-s subsystem | sftp_server]
@@ -9,7 +9,6 @@ SYNOPSIS
9 [-R num_requests] [-S program] host 9 [-R num_requests] [-S program] host
10 sftp [[user@]host[:file [file]]] 10 sftp [[user@]host[:file [file]]]
11 sftp [[user@]host[:dir[/]]] 11 sftp [[user@]host[:dir[/]]]
12 sftp -b batchfile [user@]host
13 12
14DESCRIPTION 13DESCRIPTION
15 sftp is an interactive file transfer program, similar to ftp(1), which 14 sftp is an interactive file transfer program, similar to ftp(1), which
@@ -22,13 +21,10 @@ DESCRIPTION
22 active authentication method is used; otherwise it will do so after suc- 21 active authentication method is used; otherwise it will do so after suc-
23 cessful interactive authentication. 22 cessful interactive authentication.
24 23
25 The third usage format allows the sftp client to start in a remote direc- 24 The last usage format allows the sftp client to start in a remote direc-
26 tory. 25 tory.
27 26
28 The final usage format allows for automated sessions using the -b option. 27 The options are as follows:
29 In such cases, it is usually necessary to configure public key authenti-
30 cation to obviate the need to enter a password at connection time (see
31 sshd(8) and ssh-keygen(1) for details). The options are as follows:
32 28
33 -b batchfile 29 -b batchfile
34 Batch mode reads a series of commands from an input batchfile 30 Batch mode reads a series of commands from an input batchfile
@@ -37,42 +33,42 @@ DESCRIPTION
37 will abort if any of the following commands fail: get, put, 33 will abort if any of the following commands fail: get, put,
38 rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp, 34 rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp,
39 lpwd and lmkdir. Termination on error can be suppressed on a 35 lpwd and lmkdir. Termination on error can be suppressed on a
40 command by command basis by prefixing the command with a M-bM-^@M-^X-M-bM-^@M-^Y 36 command by command basis by prefixing the command with a M-bM-^@M-^M-bM-^@M-^Y-M-bM-^@M-^M-bM-^@M-^Y
41 character (for example, -rm /tmp/blah*). 37 character (For example, -rm /tmp/blah* ).
42 38
43 -o ssh_option 39 -o ssh_option
44 Can be used to pass options to ssh in the format used in 40 Can be used to pass options to ssh in the format used in
45 ssh_config(5). This is useful for specifying options for which 41 ssh_config(5). This is useful for specifying options for which
46 there is no separate sftp command-line flag. For example, to 42 there is no separate sftp command-line flag. For example, to
47 specify an alternate port use: sftp -oPort=24. 43 specify an alternate port use: sftp -oPort=24.
48 44
49 -s subsystem | sftp_server 45 -s subsystem | sftp_server
50 Specifies the SSH2 subsystem or the path for an sftp server on 46 Specifies the SSH2 subsystem or the path for an sftp server on
51 the remote host. A path is useful for using sftp over protocol 47 the remote host. A path is useful for using sftp over protocol
52 version 1, or when the remote sshd(8) does not have an sftp sub- 48 version 1, or when the remote sshd does not have an sftp subsys-
53 system configured. 49 tem configured.
54 50
55 -v Raise logging level. This option is also passed to ssh. 51 -v Raise logging level. This option is also passed to ssh.
56 52
57 -B buffer_size 53 -B buffer_size
58 Specify the size of the buffer that sftp uses when transferring 54 Specify the size of the buffer that sftp uses when transferring
59 files. Larger buffers require fewer round trips at the cost of 55 files. Larger buffers require fewer round trips at the cost of
60 higher memory consumption. The default is 32768 bytes. 56 higher memory consumption. The default is 32768 bytes.
61 57
62 -C Enables compression (via sshM-bM-^@M-^Ys -C flag). 58 -C Enables compression (via sshM-bM-^@M-^Ys -C flag).
63 59
64 -F ssh_config 60 -F ssh_config
65 Specifies an alternative per-user configuration file for ssh(1). 61 Specifies an alternative per-user configuration file for ssh.
66 This option is directly passed to ssh(1). 62 This option is directly passed to ssh(1).
67 63
68 -P sftp_server path 64 -P sftp_server path
69 Connect directly to a local sftp server (rather than via ssh(1)) 65 Connect directly to a local sftp-server (rather than via ssh)
70 This option may be useful in debugging the client and server. 66 This option may be useful in debugging the client and server.
71 67
72 -R num_requests 68 -R num_requests
73 Specify how many requests may be outstanding at any one time. 69 Specify how many requests may be outstanding at any one time.
74 Increasing this may slightly improve file transfer speed but will 70 Increasing this may slightly improve file transfer speed but will
75 increase memory usage. The default is 16 outstanding requests. 71 increase memory usage. The default is 16 outstanding requests.
76 72
77 -S program 73 -S program
78 Name of the program to use for the encrypted connection. The 74 Name of the program to use for the encrypted connection. The
@@ -107,7 +103,7 @@ INTERACTIVE COMMANDS
107 get [flags] remote-path [local-path] 103 get [flags] remote-path [local-path]
108 Retrieve the remote-path and store it on the local machine. If 104 Retrieve the remote-path and store it on the local machine. If
109 the local path name is not specified, it is given the same name 105 the local path name is not specified, it is given the same name
110 it has on the remote machine. If the -P flag is specified, then 106 it has on the remote machine. If the -P flag is specified, then
111 the fileM-bM-^@M-^Ys full permission and access time are copied too. 107 the fileM-bM-^@M-^Ys full permission and access time are copied too.
112 108
113 help Display help text. 109 help Display help text.
@@ -126,7 +122,7 @@ INTERACTIVE COMMANDS
126 122
127 ls [flags] [path] 123 ls [flags] [path]
128 Display remote directory listing of either path or current direc- 124 Display remote directory listing of either path or current direc-
129 tory if path is not specified. If the -l flag is specified, then 125 tory if path is not specified. If the -l flag is specified, then
130 display additional details including permissions and ownership 126 display additional details including permissions and ownership
131 information. 127 information.
132 128
@@ -140,9 +136,9 @@ INTERACTIVE COMMANDS
140 Toggle display of progress meter. 136 Toggle display of progress meter.
141 137
142 put [flags] local-path [remote-path] 138 put [flags] local-path [remote-path]
143 Upload local-path and store it on the remote machine. If the 139 Upload local-path and store it on the remote machine. If the
144 remote path name is not specified, it is given the same name it 140 remote path name is not specified, it is given the same name it
145 has on the local machine. If the -P flag is specified, then the 141 has on the local machine. If the -P flag is specified, then the
146 fileM-bM-^@M-^Ys full permission and access time are copied too. 142 fileM-bM-^@M-^Ys full permission and access time are copied too.
147 143
148 pwd Display remote working directory. 144 pwd Display remote working directory.
@@ -171,6 +167,9 @@ INTERACTIVE COMMANDS
171 167
172 ? Synonym for help. 168 ? Synonym for help.
173 169
170AUTHORS
171 Damien Miller <djm@mindrot.org>
172
174SEE ALSO 173SEE ALSO
175 scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5), sftp-server(8), 174 scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5), sftp-server(8),
176 sshd(8) 175 sshd(8)
diff --git a/sftp.1 b/sftp.1
index 753a4f2b9..02d2c274b 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.45 2003/09/02 18:50:06 jmc Exp $ 1.\" $OpenBSD: sftp.1,v 1.41 2003/03/28 10:11:43 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -27,7 +27,7 @@
27.Os 27.Os
28.Sh NAME 28.Sh NAME
29.Nm sftp 29.Nm sftp
30.Nd secure file transfer program 30.Nd Secure file transfer program
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm sftp 32.Nm sftp
33.Bk -words 33.Bk -words
@@ -43,16 +43,13 @@
43.Ar host 43.Ar host
44.Ek 44.Ek
45.Nm sftp 45.Nm sftp
46.Oo Oo Ar user Ns @ Oc Ns 46.Oo Oo Ar user Ns No @ Oc Ns
47.Ar host Ns Oo : Ns Ar file Oo 47.Ar host Ns Oo : Ns Ar file Oo
48.Ar file Oc Oc Oc 48.Ar file Oc Oc Oc
49.Nm sftp 49.Nm sftp
50.Oo Oo Ar user Ns @ Oc Ns 50.Oo Oo Ar user Ns No @ Oc Ns
51.Ar host Ns Oo : Ns Ar dir Ns 51.Ar host Ns Oo : Ns Ar dir Ns
52.Oo Ar / Oc Oc Oc 52.Oo Ar / Oc Oc Oc
53.Nm sftp
54.Fl b Ar batchfile
55.Oo Ar user Ns @ Oc Ns Ar host
56.Sh DESCRIPTION 53.Sh DESCRIPTION
57.Nm 54.Nm
58is an interactive file transfer program, similar to 55is an interactive file transfer program, similar to
@@ -71,17 +68,8 @@ The second usage format will retrieve files automatically if a non-interactive
71authentication method is used; otherwise it will do so after 68authentication method is used; otherwise it will do so after
72successful interactive authentication. 69successful interactive authentication.
73.Pp 70.Pp
74The third usage format allows the sftp client to start in a remote directory. 71The last usage format allows the sftp client to start in a remote directory.
75.Pp 72.Pp
76The final usage format allows for automated sessions using the
77.Fl b
78option.
79In such cases, it is usually necessary to configure public key authentication
80to obviate the need to enter a password at connection time (see
81.Xr sshd 8
82and
83.Xr ssh-keygen 1
84for details).
85The options are as follows: 73The options are as follows:
86.Bl -tag -width Ds 74.Bl -tag -width Ds
87.It Fl b Ar batchfile 75.It Fl b Ar batchfile
@@ -101,9 +89,10 @@ and
101.Ic lmkdir . 89.Ic lmkdir .
102Termination on error can be suppressed on a command by command basis by 90Termination on error can be suppressed on a command by command basis by
103prefixing the command with a 91prefixing the command with a
104.Sq Ic \- 92.Ic '-'
105character (for example, 93character (For example,
106.Ic -rm /tmp/blah* ) . 94.Ic -rm /tmp/blah*
95).
107.It Fl o Ar ssh_option 96.It Fl o Ar ssh_option
108Can be used to pass options to 97Can be used to pass options to
109.Nm ssh 98.Nm ssh
@@ -112,27 +101,22 @@ in the format used in
112This is useful for specifying options 101This is useful for specifying options
113for which there is no separate 102for which there is no separate
114.Nm sftp 103.Nm sftp
115command-line flag. 104command-line flag. For example, to specify an alternate
116For example, to specify an alternate port use: 105port use:
117.Ic sftp -oPort=24 . 106.Ic sftp -oPort=24 .
118.It Fl s Ar subsystem | sftp_server 107.It Fl s Ar subsystem | sftp_server
119Specifies the SSH2 subsystem or the path for an sftp server 108Specifies the SSH2 subsystem or the path for an sftp server
120on the remote host. 109on the remote host. A path is useful for using sftp over
121A path is useful for using 110protocol version 1, or when the remote
122.Nm 111.Nm sshd
123over protocol version 1, or when the remote
124.Xr sshd 8
125does not have an sftp subsystem configured. 112does not have an sftp subsystem configured.
126.It Fl v 113.It Fl v
127Raise logging level. 114Raise logging level. This option is also passed to ssh.
128This option is also passed to ssh.
129.It Fl B Ar buffer_size 115.It Fl B Ar buffer_size
130Specify the size of the buffer that 116Specify the size of the buffer that
131.Nm 117.Nm
132uses when transferring files. 118uses when transferring files. Larger buffers require fewer round trips at
133Larger buffers require fewer round trips at the cost of higher 119the cost of higher memory consumption. The default is 32768 bytes.
134memory consumption.
135The default is 32768 bytes.
136.It Fl C 120.It Fl C
137Enables compression (via ssh's 121Enables compression (via ssh's
138.Fl C 122.Fl C
@@ -140,19 +124,19 @@ flag).
140.It Fl F Ar ssh_config 124.It Fl F Ar ssh_config
141Specifies an alternative 125Specifies an alternative
142per-user configuration file for 126per-user configuration file for
143.Xr ssh 1 . 127.Nm ssh .
144This option is directly passed to 128This option is directly passed to
145.Xr ssh 1 . 129.Xr ssh 1 .
146.It Fl P Ar sftp_server path 130.It Fl P Ar sftp_server path
147Connect directly to a local sftp server 131Connect directly to a local
132.Nm sftp-server
148(rather than via 133(rather than via
149.Xr ssh 1 ) 134.Nm ssh )
150This option may be useful in debugging the client and server. 135This option may be useful in debugging the client and server.
151.It Fl R Ar num_requests 136.It Fl R Ar num_requests
152Specify how many requests may be outstanding at any one time. 137Specify how many requests may be outstanding at any one time. Increasing
153Increasing this may slightly improve file transfer speed 138this may slightly improve file transfer speed but will increase memory
154but will increase memory usage. 139usage. The default is 16 outstanding requests.
155The default is 16 outstanding requests.
156.It Fl S Ar program 140.It Fl S Ar program
157Name of the 141Name of the
158.Ar program 142.Ar program
@@ -172,8 +156,7 @@ Commands are case insensitive and pathnames may be enclosed in quotes if they
172contain spaces. 156contain spaces.
173.Bl -tag -width Ds 157.Bl -tag -width Ds
174.It Ic bye 158.It Ic bye
175Quit 159Quit sftp.
176.Nm sftp .
177.It Ic cd Ar path 160.It Ic cd Ar path
178Change remote directory to 161Change remote directory to
179.Ar path . 162.Ar path .
@@ -200,8 +183,7 @@ to
200.Ar own 183.Ar own
201must be a numeric UID. 184must be a numeric UID.
202.It Ic exit 185.It Ic exit
203Quit 186Quit sftp.
204.Nm sftp .
205.It Xo Ic get 187.It Xo Ic get
206.Op Ar flags 188.Op Ar flags
207.Ar remote-path 189.Ar remote-path
@@ -212,8 +194,7 @@ Retrieve the
212and store it on the local machine. 194and store it on the local machine.
213If the local 195If the local
214path name is not specified, it is given the same name it has on the 196path name is not specified, it is given the same name it has on the
215remote machine. 197remote machine. If the
216If the
217.Fl P 198.Fl P
218flag is specified, then the file's full permission and access time are 199flag is specified, then the file's full permission and access time are
219copied too. 200copied too.
@@ -243,8 +224,7 @@ Display remote directory listing of either
243.Ar path 224.Ar path
244or current directory if 225or current directory if
245.Ar path 226.Ar path
246is not specified. 227is not specified. If the
247If the
248.Fl l 228.Fl l
249flag is specified, then display additional details including permissions 229flag is specified, then display additional details including permissions
250and ownership information. 230and ownership information.
@@ -263,18 +243,15 @@ Toggle display of progress meter.
263.Xc 243.Xc
264Upload 244Upload
265.Ar local-path 245.Ar local-path
266and store it on the remote machine. 246and store it on the remote machine. If the remote path name is not
267If the remote path name is not specified, it is given the same name it has 247specified, it is given the same name it has on the local machine. If the
268on the local machine.
269If the
270.Fl P 248.Fl P
271flag is specified, then the file's full permission and access time are 249flag is specified, then the file's full permission and access time are
272copied too. 250copied too.
273.It Ic pwd 251.It Ic pwd
274Display remote working directory. 252Display remote working directory.
275.It Ic quit 253.It Ic quit
276Quit 254Quit sftp.
277.Nm sftp .
278.It Ic rename Ar oldpath Ar newpath 255.It Ic rename Ar oldpath Ar newpath
279Rename remote file from 256Rename remote file from
280.Ar oldpath 257.Ar oldpath
@@ -295,15 +272,17 @@ to
295Display the 272Display the
296.Nm 273.Nm
297protocol version. 274protocol version.
298.It Ic \&! Ar command 275.It Ic ! Ar command
299Execute 276Execute
300.Ar command 277.Ar command
301in local shell. 278in local shell.
302.It Ic \&! 279.It Ic !
303Escape to local shell. 280Escape to local shell.
304.It Ic \&? 281.It Ic ?
305Synonym for help. 282Synonym for help.
306.El 283.El
284.Sh AUTHORS
285Damien Miller <djm@mindrot.org>
307.Sh SEE ALSO 286.Sh SEE ALSO
308.Xr scp 1 , 287.Xr scp 1 ,
309.Xr ssh 1 , 288.Xr ssh 1 ,
diff --git a/sftp.c b/sftp.c
index c2a6593b8..e8adcba18 100644
--- a/sftp.c
+++ b/sftp.c
@@ -24,7 +24,9 @@
24 24
25#include "includes.h" 25#include "includes.h"
26 26
27RCSID("$OpenBSD: sftp.c,v 1.37 2003/07/10 20:05:55 markus Exp $"); 27RCSID("$OpenBSD: sftp.c,v 1.34 2003/01/10 08:19:07 fgsch Exp $");
28
29/* XXX: short-form remote directory listings (like 'ls -C') */
28 30
29#include "buffer.h" 31#include "buffer.h"
30#include "xmalloc.h" 32#include "xmalloc.h"
@@ -46,21 +48,11 @@ char *__progname;
46FILE* infile; 48FILE* infile;
47size_t copy_buffer_len = 32768; 49size_t copy_buffer_len = 32768;
48size_t num_requests = 16; 50size_t num_requests = 16;
49static pid_t sshpid = -1;
50 51
51extern int showprogress; 52extern int showprogress;
52 53
53static void 54static void
54killchild(int signo) 55connect_to_server(char *path, char **args, int *in, int *out, pid_t *sshpid)
55{
56 if (sshpid > 1)
57 kill(sshpid, signo);
58
59 _exit(1);
60}
61
62static void
63connect_to_server(char *path, char **args, int *in, int *out)
64{ 56{
65 int c_in, c_out; 57 int c_in, c_out;
66 58
@@ -82,9 +74,9 @@ connect_to_server(char *path, char **args, int *in, int *out)
82 c_in = c_out = inout[1]; 74 c_in = c_out = inout[1];
83#endif /* USE_PIPES */ 75#endif /* USE_PIPES */
84 76
85 if ((sshpid = fork()) == -1) 77 if ((*sshpid = fork()) == -1)
86 fatal("fork: %s", strerror(errno)); 78 fatal("fork: %s", strerror(errno));
87 else if (sshpid == 0) { 79 else if (*sshpid == 0) {
88 if ((dup2(c_in, STDIN_FILENO) == -1) || 80 if ((dup2(c_in, STDIN_FILENO) == -1) ||
89 (dup2(c_out, STDOUT_FILENO) == -1)) { 81 (dup2(c_out, STDOUT_FILENO) == -1)) {
90 fprintf(stderr, "dup2: %s\n", strerror(errno)); 82 fprintf(stderr, "dup2: %s\n", strerror(errno));
@@ -99,9 +91,6 @@ connect_to_server(char *path, char **args, int *in, int *out)
99 exit(1); 91 exit(1);
100 } 92 }
101 93
102 signal(SIGTERM, killchild);
103 signal(SIGINT, killchild);
104 signal(SIGHUP, killchild);
105 close(c_in); 94 close(c_in);
106 close(c_out); 95 close(c_out);
107} 96}
@@ -112,9 +101,8 @@ usage(void)
112 extern char *__progname; 101 extern char *__progname;
113 102
114 fprintf(stderr, 103 fprintf(stderr,
115 "usage: %s [-vC1] [-b batchfile] [-o ssh_option] [-s subsystem | sftp_server]\n" 104 "usage: %s [-vC1] [-b batchfile] [-o option] [-s subsystem|path] [-B buffer_size]\n"
116 " [-B buffer_size] [-F ssh_config] [-P sftp_server path]\n" 105 " [-F config] [-P direct server path] [-S program]\n"
117 " [-R num_requests] [-S program]\n"
118 " [user@]host[:file [file]]\n", __progname); 106 " [user@]host[:file [file]]\n", __progname);
119 exit(1); 107 exit(1);
120} 108}
@@ -123,6 +111,7 @@ int
123main(int argc, char **argv) 111main(int argc, char **argv)
124{ 112{
125 int in, out, ch, err; 113 int in, out, ch, err;
114 pid_t sshpid;
126 char *host, *userhost, *cp, *file2; 115 char *host, *userhost, *cp, *file2;
127 int debug_level = 0, sshver = 2; 116 int debug_level = 0, sshver = 2;
128 char *file1 = NULL, *sftp_server = NULL; 117 char *file1 = NULL, *sftp_server = NULL;
@@ -132,7 +121,7 @@ main(int argc, char **argv)
132 extern int optind; 121 extern int optind;
133 extern char *optarg; 122 extern char *optarg;
134 123
135 __progname = ssh_get_progname(argv[0]); 124 __progname = get_progname(argv[0]);
136 args.list = NULL; 125 args.list = NULL;
137 addargs(&args, "ssh"); /* overwritten with ssh_program */ 126 addargs(&args, "ssh"); /* overwritten with ssh_program */
138 addargs(&args, "-oForwardX11 no"); 127 addargs(&args, "-oForwardX11 no");
@@ -240,13 +229,15 @@ main(int argc, char **argv)
240 args.list[0] = ssh_program; 229 args.list[0] = ssh_program;
241 230
242 fprintf(stderr, "Connecting to %s...\n", host); 231 fprintf(stderr, "Connecting to %s...\n", host);
243 connect_to_server(ssh_program, args.list, &in, &out); 232 connect_to_server(ssh_program, args.list, &in, &out,
233 &sshpid);
244 } else { 234 } else {
245 args.list = NULL; 235 args.list = NULL;
246 addargs(&args, "sftp-server"); 236 addargs(&args, "sftp-server");
247 237
248 fprintf(stderr, "Attaching to %s...\n", sftp_direct); 238 fprintf(stderr, "Attaching to %s...\n", sftp_direct);
249 connect_to_server(sftp_direct, args.list, &in, &out); 239 connect_to_server(sftp_direct, args.list, &in, &out,
240 &sshpid);
250 } 241 }
251 242
252 err = interactive_loop(in, out, file1, file2); 243 err = interactive_loop(in, out, file1, file2);
diff --git a/ssh-add.0 b/ssh-add.0
index 95929d4d3..b0096423d 100644
--- a/ssh-add.0
+++ b/ssh-add.0
@@ -54,21 +54,6 @@ DESCRIPTION
54 -e reader 54 -e reader
55 Remove key in smartcard reader. 55 Remove key in smartcard reader.
56 56
57ENVIRONMENT
58 DISPLAY and SSH_ASKPASS
59 If ssh-add needs a passphrase, it will read the passphrase from
60 the current terminal if it was run from a terminal. If ssh-add
61 does not have a terminal associated with it but DISPLAY and
62 SSH_ASKPASS are set, it will execute the program specified by
63 SSH_ASKPASS and open an X11 window to read the passphrase. This
64 is particularly useful when calling ssh-add from a .Xsession or
65 related script. (Note that on some machines it may be necessary
66 to redirect the input from /dev/null to make this work.)
67
68 SSH_AUTH_SOCK
69 Identifies the path of a unix-domain socket used to communicate
70 with the agent.
71
72FILES 57FILES
73 $HOME/.ssh/identity 58 $HOME/.ssh/identity
74 Contains the protocol version 1 RSA authentication identity of 59 Contains the protocol version 1 RSA authentication identity of
@@ -85,13 +70,25 @@ FILES
85 Identity files should not be readable by anyone but the user. Note that 70 Identity files should not be readable by anyone but the user. Note that
86 ssh-add ignores identity files if they are accessible by others. 71 ssh-add ignores identity files if they are accessible by others.
87 72
73ENVIRONMENT
74 DISPLAY and SSH_ASKPASS
75 If ssh-add needs a passphrase, it will read the passphrase from
76 the current terminal if it was run from a terminal. If ssh-add
77 does not have a terminal associated with it but DISPLAY and
78 SSH_ASKPASS are set, it will execute the program specified by
79 SSH_ASKPASS and open an X11 window to read the passphrase. This
80 is particularly useful when calling ssh-add from a .Xsession or
81 related script. (Note that on some machines it may be necessary
82 to redirect the input from /dev/null to make this work.)
83
84 SSH_AUTH_SOCK
85 Identifies the path of a unix-domain socket used to communicate
86 with the agent.
87
88DIAGNOSTICS 88DIAGNOSTICS
89 Exit status is 0 on success, 1 if the specified command fails, and 2 if 89 Exit status is 0 on success, 1 if the specified command fails, and 2 if
90 ssh-add is unable to contact the authentication agent. 90 ssh-add is unable to contact the authentication agent.
91 91
92SEE ALSO
93 ssh(1), ssh-agent(1), ssh-keygen(1), sshd(8)
94
95AUTHORS 92AUTHORS
96 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 93 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
97 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo 94 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
@@ -99,4 +96,7 @@ AUTHORS
99 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 96 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
100 versions 1.5 and 2.0. 97 versions 1.5 and 2.0.
101 98
99SEE ALSO
100 ssh(1), ssh-agent(1), ssh-keygen(1), sshd(8)
101
102BSD September 25, 1999 BSD 102BSD September 25, 1999 BSD
diff --git a/ssh-add.1 b/ssh-add.1
index fe0190859..bcdb8e7f6 100644
--- a/ssh-add.1
+++ b/ssh-add.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-add.1,v 1.39 2003/06/10 09:12:11 jmc Exp $ 1.\" $OpenBSD: ssh-add.1,v 1.38 2003/03/28 10:11:43 jmc Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -109,6 +109,20 @@ Add key in smartcard
109Remove key in smartcard 109Remove key in smartcard
110.Ar reader . 110.Ar reader .
111.El 111.El
112.Sh FILES
113.Bl -tag -width Ds
114.It Pa $HOME/.ssh/identity
115Contains the protocol version 1 RSA authentication identity of the user.
116.It Pa $HOME/.ssh/id_dsa
117Contains the protocol version 2 DSA authentication identity of the user.
118.It Pa $HOME/.ssh/id_rsa
119Contains the protocol version 2 RSA authentication identity of the user.
120.El
121.Pp
122Identity files should not be readable by anyone but the user.
123Note that
124.Nm
125ignores identity files if they are accessible by others.
112.Sh ENVIRONMENT 126.Sh ENVIRONMENT
113.Bl -tag -width Ds 127.Bl -tag -width Ds
114.It Ev "DISPLAY" and "SSH_ASKPASS" 128.It Ev "DISPLAY" and "SSH_ASKPASS"
@@ -138,30 +152,11 @@ to make this work.)
138Identifies the path of a unix-domain socket used to communicate with the 152Identifies the path of a unix-domain socket used to communicate with the
139agent. 153agent.
140.El 154.El
141.Sh FILES
142.Bl -tag -width Ds
143.It Pa $HOME/.ssh/identity
144Contains the protocol version 1 RSA authentication identity of the user.
145.It Pa $HOME/.ssh/id_dsa
146Contains the protocol version 2 DSA authentication identity of the user.
147.It Pa $HOME/.ssh/id_rsa
148Contains the protocol version 2 RSA authentication identity of the user.
149.El
150.Pp
151Identity files should not be readable by anyone but the user.
152Note that
153.Nm
154ignores identity files if they are accessible by others.
155.Sh DIAGNOSTICS 155.Sh DIAGNOSTICS
156Exit status is 0 on success, 1 if the specified command fails, 156Exit status is 0 on success, 1 if the specified command fails,
157and 2 if 157and 2 if
158.Nm 158.Nm
159is unable to contact the authentication agent. 159is unable to contact the authentication agent.
160.Sh SEE ALSO
161.Xr ssh 1 ,
162.Xr ssh-agent 1 ,
163.Xr ssh-keygen 1 ,
164.Xr sshd 8
165.Sh AUTHORS 160.Sh AUTHORS
166OpenSSH is a derivative of the original and free 161OpenSSH is a derivative of the original and free
167ssh 1.2.12 release by Tatu Ylonen. 162ssh 1.2.12 release by Tatu Ylonen.
@@ -171,3 +166,8 @@ removed many bugs, re-added newer features and
171created OpenSSH. 166created OpenSSH.
172Markus Friedl contributed the support for SSH 167Markus Friedl contributed the support for SSH
173protocol versions 1.5 and 2.0. 168protocol versions 1.5 and 2.0.
169.Sh SEE ALSO
170.Xr ssh 1 ,
171.Xr ssh-agent 1 ,
172.Xr ssh-keygen 1 ,
173.Xr sshd 8
diff --git a/ssh-add.c b/ssh-add.c
index 2e394e5c1..9adec3094 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: ssh-add.c,v 1.68 2003/06/16 10:22:45 markus Exp $"); 38RCSID("$OpenBSD: ssh-add.c,v 1.66 2003/03/05 22:33:43 markus Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41 41
@@ -164,8 +164,7 @@ add_file(AuthenticationConnection *ac, const char *filename)
164 if (private != NULL) 164 if (private != NULL)
165 break; 165 break;
166 clear_pass(); 166 clear_pass();
167 snprintf(msg, sizeof msg, 167 strlcpy(msg, "Bad passphrase, try again: ", sizeof msg);
168 "Bad passphrase, try again for %.200s: ", comment);
169 } 168 }
170 } 169 }
171 170
@@ -202,7 +201,7 @@ update_card(AuthenticationConnection *ac, int add, const char *id)
202 if (pin == NULL) 201 if (pin == NULL)
203 return -1; 202 return -1;
204 203
205 if (ssh_update_card(ac, add, id, pin, lifetime, confirm)) { 204 if (ssh_update_card(ac, add, id, pin)) {
206 fprintf(stderr, "Card %s: %s\n", 205 fprintf(stderr, "Card %s: %s\n",
207 add ? "added" : "removed", id); 206 add ? "added" : "removed", id);
208 ret = 0; 207 ret = 0;
@@ -319,7 +318,7 @@ main(int argc, char **argv)
319 char *sc_reader_id = NULL; 318 char *sc_reader_id = NULL;
320 int i, ch, deleting = 0, ret = 0; 319 int i, ch, deleting = 0, ret = 0;
321 320
322 __progname = ssh_get_progname(argv[0]); 321 __progname = get_progname(argv[0]);
323 init_rng(); 322 init_rng();
324 seed_rng(); 323 seed_rng();
325 324
diff --git a/ssh-agent.0 b/ssh-agent.0
index 990cbc29b..48cc9b36e 100644
--- a/ssh-agent.0
+++ b/ssh-agent.0
@@ -60,7 +60,7 @@ DESCRIPTION
60 can thus use the privileges given by the identities anywhere in the net- 60 can thus use the privileges given by the identities anywhere in the net-
61 work in a secure way. 61 work in a secure way.
62 62
63 There are two main ways to get an agent set up: Either the agent starts a 63 There are two main ways to get an agent setup: Either the agent starts a
64 new subcommand into which some environment variables are exported, or the 64 new subcommand into which some environment variables are exported, or the
65 agent prints the needed shell commands (either sh(1) or csh(1) syntax can 65 agent prints the needed shell commands (either sh(1) or csh(1) syntax can
66 be generated) which can be evalled in the calling shell. Later ssh(1) 66 be generated) which can be evalled in the calling shell. Later ssh(1)
@@ -101,9 +101,6 @@ FILES
101 owner. The sockets should get automatically removed when the 101 owner. The sockets should get automatically removed when the
102 agent exits. 102 agent exits.
103 103
104SEE ALSO
105 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
106
107AUTHORS 104AUTHORS
108 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 105 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
109 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo 106 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
@@ -111,4 +108,7 @@ AUTHORS
111 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 108 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
112 versions 1.5 and 2.0. 109 versions 1.5 and 2.0.
113 110
111SEE ALSO
112 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
113
114BSD September 25, 1999 BSD 114BSD September 25, 1999 BSD
diff --git a/ssh-agent.1 b/ssh-agent.1
index aab15cc7f..fde4608bb 100644
--- a/ssh-agent.1
+++ b/ssh-agent.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-agent.1,v 1.39 2003/06/10 09:12:11 jmc Exp $ 1.\" $OpenBSD: ssh-agent.1,v 1.37 2003/03/28 10:11:43 jmc Exp $
2.\" 2.\"
3.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -133,7 +133,7 @@ However, the connection to the agent is forwarded over SSH
133remote logins, and the user can thus use the privileges given by the 133remote logins, and the user can thus use the privileges given by the
134identities anywhere in the network in a secure way. 134identities anywhere in the network in a secure way.
135.Pp 135.Pp
136There are two main ways to get an agent set up: 136There are two main ways to get an agent setup:
137Either the agent starts a new subcommand into which some environment 137Either the agent starts a new subcommand into which some environment
138variables are exported, or the agent prints the needed shell commands 138variables are exported, or the agent prints the needed shell commands
139(either 139(either
@@ -179,11 +179,6 @@ authentication agent.
179These sockets should only be readable by the owner. 179These sockets should only be readable by the owner.
180The sockets should get automatically removed when the agent exits. 180The sockets should get automatically removed when the agent exits.
181.El 181.El
182.Sh SEE ALSO
183.Xr ssh 1 ,
184.Xr ssh-add 1 ,
185.Xr ssh-keygen 1 ,
186.Xr sshd 8
187.Sh AUTHORS 182.Sh AUTHORS
188OpenSSH is a derivative of the original and free 183OpenSSH is a derivative of the original and free
189ssh 1.2.12 release by Tatu Ylonen. 184ssh 1.2.12 release by Tatu Ylonen.
@@ -193,3 +188,8 @@ removed many bugs, re-added newer features and
193created OpenSSH. 188created OpenSSH.
194Markus Friedl contributed the support for SSH 189Markus Friedl contributed the support for SSH
195protocol versions 1.5 and 2.0. 190protocol versions 1.5 and 2.0.
191.Sh SEE ALSO
192.Xr ssh 1 ,
193.Xr ssh-add 1 ,
194.Xr ssh-keygen 1 ,
195.Xr sshd 8
diff --git a/ssh-agent.c b/ssh-agent.c
index c05c61468..a936134fe 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -35,7 +35,7 @@
35 35
36#include "includes.h" 36#include "includes.h"
37#include "openbsd-compat/sys-queue.h" 37#include "openbsd-compat/sys-queue.h"
38RCSID("$OpenBSD: ssh-agent.c,v 1.111 2003/06/12 19:12:03 markus Exp $"); 38RCSID("$OpenBSD: ssh-agent.c,v 1.108 2003/03/13 11:44:50 markus Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41#include <openssl/md5.h> 41#include <openssl/md5.h>
@@ -261,7 +261,7 @@ process_authentication_challenge1(SocketEntry *e)
261 /* The response is MD5 of decrypted challenge plus session id. */ 261 /* The response is MD5 of decrypted challenge plus session id. */
262 len = BN_num_bytes(challenge); 262 len = BN_num_bytes(challenge);
263 if (len <= 0 || len > 32) { 263 if (len <= 0 || len > 32) {
264 logit("process_authentication_challenge: bad challenge length %d", len); 264 log("process_authentication_challenge: bad challenge length %d", len);
265 goto failure; 265 goto failure;
266 } 266 }
267 memset(buf, 0, 32); 267 memset(buf, 0, 32);
@@ -350,7 +350,7 @@ process_remove_identity(SocketEntry *e, int version)
350 buffer_get_bignum(&e->request, key->rsa->n); 350 buffer_get_bignum(&e->request, key->rsa->n);
351 351
352 if (bits != key_size(key)) 352 if (bits != key_size(key))
353 logit("Warning: identity keysize mismatch: actual %u, announced %u", 353 log("Warning: identity keysize mismatch: actual %u, announced %u",
354 key_size(key), bits); 354 key_size(key), bits);
355 break; 355 break;
356 case 2: 356 case 2:
@@ -580,29 +580,13 @@ static void
580process_add_smartcard_key (SocketEntry *e) 580process_add_smartcard_key (SocketEntry *e)
581{ 581{
582 char *sc_reader_id = NULL, *pin; 582 char *sc_reader_id = NULL, *pin;
583 int i, version, success = 0, death = 0, confirm = 0; 583 int i, version, success = 0;
584 Key **keys, *k; 584 Key **keys, *k;
585 Identity *id; 585 Identity *id;
586 Idtab *tab; 586 Idtab *tab;
587 587
588 sc_reader_id = buffer_get_string(&e->request, NULL); 588 sc_reader_id = buffer_get_string(&e->request, NULL);
589 pin = buffer_get_string(&e->request, NULL); 589 pin = buffer_get_string(&e->request, NULL);
590
591 while (buffer_len(&e->request)) {
592 switch (buffer_get_char(&e->request)) {
593 case SSH_AGENT_CONSTRAIN_LIFETIME:
594 death = time(NULL) + buffer_get_int(&e->request);
595 break;
596 case SSH_AGENT_CONSTRAIN_CONFIRM:
597 confirm = 1;
598 break;
599 default:
600 break;
601 }
602 }
603 if (lifetime && !death)
604 death = time(NULL) + lifetime;
605
606 keys = sc_get_keys(sc_reader_id, pin); 590 keys = sc_get_keys(sc_reader_id, pin);
607 xfree(sc_reader_id); 591 xfree(sc_reader_id);
608 xfree(pin); 592 xfree(pin);
@@ -618,9 +602,9 @@ process_add_smartcard_key (SocketEntry *e)
618 if (lookup_identity(k, version) == NULL) { 602 if (lookup_identity(k, version) == NULL) {
619 id = xmalloc(sizeof(Identity)); 603 id = xmalloc(sizeof(Identity));
620 id->key = k; 604 id->key = k;
621 id->comment = sc_get_key_label(k); 605 id->comment = xstrdup("smartcard key");
622 id->death = death; 606 id->death = 0;
623 id->confirm = confirm; 607 id->confirm = 0;
624 TAILQ_INSERT_TAIL(&tab->idlist, id, next); 608 TAILQ_INSERT_TAIL(&tab->idlist, id, next);
625 tab->nentries++; 609 tab->nentries++;
626 success = 1; 610 success = 1;
@@ -764,7 +748,6 @@ process_message(SocketEntry *e)
764 break; 748 break;
765#ifdef SMARTCARD 749#ifdef SMARTCARD
766 case SSH_AGENTC_ADD_SMARTCARD_KEY: 750 case SSH_AGENTC_ADD_SMARTCARD_KEY:
767 case SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED:
768 process_add_smartcard_key(e); 751 process_add_smartcard_key(e);
769 break; 752 break;
770 case SSH_AGENTC_REMOVE_SMARTCARD_KEY: 753 case SSH_AGENTC_REMOVE_SMARTCARD_KEY:
@@ -784,7 +767,7 @@ process_message(SocketEntry *e)
784static void 767static void
785new_socket(sock_type type, int fd) 768new_socket(sock_type type, int fd)
786{ 769{
787 u_int i, old_alloc; 770 u_int i, old_alloc, new_alloc;
788 771
789 if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) 772 if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
790 error("fcntl O_NONBLOCK: %s", strerror(errno)); 773 error("fcntl O_NONBLOCK: %s", strerror(errno));
@@ -795,25 +778,26 @@ new_socket(sock_type type, int fd)
795 for (i = 0; i < sockets_alloc; i++) 778 for (i = 0; i < sockets_alloc; i++)
796 if (sockets[i].type == AUTH_UNUSED) { 779 if (sockets[i].type == AUTH_UNUSED) {
797 sockets[i].fd = fd; 780 sockets[i].fd = fd;
798 sockets[i].type = type;
799 buffer_init(&sockets[i].input); 781 buffer_init(&sockets[i].input);
800 buffer_init(&sockets[i].output); 782 buffer_init(&sockets[i].output);
801 buffer_init(&sockets[i].request); 783 buffer_init(&sockets[i].request);
784 sockets[i].type = type;
802 return; 785 return;
803 } 786 }
804 old_alloc = sockets_alloc; 787 old_alloc = sockets_alloc;
805 sockets_alloc += 10; 788 new_alloc = sockets_alloc + 10;
806 if (sockets) 789 if (sockets)
807 sockets = xrealloc(sockets, sockets_alloc * sizeof(sockets[0])); 790 sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0]));
808 else 791 else
809 sockets = xmalloc(sockets_alloc * sizeof(sockets[0])); 792 sockets = xmalloc(new_alloc * sizeof(sockets[0]));
810 for (i = old_alloc; i < sockets_alloc; i++) 793 for (i = old_alloc; i < new_alloc; i++)
811 sockets[i].type = AUTH_UNUSED; 794 sockets[i].type = AUTH_UNUSED;
812 sockets[old_alloc].type = type; 795 sockets_alloc = new_alloc;
813 sockets[old_alloc].fd = fd; 796 sockets[old_alloc].fd = fd;
814 buffer_init(&sockets[old_alloc].input); 797 buffer_init(&sockets[old_alloc].input);
815 buffer_init(&sockets[old_alloc].output); 798 buffer_init(&sockets[old_alloc].output);
816 buffer_init(&sockets[old_alloc].request); 799 buffer_init(&sockets[old_alloc].request);
800 sockets[old_alloc].type = type;
817} 801}
818 802
819static int 803static int
@@ -979,7 +963,7 @@ check_parent_exists(int sig)
979 /* printf("Parent has died - Authentication agent exiting.\n"); */ 963 /* printf("Parent has died - Authentication agent exiting.\n"); */
980 cleanup_handler(sig); /* safe */ 964 cleanup_handler(sig); /* safe */
981 } 965 }
982 mysignal(SIGALRM, check_parent_exists); 966 signal(SIGALRM, check_parent_exists);
983 alarm(10); 967 alarm(10);
984 errno = save_errno; 968 errno = save_errno;
985} 969}
@@ -1024,7 +1008,7 @@ main(int ac, char **av)
1024 1008
1025 SSLeay_add_all_algorithms(); 1009 SSLeay_add_all_algorithms();
1026 1010
1027 __progname = ssh_get_progname(av[0]); 1011 __progname = get_progname(av[0]);
1028 init_rng(); 1012 init_rng();
1029 seed_rng(); 1013 seed_rng();
1030 1014
@@ -1211,7 +1195,7 @@ skip:
1211 fatal_add_cleanup(cleanup_socket, NULL); 1195 fatal_add_cleanup(cleanup_socket, NULL);
1212 new_socket(AUTH_SOCKET, sock); 1196 new_socket(AUTH_SOCKET, sock);
1213 if (ac > 0) { 1197 if (ac > 0) {
1214 mysignal(SIGALRM, check_parent_exists); 1198 signal(SIGALRM, check_parent_exists);
1215 alarm(10); 1199 alarm(10);
1216 } 1200 }
1217 idtab_init(); 1201 idtab_init();
diff --git a/ssh-gss.h b/ssh-gss.h
deleted file mode 100644
index 6b58adb3a..000000000
--- a/ssh-gss.h
+++ /dev/null
@@ -1,121 +0,0 @@
1/*
2 * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#ifndef _SSH_GSS_H
26#define _SSH_GSS_H
27
28#ifdef GSSAPI
29
30#include "buffer.h"
31
32#include <gssapi.h>
33
34#ifdef KRB5
35#ifndef HEIMDAL
36#include <gssapi_generic.h>
37
38/* MIT Kerberos doesn't seem to define GSS_NT_HOSTBASED_SERVICE */
39
40#ifndef GSS_C_NT_HOSTBASED_SERVICE
41#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
42#endif /* GSS_C_NT_... */
43#endif /* !HEIMDAL */
44#endif /* KRB5 */
45
46/* draft-ietf-secsh-gsskeyex-06 */
47#define SSH2_MSG_USERAUTH_GSSAPI_RESPONSE 60
48#define SSH2_MSG_USERAUTH_GSSAPI_TOKEN 61
49#define SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE 63
50#define SSH2_MSG_USERAUTH_GSSAPI_ERROR 64
51#define SSH2_MSG_USERAUTH_GSSAPI_ERRTOK 65
52
53#define SSH_GSS_OIDTYPE 0x06
54
55typedef struct {
56 char *filename;
57 char *envvar;
58 char *envval;
59 void *data;
60} ssh_gssapi_ccache;
61
62typedef struct {
63 gss_buffer_desc displayname;
64 gss_buffer_desc exportedname;
65 gss_cred_id_t creds;
66 struct ssh_gssapi_mech_struct *mech;
67 ssh_gssapi_ccache store;
68} ssh_gssapi_client;
69
70typedef struct ssh_gssapi_mech_struct {
71 char *enc_name;
72 char *name;
73 gss_OID_desc oid;
74 int (*dochild) (ssh_gssapi_client *);
75 int (*userok) (ssh_gssapi_client *, char *);
76 int (*localname) (ssh_gssapi_client *, char **);
77 void (*storecreds) (ssh_gssapi_client *);
78} ssh_gssapi_mech;
79
80typedef struct {
81 OM_uint32 major; /* both */
82 OM_uint32 minor; /* both */
83 gss_ctx_id_t context; /* both */
84 gss_name_t name; /* both */
85 gss_OID oid; /* client */
86 gss_cred_id_t creds; /* server */
87 gss_name_t client; /* server */
88 gss_cred_id_t client_creds; /* server */
89} Gssctxt;
90
91extern ssh_gssapi_mech *supported_mechs[];
92
93int ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len);
94void ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len);
95void ssh_gssapi_set_oid(Gssctxt *ctx, gss_OID oid);
96void ssh_gssapi_supported_oids(gss_OID_set *oidset);
97ssh_gssapi_mech *ssh_gssapi_get_ctype(Gssctxt *ctxt);
98
99OM_uint32 ssh_gssapi_import_name(Gssctxt *ctx, const char *host);
100OM_uint32 ssh_gssapi_acquire_cred(Gssctxt *ctx);
101OM_uint32 ssh_gssapi_init_ctx(Gssctxt *ctx, int deleg_creds,
102 gss_buffer_desc *recv_tok, gss_buffer_desc *send_tok, OM_uint32 *flags);
103OM_uint32 ssh_gssapi_accept_ctx(Gssctxt *ctx,
104 gss_buffer_desc *recv_tok, gss_buffer_desc *send_tok, OM_uint32 *flags);
105OM_uint32 ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *);
106void ssh_gssapi_error(Gssctxt *ctx);
107char *ssh_gssapi_last_error(Gssctxt *ctxt, OM_uint32 *maj, OM_uint32 *min);
108void ssh_gssapi_build_ctx(Gssctxt **ctx);
109void ssh_gssapi_delete_ctx(Gssctxt **ctx);
110OM_uint32 ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid);
111
112/* In the server */
113int ssh_gssapi_userok(char *name);
114
115void ssh_gssapi_do_child(char ***envp, u_int *envsizep);
116void ssh_gssapi_cleanup_creds(void *ignored);
117void ssh_gssapi_storecreds(void);
118
119#endif /* GSSAPI */
120
121#endif /* _SSH_GSS_H */
diff --git a/ssh-keygen.0 b/ssh-keygen.0
index 2db957554..515d9f94c 100644
--- a/ssh-keygen.0
+++ b/ssh-keygen.0
@@ -15,18 +15,12 @@ SYNOPSIS
15 ssh-keygen -B [-f input_keyfile] 15 ssh-keygen -B [-f input_keyfile]
16 ssh-keygen -D reader 16 ssh-keygen -D reader
17 ssh-keygen -U reader [-f input_keyfile] 17 ssh-keygen -U reader [-f input_keyfile]
18 ssh-keygen -r hostname [-f input_keyfile] [-g]
19 ssh-keygen -G output_file [-b bits] [-M memory] [-S start_point]
20 ssh-keygen -T output_file -f input_file [-a num_trials] [-W generator]
21 18
22DESCRIPTION 19DESCRIPTION
23 ssh-keygen generates, manages and converts authentication keys for 20 ssh-keygen generates, manages and converts authentication keys for
24 ssh(1). ssh-keygen can create RSA keys for use by SSH protocol version 1 21 ssh(1). ssh-keygen can create RSA keys for use by SSH protocol version 1
25 and RSA or DSA keys for use by SSH protocol version 2. The type of key 22 and RSA or DSA keys for use by SSH protocol version 2. The type of key to
26 to be generated is specified with the -t option. 23 be generated is specified with the -t option.
27
28 ssh-keygen is also used to generate groups for use in Diffie-Hellman
29 group exchange (DH-GEX). See the MODULI GENERATION section for details.
30 24
31 Normally each user wishing to use SSH with RSA or DSA authentication runs 25 Normally each user wishing to use SSH with RSA or DSA authentication runs
32 this once to create the authentication key in $HOME/.ssh/identity, 26 this once to create the authentication key in $HOME/.ssh/identity,
@@ -62,10 +56,6 @@ DESCRIPTION
62 56
63 The options are as follows: 57 The options are as follows:
64 58
65 -a trials
66 Specifies the number of primality tests to perform when screening
67 DH-GEX candidates using the -T command.
68
69 -b bits 59 -b bits
70 Specifies the number of bits in the key to create. Minimum is 60 Specifies the number of bits in the key to create. Minimum is
71 512 bits. Generally, 1024 bits is considered sufficient. The 61 512 bits. Generally, 1024 bits is considered sufficient. The
@@ -81,8 +71,6 @@ DESCRIPTION
81 This option allows exporting keys for use by several commercial 71 This option allows exporting keys for use by several commercial
82 SSH implementations. 72 SSH implementations.
83 73
84 -g Use generic DNS resource record format.
85
86 -f filename 74 -f filename
87 Specifies the filename of the key file. 75 Specifies the filename of the key file.
88 76
@@ -120,71 +108,15 @@ DESCRIPTION
120 -D reader 108 -D reader
121 Download the RSA public key stored in the smartcard in reader. 109 Download the RSA public key stored in the smartcard in reader.
122 110
123 -G output_file
124 Generate candidate primes for DH-GEX. These primes must be
125 screened for safety (using the -T option) before use.
126
127 -M memory
128 Specify the amount of memory to use (in megabytes) when generat-
129 ing candidate moduli for DH-GEX.
130
131 -N new_passphrase 111 -N new_passphrase
132 Provides the new passphrase. 112 Provides the new passphrase.
133 113
134 -P passphrase 114 -P passphrase
135 Provides the (old) passphrase. 115 Provides the (old) passphrase.
136 116
137 -S start
138 Specify start point (in hex) when generating candidate moduli for
139 DH-GEX.
140
141 -T output_file
142 Test DH group exchange candidate primes (generated using the -G
143 option) for safety.
144
145 -W generator
146 Specify desired generator when testing candidate moduli for DH-
147 GEX.
148
149 -U reader 117 -U reader
150 Upload an existing RSA private key into the smartcard in reader. 118 Upload an existing RSA private key into the smartcard in reader.
151 119
152 -r hostname
153 Print DNS resource record with the specified hostname.
154
155MODULI GENERATION
156 ssh-keygen may be used to generate groups for the Diffie-Hellman Group
157 Exchange (DH-GEX) protocol. Generating these groups is a two-step pro-
158 cess: first, candidate primes are generated using a fast, but memory
159 intensive process. These candidate primes are then tested for suitabil-
160 ity (a CPU-intensive process).
161
162 Generation of primes is performed using the -G option. The desired
163 length of the primes may be specified by the -b option. For example:
164
165 ssh-keygen -G moduli-2048.candidates -b 2048
166
167 By default, the search for primes begins at a random point in the desired
168 length range. This may be overridden using the -S option, which speci-
169 fies a different start point (in hex).
170
171 Once a set of candidates have been generated, they must be tested for
172 suitability. This may be performed using the -T option. In this mode
173 ssh-keygen will read candidates from standard input (or a file specified
174 using the -f option). For example:
175
176 ssh-keygen -T moduli-2048 -f moduli-2048.candidates
177
178 By default, each candidate will be subjected to 100 primality tests.
179 This may be overridden using the -a option. The DH generator value will
180 be chosen automatically for the prime under consideration. If a specific
181 generator is desired, it may be requested using the -W option. Valid
182 generator values are 2, 3 and 5.
183
184 Screened DH groups may be installed in /etc/moduli. It is important that
185 this file contains moduli of a range of bit lengths and that both ends of
186 a connection share common moduli.
187
188FILES 120FILES
189 $HOME/.ssh/identity 121 $HOME/.ssh/identity
190 Contains the protocol version 1 RSA authentication identity of 122 Contains the protocol version 1 RSA authentication identity of
@@ -234,16 +166,6 @@ FILES
234 to log in using public key authentication. There is no need to 166 to log in using public key authentication. There is no need to
235 keep the contents of this file secret. 167 keep the contents of this file secret.
236 168
237 /etc/moduli
238 Contains Diffie-Hellman groups used for DH-GEX. The file format
239 is described in moduli(5).
240
241SEE ALSO
242 ssh(1), ssh-add(1), ssh-agent(1), moduli(5), sshd(8)
243
244 J. Galbraith and R. Thayer, SECSH Public Key File Format, draft-ietf-
245 secsh-publickeyfile-01.txt, March 2001, work in progress material.
246
247AUTHORS 169AUTHORS
248 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 170 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
249 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo 171 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
@@ -251,4 +173,10 @@ AUTHORS
251 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 173 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
252 versions 1.5 and 2.0. 174 versions 1.5 and 2.0.
253 175
176SEE ALSO
177 ssh(1), ssh-add(1), ssh-agent(1), sshd(8)
178
179 J. Galbraith and R. Thayer, SECSH Public Key File Format, draft-ietf-
180 secsh-publickeyfile-01.txt, March 2001, work in progress material.
181
254BSD September 25, 1999 BSD 182BSD September 25, 1999 BSD
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index dc4bcacd0..000e8ff2a 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.60 2003/07/28 09:49:56 djm Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.56 2003/03/28 10:11:43 jmc Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -83,38 +83,17 @@
83.Nm ssh-keygen 83.Nm ssh-keygen
84.Fl U Ar reader 84.Fl U Ar reader
85.Op Fl f Ar input_keyfile 85.Op Fl f Ar input_keyfile
86.Nm ssh-keygen
87.Fl r Ar hostname
88.Op Fl f Ar input_keyfile
89.Op Fl g
90.Nm ssh-keygen
91.Fl G Ar output_file
92.Op Fl b Ar bits
93.Op Fl M Ar memory
94.Op Fl S Ar start_point
95.Nm ssh-keygen
96.Fl T Ar output_file
97.Fl f Ar input_file
98.Op Fl a Ar num_trials
99.Op Fl W Ar generator
100.Sh DESCRIPTION 86.Sh DESCRIPTION
101.Nm 87.Nm
102generates, manages and converts authentication keys for 88generates, manages and converts authentication keys for
103.Xr ssh 1 . 89.Xr ssh 1 .
104.Nm 90.Nm
105can create RSA keys for use by SSH protocol version 1 and RSA or DSA 91can create RSA keys for use by SSH protocol version 1 and RSA or DSA
106keys for use by SSH protocol version 2. 92keys for use by SSH protocol version 2. The type of key to be generated
107The type of key to be generated is specified with the 93is specified with the
108.Fl t 94.Fl t
109option. 95option.
110.Pp 96.Pp
111.Nm
112is also used to generate groups for use in Diffie-Hellman group
113exchange (DH-GEX).
114See the
115.Sx MODULI GENERATION
116section for details.
117.Pp
118Normally each user wishing to use SSH 97Normally each user wishing to use SSH
119with RSA or DSA authentication runs this once to create the authentication 98with RSA or DSA authentication runs this once to create the authentication
120key in 99key in
@@ -167,11 +146,6 @@ should be placed to be activated.
167.Pp 146.Pp
168The options are as follows: 147The options are as follows:
169.Bl -tag -width Ds 148.Bl -tag -width Ds
170.It Fl a Ar trials
171Specifies the number of primality tests to perform when screening DH-GEX
172candidates using the
173.Fl T
174command.
175.It Fl b Ar bits 149.It Fl b Ar bits
176Specifies the number of bits in the key to create. 150Specifies the number of bits in the key to create.
177Minimum is 512 bits. 151Minimum is 512 bits.
@@ -189,8 +163,6 @@ print the key in a
189to stdout. 163to stdout.
190This option allows exporting keys for use by several commercial 164This option allows exporting keys for use by several commercial
191SSH implementations. 165SSH implementations.
192.It Fl g
193Use generic DNS resource record format.
194.It Fl f Ar filename 166.It Fl f Ar filename
195Specifies the filename of the key file. 167Specifies the filename of the key file.
196.It Fl i 168.It Fl i
@@ -239,88 +211,14 @@ Provides the new comment.
239.It Fl D Ar reader 211.It Fl D Ar reader
240Download the RSA public key stored in the smartcard in 212Download the RSA public key stored in the smartcard in
241.Ar reader . 213.Ar reader .
242.It Fl G Ar output_file
243Generate candidate primes for DH-GEX.
244These primes must be screened for
245safety (using the
246.Fl T
247option) before use.
248.It Fl M Ar memory
249Specify the amount of memory to use (in megabytes) when generating
250candidate moduli for DH-GEX.
251.It Fl N Ar new_passphrase 214.It Fl N Ar new_passphrase
252Provides the new passphrase. 215Provides the new passphrase.
253.It Fl P Ar passphrase 216.It Fl P Ar passphrase
254Provides the (old) passphrase. 217Provides the (old) passphrase.
255.It Fl S Ar start
256Specify start point (in hex) when generating candidate moduli for DH-GEX.
257.It Fl T Ar output_file
258Test DH group exchange candidate primes (generated using the
259.Fl G
260option) for safety.
261.It Fl W Ar generator
262Specify desired generator when testing candidate moduli for DH-GEX.
263.It Fl U Ar reader 218.It Fl U Ar reader
264Upload an existing RSA private key into the smartcard in 219Upload an existing RSA private key into the smartcard in
265.Ar reader . 220.Ar reader .
266.It Fl r Ar hostname
267Print DNS resource record with the specified
268.Ar hostname .
269.El 221.El
270.Sh MODULI GENERATION
271.Nm
272may be used to generate groups for the Diffie-Hellman Group Exchange
273(DH-GEX) protocol.
274Generating these groups is a two-step process: first, candidate
275primes are generated using a fast, but memory intensive process.
276These candidate primes are then tested for suitability (a CPU-intensive
277process).
278.Pp
279Generation of primes is performed using the
280.Fl G
281option.
282The desired length of the primes may be specified by the
283.Fl b
284option.
285For example:
286.Pp
287.Dl ssh-keygen -G moduli-2048.candidates -b 2048
288.Pp
289By default, the search for primes begins at a random point in the
290desired length range.
291This may be overridden using the
292.Fl S
293option, which specifies a different start point (in hex).
294.Pp
295Once a set of candidates have been generated, they must be tested for
296suitability.
297This may be performed using the
298.Fl T
299option.
300In this mode
301.Nm
302will read candidates from standard input (or a file specified using the
303.Fl f
304option).
305For example:
306.Pp
307.Dl ssh-keygen -T moduli-2048 -f moduli-2048.candidates
308.Pp
309By default, each candidate will be subjected to 100 primality tests.
310This may be overridden using the
311.Fl a
312option.
313The DH generator value will be chosen automatically for the
314prime under consideration.
315If a specific generator is desired, it may be requested using the
316.Fl W
317option.
318Valid generator values are 2, 3 and 5.
319.Pp
320Screened DH groups may be installed in
321.Pa /etc/moduli .
322It is important that this file contains moduli of a range of bit lengths and
323that both ends of a connection share common moduli.
324.Sh FILES 222.Sh FILES
325.Bl -tag -width Ds 223.Bl -tag -width Ds
326.It Pa $HOME/.ssh/identity 224.It Pa $HOME/.ssh/identity
@@ -377,16 +275,20 @@ The contents of this file should be added to
377on all machines 275on all machines
378where the user wishes to log in using public key authentication. 276where the user wishes to log in using public key authentication.
379There is no need to keep the contents of this file secret. 277There is no need to keep the contents of this file secret.
380.It Pa /etc/moduli
381Contains Diffie-Hellman groups used for DH-GEX.
382The file format is described in
383.Xr moduli 5 .
384.El 278.El
279.Sh AUTHORS
280OpenSSH is a derivative of the original and free
281ssh 1.2.12 release by Tatu Ylonen.
282Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
283Theo de Raadt and Dug Song
284removed many bugs, re-added newer features and
285created OpenSSH.
286Markus Friedl contributed the support for SSH
287protocol versions 1.5 and 2.0.
385.Sh SEE ALSO 288.Sh SEE ALSO
386.Xr ssh 1 , 289.Xr ssh 1 ,
387.Xr ssh-add 1 , 290.Xr ssh-add 1 ,
388.Xr ssh-agent 1 , 291.Xr ssh-agent 1 ,
389.Xr moduli 5 ,
390.Xr sshd 8 292.Xr sshd 8
391.Rs 293.Rs
392.%A J. Galbraith 294.%A J. Galbraith
@@ -396,12 +298,3 @@ The file format is described in
396.%D March 2001 298.%D March 2001
397.%O work in progress material 299.%O work in progress material
398.Re 300.Re
399.Sh AUTHORS
400OpenSSH is a derivative of the original and free
401ssh 1.2.12 release by Tatu Ylonen.
402Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
403Theo de Raadt and Dug Song
404removed many bugs, re-added newer features and
405created OpenSSH.
406Markus Friedl contributed the support for SSH
407protocol versions 1.5 and 2.0.
diff --git a/ssh-keygen.c b/ssh-keygen.c
index e74d3cd37..6a872bcfd 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.108 2003/08/14 16:08:58 markus Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.102 2002/11/26 00:45:03 wcobb Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -27,14 +27,10 @@ RCSID("$OpenBSD: ssh-keygen.c,v 1.108 2003/08/14 16:08:58 markus Exp $");
27#include "pathnames.h" 27#include "pathnames.h"
28#include "log.h" 28#include "log.h"
29#include "readpass.h" 29#include "readpass.h"
30#include "moduli.h"
31 30
32#ifdef SMARTCARD 31#ifdef SMARTCARD
33#include "scard.h" 32#include "scard.h"
34#endif 33#endif
35#ifdef DNS
36#include "dns.h"
37#endif
38 34
39/* Number of bits in the RSA/DSA key. This value can be changed on the command line. */ 35/* Number of bits in the RSA/DSA key. This value can be changed on the command line. */
40int bits = 1024; 36int bits = 1024;
@@ -74,7 +70,6 @@ char *identity_comment = NULL;
74int convert_to_ssh2 = 0; 70int convert_to_ssh2 = 0;
75int convert_from_ssh2 = 0; 71int convert_from_ssh2 = 0;
76int print_public = 0; 72int print_public = 0;
77int print_generic = 0;
78 73
79char *key_type_name = NULL; 74char *key_type_name = NULL;
80 75
@@ -168,10 +163,6 @@ do_convert_to_ssh2(struct passwd *pw)
168 exit(1); 163 exit(1);
169 } 164 }
170 } 165 }
171 if (k->type == KEY_RSA1) {
172 fprintf(stderr, "version 1 keys are not supported\n");
173 exit(1);
174 }
175 if (key_to_blob(k, &blob, &len) <= 0) { 166 if (key_to_blob(k, &blob, &len) <= 0) {
176 fprintf(stderr, "key_to_blob failed\n"); 167 fprintf(stderr, "key_to_blob failed\n");
177 exit(1); 168 exit(1);
@@ -424,7 +415,7 @@ do_upload(struct passwd *pw, const char *sc_reader_id)
424 key_free(prv); 415 key_free(prv);
425 if (ret < 0) 416 if (ret < 0)
426 exit(1); 417 exit(1);
427 logit("loading key done"); 418 log("loading key done");
428 exit(0); 419 exit(0);
429} 420}
430 421
@@ -625,38 +616,6 @@ do_change_passphrase(struct passwd *pw)
625 exit(0); 616 exit(0);
626} 617}
627 618
628#ifdef DNS
629/*
630 * Print the SSHFP RR.
631 */
632static void
633do_print_resource_record(struct passwd *pw, char *hostname)
634{
635 Key *public;
636 char *comment = NULL;
637 struct stat st;
638
639 if (!have_identity)
640 ask_filename(pw, "Enter file in which the key is");
641 if (stat(identity_file, &st) < 0) {
642 perror(identity_file);
643 exit(1);
644 }
645 public = key_load_public(identity_file, &comment);
646 if (public != NULL) {
647 export_dns_rr(hostname, public, stdout, print_generic);
648 key_free(public);
649 xfree(comment);
650 exit(0);
651 }
652 if (comment)
653 xfree(comment);
654
655 printf("failed to read v2 public key from %s.\n", identity_file);
656 exit(1);
657}
658#endif /* DNS */
659
660/* 619/*
661 * Change the comment of a private key file. 620 * Change the comment of a private key file.
662 */ 621 */
@@ -763,7 +722,6 @@ usage(void)
763 fprintf(stderr, " -c Change comment in private and public key files.\n"); 722 fprintf(stderr, " -c Change comment in private and public key files.\n");
764 fprintf(stderr, " -e Convert OpenSSH to IETF SECSH key file.\n"); 723 fprintf(stderr, " -e Convert OpenSSH to IETF SECSH key file.\n");
765 fprintf(stderr, " -f filename Filename of the key file.\n"); 724 fprintf(stderr, " -f filename Filename of the key file.\n");
766 fprintf(stderr, " -g Use generic DNS resource record format.\n");
767 fprintf(stderr, " -i Convert IETF SECSH to OpenSSH key file.\n"); 725 fprintf(stderr, " -i Convert IETF SECSH to OpenSSH key file.\n");
768 fprintf(stderr, " -l Show fingerprint of key file.\n"); 726 fprintf(stderr, " -l Show fingerprint of key file.\n");
769 fprintf(stderr, " -p Change passphrase of private key file.\n"); 727 fprintf(stderr, " -p Change passphrase of private key file.\n");
@@ -774,17 +732,11 @@ usage(void)
774 fprintf(stderr, " -C comment Provide new comment.\n"); 732 fprintf(stderr, " -C comment Provide new comment.\n");
775 fprintf(stderr, " -N phrase Provide new passphrase.\n"); 733 fprintf(stderr, " -N phrase Provide new passphrase.\n");
776 fprintf(stderr, " -P phrase Provide old passphrase.\n"); 734 fprintf(stderr, " -P phrase Provide old passphrase.\n");
777#ifdef DNS
778 fprintf(stderr, " -r hostname Print DNS resource record.\n");
779#endif /* DNS */
780#ifdef SMARTCARD 735#ifdef SMARTCARD
781 fprintf(stderr, " -D reader Download public key from smartcard.\n"); 736 fprintf(stderr, " -D reader Download public key from smartcard.\n");
782 fprintf(stderr, " -U reader Upload private key to smartcard.\n"); 737 fprintf(stderr, " -U reader Upload private key to smartcard.\n");
783#endif /* SMARTCARD */ 738#endif /* SMARTCARD */
784 739
785 fprintf(stderr, " -G file Generate candidates for DH-GEX moduli\n");
786 fprintf(stderr, " -T file Screen candidates for DH-GEX moduli\n");
787
788 exit(1); 740 exit(1);
789} 741}
790 742
@@ -795,25 +747,19 @@ int
795main(int ac, char **av) 747main(int ac, char **av)
796{ 748{
797 char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2; 749 char dotsshdir[MAXPATHLEN], comment[1024], *passphrase1, *passphrase2;
798 char out_file[MAXPATHLEN], *reader_id = NULL; 750 char *reader_id = NULL;
799 char *resource_record_hostname = NULL;
800 Key *private, *public; 751 Key *private, *public;
801 struct passwd *pw; 752 struct passwd *pw;
802 struct stat st; 753 struct stat st;
803 int opt, type, fd, download = 0, memory = 0; 754 int opt, type, fd, download = 0;
804 int generator_wanted = 0, trials = 100;
805 int do_gen_candidates = 0, do_screen_candidates = 0;
806 BIGNUM *start = NULL;
807 FILE *f; 755 FILE *f;
808 756
809 extern int optind; 757 extern int optind;
810 extern char *optarg; 758 extern char *optarg;
811 759
812 __progname = ssh_get_progname(av[0]); 760 __progname = get_progname(av[0]);
813 761
814 SSLeay_add_all_algorithms(); 762 SSLeay_add_all_algorithms();
815 log_init(av[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
816
817 init_rng(); 763 init_rng();
818 seed_rng(); 764 seed_rng();
819 765
@@ -828,8 +774,7 @@ main(int ac, char **av)
828 exit(1); 774 exit(1);
829 } 775 }
830 776
831 while ((opt = getopt(ac, av, 777 while ((opt = getopt(ac, av, "deiqpclBRxXyb:f:t:U:D:P:N:C:")) != -1) {
832 "degiqpclBRxXyb:f:t:U:D:P:N:C:r:g:T:G:M:S:a:W:")) != -1) {
833 switch (opt) { 778 switch (opt) {
834 case 'b': 779 case 'b':
835 bits = atoi(optarg); 780 bits = atoi(optarg);
@@ -854,9 +799,6 @@ main(int ac, char **av)
854 strlcpy(identity_file, optarg, sizeof(identity_file)); 799 strlcpy(identity_file, optarg, sizeof(identity_file));
855 have_identity = 1; 800 have_identity = 1;
856 break; 801 break;
857 case 'g':
858 print_generic = 1;
859 break;
860 case 'P': 802 case 'P':
861 identity_passphrase = optarg; 803 identity_passphrase = optarg;
862 break; 804 break;
@@ -897,42 +839,6 @@ main(int ac, char **av)
897 case 'U': 839 case 'U':
898 reader_id = optarg; 840 reader_id = optarg;
899 break; 841 break;
900 case 'r':
901 resource_record_hostname = optarg;
902 break;
903 case 'W':
904 generator_wanted = atoi(optarg);
905 if (generator_wanted < 1)
906 fatal("Desired generator has bad value.");
907 break;
908 case 'a':
909 trials = atoi(optarg);
910 if (trials < TRIAL_MINIMUM) {
911 fatal("Minimum primality trials is %d",
912 TRIAL_MINIMUM);
913 }
914 break;
915 case 'M':
916 memory = atoi(optarg);
917 if (memory != 0 &&
918 (memory < LARGE_MINIMUM || memory > LARGE_MAXIMUM)) {
919 fatal("Invalid memory amount (min %ld, max %ld)",
920 LARGE_MINIMUM, LARGE_MAXIMUM);
921 }
922 break;
923 case 'G':
924 do_gen_candidates = 1;
925 strlcpy(out_file, optarg, sizeof(out_file));
926 break;
927 case 'T':
928 do_screen_candidates = 1;
929 strlcpy(out_file, optarg, sizeof(out_file));
930 break;
931 case 'S':
932 /* XXX - also compare length against bits */
933 if (BN_hex2bn(&start, optarg) == 0)
934 fatal("Invalid start point.");
935 break;
936 case '?': 842 case '?':
937 default: 843 default:
938 usage(); 844 usage();
@@ -958,13 +864,6 @@ main(int ac, char **av)
958 do_convert_from_ssh2(pw); 864 do_convert_from_ssh2(pw);
959 if (print_public) 865 if (print_public)
960 do_print_public(pw); 866 do_print_public(pw);
961 if (resource_record_hostname != NULL) {
962#ifdef DNS
963 do_print_resource_record(pw, resource_record_hostname);
964#else /* DNS */
965 fatal("no DNS support.");
966#endif /* DNS */
967 }
968 if (reader_id != NULL) { 867 if (reader_id != NULL) {
969#ifdef SMARTCARD 868#ifdef SMARTCARD
970 if (download) 869 if (download)
@@ -976,42 +875,6 @@ main(int ac, char **av)
976#endif /* SMARTCARD */ 875#endif /* SMARTCARD */
977 } 876 }
978 877
979 if (do_gen_candidates) {
980 FILE *out = fopen(out_file, "w");
981
982 if (out == NULL) {
983 error("Couldn't open modulus candidate file \"%s\": %s",
984 out_file, strerror(errno));
985 return (1);
986 }
987 if (gen_candidates(out, memory, bits, start) != 0)
988 fatal("modulus candidate generation failed\n");
989
990 return (0);
991 }
992
993 if (do_screen_candidates) {
994 FILE *in;
995 FILE *out = fopen(out_file, "w");
996
997 if (have_identity && strcmp(identity_file, "-") != 0) {
998 if ((in = fopen(identity_file, "r")) == NULL) {
999 fatal("Couldn't open modulus candidate "
1000 "file \"%s\": %s", identity_file,
1001 strerror(errno));
1002 }
1003 } else
1004 in = stdin;
1005
1006 if (out == NULL) {
1007 fatal("Couldn't open moduli file \"%s\": %s",
1008 out_file, strerror(errno));
1009 }
1010 if (prime_test(in, out, trials, generator_wanted) != 0)
1011 fatal("modulus screening failed\n");
1012 return (0);
1013 }
1014
1015 arc4random_stir(); 878 arc4random_stir();
1016 879
1017 if (key_type_name == NULL) { 880 if (key_type_name == NULL) {
diff --git a/ssh-keyscan.0 b/ssh-keyscan.0
index 23d9f943c..19031a27f 100644
--- a/ssh-keyscan.0
+++ b/ssh-keyscan.0
@@ -57,6 +57,17 @@ SECURITY
57 detection of tampered keyfiles or man in the middle attacks which have 57 detection of tampered keyfiles or man in the middle attacks which have
58 begun after the ssh_known_hosts file was created. 58 begun after the ssh_known_hosts file was created.
59 59
60EXAMPLES
61 Print the rsa1 host key for machine hostname:
62
63 $ ssh-keyscan hostname
64
65 Find all hosts from the file ssh_hosts which have new or different keys
66 from those in the sorted file ssh_known_hosts:
67
68 $ ssh-keyscan -t rsa,dsa -f ssh_hosts | \
69 sort -u - ssh_known_hosts | diff ssh_known_hosts -
70
60FILES 71FILES
61 Input format: 72 Input format:
62 73
@@ -70,33 +81,22 @@ FILES
70 81
71 host-or-namelist keytype base64-encoded-key 82 host-or-namelist keytype base64-encoded-key
72 83
73 Where keytype is either M-bM-^@M-^\ssh-rsaM-bM-^@M-^] or M-bM-^@M-^\ssh-dssM-bM-^@M-^]. 84 Where keytype is either M-bM-^@M-^\ssh-rsaM-bM-^@M-^] or M-bM-^@M-^\ssh-dsaM-bM-^@M-^].
74 85
75 /etc/ssh/ssh_known_hosts 86 /etc/ssh/ssh_known_hosts
76 87
77EXAMPLES
78 Print the rsa1 host key for machine hostname:
79
80 $ ssh-keyscan hostname
81
82 Find all hosts from the file ssh_hosts which have new or different keys
83 from those in the sorted file ssh_known_hosts:
84
85 $ ssh-keyscan -t rsa,dsa -f ssh_hosts | \
86 sort -u - ssh_known_hosts | diff ssh_known_hosts -
87
88SEE ALSO
89 ssh(1), sshd(8)
90
91AUTHORS
92 David Mazieres M-bM-^LM-)dm@lcs.mit.eduM-bM-^LM-* wrote the initial version, and
93 Wayne Davison M-bM-^LM-)wayned@users.sourceforge.netM-bM-^LM-* added support for protocol
94 version 2.
95
96BUGS 88BUGS
97 It generates "Connection closed by remote host" messages on the consoles 89 It generates "Connection closed by remote host" messages on the consoles
98 of all the machines it scans if the server is older than version 2.9. 90 of all the machines it scans if the server is older than version 2.9.
99 This is because it opens a connection to the ssh port, reads the public 91 This is because it opens a connection to the ssh port, reads the public
100 key, and drops the connection as soon as it gets the key. 92 key, and drops the connection as soon as it gets the key.
101 93
94SEE ALSO
95 ssh(1), sshd(8)
96
97AUTHORS
98 David Mazieres <dm@lcs.mit.edu> wrote the initial version, and Wayne
99 Davison <wayned@users.sourceforge.net> added support for protocol version
100 2.
101
102BSD January 1, 1996 BSD 102BSD January 1, 1996 BSD
diff --git a/ssh-keyscan.1 b/ssh-keyscan.1
index 572751f66..f6596c481 100644
--- a/ssh-keyscan.1
+++ b/ssh-keyscan.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keyscan.1,v 1.17 2003/06/10 09:12:11 jmc Exp $ 1.\" $OpenBSD: ssh-keyscan.1,v 1.15 2003/03/28 10:11:43 jmc Exp $
2.\" 2.\"
3.\" Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3.\" Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4.\" 4.\"
@@ -103,6 +103,24 @@ On the other hand, if the security model allows such a risk,
103.Nm 103.Nm
104can help in the detection of tampered keyfiles or man in the middle 104can help in the detection of tampered keyfiles or man in the middle
105attacks which have begun after the ssh_known_hosts file was created. 105attacks which have begun after the ssh_known_hosts file was created.
106.Sh EXAMPLES
107.Pp
108Print the
109.Pa rsa1
110host key for machine
111.Pa hostname :
112.Bd -literal
113$ ssh-keyscan hostname
114.Ed
115.Pp
116Find all hosts from the file
117.Pa ssh_hosts
118which have new or different keys from those in the sorted file
119.Pa ssh_known_hosts :
120.Bd -literal
121$ ssh-keyscan -t rsa,dsa -f ssh_hosts | \e\
122 sort -u - ssh_known_hosts | diff ssh_known_hosts -
123.Ed
106.Sh FILES 124.Sh FILES
107.Pa Input format: 125.Pa Input format:
108.Bd -literal 126.Bd -literal
@@ -124,36 +142,19 @@ Where
124is either 142is either
125.Dq ssh-rsa 143.Dq ssh-rsa
126or 144or
127.Dq ssh-dss . 145.Dq ssh-dsa .
128.Pp 146.Pp
129.Pa /etc/ssh/ssh_known_hosts 147.Pa /etc/ssh/ssh_known_hosts
130.Sh EXAMPLES 148.Sh BUGS
131Print the 149It generates "Connection closed by remote host" messages on the consoles
132.Pa rsa1 150of all the machines it scans if the server is older than version 2.9.
133host key for machine 151This is because it opens a connection to the ssh port, reads the public
134.Pa hostname : 152key, and drops the connection as soon as it gets the key.
135.Bd -literal
136$ ssh-keyscan hostname
137.Ed
138.Pp
139Find all hosts from the file
140.Pa ssh_hosts
141which have new or different keys from those in the sorted file
142.Pa ssh_known_hosts :
143.Bd -literal
144$ ssh-keyscan -t rsa,dsa -f ssh_hosts | \e
145 sort -u - ssh_known_hosts | diff ssh_known_hosts -
146.Ed
147.Sh SEE ALSO 153.Sh SEE ALSO
148.Xr ssh 1 , 154.Xr ssh 1 ,
149.Xr sshd 8 155.Xr sshd 8
150.Sh AUTHORS 156.Sh AUTHORS
151.An David Mazieres Aq dm@lcs.mit.edu 157David Mazieres <dm@lcs.mit.edu>
152wrote the initial version, and 158wrote the initial version, and
153.An Wayne Davison Aq wayned@users.sourceforge.net 159Wayne Davison <wayned@users.sourceforge.net>
154added support for protocol version 2. 160added support for protocol version 2.
155.Sh BUGS
156It generates "Connection closed by remote host" messages on the consoles
157of all the machines it scans if the server is older than version 2.9.
158This is because it opens a connection to the ssh port, reads the public
159key, and drops the connection as soon as it gets the key.
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index e541b4709..07e1a5cd5 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$OpenBSD: ssh-keyscan.c,v 1.44 2003/06/28 16:23:06 deraadt Exp $"); 10RCSID("$OpenBSD: ssh-keyscan.c,v 1.41 2003/02/16 17:09:57 markus Exp $");
11 11
12#include "openbsd-compat/sys-queue.h" 12#include "openbsd-compat/sys-queue.h"
13 13
@@ -31,7 +31,11 @@ RCSID("$OpenBSD: ssh-keyscan.c,v 1.44 2003/06/28 16:23:06 deraadt Exp $");
31 31
32/* Flag indicating whether IPv4 or IPv6. This can be set on the command line. 32/* Flag indicating whether IPv4 or IPv6. This can be set on the command line.
33 Default value is AF_UNSPEC means both IPv4 and IPv6. */ 33 Default value is AF_UNSPEC means both IPv4 and IPv6. */
34#ifdef IPV4_DEFAULT
35int IPv4or6 = AF_INET;
36#else
34int IPv4or6 = AF_UNSPEC; 37int IPv4or6 = AF_UNSPEC;
38#endif
35 39
36int ssh_port = SSH_DEFAULT_PORT; 40int ssh_port = SSH_DEFAULT_PORT;
37 41
@@ -393,7 +397,7 @@ tcpconnect(char *host)
393 if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) 397 if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
394 fatal("getaddrinfo %s: %s", host, gai_strerror(gaierr)); 398 fatal("getaddrinfo %s: %s", host, gai_strerror(gaierr));
395 for (ai = aitop; ai; ai = ai->ai_next) { 399 for (ai = aitop; ai; ai = ai->ai_next) {
396 s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 400 s = socket(ai->ai_family, SOCK_STREAM, 0);
397 if (s < 0) { 401 if (s < 0) {
398 error("socket: %s", strerror(errno)); 402 error("socket: %s", strerror(errno));
399 continue; 403 continue;
@@ -541,7 +545,7 @@ congreet(int s)
541 n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n", 545 n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n",
542 c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2, 546 c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2,
543 c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2); 547 c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2);
544 if (atomicio(vwrite, s, buf, n) != n) { 548 if (atomicio(write, s, buf, n) != n) {
545 error("write (%s): %s", c->c_name, strerror(errno)); 549 error("write (%s): %s", c->c_name, strerror(errno));
546 confree(s); 550 confree(s);
547 return; 551 return;
@@ -681,7 +685,7 @@ fatal(const char *fmt,...)
681static void 685static void
682usage(void) 686usage(void)
683{ 687{
684 fprintf(stderr, "usage: %s [-v46] [-p port] [-T timeout] [-t type] [-f file]\n" 688 fprintf(stderr, "usage: %s [-v46] [-p port] [-T timeout] [-f file]\n"
685 "\t\t [host | addrlist namelist] [...]\n", 689 "\t\t [host | addrlist namelist] [...]\n",
686 __progname); 690 __progname);
687 exit(1); 691 exit(1);
@@ -697,7 +701,7 @@ main(int argc, char **argv)
697 extern int optind; 701 extern int optind;
698 extern char *optarg; 702 extern char *optarg;
699 703
700 __progname = ssh_get_progname(argv[0]); 704 __progname = get_progname(argv[0]);
701 init_rng(); 705 init_rng();
702 seed_rng(); 706 seed_rng();
703 TAILQ_INIT(&tq); 707 TAILQ_INIT(&tq);
diff --git a/ssh-keysign.0 b/ssh-keysign.0
index 5e9c6f9c7..6fb9ca59b 100644
--- a/ssh-keysign.0
+++ b/ssh-keysign.0
@@ -33,10 +33,10 @@ FILES
33SEE ALSO 33SEE ALSO
34 ssh(1), ssh-keygen(1), ssh_config(5), sshd(8) 34 ssh(1), ssh-keygen(1), ssh_config(5), sshd(8)
35 35
36AUTHORS
37 Markus Friedl <markus@openbsd.org>
38
36HISTORY 39HISTORY
37 ssh-keysign first appeared in OpenBSD 3.2. 40 ssh-keysign first appeared in OpenBSD 3.2.
38 41
39AUTHORS
40 Markus Friedl M-bM-^LM-)markus@openbsd.orgM-bM-^LM-*
41
42BSD May 24, 2002 BSD 42BSD May 24, 2002 BSD
diff --git a/ssh-keysign.8 b/ssh-keysign.8
index a17e8d5cf..2e3f8ff3e 100644
--- a/ssh-keysign.8
+++ b/ssh-keysign.8
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keysign.8,v 1.7 2003/06/10 09:12:11 jmc Exp $ 1.\" $OpenBSD: ssh-keysign.8,v 1.6 2003/03/28 10:11:43 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2002 Markus Friedl. All rights reserved. 3.\" Copyright (c) 2002 Markus Friedl. All rights reserved.
4.\" 4.\"
@@ -74,9 +74,9 @@ must be set-uid root if hostbased authentication is used.
74.Xr ssh-keygen 1 , 74.Xr ssh-keygen 1 ,
75.Xr ssh_config 5 , 75.Xr ssh_config 5 ,
76.Xr sshd 8 76.Xr sshd 8
77.Sh AUTHORS
78Markus Friedl <markus@openbsd.org>
77.Sh HISTORY 79.Sh HISTORY
78.Nm 80.Nm
79first appeared in 81first appeared in
80.Ox 3.2 . 82.Ox 3.2 .
81.Sh AUTHORS
82.An Markus Friedl Aq markus@openbsd.org
diff --git a/ssh-keysign.c b/ssh-keysign.c
index c7ca5c4e4..26c8faad2 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: ssh-keysign.c,v 1.13 2003/07/03 08:09:06 djm Exp $"); 25RCSID("$OpenBSD: ssh-keysign.c,v 1.10 2003/03/13 11:42:19 markus Exp $");
26 26
27#include <openssl/evp.h> 27#include <openssl/evp.h>
28#include <openssl/rand.h> 28#include <openssl/rand.h>
@@ -42,8 +42,7 @@ RCSID("$OpenBSD: ssh-keysign.c,v 1.13 2003/07/03 08:09:06 djm Exp $");
42#include "pathnames.h" 42#include "pathnames.h"
43#include "readconf.h" 43#include "readconf.h"
44 44
45/* XXX readconf.c needs these */ 45uid_t original_real_uid; /* XXX readconf.c needs this */
46uid_t original_real_uid;
47 46
48#ifdef HAVE___PROGNAME 47#ifdef HAVE___PROGNAME
49extern char *__progname; 48extern char *__progname;
@@ -56,7 +55,7 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data,
56 u_int datalen) 55 u_int datalen)
57{ 56{
58 Buffer b; 57 Buffer b;
59 Key *key = NULL; 58 Key *key;
60 u_char *pkblob; 59 u_char *pkblob;
61 u_int blen, len; 60 u_int blen, len;
62 char *pkalg, *p; 61 char *pkalg, *p;
diff --git a/ssh-rand-helper.0 b/ssh-rand-helper.0
index 885bf19df..7e8c4b795 100644
--- a/ssh-rand-helper.0
+++ b/ssh-rand-helper.0
@@ -1,4 +1,4 @@
1SSH-RAND-HELPER(8) OpenBSD System Manager's Manual SSH-RAND-HELPER(8) 1SSH-RAND-HELPER(8) BSD System ManagerM-bM-^@M-^Ys Manual SSH-RAND-HELPER(8)
2 2
3NAME 3NAME
4 ssh-rand-helper - Random number gatherer for OpenSSH 4 ssh-rand-helper - Random number gatherer for OpenSSH
@@ -46,4 +46,4 @@ AUTHORS
46SEE ALSO 46SEE ALSO
47 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8) 47 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
48 48
49OpenBSD 3.4 April 14, 2002 1 49BSD April 14, 2002 BSD
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 7e65e4569..68b77b208 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -39,7 +39,7 @@
39#include "pathnames.h" 39#include "pathnames.h"
40#include "log.h" 40#include "log.h"
41 41
42RCSID("$Id: ssh-rand-helper.c,v 1.13 2003/08/21 23:34:41 djm Exp $"); 42RCSID("$Id: ssh-rand-helper.c,v 1.10 2003/03/17 05:13:53 djm Exp $");
43 43
44/* Number of bytes we write out */ 44/* Number of bytes we write out */
45#define OUTPUT_SEED_SIZE 48 45#define OUTPUT_SEED_SIZE 48
@@ -187,7 +187,7 @@ reopen:
187 msg[0] = 0x02; 187 msg[0] = 0x02;
188 msg[1] = len; 188 msg[1] = len;
189 189
190 if (atomicio(vwrite, fd, msg, sizeof(msg)) != sizeof(msg)) { 190 if (atomicio(write, fd, msg, sizeof(msg)) != sizeof(msg)) {
191 if (errno == EPIPE && errors < 10) { 191 if (errno == EPIPE && errors < 10) {
192 close(fd); 192 close(fd);
193 errors++; 193 errors++;
@@ -532,7 +532,7 @@ prng_check_seedfile(char *filename)
532 /* mode 0600, owned by root or the current user? */ 532 /* mode 0600, owned by root or the current user? */
533 if (((st.st_mode & 0177) != 0) || !(st.st_uid == getuid())) { 533 if (((st.st_mode & 0177) != 0) || !(st.st_uid == getuid())) {
534 debug("WARNING: PRNG seedfile %.100s must be mode 0600, " 534 debug("WARNING: PRNG seedfile %.100s must be mode 0600, "
535 "owned by uid %li", filename, (long int)getuid()); 535 "owned by uid %d", filename, getuid());
536 return 0; 536 return 0;
537 } 537 }
538 538
@@ -550,7 +550,7 @@ prng_write_seedfile(void)
550 pw = getpwuid(getuid()); 550 pw = getpwuid(getuid());
551 if (pw == NULL) 551 if (pw == NULL)
552 fatal("Couldn't get password entry for current user " 552 fatal("Couldn't get password entry for current user "
553 "(%li): %s", (long int)getuid(), strerror(errno)); 553 "(%i): %s", getuid(), strerror(errno));
554 554
555 /* Try to ensure that the parent directory is there */ 555 /* Try to ensure that the parent directory is there */
556 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, 556 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
@@ -572,7 +572,7 @@ prng_write_seedfile(void)
572 debug("WARNING: couldn't access PRNG seedfile %.100s " 572 debug("WARNING: couldn't access PRNG seedfile %.100s "
573 "(%.100s)", filename, strerror(errno)); 573 "(%.100s)", filename, strerror(errno));
574 } else { 574 } else {
575 if (atomicio(vwrite, fd, &seed, sizeof(seed)) < sizeof(seed)) 575 if (atomicio(write, fd, &seed, sizeof(seed)) < sizeof(seed))
576 fatal("problem writing PRNG seedfile %.100s " 576 fatal("problem writing PRNG seedfile %.100s "
577 "(%.100s)", filename, strerror(errno)); 577 "(%.100s)", filename, strerror(errno));
578 close(fd); 578 close(fd);
@@ -589,7 +589,7 @@ prng_read_seedfile(void)
589 pw = getpwuid(getuid()); 589 pw = getpwuid(getuid());
590 if (pw == NULL) 590 if (pw == NULL)
591 fatal("Couldn't get password entry for current user " 591 fatal("Couldn't get password entry for current user "
592 "(%li): %s", (long int)getuid(), strerror(errno)); 592 "(%i): %s", getuid(), strerror(errno));
593 593
594 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, 594 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
595 SSH_PRNG_SEED_FILE); 595 SSH_PRNG_SEED_FILE);
@@ -769,7 +769,7 @@ main(int argc, char **argv)
769 extern char *optarg; 769 extern char *optarg;
770 LogLevel ll; 770 LogLevel ll;
771 771
772 __progname = ssh_get_progname(argv[0]); 772 __progname = get_progname(argv[0]);
773 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); 773 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
774 774
775 ll = SYSLOG_LEVEL_INFO; 775 ll = SYSLOG_LEVEL_INFO;
@@ -858,7 +858,7 @@ main(int argc, char **argv)
858 printf("%02x", (unsigned char)(buf[ret])); 858 printf("%02x", (unsigned char)(buf[ret]));
859 printf("\n"); 859 printf("\n");
860 } else 860 } else
861 ret = atomicio(vwrite, STDOUT_FILENO, buf, bytes); 861 ret = atomicio(write, STDOUT_FILENO, buf, bytes);
862 862
863 memset(buf, '\0', bytes); 863 memset(buf, '\0', bytes);
864 xfree(buf); 864 xfree(buf);
diff --git a/ssh-rsa.c b/ssh-rsa.c
index 53e5023f7..efbc9e664 100644
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -1,20 +1,29 @@
1/* 1/*
2 * Copyright (c) 2000, 2003 Markus Friedl <markus@openbsd.org> 2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 3 *
4 * Permission to use, copy, modify, and distribute this software for any 4 * Redistribution and use in source and binary forms, with or without
5 * purpose with or without fee is hereby granted, provided that the above 5 * modification, are permitted provided that the following conditions
6 * copyright notice and this permission notice appear in all copies. 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
7 * 12 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 */ 23 */
24
16#include "includes.h" 25#include "includes.h"
17RCSID("$OpenBSD: ssh-rsa.c,v 1.30 2003/06/18 11:28:11 markus Exp $"); 26RCSID("$OpenBSD: ssh-rsa.c,v 1.28 2003/02/12 09:33:04 markus Exp $");
18 27
19#include <openssl/evp.h> 28#include <openssl/evp.h>
20#include <openssl/err.h> 29#include <openssl/err.h>
diff --git a/ssh.0 b/ssh.0
index 972ac45c7..0baca2288 100644
--- a/ssh.0
+++ b/ssh.0
@@ -6,7 +6,7 @@ NAME
6SYNOPSIS 6SYNOPSIS
7 ssh [-l login_name] hostname | user@hostname [command] 7 ssh [-l login_name] hostname | user@hostname [command]
8 8
9 ssh [-afgknqstvxACNTVX1246] [-b bind_address] [-c cipher_spec] 9 ssh [-afgknqstvxACNTX1246] [-b bind_address] [-c cipher_spec]
10 [-e escape_char] [-i identity_file] [-l login_name] [-m mac_spec] 10 [-e escape_char] [-i identity_file] [-l login_name] [-m mac_spec]
11 [-o option] [-p port] [-F configfile] [-L port:host:hostport] 11 [-o option] [-p port] [-F configfile] [-L port:host:hostport]
12 [-R port:host:hostport] [-D port] hostname | user@hostname [command] 12 [-R port:host:hostport] [-D port] hostname | user@hostname [command]
@@ -149,9 +149,6 @@ DESCRIPTION
149 149
150 ~? Display a list of escape characters 150 ~? Display a list of escape characters
151 151
152 ~B Send a BREAK to the remote system (only useful for SSH protocol
153 version 2 and if the peer supports it)
154
155 ~C Open command line (only useful for adding port forwardings using 152 ~C Open command line (only useful for adding port forwardings using
156 the -L and -R options) 153 the -L and -R options)
157 154
@@ -266,12 +263,12 @@ DESCRIPTION
266 ties specified in configuration files). 263 ties specified in configuration files).
267 264
268 -I smartcard_device 265 -I smartcard_device
269 Specifies which smartcard device to use. The argument is the 266 Specifies which smartcard device to use. The argument is the
270 device ssh should use to communicate with a smartcard used for 267 device ssh should use to communicate with a smartcard used for
271 storing the userM-bM-^@M-^Ys private RSA key. 268 storing the userM-bM-^@M-^Ys private RSA key.
272 269
273 -k Disables forwarding of Kerberos tickets. This may also be speci- 270 -k Disables forwarding of Kerberos tickets and AFS tokens. This may
274 fied on a per-host basis in the configuration file. 271 also be specified on a per-host basis in the configuration file.
275 272
276 -l login_name 273 -l login_name
277 Specifies the user to log in as on the remote machine. This also 274 Specifies the user to log in as on the remote machine. This also
@@ -308,10 +305,10 @@ DESCRIPTION
308 suppressed. 305 suppressed.
309 306
310 -s May be used to request invocation of a subsystem on the remote 307 -s May be used to request invocation of a subsystem on the remote
311 system. Subsystems are a feature of the SSH2 protocol which 308 system. Subsystems are a feature of the SSH2 protocol which
312 facilitate the use of SSH as a secure transport for other appli- 309 facilitate the use of SSH as a secure transport for other appli-
313 cations (eg. sftp). The subsystem is specified as the remote 310 cations (eg. sftp). The subsystem is specified as the remote com-
314 command. 311 mand.
315 312
316 -t Force pseudo-tty allocation. This can be used to execute arbi- 313 -t Force pseudo-tty allocation. This can be used to execute arbi-
317 trary screen-based programs on a remote machine, which can be 314 trary screen-based programs on a remote machine, which can be
@@ -322,10 +319,8 @@ DESCRIPTION
322 319
323 -v Verbose mode. Causes ssh to print debugging messages about its 320 -v Verbose mode. Causes ssh to print debugging messages about its
324 progress. This is helpful in debugging connection, authentica- 321 progress. This is helpful in debugging connection, authentica-
325 tion, and configuration problems. Multiple -v options increase 322 tion, and configuration problems. Multiple -v options increases
326 the verbosity. The maximum is 3. 323 the verbosity. Maximum is 3.
327
328 -V Display the version number and exit.
329 324
330 -x Disables X11 forwarding. 325 -x Disables X11 forwarding.
331 326
@@ -382,10 +377,10 @@ DESCRIPTION
382 side, and whenever a connection is made to this port, the connec- 377 side, and whenever a connection is made to this port, the connec-
383 tion is forwarded over the secure channel, and the application 378 tion is forwarded over the secure channel, and the application
384 protocol is then used to determine where to connect to from the 379 protocol is then used to determine where to connect to from the
385 remote machine. Currently the SOCKS4 and SOCKS5 protocols are 380 remote machine. Currently the SOCKS4 protocol is supported, and
386 supported, and ssh will act as a SOCKS server. Only root can 381 ssh will act as a SOCKS4 server. Only root can forward privi-
387 forward privileged ports. Dynamic port forwardings can also be 382 leged ports. Dynamic port forwardings can also be specified in
388 specified in the configuration file. 383 the configuration file.
389 384
390 -1 Forces ssh to try protocol version 1 only. 385 -1 Forces ssh to try protocol version 1 only.
391 386
@@ -564,7 +559,7 @@ FILES
564 with ssh without permitting login with rlogin or rsh(1). 559 with ssh without permitting login with rlogin or rsh(1).
565 560
566 /etc/hosts.equiv 561 /etc/hosts.equiv
567 This file is used during .rhosts authentication. It contains 562 This file is used during .rhosts authentication. It contains
568 canonical hosts names, one per line (the full format is described 563 canonical hosts names, one per line (the full format is described
569 on the sshd(8) manual page). If the client host is found in this 564 on the sshd(8) manual page). If the client host is found in this
570 file, login is automatically permitted provided client and server 565 file, login is automatically permitted provided client and server
@@ -595,6 +590,13 @@ DIAGNOSTICS
595 ssh exits with the exit status of the remote command or with 255 if an 590 ssh exits with the exit status of the remote command or with 255 if an
596 error occurred. 591 error occurred.
597 592
593AUTHORS
594 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
595 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
596 de Raadt and Dug Song removed many bugs, re-added newer features and cre-
597 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
598 versions 1.5 and 2.0.
599
598SEE ALSO 600SEE ALSO
599 rsh(1), scp(1), sftp(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), 601 rsh(1), scp(1), sftp(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
600 telnet(1), ssh_config(5), ssh-keysign(8), sshd(8) 602 telnet(1), ssh_config(5), ssh-keysign(8), sshd(8)
@@ -603,11 +605,4 @@ SEE ALSO
603 Protocol Architecture, draft-ietf-secsh-architecture-12.txt, January 605 Protocol Architecture, draft-ietf-secsh-architecture-12.txt, January
604 2002, work in progress material. 606 2002, work in progress material.
605 607
606AUTHORS
607 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
608 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
609 de Raadt and Dug Song removed many bugs, re-added newer features and cre-
610 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
611 versions 1.5 and 2.0.
612
613BSD September 25, 1999 BSD 608BSD September 25, 1999 BSD
diff --git a/ssh.1 b/ssh.1
index 3fbd954e8..86c1f0bb1 100644
--- a/ssh.1
+++ b/ssh.1
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: ssh.1,v 1.175 2003/07/22 13:35:22 markus Exp $ 37.\" $OpenBSD: ssh.1,v 1.168 2003/03/28 10:11:43 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSH 1 39.Dt SSH 1
40.Os 40.Os
@@ -49,7 +49,7 @@
49.Pp 49.Pp
50.Nm ssh 50.Nm ssh
51.Bk -words 51.Bk -words
52.Op Fl afgknqstvxACNTVX1246 52.Op Fl afgknqstvxACNTX1246
53.Op Fl b Ar bind_address 53.Op Fl b Ar bind_address
54.Op Fl c Ar cipher_spec 54.Op Fl c Ar cipher_spec
55.Op Fl e Ar escape_char 55.Op Fl e Ar escape_char
@@ -301,9 +301,6 @@ Background ssh at logout when waiting for forwarded connection / X11 sessions
301to terminate 301to terminate
302.It Cm ~? 302.It Cm ~?
303Display a list of escape characters 303Display a list of escape characters
304.It Cm ~B
305Send a BREAK to the remote system (only useful for SSH protocol version 2
306and if the peer supports it)
307.It Cm ~C 304.It Cm ~C
308Open command line (only useful for adding port forwardings using the 305Open command line (only useful for adding port forwardings using the
309.Fl L 306.Fl L
@@ -488,13 +485,13 @@ It is possible to have multiple
488options (and multiple identities specified in 485options (and multiple identities specified in
489configuration files). 486configuration files).
490.It Fl I Ar smartcard_device 487.It Fl I Ar smartcard_device
491Specifies which smartcard device to use. 488Specifies which smartcard device to use. The argument is
492The argument is the device 489the device
493.Nm 490.Nm
494should use to communicate with a smartcard used for storing the user's 491should use to communicate with a smartcard used for storing the user's
495private RSA key. 492private RSA key.
496.It Fl k 493.It Fl k
497Disables forwarding of Kerberos tickets. 494Disables forwarding of Kerberos tickets and AFS tokens.
498This may also be specified on a per-host basis in the configuration file. 495This may also be specified on a per-host basis in the configuration file.
499.It Fl l Ar login_name 496.It Fl l Ar login_name
500Specifies the user to log in as on the remote machine. 497Specifies the user to log in as on the remote machine.
@@ -546,10 +543,9 @@ If a second
546.Fl q 543.Fl q
547is given then even fatal errors are suppressed. 544is given then even fatal errors are suppressed.
548.It Fl s 545.It Fl s
549May be used to request invocation of a subsystem on the remote system. 546May be used to request invocation of a subsystem on the remote system. Subsystems are a feature of the SSH2 protocol which facilitate the use
550Subsystems are a feature of the SSH2 protocol which facilitate the use 547of SSH as a secure transport for other applications (eg. sftp). The
551of SSH as a secure transport for other applications (eg. sftp). 548subsystem is specified as the remote command.
552The subsystem is specified as the remote command.
553.It Fl t 549.It Fl t
554Force pseudo-tty allocation. 550Force pseudo-tty allocation.
555This can be used to execute arbitrary 551This can be used to execute arbitrary
@@ -571,10 +567,8 @@ This is helpful in
571debugging connection, authentication, and configuration problems. 567debugging connection, authentication, and configuration problems.
572Multiple 568Multiple
573.Fl v 569.Fl v
574options increase the verbosity. 570options increases the verbosity.
575The maximum is 3. 571Maximum is 3.
576.It Fl V
577Display the version number and exit.
578.It Fl x 572.It Fl x
579Disables X11 forwarding. 573Disables X11 forwarding.
580.It Fl X 574.It Fl X
@@ -653,9 +647,9 @@ on the local side, and whenever a connection is made to this port, the
653connection is forwarded over the secure channel, and the application 647connection is forwarded over the secure channel, and the application
654protocol is then used to determine where to connect to from the 648protocol is then used to determine where to connect to from the
655remote machine. 649remote machine.
656Currently the SOCKS4 and SOCKS5 protocols are supported, and 650Currently the SOCKS4 protocol is supported, and
657.Nm 651.Nm
658will act as a SOCKS server. 652will act as a SOCKS4 server.
659Only root can forward privileged ports. 653Only root can forward privileged ports.
660Dynamic port forwardings can also be specified in the configuration file. 654Dynamic port forwardings can also be specified in the configuration file.
661.It Fl 1 655.It Fl 1
@@ -926,8 +920,7 @@ or
926.Xr rsh 1 . 920.Xr rsh 1 .
927.It Pa /etc/hosts.equiv 921.It Pa /etc/hosts.equiv
928This file is used during 922This file is used during
929.Pa \&.rhosts 923.Pa \&.rhosts authentication.
930authentication.
931It contains 924It contains
932canonical hosts names, one per line (the full format is described on 925canonical hosts names, one per line (the full format is described on
933the 926the
@@ -969,6 +962,15 @@ above.
969.Nm 962.Nm
970exits with the exit status of the remote command or with 255 963exits with the exit status of the remote command or with 255
971if an error occurred. 964if an error occurred.
965.Sh AUTHORS
966OpenSSH is a derivative of the original and free
967ssh 1.2.12 release by Tatu Ylonen.
968Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
969Theo de Raadt and Dug Song
970removed many bugs, re-added newer features and
971created OpenSSH.
972Markus Friedl contributed the support for SSH
973protocol versions 1.5 and 2.0.
972.Sh SEE ALSO 974.Sh SEE ALSO
973.Xr rsh 1 , 975.Xr rsh 1 ,
974.Xr scp 1 , 976.Xr scp 1 ,
@@ -992,12 +994,3 @@ if an error occurred.
992.%D January 2002 994.%D January 2002
993.%O work in progress material 995.%O work in progress material
994.Re 996.Re
995.Sh AUTHORS
996OpenSSH is a derivative of the original and free
997ssh 1.2.12 release by Tatu Ylonen.
998Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
999Theo de Raadt and Dug Song
1000removed many bugs, re-added newer features and
1001created OpenSSH.
1002Markus Friedl contributed the support for SSH
1003protocol versions 1.5 and 2.0.
diff --git a/ssh.c b/ssh.c
index ca279fbb8..d9611848d 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.201 2003/09/01 18:15:50 markus Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.190 2003/02/06 09:27:29 markus Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -79,6 +79,14 @@ extern char *__progname;
79char *__progname; 79char *__progname;
80#endif 80#endif
81 81
82/* Flag indicating whether IPv4 or IPv6. This can be set on the command line.
83 Default value is AF_UNSPEC means both IPv4 and IPv6. */
84#ifdef IPV4_DEFAULT
85int IPv4or6 = AF_INET;
86#else
87int IPv4or6 = AF_UNSPEC;
88#endif
89
82/* Flag indicating whether debug mode is on. This can be set on the command line. */ 90/* Flag indicating whether debug mode is on. This can be set on the command line. */
83int debug_flag = 0; 91int debug_flag = 0;
84 92
@@ -154,6 +162,9 @@ usage(void)
154 _PATH_SSH_USER_CONFFILE); 162 _PATH_SSH_USER_CONFFILE);
155 fprintf(stderr, " -A Enable authentication agent forwarding.\n"); 163 fprintf(stderr, " -A Enable authentication agent forwarding.\n");
156 fprintf(stderr, " -a Disable authentication agent forwarding (default).\n"); 164 fprintf(stderr, " -a Disable authentication agent forwarding (default).\n");
165#ifdef AFS
166 fprintf(stderr, " -k Disable Kerberos ticket and AFS token forwarding.\n");
167#endif /* AFS */
157 fprintf(stderr, " -X Enable X11 connection forwarding.\n"); 168 fprintf(stderr, " -X Enable X11 connection forwarding.\n");
158 fprintf(stderr, " -x Disable X11 connection forwarding (default).\n"); 169 fprintf(stderr, " -x Disable X11 connection forwarding (default).\n");
159 fprintf(stderr, " -i file Identity for public key authentication " 170 fprintf(stderr, " -i file Identity for public key authentication "
@@ -211,7 +222,7 @@ main(int ac, char **av)
211 extern int optind, optreset; 222 extern int optind, optreset;
212 extern char *optarg; 223 extern char *optarg;
213 224
214 __progname = ssh_get_progname(av[0]); 225 __progname = get_progname(av[0]);
215 init_rng(); 226 init_rng();
216 227
217 /* 228 /*
@@ -242,7 +253,7 @@ main(int ac, char **av)
242 /* Get user data. */ 253 /* Get user data. */
243 pw = getpwuid(original_real_uid); 254 pw = getpwuid(original_real_uid);
244 if (!pw) { 255 if (!pw) {
245 logit("You don't exist, go away!"); 256 log("You don't exist, go away!");
246 exit(1); 257 exit(1);
247 } 258 }
248 /* Take a copy of the returned structure. */ 259 /* Take a copy of the returned structure. */
@@ -273,10 +284,10 @@ again:
273 options.protocol = SSH_PROTO_2; 284 options.protocol = SSH_PROTO_2;
274 break; 285 break;
275 case '4': 286 case '4':
276 options.address_family = AF_INET; 287 IPv4or6 = AF_INET;
277 break; 288 break;
278 case '6': 289 case '6':
279 options.address_family = AF_INET6; 290 IPv4or6 = AF_INET6;
280 break; 291 break;
281 case 'n': 292 case 'n':
282 stdin_null_flag = 1; 293 stdin_null_flag = 1;
@@ -303,9 +314,12 @@ again:
303 case 'A': 314 case 'A':
304 options.forward_agent = 1; 315 options.forward_agent = 1;
305 break; 316 break;
317#ifdef AFS
306 case 'k': 318 case 'k':
307 /* ignored for backward compatibility */ 319 options.kerberos_tgt_passing = 0;
320 options.afs_token_passing = 0;
308 break; 321 break;
322#endif
309 case 'i': 323 case 'i':
310 if (stat(optarg, &st) < 0) { 324 if (stat(optarg, &st) < 0) {
311 fprintf(stderr, "Warning: Identity file %s " 325 fprintf(stderr, "Warning: Identity file %s "
@@ -332,22 +346,22 @@ again:
332 tty_flag = 1; 346 tty_flag = 1;
333 break; 347 break;
334 case 'v': 348 case 'v':
335 if (debug_flag == 0) { 349 if (0 == debug_flag) {
336 debug_flag = 1; 350 debug_flag = 1;
337 options.log_level = SYSLOG_LEVEL_DEBUG1; 351 options.log_level = SYSLOG_LEVEL_DEBUG1;
338 } else { 352 } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) {
339 if (options.log_level < SYSLOG_LEVEL_DEBUG3) 353 options.log_level++;
340 options.log_level++;
341 break; 354 break;
342 } 355 } else
356 fatal("Too high debugging level.");
343 /* fallthrough */ 357 /* fallthrough */
344 case 'V': 358 case 'V':
345 fprintf(stderr, 359 fprintf(stderr,
346 "%s, SSH protocols %d.%d/%d.%d, %s\n", 360 "%s, SSH protocols %d.%d/%d.%d, OpenSSL 0x%8.8lx\n",
347 SSH_VERSION, 361 SSH_VERSION,
348 PROTOCOL_MAJOR_1, PROTOCOL_MINOR_1, 362 PROTOCOL_MAJOR_1, PROTOCOL_MINOR_1,
349 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, 363 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2,
350 SSLeay_version(SSLEAY_VERSION)); 364 SSLeay());
351 if (opt == 'V') 365 if (opt == 'V')
352 exit(0); 366 exit(0);
353 break; 367 break;
@@ -418,9 +432,9 @@ again:
418 432
419 case 'L': 433 case 'L':
420 case 'R': 434 case 'R':
421 if (sscanf(optarg, "%5[0123456789]:%255[^:]:%5[0123456789]", 435 if (sscanf(optarg, "%5[0-9]:%255[^:]:%5[0-9]",
422 sfwd_port, buf, sfwd_host_port) != 3 && 436 sfwd_port, buf, sfwd_host_port) != 3 &&
423 sscanf(optarg, "%5[0123456789]/%255[^/]/%5[0123456789]", 437 sscanf(optarg, "%5[0-9]/%255[^/]/%5[0-9]",
424 sfwd_port, buf, sfwd_host_port) != 3) { 438 sfwd_port, buf, sfwd_host_port) != 3) {
425 fprintf(stderr, 439 fprintf(stderr,
426 "Bad forwarding specification '%s'\n", 440 "Bad forwarding specification '%s'\n",
@@ -449,7 +463,7 @@ again:
449 optarg); 463 optarg);
450 exit(1); 464 exit(1);
451 } 465 }
452 add_local_forward(&options, fwd_port, "socks", 0); 466 add_local_forward(&options, fwd_port, "socks4", 0);
453 break; 467 break;
454 468
455 case 'C': 469 case 'C':
@@ -509,6 +523,7 @@ again:
509 523
510 SSLeay_add_all_algorithms(); 524 SSLeay_add_all_algorithms();
511 ERR_load_crypto_strings(); 525 ERR_load_crypto_strings();
526 channel_set_af(IPv4or6);
512 527
513 /* Initialize the command to execute on remote host. */ 528 /* Initialize the command to execute on remote host. */
514 buffer_init(&command); 529 buffer_init(&command);
@@ -549,7 +564,7 @@ again:
549 /* Do not allocate a tty if stdin is not a tty. */ 564 /* Do not allocate a tty if stdin is not a tty. */
550 if (!isatty(fileno(stdin)) && !force_tty_flag) { 565 if (!isatty(fileno(stdin)) && !force_tty_flag) {
551 if (tty_flag) 566 if (tty_flag)
552 logit("Pseudo-terminal will not be allocated because stdin is not a terminal."); 567 log("Pseudo-terminal will not be allocated because stdin is not a terminal.");
553 tty_flag = 0; 568 tty_flag = 0;
554 } 569 }
555 570
@@ -580,8 +595,6 @@ again:
580 /* Fill configuration defaults. */ 595 /* Fill configuration defaults. */
581 fill_default_options(&options); 596 fill_default_options(&options);
582 597
583 channel_set_af(options.address_family);
584
585 /* reinit */ 598 /* reinit */
586 log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 1); 599 log_init(av[0], options.log_level, SYSLOG_FACILITY_USER, 1);
587 600
@@ -593,20 +606,25 @@ again:
593 if (options.hostname != NULL) 606 if (options.hostname != NULL)
594 host = options.hostname; 607 host = options.hostname;
595 608
596 /* force lowercase for hostkey matching */
597 if (options.host_key_alias != NULL) {
598 for (p = options.host_key_alias; *p; p++)
599 if (isupper(*p))
600 *p = tolower(*p);
601 }
602
603 if (options.proxy_command != NULL && 609 if (options.proxy_command != NULL &&
604 strcmp(options.proxy_command, "none") == 0) 610 strcmp(options.proxy_command, "none") == 0)
605 options.proxy_command = NULL; 611 options.proxy_command = NULL;
606 612
613 /* Disable rhosts authentication if not running as root. */
614#ifdef HAVE_CYGWIN
615 /* Ignore uid if running under Windows */
616 if (!options.use_privileged_port) {
617#else
618 if (original_effective_uid != 0 || !options.use_privileged_port) {
619#endif
620 debug("Rhosts Authentication disabled, "
621 "originating port will not be trusted.");
622 options.rhosts_authentication = 0;
623 }
607 /* Open a connection to the remote host. */ 624 /* Open a connection to the remote host. */
608 if (ssh_connect(host, &hostaddr, options.port, 625
609 options.address_family, options.connection_attempts, 626 if (ssh_connect(host, &hostaddr, options.port, IPv4or6,
627 options.connection_attempts,
610#ifdef HAVE_CYGWIN 628#ifdef HAVE_CYGWIN
611 options.use_privileged_port, 629 options.use_privileged_port,
612#else 630#else
@@ -780,7 +798,7 @@ x11_get_proto(char **_proto, char **_data)
780 if (!got_data) { 798 if (!got_data) {
781 u_int32_t rand = 0; 799 u_int32_t rand = 0;
782 800
783 logit("Warning: No xauth data; using fake authentication data for X11 forwarding."); 801 log("Warning: No xauth data; using fake authentication data for X11 forwarding.");
784 strlcpy(proto, "MIT-MAGIC-COOKIE-1", sizeof proto); 802 strlcpy(proto, "MIT-MAGIC-COOKIE-1", sizeof proto);
785 for (i = 0; i < 16; i++) { 803 for (i = 0; i < 16; i++) {
786 if (i % 4 == 0) 804 if (i % 4 == 0)
@@ -860,7 +878,7 @@ ssh_session(void)
860 if (type == SSH_SMSG_SUCCESS) 878 if (type == SSH_SMSG_SUCCESS)
861 packet_start_compression(options.compression_level); 879 packet_start_compression(options.compression_level);
862 else if (type == SSH_SMSG_FAILURE) 880 else if (type == SSH_SMSG_FAILURE)
863 logit("Warning: Remote host refused compression."); 881 log("Warning: Remote host refused compression.");
864 else 882 else
865 packet_disconnect("Protocol error waiting for compression response."); 883 packet_disconnect("Protocol error waiting for compression response.");
866 } 884 }
@@ -899,7 +917,7 @@ ssh_session(void)
899 interactive = 1; 917 interactive = 1;
900 have_tty = 1; 918 have_tty = 1;
901 } else if (type == SSH_SMSG_FAILURE) 919 } else if (type == SSH_SMSG_FAILURE)
902 logit("Warning: Remote host failed or refused to allocate a pseudo tty."); 920 log("Warning: Remote host failed or refused to allocate a pseudo tty.");
903 else 921 else
904 packet_disconnect("Protocol error waiting for pty request response."); 922 packet_disconnect("Protocol error waiting for pty request response.");
905 } 923 }
@@ -917,7 +935,7 @@ ssh_session(void)
917 if (type == SSH_SMSG_SUCCESS) { 935 if (type == SSH_SMSG_SUCCESS) {
918 interactive = 1; 936 interactive = 1;
919 } else if (type == SSH_SMSG_FAILURE) { 937 } else if (type == SSH_SMSG_FAILURE) {
920 logit("Warning: Remote host denied X11 forwarding."); 938 log("Warning: Remote host denied X11 forwarding.");
921 } else { 939 } else {
922 packet_disconnect("Protocol error waiting for X11 forwarding"); 940 packet_disconnect("Protocol error waiting for X11 forwarding");
923 } 941 }
@@ -936,7 +954,7 @@ ssh_session(void)
936 type = packet_read(); 954 type = packet_read();
937 packet_check_eom(); 955 packet_check_eom();
938 if (type != SSH_SMSG_SUCCESS) 956 if (type != SSH_SMSG_SUCCESS)
939 logit("Warning: Remote host denied authentication agent forwarding."); 957 log("Warning: Remote host denied authentication agent forwarding.");
940 } 958 }
941 959
942 /* Initiate port forwardings. */ 960 /* Initiate port forwardings. */
@@ -1004,7 +1022,7 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt)
1004 options.remote_forwards[i].host, 1022 options.remote_forwards[i].host,
1005 options.remote_forwards[i].host_port); 1023 options.remote_forwards[i].host_port);
1006 if (type == SSH2_MSG_REQUEST_FAILURE) 1024 if (type == SSH2_MSG_REQUEST_FAILURE)
1007 logit("Warning: remote port forwarding failed for listen port %d", 1025 log("Warning: remote port forwarding failed for listen port %d",
1008 options.remote_forwards[i].port); 1026 options.remote_forwards[i].port);
1009} 1027}
1010 1028
@@ -1119,7 +1137,7 @@ ssh_session2_open(void)
1119 c = channel_new( 1137 c = channel_new(
1120 "session", SSH_CHANNEL_OPENING, in, out, err, 1138 "session", SSH_CHANNEL_OPENING, in, out, err,
1121 window, packetmax, CHAN_EXTENDED_WRITE, 1139 window, packetmax, CHAN_EXTENDED_WRITE,
1122 "client-session", /*nonblock*/0); 1140 xstrdup("client-session"), /*nonblock*/0);
1123 1141
1124 debug3("ssh_session2_open: channel_new: %d", c->self); 1142 debug3("ssh_session2_open: channel_new: %d", c->self);
1125 1143
@@ -1171,7 +1189,7 @@ load_public_identity_files(void)
1171 sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1)); 1189 sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1));
1172 options.num_identity_files++; 1190 options.num_identity_files++;
1173 options.identity_keys[0] = keys[i]; 1191 options.identity_keys[0] = keys[i];
1174 options.identity_files[0] = sc_get_key_label(keys[i]); 1192 options.identity_files[0] = xstrdup("smartcard key");;
1175 } 1193 }
1176 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES) 1194 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
1177 options.num_identity_files = SSH_MAX_IDENTITY_FILES; 1195 options.num_identity_files = SSH_MAX_IDENTITY_FILES;
diff --git a/ssh.h b/ssh.h
index e88b9b83e..0a6ad1317 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.h,v 1.74 2003/09/01 13:52:18 markus Exp $ */ 1/* $OpenBSD: ssh.h,v 1.71 2002/06/22 02:00:29 stevesk Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -20,6 +20,7 @@
20#include <stdarg.h> /* For va_list */ 20#include <stdarg.h> /* For va_list */
21#include <syslog.h> /* For LOG_AUTH and friends */ 21#include <syslog.h> /* For LOG_AUTH and friends */
22#include <sys/socket.h> /* For struct sockaddr_storage */ 22#include <sys/socket.h> /* For struct sockaddr_storage */
23#include "openbsd-compat/fake-socket.h" /* For struct sockaddr_storage */
23#ifdef HAVE_SYS_SELECT_H 24#ifdef HAVE_SYS_SELECT_H
24# include <sys/select.h> 25# include <sys/select.h>
25#endif 26#endif
@@ -88,6 +89,9 @@
88 */ 89 */
89#define SSH_SESSION_KEY_LENGTH 32 90#define SSH_SESSION_KEY_LENGTH 32
90 91
92/* Name of Kerberos service for SSH to use. */
93#define KRB4_SERVICE_NAME "rcmd"
94
91/* Used to identify ``EscapeChar none'' */ 95/* Used to identify ``EscapeChar none'' */
92#define SSH_ESCAPECHAR_NONE -2 96#define SSH_ESCAPECHAR_NONE -2
93 97
diff --git a/ssh2.h b/ssh2.h
index fb491c918..091e52b13 100644
--- a/ssh2.h
+++ b/ssh2.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh2.h,v 1.9 2003/05/14 00:52:59 markus Exp $ */ 1/* $OpenBSD: ssh2.h,v 1.8 2002/03/04 17:27:39 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -61,8 +61,6 @@
61#define SSH2_MSG_TRANSPORT_MAX 49 61#define SSH2_MSG_TRANSPORT_MAX 49
62#define SSH2_MSG_USERAUTH_MIN 50 62#define SSH2_MSG_USERAUTH_MIN 50
63#define SSH2_MSG_USERAUTH_MAX 79 63#define SSH2_MSG_USERAUTH_MAX 79
64#define SSH2_MSG_USERAUTH_PER_METHOD_MIN 60
65#define SSH2_MSG_USERAUTH_PER_METHOD_MAX SSH2_MSG_USERAUTH_MAX
66#define SSH2_MSG_CONNECTION_MIN 80 64#define SSH2_MSG_CONNECTION_MIN 80
67#define SSH2_MSG_CONNECTION_MAX 127 65#define SSH2_MSG_CONNECTION_MAX 127
68#define SSH2_MSG_RESERVED_MIN 128 66#define SSH2_MSG_RESERVED_MIN 128
diff --git a/ssh_config b/ssh_config
index 2692e8913..94cffbf39 100644
--- a/ssh_config
+++ b/ssh_config
@@ -1,4 +1,4 @@
1# $OpenBSD: ssh_config,v 1.19 2003/08/13 08:46:31 markus Exp $ 1# $OpenBSD: ssh_config,v 1.16 2002/07/03 14:21:05 markus Exp $
2 2
3# This is the ssh client system-wide configuration file. See 3# This is the ssh client system-wide configuration file. See
4# ssh_config(5) for more information. This file provides defaults for 4# ssh_config(5) for more information. This file provides defaults for
@@ -18,14 +18,13 @@
18# Host * 18# Host *
19# ForwardAgent no 19# ForwardAgent no
20# ForwardX11 no 20# ForwardX11 no
21# RhostsAuthentication no
21# RhostsRSAAuthentication no 22# RhostsRSAAuthentication no
22# RSAAuthentication yes 23# RSAAuthentication yes
23# PasswordAuthentication yes 24# PasswordAuthentication yes
24# HostbasedAuthentication no 25# HostbasedAuthentication no
25# BatchMode no 26# BatchMode no
26# CheckHostIP yes 27# CheckHostIP yes
27# AddressFamily any
28# ConnectTimeout 0
29# StrictHostKeyChecking ask 28# StrictHostKeyChecking ask
30# IdentityFile ~/.ssh/identity 29# IdentityFile ~/.ssh/identity
31# IdentityFile ~/.ssh/id_rsa 30# IdentityFile ~/.ssh/id_rsa
diff --git a/ssh_config.0 b/ssh_config.0
index a8687ffc2..74e516594 100644
--- a/ssh_config.0
+++ b/ssh_config.0
@@ -39,16 +39,16 @@ DESCRIPTION
39 39
40 Host Restricts the following declarations (up to the next Host key- 40 Host Restricts the following declarations (up to the next Host key-
41 word) to be only for those hosts that match one of the patterns 41 word) to be only for those hosts that match one of the patterns
42 given after the keyword. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y can be used as wildcards in 42 given after the keyword. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^XM-bM-^@M-^Y? can be used as wildcards
43 the patterns. A single M-bM-^@M-^X*M-bM-^@M-^Y as a pattern can be used to provide 43 in the patterns. A single M-bM-^@M-^X*M-bM-^@M-^Y as a pattern can be used to pro-
44 global defaults for all hosts. The host is the hostname argument 44 vide global defaults for all hosts. The host is the hostname
45 given on the command line (i.e., the name is not converted to a 45 argument given on the command line (i.e., the name is not con-
46 canonicalized host name before matching). 46 verted to a canonicalized host name before matching).
47 47
48 AddressFamily 48 AFSTokenPassing
49 Specifies which address family to use when connecting. Valid 49 Specifies whether to pass AFS tokens to remote host. The argu-
50 arguments are M-bM-^@M-^\anyM-bM-^@M-^], M-bM-^@M-^\inetM-bM-^@M-^] (Use IPv4 only) or M-bM-^@M-^\inet6M-bM-^@M-^] (Use IPv6 50 ment to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. This option applies
51 only.) 51 to protocol version 1 only.
52 52
53 BatchMode 53 BatchMode
54 If set to M-bM-^@M-^\yesM-bM-^@M-^], passphrase/password querying will be disabled. 54 If set to M-bM-^@M-^\yesM-bM-^@M-^], passphrase/password querying will be disabled.
@@ -112,28 +112,15 @@ DESCRIPTION
112 exiting. The argument must be an integer. This may be useful in 112 exiting. The argument must be an integer. This may be useful in
113 scripts if the connection sometimes fails. The default is 1. 113 scripts if the connection sometimes fails. The default is 1.
114 114
115 ConnectTimeout
116 Specifies the timeout (in seconds) used when connecting to the
117 ssh server, instead of using the default system TCP timeout.
118 This value is used only when the target is down or really
119 unreachable, not when it refuses the connection.
120
121 DynamicForward 115 DynamicForward
122 Specifies that a TCP/IP port on the local machine be forwarded 116 Specifies that a TCP/IP port on the local machine be forwarded
123 over the secure channel, and the application protocol is then 117 over the secure channel, and the application protocol is then
124 used to determine where to connect to from the remote machine. 118 used to determine where to connect to from the remote machine.
125 The argument must be a port number. Currently the SOCKS4 and 119 The argument must be a port number. Currently the SOCKS4 proto-
126 SOCKS5 protocols are supported, and ssh will act as a SOCKS 120 col is supported, and ssh will act as a SOCKS4 server. Multiple
127 server. Multiple forwardings may be specified, and additional 121 forwardings may be specified, and additional forwardings can be
128 forwardings can be given on the command line. Only the superuser 122 given on the command line. Only the superuser can forward privi-
129 can forward privileged ports. 123 leged ports.
130
131 EnableSSHKeysign
132 Setting this option to M-bM-^@M-^\yesM-bM-^@M-^] in the global client configuration
133 file /etc/ssh/ssh_config enables the use of the helper program
134 ssh-keysign(8) during HostbasedAuthentication. The argument must
135 be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The default is M-bM-^@M-^\noM-bM-^@M-^]. See ssh-keysign(8) for
136 more information.
137 124
138 EscapeChar 125 EscapeChar
139 Sets the escape character (default: M-bM-^@M-^X~M-bM-^@M-^Y). The escape character 126 Sets the escape character (default: M-bM-^@M-^X~M-bM-^@M-^Y). The escape character
@@ -179,16 +166,6 @@ DESCRIPTION
179 Specifies a file to use for the global host key database instead 166 Specifies a file to use for the global host key database instead
180 of /etc/ssh/ssh_known_hosts. 167 of /etc/ssh/ssh_known_hosts.
181 168
182 GSSAPIAuthentication
183 Specifies whether authentication based on GSSAPI may be used,
184 either using the result of a successful key exchange, or using
185 GSSAPI user authentication. The default is M-bM-^@M-^\yesM-bM-^@M-^]. Note that
186 this option applies to protocol version 2 only.
187
188 GSSAPIDelegateCredentials
189 Forward (delegate) credentials to the server. The default is
190 M-bM-^@M-^\noM-bM-^@M-^]. Note that this option applies to protocol version 2 only.
191
192 HostbasedAuthentication 169 HostbasedAuthentication
193 Specifies whether to try rhosts based authentication with public 170 Specifies whether to try rhosts based authentication with public
194 key authentication. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The 171 key authentication. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The
@@ -215,14 +192,14 @@ DESCRIPTION
215 192
216 IdentityFile 193 IdentityFile
217 Specifies a file from which the userM-bM-^@M-^Ys RSA or DSA authentication 194 Specifies a file from which the userM-bM-^@M-^Ys RSA or DSA authentication
218 identity is read. The default is $HOME/.ssh/identity for proto- 195 identity is read. The default is $HOME/.ssh/identity for protocol
219 col version 1, and $HOME/.ssh/id_rsa and $HOME/.ssh/id_dsa for 196 version 1, and $HOME/.ssh/id_rsa and $HOME/.ssh/id_dsa for proto-
220 protocol version 2. Additionally, any identities represented by 197 col version 2. Additionally, any identities represented by the
221 the authentication agent will be used for authentication. The 198 authentication agent will be used for authentication. The file
222 file name may use the tilde syntax to refer to a userM-bM-^@M-^Ys home 199 name may use the tilde syntax to refer to a userM-bM-^@M-^Ys home direc-
223 directory. It is possible to have multiple identity files speci- 200 tory. It is possible to have multiple identity files specified
224 fied in configuration files; all these identities will be tried 201 in configuration files; all these identities will be tried in
225 in sequence. 202 sequence.
226 203
227 KeepAlive 204 KeepAlive
228 Specifies whether the system should send TCP keepalive messages 205 Specifies whether the system should send TCP keepalive messages
@@ -237,6 +214,15 @@ DESCRIPTION
237 214
238 To disable keepalives, the value should be set to M-bM-^@M-^\noM-bM-^@M-^]. 215 To disable keepalives, the value should be set to M-bM-^@M-^\noM-bM-^@M-^].
239 216
217 KerberosAuthentication
218 Specifies whether Kerberos authentication will be used. The
219 argument to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].
220
221 KerberosTgtPassing
222 Specifies whether a Kerberos TGT will be forwarded to the server.
223 This will only work if the Kerberos server is actually an AFS
224 kaserver. The argument to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^].
225
240 LocalForward 226 LocalForward
241 Specifies that a TCP/IP port on the local machine be forwarded 227 Specifies that a TCP/IP port on the local machine be forwarded
242 over the secure channel to the specified host and port from the 228 over the secure channel to the specified host and port from the
@@ -281,9 +267,9 @@ DESCRIPTION
281 267
282 PreferredAuthentications 268 PreferredAuthentications
283 Specifies the order in which the client should try protocol 2 269 Specifies the order in which the client should try protocol 2
284 authentication methods. This allows a client to prefer one 270 authentication methods. This allows a client to prefer one method
285 method (e.g. keyboard-interactive) over another method (e.g. 271 (e.g. keyboard-interactive) over another method (e.g. password)
286 password) The default for this option is: 272 The default for this option is:
287 M-bM-^@M-^\hostbased,publickey,keyboard-interactive,passwordM-bM-^@M-^]. 273 M-bM-^@M-^\hostbased,publickey,keyboard-interactive,passwordM-bM-^@M-^].
288 274
289 Protocol 275 Protocol
@@ -321,6 +307,16 @@ DESCRIPTION
321 specified, and additional forwardings can be given on the command 307 specified, and additional forwardings can be given on the command
322 line. Only the superuser can forward privileged ports. 308 line. Only the superuser can forward privileged ports.
323 309
310 RhostsAuthentication
311 Specifies whether to try rhosts based authentication. Note that
312 this declaration only affects the client side and has no effect
313 whatsoever on security. Most servers do not permit RhostsAuthen-
314 tication because it is not secure (see RhostsRSAAuthentication).
315 The argument to this keyword must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The default
316 is M-bM-^@M-^\noM-bM-^@M-^]. This option applies to protocol version 1 only and
317 requires ssh to be setuid root and UsePrivilegedPort to be set to
318 M-bM-^@M-^\yesM-bM-^@M-^].
319
324 RhostsRSAAuthentication 320 RhostsRSAAuthentication
325 Specifies whether to try rhosts based authentication with RSA 321 Specifies whether to try rhosts based authentication with RSA
326 host authentication. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The 322 host authentication. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The
@@ -335,9 +331,9 @@ DESCRIPTION
335 applies to protocol version 1 only. 331 applies to protocol version 1 only.
336 332
337 SmartcardDevice 333 SmartcardDevice
338 Specifies which smartcard device to use. The argument to this 334 Specifies which smartcard device to use. The argument to this
339 keyword is the device ssh should use to communicate with a smart- 335 keyword is the device ssh should use to communicate with a smart-
340 card used for storing the userM-bM-^@M-^Ys private RSA key. By default, no 336 card used for storing the userM-bM-^@M-^Ys private RSA key. By default, no
341 device is specified and smartcard support is not activated. 337 device is specified and smartcard support is not activated.
342 338
343 StrictHostKeyChecking 339 StrictHostKeyChecking
@@ -360,7 +356,8 @@ DESCRIPTION
360 Specifies whether to use a privileged port for outgoing connec- 356 Specifies whether to use a privileged port for outgoing connec-
361 tions. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The default is M-bM-^@M-^\noM-bM-^@M-^]. 357 tions. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The default is M-bM-^@M-^\noM-bM-^@M-^].
362 If set to M-bM-^@M-^\yesM-bM-^@M-^] ssh must be setuid root. Note that this option 358 If set to M-bM-^@M-^\yesM-bM-^@M-^] ssh must be setuid root. Note that this option
363 must be set to M-bM-^@M-^\yesM-bM-^@M-^] for RhostsRSAAuthentication with older 359 must be set to M-bM-^@M-^\yesM-bM-^@M-^] if RhostsAuthentication and
360 RhostsRSAAuthentication authentications are needed with older
364 servers. 361 servers.
365 362
366 User Specifies the user to log in as. This can be useful when a dif- 363 User Specifies the user to log in as. This can be useful when a dif-
@@ -372,11 +369,6 @@ DESCRIPTION
372 Specifies a file to use for the user host key database instead of 369 Specifies a file to use for the user host key database instead of
373 $HOME/.ssh/known_hosts. 370 $HOME/.ssh/known_hosts.
374 371
375 VerifyHostKeyDNS
376 Specifies whether to verify the remote key using DNS and SSHFP
377 resource records. The default is M-bM-^@M-^\noM-bM-^@M-^]. Note that this option
378 applies to protocol version 2 only.
379
380 XAuthLocation 372 XAuthLocation
381 Specifies the full pathname of the xauth(1) program. The default 373 Specifies the full pathname of the xauth(1) program. The default
382 is /usr/X11R6/bin/xauth. 374 is /usr/X11R6/bin/xauth.
@@ -395,9 +387,6 @@ FILES
395 file, and for those users who do not have a configuration file. 387 file, and for those users who do not have a configuration file.
396 This file must be world-readable. 388 This file must be world-readable.
397 389
398SEE ALSO
399 ssh(1)
400
401AUTHORS 390AUTHORS
402 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 391 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
403 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo 392 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
@@ -405,4 +394,7 @@ AUTHORS
405 ated OpenSSH. Markus Friedl contributed the support for SSH protocol 394 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
406 versions 1.5 and 2.0. 395 versions 1.5 and 2.0.
407 396
397SEE ALSO
398 ssh(1)
399
408BSD September 25, 1999 BSD 400BSD September 25, 1999 BSD
diff --git a/ssh_config.5 b/ssh_config.5
index 2ca7ce02f..d0ea33918 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: ssh_config.5,v 1.20 2003/09/02 18:50:06 jmc Exp $ 37.\" $OpenBSD: ssh_config.5,v 1.7 2003/03/28 10:11:43 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSH_CONFIG 5 39.Dt SSH_CONFIG 5
40.Os 40.Os
@@ -104,7 +104,7 @@ keyword) to be only for those hosts that match one of the patterns
104given after the keyword. 104given after the keyword.
105.Ql \&* 105.Ql \&*
106and 106and
107.Ql \&? 107.Ql ?
108can be used as wildcards in the 108can be used as wildcards in the
109patterns. 109patterns.
110A single 110A single
@@ -115,14 +115,13 @@ The host is the
115.Ar hostname 115.Ar hostname
116argument given on the command line (i.e., the name is not converted to 116argument given on the command line (i.e., the name is not converted to
117a canonicalized host name before matching). 117a canonicalized host name before matching).
118.It Cm AddressFamily 118.It Cm AFSTokenPassing
119Specifies which address family to use when connecting. 119Specifies whether to pass AFS tokens to remote host.
120Valid arguments are 120The argument to this keyword must be
121.Dq any , 121.Dq yes
122.Dq inet 122or
123(Use IPv4 only) or 123.Dq no .
124.Dq inet6 124This option applies to protocol version 1 only.
125(Use IPv6 only.)
126.It Cm BatchMode 125.It Cm BatchMode
127If set to 126If set to
128.Dq yes , 127.Dq yes ,
@@ -235,41 +234,18 @@ Specifies the number of tries (one per second) to make before exiting.
235The argument must be an integer. 234The argument must be an integer.
236This may be useful in scripts if the connection sometimes fails. 235This may be useful in scripts if the connection sometimes fails.
237The default is 1. 236The default is 1.
238.It Cm ConnectTimeout
239Specifies the timeout (in seconds) used when connecting to the ssh
240server, instead of using the default system TCP timeout.
241This value is used only when the target is down or really unreachable,
242not when it refuses the connection.
243.It Cm DynamicForward 237.It Cm DynamicForward
244Specifies that a TCP/IP port on the local machine be forwarded 238Specifies that a TCP/IP port on the local machine be forwarded
245over the secure channel, and the application 239over the secure channel, and the application
246protocol is then used to determine where to connect to from the 240protocol is then used to determine where to connect to from the
247remote machine. 241remote machine.
248The argument must be a port number. 242The argument must be a port number.
249Currently the SOCKS4 and SOCKS5 protocols are supported, and 243Currently the SOCKS4 protocol is supported, and
250.Nm ssh 244.Nm ssh
251will act as a SOCKS server. 245will act as a SOCKS4 server.
252Multiple forwardings may be specified, and 246Multiple forwardings may be specified, and
253additional forwardings can be given on the command line. 247additional forwardings can be given on the command line.
254Only the superuser can forward privileged ports. 248Only the superuser can forward privileged ports.
255.It Cm EnableSSHKeysign
256Setting this option to
257.Dq yes
258in the global client configuration file
259.Pa /etc/ssh/ssh_config
260enables the use of the helper program
261.Xr ssh-keysign 8
262during
263.Cm HostbasedAuthentication .
264The argument must be
265.Dq yes
266or
267.Dq no .
268The default is
269.Dq no .
270See
271.Xr ssh-keysign 8
272for more information.
273.It Cm EscapeChar 249.It Cm EscapeChar
274Sets the escape character (default: 250Sets the escape character (default:
275.Ql ~ ) . 251.Ql ~ ) .
@@ -338,18 +314,6 @@ The default is
338Specifies a file to use for the global 314Specifies a file to use for the global
339host key database instead of 315host key database instead of
340.Pa /etc/ssh/ssh_known_hosts . 316.Pa /etc/ssh/ssh_known_hosts .
341.It Cm GSSAPIAuthentication
342Specifies whether authentication based on GSSAPI may be used, either using
343the result of a successful key exchange, or using GSSAPI user
344authentication.
345The default is
346.Dq yes .
347Note that this option applies to protocol version 2 only.
348.It Cm GSSAPIDelegateCredentials
349Forward (delegate) credentials to the server.
350The default is
351.Dq no .
352Note that this option applies to protocol version 2 only.
353.It Cm HostbasedAuthentication 317.It Cm HostbasedAuthentication
354Specifies whether to try rhosts based authentication with public key 318Specifies whether to try rhosts based authentication with public key
355authentication. 319authentication.
@@ -382,8 +346,7 @@ Numeric IP addresses are also permitted (both on the command line and in
382specifications). 346specifications).
383.It Cm IdentityFile 347.It Cm IdentityFile
384Specifies a file from which the user's RSA or DSA authentication identity 348Specifies a file from which the user's RSA or DSA authentication identity
385is read. 349is read. The default is
386The default is
387.Pa $HOME/.ssh/identity 350.Pa $HOME/.ssh/identity
388for protocol version 1, and 351for protocol version 1, and
389.Pa $HOME/.ssh/id_rsa 352.Pa $HOME/.ssh/id_rsa
@@ -420,6 +383,19 @@ This is important in scripts, and many users want it too.
420.Pp 383.Pp
421To disable keepalives, the value should be set to 384To disable keepalives, the value should be set to
422.Dq no . 385.Dq no .
386.It Cm KerberosAuthentication
387Specifies whether Kerberos authentication will be used.
388The argument to this keyword must be
389.Dq yes
390or
391.Dq no .
392.It Cm KerberosTgtPassing
393Specifies whether a Kerberos TGT will be forwarded to the server.
394This will only work if the Kerberos server is actually an AFS kaserver.
395The argument to this keyword must be
396.Dq yes
397or
398.Dq no .
423.It Cm LocalForward 399.It Cm LocalForward
424Specifies that a TCP/IP port on the local machine be forwarded over 400Specifies that a TCP/IP port on the local machine be forwarded over
425the secure channel to the specified host and port from the remote machine. 401the secure channel to the specified host and port from the remote machine.
@@ -473,8 +449,7 @@ Specifies the port number to connect on the remote host.
473Default is 22. 449Default is 22.
474.It Cm PreferredAuthentications 450.It Cm PreferredAuthentications
475Specifies the order in which the client should try protocol 2 451Specifies the order in which the client should try protocol 2
476authentication methods. 452authentication methods. This allows a client to prefer one method (e.g.
477This allows a client to prefer one method (e.g.
478.Cm keyboard-interactive ) 453.Cm keyboard-interactive )
479over another method (e.g. 454over another method (e.g.
480.Cm password ) 455.Cm password )
@@ -550,6 +525,26 @@ IPv6 addresses can be specified with an alternative syntax:
550Multiple forwardings may be specified, and additional 525Multiple forwardings may be specified, and additional
551forwardings can be given on the command line. 526forwardings can be given on the command line.
552Only the superuser can forward privileged ports. 527Only the superuser can forward privileged ports.
528.It Cm RhostsAuthentication
529Specifies whether to try rhosts based authentication.
530Note that this
531declaration only affects the client side and has no effect whatsoever
532on security.
533Most servers do not permit RhostsAuthentication because it
534is not secure (see
535.Cm RhostsRSAAuthentication ) .
536The argument to this keyword must be
537.Dq yes
538or
539.Dq no .
540The default is
541.Dq no .
542This option applies to protocol version 1 only and requires
543.Nm ssh
544to be setuid root and
545.Cm UsePrivilegedPort
546to be set to
547.Dq yes .
553.It Cm RhostsRSAAuthentication 548.It Cm RhostsRSAAuthentication
554Specifies whether to try rhosts based authentication with RSA host 549Specifies whether to try rhosts based authentication with RSA host
555authentication. 550authentication.
@@ -591,12 +586,12 @@ The default is 0 (disabled), or 300 if
591.Cm BatchMode 586.Cm BatchMode
592is set. 587is set.
593.It Cm SmartcardDevice 588.It Cm SmartcardDevice
594Specifies which smartcard device to use. 589Specifies which smartcard device to use. The argument to this keyword is
595The argument to this keyword is the device 590the device
596.Nm ssh 591.Nm ssh
597should use to communicate with a smartcard used for storing the user's 592should use to communicate with a smartcard used for storing the user's
598private RSA key. 593private RSA key. By default, no device is specified and smartcard support
599By default, no device is specified and smartcard support is not activated. 594is not activated.
600.It Cm StrictHostKeyChecking 595.It Cm StrictHostKeyChecking
601If this flag is set to 596If this flag is set to
602.Dq yes , 597.Dq yes ,
@@ -646,9 +641,11 @@ If set to
646must be setuid root. 641must be setuid root.
647Note that this option must be set to 642Note that this option must be set to
648.Dq yes 643.Dq yes
649for 644if
645.Cm RhostsAuthentication
646and
650.Cm RhostsRSAAuthentication 647.Cm RhostsRSAAuthentication
651with older servers. 648authentications are needed with older servers.
652.It Cm User 649.It Cm User
653Specifies the user to log in as. 650Specifies the user to log in as.
654This can be useful when a different user name is used on different machines. 651This can be useful when a different user name is used on different machines.
@@ -658,12 +655,6 @@ having to remember to give the user name on the command line.
658Specifies a file to use for the user 655Specifies a file to use for the user
659host key database instead of 656host key database instead of
660.Pa $HOME/.ssh/known_hosts . 657.Pa $HOME/.ssh/known_hosts .
661.It Cm VerifyHostKeyDNS
662Specifies whether to verify the remote key using DNS and SSHFP resource
663records.
664The default is
665.Dq no .
666Note that this option applies to protocol version 2 only.
667.It Cm XAuthLocation 658.It Cm XAuthLocation
668Specifies the full pathname of the 659Specifies the full pathname of the
669.Xr xauth 1 660.Xr xauth 1
@@ -689,8 +680,6 @@ values that are not specified in the user's configuration file, and
689for those users who do not have a configuration file. 680for those users who do not have a configuration file.
690This file must be world-readable. 681This file must be world-readable.
691.El 682.El
692.Sh SEE ALSO
693.Xr ssh 1
694.Sh AUTHORS 683.Sh AUTHORS
695OpenSSH is a derivative of the original and free 684OpenSSH is a derivative of the original and free
696ssh 1.2.12 release by Tatu Ylonen. 685ssh 1.2.12 release by Tatu Ylonen.
@@ -700,3 +689,5 @@ removed many bugs, re-added newer features and
700created OpenSSH. 689created OpenSSH.
701Markus Friedl contributed the support for SSH 690Markus Friedl contributed the support for SSH
702protocol versions 1.5 and 2.0. 691protocol versions 1.5 and 2.0.
692.Sh SEE ALSO
693.Xr ssh 1
diff --git a/sshconnect.c b/sshconnect.c
index 5c56f3178..013a896b7 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect.c,v 1.148 2003/09/18 07:52:54 markus Exp $"); 16RCSID("$OpenBSD: sshconnect.c,v 1.137 2002/11/21 23:03:51 deraadt Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19 19
@@ -33,17 +33,9 @@ RCSID("$OpenBSD: sshconnect.c,v 1.148 2003/09/18 07:52:54 markus Exp $");
33#include "misc.h" 33#include "misc.h"
34#include "readpass.h" 34#include "readpass.h"
35 35
36#ifdef DNS
37#include "dns.h"
38#endif
39
40char *client_version_string = NULL; 36char *client_version_string = NULL;
41char *server_version_string = NULL; 37char *server_version_string = NULL;
42 38
43#ifdef DNS
44int verified_host_key_dns = 0;
45#endif
46
47/* import */ 39/* import */
48extern Options options; 40extern Options options;
49extern char *__progname; 41extern char *__progname;
@@ -178,7 +170,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
178 * Creates a (possibly privileged) socket for use as the ssh connection. 170 * Creates a (possibly privileged) socket for use as the ssh connection.
179 */ 171 */
180static int 172static int
181ssh_create_socket(int privileged, struct addrinfo *ai) 173ssh_create_socket(int privileged, int family)
182{ 174{
183 int sock, gaierr; 175 int sock, gaierr;
184 struct addrinfo hints, *res; 176 struct addrinfo hints, *res;
@@ -190,16 +182,15 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
190 if (privileged) { 182 if (privileged) {
191 int p = IPPORT_RESERVED - 1; 183 int p = IPPORT_RESERVED - 1;
192 PRIV_START; 184 PRIV_START;
193 sock = rresvport_af(&p, ai->ai_family); 185 sock = rresvport_af(&p, family);
194 PRIV_END; 186 PRIV_END;
195 if (sock < 0) 187 if (sock < 0)
196 error("rresvport: af=%d %.100s", ai->ai_family, 188 error("rresvport: af=%d %.100s", family, strerror(errno));
197 strerror(errno));
198 else 189 else
199 debug("Allocated local port %d.", p); 190 debug("Allocated local port %d.", p);
200 return sock; 191 return sock;
201 } 192 }
202 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); 193 sock = socket(family, SOCK_STREAM, 0);
203 if (sock < 0) 194 if (sock < 0)
204 error("socket: %.100s", strerror(errno)); 195 error("socket: %.100s", strerror(errno));
205 196
@@ -208,9 +199,8 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
208 return sock; 199 return sock;
209 200
210 memset(&hints, 0, sizeof(hints)); 201 memset(&hints, 0, sizeof(hints));
211 hints.ai_family = ai->ai_family; 202 hints.ai_family = family;
212 hints.ai_socktype = ai->ai_socktype; 203 hints.ai_socktype = SOCK_STREAM;
213 hints.ai_protocol = ai->ai_protocol;
214 hints.ai_flags = AI_PASSIVE; 204 hints.ai_flags = AI_PASSIVE;
215 gaierr = getaddrinfo(options.bind_address, "0", &hints, &res); 205 gaierr = getaddrinfo(options.bind_address, "0", &hints, &res);
216 if (gaierr) { 206 if (gaierr) {
@@ -229,74 +219,6 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
229 return sock; 219 return sock;
230} 220}
231 221
232static int
233timeout_connect(int sockfd, const struct sockaddr *serv_addr,
234 socklen_t addrlen, int timeout)
235{
236 fd_set *fdset;
237 struct timeval tv;
238 socklen_t optlen;
239 int fdsetsz, optval, rc, result = -1;
240
241 if (timeout <= 0)
242 return (connect(sockfd, serv_addr, addrlen));
243
244 if (fcntl(sockfd, F_SETFL, O_NONBLOCK) < 0)
245 return (-1);
246
247 rc = connect(sockfd, serv_addr, addrlen);
248 if (rc == 0)
249 return (0);
250 if (errno != EINPROGRESS)
251 return (-1);
252
253 fdsetsz = howmany(sockfd + 1, NFDBITS) * sizeof(fd_mask);
254 fdset = (fd_set *)xmalloc(fdsetsz);
255
256 memset(fdset, 0, fdsetsz);
257 FD_SET(sockfd, fdset);
258 tv.tv_sec = timeout;
259 tv.tv_usec = 0;
260
261 for(;;) {
262 rc = select(sockfd + 1, NULL, fdset, NULL, &tv);
263 if (rc != -1 || errno != EINTR)
264 break;
265 }
266
267 switch(rc) {
268 case 0:
269 /* Timed out */
270 errno = ETIMEDOUT;
271 break;
272 case -1:
273 /* Select error */
274 debug("select: %s", strerror(errno));
275 break;
276 case 1:
277 /* Completed or failed */
278 optval = 0;
279 optlen = sizeof(optval);
280 if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval,
281 &optlen) == -1) {
282 debug("getsockopt: %s", strerror(errno));
283 break;
284 }
285 if (optval != 0) {
286 errno = optval;
287 break;
288 }
289 result = 0;
290 break;
291 default:
292 /* Should not occur */
293 fatal("Bogus return (%d) from select()", rc);
294 }
295
296 xfree(fdset);
297 return (result);
298}
299
300/* 222/*
301 * Opens a TCP/IP connection to the remote server on the given host. 223 * Opens a TCP/IP connection to the remote server on the given host.
302 * The address of the remote host will be returned in hostaddr. 224 * The address of the remote host will be returned in hostaddr.
@@ -380,13 +302,12 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
380 host, ntop, strport); 302 host, ntop, strport);
381 303
382 /* Create a socket for connecting. */ 304 /* Create a socket for connecting. */
383 sock = ssh_create_socket(needpriv, ai); 305 sock = ssh_create_socket(needpriv, ai->ai_family);
384 if (sock < 0) 306 if (sock < 0)
385 /* Any error is already output */ 307 /* Any error is already output */
386 continue; 308 continue;
387 309
388 if (timeout_connect(sock, ai->ai_addr, ai->ai_addrlen, 310 if (connect(sock, ai->ai_addr, ai->ai_addrlen) >= 0) {
389 options.connection_timeout) >= 0) {
390 /* Successful connection. */ 311 /* Successful connection. */
391 memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen); 312 memcpy(hostaddr, ai->ai_addr, ai->ai_addrlen);
392 break; 313 break;
@@ -418,7 +339,7 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
418 339
419 /* Return failure if we didn't get a successful connection. */ 340 /* Return failure if we didn't get a successful connection. */
420 if (attempt >= connection_attempts) { 341 if (attempt >= connection_attempts) {
421 logit("ssh: connect to host %s port %s: %s", 342 log("ssh: connect to host %s port %s: %s",
422 host, strport, strerror(errno)); 343 host, strport, strerror(errno));
423 return full_failure ? ECONNABORTED : ECONNREFUSED; 344 return full_failure ? ECONNABORTED : ECONNREFUSED;
424 } 345 }
@@ -532,7 +453,7 @@ ssh_exchange_identification(void)
532 enable_compat13(); 453 enable_compat13();
533 minor1 = 3; 454 minor1 = 3;
534 if (options.forward_agent) { 455 if (options.forward_agent) {
535 logit("Agent forwarding disabled for protocol 1.3"); 456 log("Agent forwarding disabled for protocol 1.3");
536 options.forward_agent = 0; 457 options.forward_agent = 0;
537 } 458 }
538 } 459 }
@@ -556,7 +477,7 @@ ssh_exchange_identification(void)
556 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, 477 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
557 compat20 ? PROTOCOL_MINOR_2 : minor1, 478 compat20 ? PROTOCOL_MINOR_2 : minor1,
558 SSH_VERSION); 479 SSH_VERSION);
559 if (atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf)) 480 if (atomicio(write, connection_out, buf, strlen(buf)) != strlen(buf))
560 fatal("write: %.100s", strerror(errno)); 481 fatal("write: %.100s", strerror(errno));
561 client_version_string = xstrdup(buf); 482 client_version_string = xstrdup(buf);
562 chop(client_version_string); 483 chop(client_version_string);
@@ -607,7 +528,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
607 int salen; 528 int salen;
608 char ntop[NI_MAXHOST]; 529 char ntop[NI_MAXHOST];
609 char msg[1024]; 530 char msg[1024];
610 int len, host_line, ip_line; 531 int len, host_line, ip_line, has_keys;
611 const char *host_file = NULL, *ip_file = NULL; 532 const char *host_file = NULL, *ip_file = NULL;
612 533
613 /* 534 /*
@@ -723,16 +644,16 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
723 debug("Found key in %s:%d", host_file, host_line); 644 debug("Found key in %s:%d", host_file, host_line);
724 if (options.check_host_ip && ip_status == HOST_NEW) { 645 if (options.check_host_ip && ip_status == HOST_NEW) {
725 if (readonly) 646 if (readonly)
726 logit("%s host key for IP address " 647 log("%s host key for IP address "
727 "'%.128s' not in list of known hosts.", 648 "'%.128s' not in list of known hosts.",
728 type, ip); 649 type, ip);
729 else if (!add_host_to_hostfile(user_hostfile, ip, 650 else if (!add_host_to_hostfile(user_hostfile, ip,
730 host_key)) 651 host_key))
731 logit("Failed to add the %s host key for IP " 652 log("Failed to add the %s host key for IP "
732 "address '%.128s' to the list of known " 653 "address '%.128s' to the list of known "
733 "hosts (%.30s).", type, ip, user_hostfile); 654 "hosts (%.30s).", type, ip, user_hostfile);
734 else 655 else
735 logit("Warning: Permanently added the %s host " 656 log("Warning: Permanently added the %s host "
736 "key for IP address '%.128s' to the list " 657 "key for IP address '%.128s' to the list "
737 "of known hosts.", type, ip); 658 "of known hosts.", type, ip);
738 } 659 }
@@ -751,36 +672,19 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
751 "have requested strict checking.", type, host); 672 "have requested strict checking.", type, host);
752 goto fail; 673 goto fail;
753 } else if (options.strict_host_key_checking == 2) { 674 } else if (options.strict_host_key_checking == 2) {
754 char msg1[1024], msg2[1024]; 675 has_keys = show_other_keys(host, host_key);
755
756 if (show_other_keys(host, host_key))
757 snprintf(msg1, sizeof(msg1),
758 "\nbut keys of different type are already"
759 " known for this host.");
760 else
761 snprintf(msg1, sizeof(msg1), ".");
762 /* The default */ 676 /* The default */
763 fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX); 677 fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
764 msg2[0] = '\0';
765#ifdef DNS
766 if (options.verify_host_key_dns) {
767 if (verified_host_key_dns)
768 snprintf(msg2, sizeof(msg2),
769 "Matching host key fingerprint"
770 " found in DNS.\n");
771 else
772 snprintf(msg2, sizeof(msg2),
773 "No matching host key fingerprint"
774 " found in DNS.\n");
775 }
776#endif
777 snprintf(msg, sizeof(msg), 678 snprintf(msg, sizeof(msg),
778 "The authenticity of host '%.200s (%s)' can't be " 679 "The authenticity of host '%.200s (%s)' can't be "
779 "established%s\n" 680 "established%s\n"
780 "%s key fingerprint is %s.\n%s" 681 "%s key fingerprint is %s.\n"
781 "Are you sure you want to continue connecting " 682 "Are you sure you want to continue connecting "
782 "(yes/no)? ", 683 "(yes/no)? ",
783 host, ip, msg1, type, fp, msg2); 684 host, ip,
685 has_keys ? ",\nbut keys of different type are already "
686 "known for this host." : ".",
687 type, fp);
784 xfree(fp); 688 xfree(fp);
785 if (!confirm(msg)) 689 if (!confirm(msg))
786 goto fail; 690 goto fail;
@@ -796,10 +700,10 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
796 * local known_hosts file. 700 * local known_hosts file.
797 */ 701 */
798 if (!add_host_to_hostfile(user_hostfile, hostp, host_key)) 702 if (!add_host_to_hostfile(user_hostfile, hostp, host_key))
799 logit("Failed to add the host to the list of known " 703 log("Failed to add the host to the list of known "
800 "hosts (%.500s).", user_hostfile); 704 "hosts (%.500s).", user_hostfile);
801 else 705 else
802 logit("Warning: Permanently added '%.200s' (%s) to the " 706 log("Warning: Permanently added '%.200s' (%s) to the "
803 "list of known hosts.", hostp, type); 707 "list of known hosts.", hostp, type);
804 break; 708 break;
805 case HOST_CHANGED: 709 case HOST_CHANGED:
@@ -850,7 +754,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
850 754
851 /* 755 /*
852 * If strict host key checking has not been requested, allow 756 * If strict host key checking has not been requested, allow
853 * the connection but without MITM-able authentication or 757 * the connection but without password authentication or
854 * agent forwarding. 758 * agent forwarding.
855 */ 759 */
856 if (options.password_authentication) { 760 if (options.password_authentication) {
@@ -858,17 +762,6 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
858 "man-in-the-middle attacks."); 762 "man-in-the-middle attacks.");
859 options.password_authentication = 0; 763 options.password_authentication = 0;
860 } 764 }
861 if (options.kbd_interactive_authentication) {
862 error("Keyboard-interactive authentication is disabled"
863 " to avoid man-in-the-middle attacks.");
864 options.kbd_interactive_authentication = 0;
865 options.challenge_response_authentication = 0;
866 }
867 if (options.challenge_response_authentication) {
868 error("Challenge/response authentication is disabled"
869 " to avoid man-in-the-middle attacks.");
870 options.challenge_response_authentication = 0;
871 }
872 if (options.forward_agent) { 765 if (options.forward_agent) {
873 error("Agent forwarding is disabled to avoid " 766 error("Agent forwarding is disabled to avoid "
874 "man-in-the-middle attacks."); 767 "man-in-the-middle attacks.");
@@ -913,7 +806,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
913 host_file, host_line); 806 host_file, host_line);
914 } 807 }
915 if (options.strict_host_key_checking == 1) { 808 if (options.strict_host_key_checking == 1) {
916 logit("%s", msg); 809 log(msg);
917 error("Exiting, you have requested strict checking."); 810 error("Exiting, you have requested strict checking.");
918 goto fail; 811 goto fail;
919 } else if (options.strict_host_key_checking == 2) { 812 } else if (options.strict_host_key_checking == 2) {
@@ -922,7 +815,7 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
922 if (!confirm(msg)) 815 if (!confirm(msg))
923 goto fail; 816 goto fail;
924 } else { 817 } else {
925 logit("%s", msg); 818 log(msg);
926 } 819 }
927 } 820 }
928 821
@@ -934,33 +827,11 @@ fail:
934 return -1; 827 return -1;
935} 828}
936 829
937/* returns 0 if key verifies or -1 if key does NOT verify */
938int 830int
939verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key) 831verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
940{ 832{
941 struct stat st; 833 struct stat st;
942 834
943#ifdef DNS
944 if (options.verify_host_key_dns) {
945 switch(verify_host_key_dns(host, hostaddr, host_key)) {
946 case DNS_VERIFY_OK:
947#ifdef DNSSEC
948 return 0;
949#else
950 verified_host_key_dns = 1;
951 break;
952#endif
953 case DNS_VERIFY_FAILED:
954 return -1;
955 case DNS_VERIFY_ERROR:
956 break;
957 default:
958 debug3("bad return value from verify_host_key_dns");
959 break;
960 }
961 }
962#endif /* DNS */
963
964 /* return ok if the key can be found in an old keyfile */ 835 /* return ok if the key can be found in an old keyfile */
965 if (stat(options.system_hostfile2, &st) == 0 || 836 if (stat(options.system_hostfile2, &st) == 0 ||
966 stat(options.user_hostfile2, &st) == 0) { 837 stat(options.user_hostfile2, &st) == 0) {
@@ -1042,7 +913,7 @@ show_key_from_file(const char *file, const char *host, int keytype)
1042 if ((ret = lookup_key_in_hostfile_by_type(file, host, 913 if ((ret = lookup_key_in_hostfile_by_type(file, host,
1043 keytype, found, &line))) { 914 keytype, found, &line))) {
1044 fp = key_fingerprint(found, SSH_FP_MD5, SSH_FP_HEX); 915 fp = key_fingerprint(found, SSH_FP_MD5, SSH_FP_HEX);
1045 logit("WARNING: %s key found for host %s\n" 916 log("WARNING: %s key found for host %s\n"
1046 "in %s:%d\n" 917 "in %s:%d\n"
1047 "%s key fingerprint %s.", 918 "%s key fingerprint %s.",
1048 key_type(found), host, file, line, 919 key_type(found), host, file, line,
diff --git a/sshconnect1.c b/sshconnect1.c
index 2f89964ec..2fc9a981a 100644
--- a/sshconnect1.c
+++ b/sshconnect1.c
@@ -13,11 +13,25 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect1.c,v 1.56 2003/08/28 12:54:34 markus Exp $"); 16RCSID("$OpenBSD: sshconnect1.c,v 1.52 2002/08/08 13:50:23 aaron Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19#include <openssl/md5.h> 19#include <openssl/md5.h>
20 20
21#ifdef KRB4
22#include <krb.h>
23#endif
24#ifdef KRB5
25#include <krb5.h>
26#ifndef HEIMDAL
27#define krb5_get_err_text(context,code) error_message(code)
28#endif /* !HEIMDAL */
29#endif
30#ifdef AFS
31#include <kafs.h>
32#include "radix.h"
33#endif
34
21#include "ssh.h" 35#include "ssh.h"
22#include "ssh1.h" 36#include "ssh1.h"
23#include "xmalloc.h" 37#include "xmalloc.h"
@@ -108,7 +122,7 @@ try_agent_authentication(void)
108 * although it advertised it supports this. Just 122 * although it advertised it supports this. Just
109 * return a wrong value. 123 * return a wrong value.
110 */ 124 */
111 logit("Authentication agent failed to decrypt challenge."); 125 log("Authentication agent failed to decrypt challenge.");
112 memset(response, 0, sizeof(response)); 126 memset(response, 0, sizeof(response));
113 } 127 }
114 key_free(key); 128 key_free(key);
@@ -366,6 +380,478 @@ try_rhosts_rsa_authentication(const char *local_user, Key * host_key)
366 return 0; 380 return 0;
367} 381}
368 382
383#ifdef KRB4
384static int
385try_krb4_authentication(void)
386{
387 KTEXT_ST auth; /* Kerberos data */
388 char *reply;
389 char inst[INST_SZ];
390 char *realm;
391 CREDENTIALS cred;
392 int r, type;
393 socklen_t slen;
394 Key_schedule schedule;
395 u_long checksum, cksum;
396 MSG_DAT msg_data;
397 struct sockaddr_in local, foreign;
398 struct stat st;
399
400 /* Don't do anything if we don't have any tickets. */
401 if (stat(tkt_string(), &st) < 0)
402 return 0;
403
404 strlcpy(inst, (char *)krb_get_phost(get_canonical_hostname(1)),
405 INST_SZ);
406
407 realm = (char *)krb_realmofhost(get_canonical_hostname(1));
408 if (!realm) {
409 debug("Kerberos v4: no realm for %s", get_canonical_hostname(1));
410 return 0;
411 }
412 /* This can really be anything. */
413 checksum = (u_long)getpid();
414
415 r = krb_mk_req(&auth, KRB4_SERVICE_NAME, inst, realm, checksum);
416 if (r != KSUCCESS) {
417 debug("Kerberos v4 krb_mk_req failed: %s", krb_err_txt[r]);
418 return 0;
419 }
420 /* Get session key to decrypt the server's reply with. */
421 r = krb_get_cred(KRB4_SERVICE_NAME, inst, realm, &cred);
422 if (r != KSUCCESS) {
423 debug("get_cred failed: %s", krb_err_txt[r]);
424 return 0;
425 }
426 des_key_sched((des_cblock *) cred.session, schedule);
427
428 /* Send authentication info to server. */
429 packet_start(SSH_CMSG_AUTH_KERBEROS);
430 packet_put_string((char *) auth.dat, auth.length);
431 packet_send();
432 packet_write_wait();
433
434 /* Zero the buffer. */
435 (void) memset(auth.dat, 0, MAX_KTXT_LEN);
436
437 slen = sizeof(local);
438 memset(&local, 0, sizeof(local));
439 if (getsockname(packet_get_connection_in(),
440 (struct sockaddr *)&local, &slen) < 0)
441 debug("getsockname failed: %s", strerror(errno));
442
443 slen = sizeof(foreign);
444 memset(&foreign, 0, sizeof(foreign));
445 if (getpeername(packet_get_connection_in(),
446 (struct sockaddr *)&foreign, &slen) < 0) {
447 debug("getpeername failed: %s", strerror(errno));
448 fatal_cleanup();
449 }
450 /* Get server reply. */
451 type = packet_read();
452 switch (type) {
453 case SSH_SMSG_FAILURE:
454 /* Should really be SSH_SMSG_AUTH_KERBEROS_FAILURE */
455 debug("Kerberos v4 authentication failed.");
456 return 0;
457 break;
458
459 case SSH_SMSG_AUTH_KERBEROS_RESPONSE:
460 /* SSH_SMSG_AUTH_KERBEROS_SUCCESS */
461 debug("Kerberos v4 authentication accepted.");
462
463 /* Get server's response. */
464 reply = packet_get_string((u_int *) &auth.length);
465 if (auth.length >= MAX_KTXT_LEN)
466 fatal("Kerberos v4: Malformed response from server");
467 memcpy(auth.dat, reply, auth.length);
468 xfree(reply);
469
470 packet_check_eom();
471
472 /*
473 * If his response isn't properly encrypted with the session
474 * key, and the decrypted checksum fails to match, he's
475 * bogus. Bail out.
476 */
477 r = krb_rd_priv(auth.dat, auth.length, schedule, &cred.session,
478 &foreign, &local, &msg_data);
479 if (r != KSUCCESS) {
480 debug("Kerberos v4 krb_rd_priv failed: %s",
481 krb_err_txt[r]);
482 packet_disconnect("Kerberos v4 challenge failed!");
483 }
484 /* Fetch the (incremented) checksum that we supplied in the request. */
485 memcpy((char *)&cksum, (char *)msg_data.app_data,
486 sizeof(cksum));
487 cksum = ntohl(cksum);
488
489 /* If it matches, we're golden. */
490 if (cksum == checksum + 1) {
491 debug("Kerberos v4 challenge successful.");
492 return 1;
493 } else
494 packet_disconnect("Kerberos v4 challenge failed!");
495 break;
496
497 default:
498 packet_disconnect("Protocol error on Kerberos v4 response: %d", type);
499 }
500 return 0;
501}
502
503#endif /* KRB4 */
504
505#ifdef KRB5
506static int
507try_krb5_authentication(krb5_context *context, krb5_auth_context *auth_context)
508{
509 krb5_error_code problem;
510 const char *tkfile;
511 struct stat buf;
512 krb5_ccache ccache = NULL;
513 const char *remotehost;
514 krb5_data ap;
515 int type;
516 krb5_ap_rep_enc_part *reply = NULL;
517 int ret;
518
519 memset(&ap, 0, sizeof(ap));
520
521 problem = krb5_init_context(context);
522 if (problem) {
523 debug("Kerberos v5: krb5_init_context failed");
524 ret = 0;
525 goto out;
526 }
527
528 problem = krb5_auth_con_init(*context, auth_context);
529 if (problem) {
530 debug("Kerberos v5: krb5_auth_con_init failed");
531 ret = 0;
532 goto out;
533 }
534
535#ifndef HEIMDAL
536 problem = krb5_auth_con_setflags(*context, *auth_context,
537 KRB5_AUTH_CONTEXT_RET_TIME);
538 if (problem) {
539 debug("Keberos v5: krb5_auth_con_setflags failed");
540 ret = 0;
541 goto out;
542 }
543#endif
544
545 tkfile = krb5_cc_default_name(*context);
546 if (strncmp(tkfile, "FILE:", 5) == 0)
547 tkfile += 5;
548
549 if (stat(tkfile, &buf) == 0 && getuid() != buf.st_uid) {
550 debug("Kerberos v5: could not get default ccache (permission denied).");
551 ret = 0;
552 goto out;
553 }
554
555 problem = krb5_cc_default(*context, &ccache);
556 if (problem) {
557 debug("Kerberos v5: krb5_cc_default failed: %s",
558 krb5_get_err_text(*context, problem));
559 ret = 0;
560 goto out;
561 }
562
563 remotehost = get_canonical_hostname(1);
564
565 problem = krb5_mk_req(*context, auth_context, AP_OPTS_MUTUAL_REQUIRED,
566 "host", remotehost, NULL, ccache, &ap);
567 if (problem) {
568 debug("Kerberos v5: krb5_mk_req failed: %s",
569 krb5_get_err_text(*context, problem));
570 ret = 0;
571 goto out;
572 }
573
574 packet_start(SSH_CMSG_AUTH_KERBEROS);
575 packet_put_string((char *) ap.data, ap.length);
576 packet_send();
577 packet_write_wait();
578
579 xfree(ap.data);
580 ap.length = 0;
581
582 type = packet_read();
583 switch (type) {
584 case SSH_SMSG_FAILURE:
585 /* Should really be SSH_SMSG_AUTH_KERBEROS_FAILURE */
586 debug("Kerberos v5 authentication failed.");
587 ret = 0;
588 break;
589
590 case SSH_SMSG_AUTH_KERBEROS_RESPONSE:
591 /* SSH_SMSG_AUTH_KERBEROS_SUCCESS */
592 debug("Kerberos v5 authentication accepted.");
593
594 /* Get server's response. */
595 ap.data = packet_get_string((unsigned int *) &ap.length);
596 packet_check_eom();
597 /* XXX je to dobre? */
598
599 problem = krb5_rd_rep(*context, *auth_context, &ap, &reply);
600 if (problem) {
601 ret = 0;
602 }
603 ret = 1;
604 break;
605
606 default:
607 packet_disconnect("Protocol error on Kerberos v5 response: %d",
608 type);
609 ret = 0;
610 break;
611
612 }
613
614 out:
615 if (ccache != NULL)
616 krb5_cc_close(*context, ccache);
617 if (reply != NULL)
618 krb5_free_ap_rep_enc_part(*context, reply);
619 if (ap.length > 0)
620#ifdef HEIMDAL
621 krb5_data_free(&ap);
622#else
623 krb5_free_data_contents(*context, &ap);
624#endif
625
626 return (ret);
627}
628
629static void
630send_krb5_tgt(krb5_context context, krb5_auth_context auth_context)
631{
632 int fd, type;
633 krb5_error_code problem;
634 krb5_data outbuf;
635 krb5_ccache ccache = NULL;
636 krb5_creds creds;
637#ifdef HEIMDAL
638 krb5_kdc_flags flags;
639#else
640 int forwardable;
641#endif
642 const char *remotehost;
643
644 memset(&creds, 0, sizeof(creds));
645 memset(&outbuf, 0, sizeof(outbuf));
646
647 fd = packet_get_connection_in();
648
649#ifdef HEIMDAL
650 problem = krb5_auth_con_setaddrs_from_fd(context, auth_context, &fd);
651#else
652 problem = krb5_auth_con_genaddrs(context, auth_context, fd,
653 KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR |
654 KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR);
655#endif
656 if (problem)
657 goto out;
658
659 problem = krb5_cc_default(context, &ccache);
660 if (problem)
661 goto out;
662
663 problem = krb5_cc_get_principal(context, ccache, &creds.client);
664 if (problem)
665 goto out;
666
667 remotehost = get_canonical_hostname(1);
668
669#ifdef HEIMDAL
670 problem = krb5_build_principal(context, &creds.server,
671 strlen(creds.client->realm), creds.client->realm,
672 "krbtgt", creds.client->realm, NULL);
673#else
674 problem = krb5_build_principal(context, &creds.server,
675 creds.client->realm.length, creds.client->realm.data,
676 "host", remotehost, NULL);
677#endif
678 if (problem)
679 goto out;
680
681 creds.times.endtime = 0;
682
683#ifdef HEIMDAL
684 flags.i = 0;
685 flags.b.forwarded = 1;
686 flags.b.forwardable = krb5_config_get_bool(context, NULL,
687 "libdefaults", "forwardable", NULL);
688 problem = krb5_get_forwarded_creds(context, auth_context,
689 ccache, flags.i, remotehost, &creds, &outbuf);
690#else
691 forwardable = 1;
692 problem = krb5_fwd_tgt_creds(context, auth_context, remotehost,
693 creds.client, creds.server, ccache, forwardable, &outbuf);
694#endif
695
696 if (problem)
697 goto out;
698
699 packet_start(SSH_CMSG_HAVE_KERBEROS_TGT);
700 packet_put_string((char *)outbuf.data, outbuf.length);
701 packet_send();
702 packet_write_wait();
703
704 type = packet_read();
705
706 if (type == SSH_SMSG_SUCCESS) {
707 char *pname;
708
709 krb5_unparse_name(context, creds.client, &pname);
710 debug("Kerberos v5 TGT forwarded (%s).", pname);
711 xfree(pname);
712 } else
713 debug("Kerberos v5 TGT forwarding failed.");
714
715 return;
716
717 out:
718 if (problem)
719 debug("Kerberos v5 TGT forwarding failed: %s",
720 krb5_get_err_text(context, problem));
721 if (creds.client)
722 krb5_free_principal(context, creds.client);
723 if (creds.server)
724 krb5_free_principal(context, creds.server);
725 if (ccache)
726 krb5_cc_close(context, ccache);
727 if (outbuf.data)
728 xfree(outbuf.data);
729}
730#endif /* KRB5 */
731
732#ifdef AFS
733static void
734send_krb4_tgt(void)
735{
736 CREDENTIALS *creds;
737 struct stat st;
738 char buffer[4096], pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ];
739 int problem, type;
740
741 /* Don't do anything if we don't have any tickets. */
742 if (stat(tkt_string(), &st) < 0)
743 return;
744
745 creds = xmalloc(sizeof(*creds));
746
747 problem = krb_get_tf_fullname(TKT_FILE, pname, pinst, prealm);
748 if (problem)
749 goto out;
750
751 problem = krb_get_cred("krbtgt", prealm, prealm, creds);
752 if (problem)
753 goto out;
754
755 if (time(0) > krb_life_to_time(creds->issue_date, creds->lifetime)) {
756 problem = RD_AP_EXP;
757 goto out;
758 }
759 creds_to_radix(creds, (u_char *)buffer, sizeof(buffer));
760
761 packet_start(SSH_CMSG_HAVE_KERBEROS_TGT);
762 packet_put_cstring(buffer);
763 packet_send();
764 packet_write_wait();
765
766 type = packet_read();
767
768 if (type == SSH_SMSG_SUCCESS)
769 debug("Kerberos v4 TGT forwarded (%s%s%s@%s).",
770 creds->pname, creds->pinst[0] ? "." : "",
771 creds->pinst, creds->realm);
772 else
773 debug("Kerberos v4 TGT rejected.");
774
775 xfree(creds);
776 return;
777
778 out:
779 debug("Kerberos v4 TGT passing failed: %s", krb_err_txt[problem]);
780 xfree(creds);
781}
782
783static void
784send_afs_tokens(void)
785{
786 CREDENTIALS creds;
787 struct ViceIoctl parms;
788 struct ClearToken ct;
789 int i, type, len;
790 char buf[2048], *p, *server_cell;
791 char buffer[8192];
792
793 /* Move over ktc_GetToken, here's something leaner. */
794 for (i = 0; i < 100; i++) { /* just in case */
795 parms.in = (char *) &i;
796 parms.in_size = sizeof(i);
797 parms.out = buf;
798 parms.out_size = sizeof(buf);
799 if (k_pioctl(0, VIOCGETTOK, &parms, 0) != 0)
800 break;
801 p = buf;
802
803 /* Get secret token. */
804 memcpy(&creds.ticket_st.length, p, sizeof(u_int));
805 if (creds.ticket_st.length > MAX_KTXT_LEN)
806 break;
807 p += sizeof(u_int);
808 memcpy(creds.ticket_st.dat, p, creds.ticket_st.length);
809 p += creds.ticket_st.length;
810
811 /* Get clear token. */
812 memcpy(&len, p, sizeof(len));
813 if (len != sizeof(struct ClearToken))
814 break;
815 p += sizeof(len);
816 memcpy(&ct, p, len);
817 p += len;
818 p += sizeof(len); /* primary flag */
819 server_cell = p;
820
821 /* Flesh out our credentials. */
822 strlcpy(creds.service, "afs", sizeof(creds.service));
823 creds.instance[0] = '\0';
824 strlcpy(creds.realm, server_cell, REALM_SZ);
825 memcpy(creds.session, ct.HandShakeKey, DES_KEY_SZ);
826 creds.issue_date = ct.BeginTimestamp;
827 creds.lifetime = krb_time_to_life(creds.issue_date,
828 ct.EndTimestamp);
829 creds.kvno = ct.AuthHandle;
830 snprintf(creds.pname, sizeof(creds.pname), "AFS ID %d", ct.ViceId);
831 creds.pinst[0] = '\0';
832
833 /* Encode token, ship it off. */
834 if (creds_to_radix(&creds, (u_char *)buffer,
835 sizeof(buffer)) <= 0)
836 break;
837 packet_start(SSH_CMSG_HAVE_AFS_TOKEN);
838 packet_put_cstring(buffer);
839 packet_send();
840 packet_write_wait();
841
842 /* Roger, Roger. Clearance, Clarence. What's your vector,
843 Victor? */
844 type = packet_read();
845
846 if (type == SSH_SMSG_FAILURE)
847 debug("AFS token for cell %s rejected.", server_cell);
848 else if (type != SSH_SMSG_SUCCESS)
849 packet_disconnect("Protocol error on AFS token response: %d", type);
850 }
851}
852
853#endif /* AFS */
854
369/* 855/*
370 * Tries to authenticate with any string-based challenge/response system. 856 * Tries to authenticate with any string-based challenge/response system.
371 * Note that the client code is not tied to s/key or TIS. 857 * Note that the client code is not tied to s/key or TIS.
@@ -404,7 +890,7 @@ try_challenge_response_authentication(void)
404 if (i != 0) 890 if (i != 0)
405 error("Permission denied, please try again."); 891 error("Permission denied, please try again.");
406 if (options.cipher == SSH_CIPHER_NONE) 892 if (options.cipher == SSH_CIPHER_NONE)
407 logit("WARNING: Encryption is disabled! " 893 log("WARNING: Encryption is disabled! "
408 "Response will be transmitted in clear text."); 894 "Response will be transmitted in clear text.");
409 response = read_passphrase(prompt, 0); 895 response = read_passphrase(prompt, 0);
410 if (strcmp(response, "") == 0) { 896 if (strcmp(response, "") == 0) {
@@ -439,7 +925,7 @@ try_password_authentication(char *prompt)
439 925
440 debug("Doing password authentication."); 926 debug("Doing password authentication.");
441 if (options.cipher == SSH_CIPHER_NONE) 927 if (options.cipher == SSH_CIPHER_NONE)
442 logit("WARNING: Encryption is disabled! Password will be transmitted in clear text."); 928 log("WARNING: Encryption is disabled! Password will be transmitted in clear text.");
443 for (i = 0; i < options.number_of_password_prompts; i++) { 929 for (i = 0; i < options.number_of_password_prompts; i++) {
444 if (i != 0) 930 if (i != 0)
445 error("Permission denied, please try again."); 931 error("Permission denied, please try again.");
@@ -495,9 +981,9 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
495 981
496 rbits = BN_num_bits(server_key->rsa->n); 982 rbits = BN_num_bits(server_key->rsa->n);
497 if (bits != rbits) { 983 if (bits != rbits) {
498 logit("Warning: Server lies about size of server public key: " 984 log("Warning: Server lies about size of server public key: "
499 "actual size is %d bits vs. announced %d.", rbits, bits); 985 "actual size is %d bits vs. announced %d.", rbits, bits);
500 logit("Warning: This may be due to an old implementation of ssh."); 986 log("Warning: This may be due to an old implementation of ssh.");
501 } 987 }
502 /* Get the host key. */ 988 /* Get the host key. */
503 host_key = key_new(KEY_RSA1); 989 host_key = key_new(KEY_RSA1);
@@ -507,9 +993,9 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
507 993
508 rbits = BN_num_bits(host_key->rsa->n); 994 rbits = BN_num_bits(host_key->rsa->n);
509 if (bits != rbits) { 995 if (bits != rbits) {
510 logit("Warning: Server lies about size of server host key: " 996 log("Warning: Server lies about size of server host key: "
511 "actual size is %d bits vs. announced %d.", rbits, bits); 997 "actual size is %d bits vs. announced %d.", rbits, bits);
512 logit("Warning: This may be due to an old implementation of ssh."); 998 log("Warning: This may be due to an old implementation of ssh.");
513 } 999 }
514 1000
515 /* Get protocol flags. */ 1001 /* Get protocol flags. */
@@ -600,7 +1086,7 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
600 options.cipher = ssh_cipher_default; 1086 options.cipher = ssh_cipher_default;
601 } else if (options.cipher == SSH_CIPHER_ILLEGAL || 1087 } else if (options.cipher == SSH_CIPHER_ILLEGAL ||
602 !(cipher_mask_ssh1(1) & (1 << options.cipher))) { 1088 !(cipher_mask_ssh1(1) & (1 << options.cipher))) {
603 logit("No valid SSH1 cipher, using %.100s instead.", 1089 log("No valid SSH1 cipher, using %.100s instead.",
604 cipher_name(ssh_cipher_default)); 1090 cipher_name(ssh_cipher_default));
605 options.cipher = ssh_cipher_default; 1091 options.cipher = ssh_cipher_default;
606 } 1092 }
@@ -654,6 +1140,10 @@ void
654ssh_userauth1(const char *local_user, const char *server_user, char *host, 1140ssh_userauth1(const char *local_user, const char *server_user, char *host,
655 Sensitive *sensitive) 1141 Sensitive *sensitive)
656{ 1142{
1143#ifdef KRB5
1144 krb5_context context = NULL;
1145 krb5_auth_context auth_context = NULL;
1146#endif
657 int i, type; 1147 int i, type;
658 1148
659 if (supported_authentications == 0) 1149 if (supported_authentications == 0)
@@ -678,6 +1168,56 @@ ssh_userauth1(const char *local_user, const char *server_user, char *host,
678 if (type != SSH_SMSG_FAILURE) 1168 if (type != SSH_SMSG_FAILURE)
679 packet_disconnect("Protocol error: got %d in response to SSH_CMSG_USER", type); 1169 packet_disconnect("Protocol error: got %d in response to SSH_CMSG_USER", type);
680 1170
1171#ifdef KRB5
1172 if ((supported_authentications & (1 << SSH_AUTH_KERBEROS)) &&
1173 options.kerberos_authentication) {
1174 debug("Trying Kerberos v5 authentication.");
1175
1176 if (try_krb5_authentication(&context, &auth_context)) {
1177 type = packet_read();
1178 if (type == SSH_SMSG_SUCCESS)
1179 goto success;
1180 if (type != SSH_SMSG_FAILURE)
1181 packet_disconnect("Protocol error: got %d in response to Kerberos v5 auth", type);
1182 }
1183 }
1184#endif /* KRB5 */
1185
1186#ifdef KRB4
1187 if ((supported_authentications & (1 << SSH_AUTH_KERBEROS)) &&
1188 options.kerberos_authentication) {
1189 debug("Trying Kerberos v4 authentication.");
1190
1191 if (try_krb4_authentication()) {
1192 type = packet_read();
1193 if (type == SSH_SMSG_SUCCESS)
1194 goto success;
1195 if (type != SSH_SMSG_FAILURE)
1196 packet_disconnect("Protocol error: got %d in response to Kerberos v4 auth", type);
1197 }
1198 }
1199#endif /* KRB4 */
1200
1201 /*
1202 * Use rhosts authentication if running in privileged socket and we
1203 * do not wish to remain anonymous.
1204 */
1205 if ((supported_authentications & (1 << SSH_AUTH_RHOSTS)) &&
1206 options.rhosts_authentication) {
1207 debug("Trying rhosts authentication.");
1208 packet_start(SSH_CMSG_AUTH_RHOSTS);
1209 packet_put_cstring(local_user);
1210 packet_send();
1211 packet_write_wait();
1212
1213 /* The server should respond with success or failure. */
1214 type = packet_read();
1215 if (type == SSH_SMSG_SUCCESS)
1216 goto success;
1217 if (type != SSH_SMSG_FAILURE)
1218 packet_disconnect("Protocol error: got %d in response to rhosts auth",
1219 type);
1220 }
681 /* 1221 /*
682 * Try .rhosts or /etc/hosts.equiv authentication with RSA host 1222 * Try .rhosts or /etc/hosts.equiv authentication with RSA host
683 * authentication. 1223 * authentication.
@@ -731,5 +1271,36 @@ ssh_userauth1(const char *local_user, const char *server_user, char *host,
731 /* NOTREACHED */ 1271 /* NOTREACHED */
732 1272
733 success: 1273 success:
1274#ifdef KRB5
1275 /* Try Kerberos v5 TGT passing. */
1276 if ((supported_authentications & (1 << SSH_PASS_KERBEROS_TGT)) &&
1277 options.kerberos_tgt_passing && context && auth_context) {
1278 if (options.cipher == SSH_CIPHER_NONE)
1279 log("WARNING: Encryption is disabled! Ticket will be transmitted in the clear!");
1280 send_krb5_tgt(context, auth_context);
1281 }
1282 if (auth_context)
1283 krb5_auth_con_free(context, auth_context);
1284 if (context)
1285 krb5_free_context(context);
1286#endif
1287
1288#ifdef AFS
1289 /* Try Kerberos v4 TGT passing if the server supports it. */
1290 if ((supported_authentications & (1 << SSH_PASS_KERBEROS_TGT)) &&
1291 options.kerberos_tgt_passing) {
1292 if (options.cipher == SSH_CIPHER_NONE)
1293 log("WARNING: Encryption is disabled! Ticket will be transmitted in the clear!");
1294 send_krb4_tgt();
1295 }
1296 /* Try AFS token passing if the server supports it. */
1297 if ((supported_authentications & (1 << SSH_PASS_AFS_TOKEN)) &&
1298 options.afs_token_passing && k_hasafs()) {
1299 if (options.cipher == SSH_CIPHER_NONE)
1300 log("WARNING: Encryption is disabled! Token will be transmitted in the clear!");
1301 send_afs_tokens();
1302 }
1303#endif /* AFS */
1304
734 return; /* need statement after label */ 1305 return; /* need statement after label */
735} 1306}
diff --git a/sshconnect2.c b/sshconnect2.c
index 933c223ec..642b34b9e 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,9 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.124 2003/08/25 10:33:33 djm Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.114 2003/04/01 10:22:21 markus Exp $");
27
28#include "openbsd-compat/sys-queue.h"
29 27
30#include "ssh.h" 28#include "ssh.h"
31#include "ssh2.h" 29#include "ssh2.h"
@@ -50,10 +48,6 @@ RCSID("$OpenBSD: sshconnect2.c,v 1.124 2003/08/25 10:33:33 djm Exp $");
50#include "msg.h" 48#include "msg.h"
51#include "pathnames.h" 49#include "pathnames.h"
52 50
53#ifdef GSSAPI
54#include "ssh-gss.h"
55#endif
56
57/* import */ 51/* import */
58extern char *client_version_string; 52extern char *client_version_string;
59extern char *server_version_string; 53extern char *server_version_string;
@@ -64,7 +58,7 @@ extern Options options;
64 */ 58 */
65 59
66u_char *session_id2 = NULL; 60u_char *session_id2 = NULL;
67u_int session_id2_len = 0; 61int session_id2_len = 0;
68 62
69char *xxx_host; 63char *xxx_host;
70struct sockaddr *xxx_hostaddr; 64struct sockaddr *xxx_hostaddr;
@@ -88,7 +82,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
88 xxx_hostaddr = hostaddr; 82 xxx_hostaddr = hostaddr;
89 83
90 if (options.ciphers == (char *)-1) { 84 if (options.ciphers == (char *)-1) {
91 logit("No valid ciphers for protocol version 2 given, using defaults."); 85 log("No valid ciphers for protocol version 2 given, using defaults.");
92 options.ciphers = NULL; 86 options.ciphers = NULL;
93 } 87 }
94 if (options.ciphers != NULL) { 88 if (options.ciphers != NULL) {
@@ -114,9 +108,6 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
114 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = 108 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] =
115 options.hostkeyalgorithms; 109 options.hostkeyalgorithms;
116 110
117 if (options.rekey_limit)
118 packet_set_rekey_limit(options.rekey_limit);
119
120 /* start key exchange */ 111 /* start key exchange */
121 kex = kex_setup(myproposal); 112 kex = kex_setup(myproposal);
122 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; 113 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
@@ -147,18 +138,10 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
147 138
148typedef struct Authctxt Authctxt; 139typedef struct Authctxt Authctxt;
149typedef struct Authmethod Authmethod; 140typedef struct Authmethod Authmethod;
150typedef struct identity Identity; 141
151typedef struct idlist Idlist; 142typedef int sign_cb_fn(
152 143 Authctxt *authctxt, Key *key,
153struct identity { 144 u_char **sigp, u_int *lenp, u_char *data, u_int datalen);
154 TAILQ_ENTRY(identity) next;
155 AuthenticationConnection *ac; /* set if agent supports key */
156 Key *key; /* public/private key */
157 char *filename; /* comment for agent-only keys */
158 int tried;
159 int isprivate; /* key points to the private key */
160};
161TAILQ_HEAD(idlist, identity);
162 145
163struct Authctxt { 146struct Authctxt {
164 const char *server_user; 147 const char *server_user;
@@ -169,14 +152,14 @@ struct Authctxt {
169 int success; 152 int success;
170 char *authlist; 153 char *authlist;
171 /* pubkey */ 154 /* pubkey */
172 Idlist keys; 155 Key *last_key;
156 sign_cb_fn *last_key_sign;
157 int last_key_hint;
173 AuthenticationConnection *agent; 158 AuthenticationConnection *agent;
174 /* hostbased */ 159 /* hostbased */
175 Sensitive *sensitive; 160 Sensitive *sensitive;
176 /* kbd-interactive */ 161 /* kbd-interactive */
177 int info_req_seen; 162 int info_req_seen;
178 /* generic */
179 void *methoddata;
180}; 163};
181struct Authmethod { 164struct Authmethod {
182 char *name; /* string to compare against server's list */ 165 char *name; /* string to compare against server's list */
@@ -198,35 +181,17 @@ int userauth_pubkey(Authctxt *);
198int userauth_passwd(Authctxt *); 181int userauth_passwd(Authctxt *);
199int userauth_kbdint(Authctxt *); 182int userauth_kbdint(Authctxt *);
200int userauth_hostbased(Authctxt *); 183int userauth_hostbased(Authctxt *);
201int userauth_kerberos(Authctxt *);
202
203#ifdef GSSAPI
204int userauth_gssapi(Authctxt *authctxt);
205void input_gssapi_response(int type, u_int32_t, void *);
206void input_gssapi_token(int type, u_int32_t, void *);
207void input_gssapi_hash(int type, u_int32_t, void *);
208void input_gssapi_error(int, u_int32_t, void *);
209void input_gssapi_errtok(int, u_int32_t, void *);
210#endif
211 184
212void userauth(Authctxt *, char *); 185void userauth(Authctxt *, char *);
213 186
214static int sign_and_send_pubkey(Authctxt *, Identity *); 187static int sign_and_send_pubkey(Authctxt *, Key *, sign_cb_fn *);
215static void pubkey_prepare(Authctxt *); 188static void clear_auth_state(Authctxt *);
216static void pubkey_cleanup(Authctxt *);
217static Key *load_identity_file(char *);
218 189
219static Authmethod *authmethod_get(char *authlist); 190static Authmethod *authmethod_get(char *authlist);
220static Authmethod *authmethod_lookup(const char *name); 191static Authmethod *authmethod_lookup(const char *name);
221static char *authmethods_get(void); 192static char *authmethods_get(void);
222 193
223Authmethod authmethods[] = { 194Authmethod authmethods[] = {
224#ifdef GSSAPI
225 {"gssapi",
226 userauth_gssapi,
227 &options.gss_authentication,
228 NULL},
229#endif
230 {"hostbased", 195 {"hostbased",
231 userauth_hostbased, 196 userauth_hostbased,
232 &options.hostbased_authentication, 197 &options.hostbased_authentication,
@@ -283,7 +248,7 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
283 248
284 /* setup authentication context */ 249 /* setup authentication context */
285 memset(&authctxt, 0, sizeof(authctxt)); 250 memset(&authctxt, 0, sizeof(authctxt));
286 pubkey_prepare(&authctxt); 251 authctxt.agent = ssh_get_authentication_connection();
287 authctxt.server_user = server_user; 252 authctxt.server_user = server_user;
288 authctxt.local_user = local_user; 253 authctxt.local_user = local_user;
289 authctxt.host = host; 254 authctxt.host = host;
@@ -291,7 +256,6 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
291 authctxt.success = 0; 256 authctxt.success = 0;
292 authctxt.method = authmethod_lookup("none"); 257 authctxt.method = authmethod_lookup("none");
293 authctxt.authlist = NULL; 258 authctxt.authlist = NULL;
294 authctxt.methoddata = NULL;
295 authctxt.sensitive = sensitive; 259 authctxt.sensitive = sensitive;
296 authctxt.info_req_seen = 0; 260 authctxt.info_req_seen = 0;
297 if (authctxt.method == NULL) 261 if (authctxt.method == NULL)
@@ -306,19 +270,14 @@ ssh_userauth2(const char *local_user, const char *server_user, char *host,
306 dispatch_set(SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner); 270 dispatch_set(SSH2_MSG_USERAUTH_BANNER, &input_userauth_banner);
307 dispatch_run(DISPATCH_BLOCK, &authctxt.success, &authctxt); /* loop until success */ 271 dispatch_run(DISPATCH_BLOCK, &authctxt.success, &authctxt); /* loop until success */
308 272
309 pubkey_cleanup(&authctxt); 273 if (authctxt.agent != NULL)
310 dispatch_range(SSH2_MSG_USERAUTH_MIN, SSH2_MSG_USERAUTH_MAX, NULL); 274 ssh_close_authentication_connection(authctxt.agent);
311 275
312 debug("Authentication succeeded (%s).", authctxt.method->name); 276 debug("Authentication succeeded (%s).", authctxt.method->name);
313} 277}
314
315void 278void
316userauth(Authctxt *authctxt, char *authlist) 279userauth(Authctxt *authctxt, char *authlist)
317{ 280{
318 if (authctxt->methoddata) {
319 xfree(authctxt->methoddata);
320 authctxt->methoddata = NULL;
321 }
322 if (authlist == NULL) { 281 if (authlist == NULL) {
323 authlist = authctxt->authlist; 282 authlist = authctxt->authlist;
324 } else { 283 } else {
@@ -331,12 +290,6 @@ userauth(Authctxt *authctxt, char *authlist)
331 if (method == NULL) 290 if (method == NULL)
332 fatal("Permission denied (%s).", authlist); 291 fatal("Permission denied (%s).", authlist);
333 authctxt->method = method; 292 authctxt->method = method;
334
335 /* reset the per method handler */
336 dispatch_range(SSH2_MSG_USERAUTH_PER_METHOD_MIN,
337 SSH2_MSG_USERAUTH_PER_METHOD_MAX, NULL);
338
339 /* and try new method */
340 if (method->userauth(authctxt) != 0) { 293 if (method->userauth(authctxt) != 0) {
341 debug2("we sent a %s packet, wait for reply", method->name); 294 debug2("we sent a %s packet, wait for reply", method->name);
342 break; 295 break;
@@ -361,7 +314,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
361 debug3("input_userauth_banner"); 314 debug3("input_userauth_banner");
362 msg = packet_get_string(NULL); 315 msg = packet_get_string(NULL);
363 lang = packet_get_string(NULL); 316 lang = packet_get_string(NULL);
364 logit("%s", msg); 317 fprintf(stderr, "%s", msg);
365 xfree(msg); 318 xfree(msg);
366 xfree(lang); 319 xfree(lang);
367} 320}
@@ -374,8 +327,7 @@ input_userauth_success(int type, u_int32_t seq, void *ctxt)
374 fatal("input_userauth_success: no authentication context"); 327 fatal("input_userauth_success: no authentication context");
375 if (authctxt->authlist) 328 if (authctxt->authlist)
376 xfree(authctxt->authlist); 329 xfree(authctxt->authlist);
377 if (authctxt->methoddata) 330 clear_auth_state(authctxt);
378 xfree(authctxt->methoddata);
379 authctxt->success = 1; /* break out */ 331 authctxt->success = 1; /* break out */
380} 332}
381 333
@@ -394,9 +346,10 @@ input_userauth_failure(int type, u_int32_t seq, void *ctxt)
394 packet_check_eom(); 346 packet_check_eom();
395 347
396 if (partial != 0) 348 if (partial != 0)
397 logit("Authenticated with partial success."); 349 log("Authenticated with partial success.");
398 debug("Authentications that can continue: %s", authlist); 350 debug("Authentications that can continue: %s", authlist);
399 351
352 clear_auth_state(authctxt);
400 userauth(authctxt, authlist); 353 userauth(authctxt, authlist);
401} 354}
402void 355void
@@ -404,7 +357,6 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
404{ 357{
405 Authctxt *authctxt = ctxt; 358 Authctxt *authctxt = ctxt;
406 Key *key = NULL; 359 Key *key = NULL;
407 Identity *id = NULL;
408 Buffer b; 360 Buffer b;
409 int pktype, sent = 0; 361 int pktype, sent = 0;
410 u_int alen, blen; 362 u_int alen, blen;
@@ -427,267 +379,55 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
427 } 379 }
428 packet_check_eom(); 380 packet_check_eom();
429 381
430 debug("Server accepts key: pkalg %s blen %u", pkalg, blen); 382 debug("Server accepts key: pkalg %s blen %u lastkey %p hint %d",
431 383 pkalg, blen, authctxt->last_key, authctxt->last_key_hint);
432 if ((pktype = key_type_from_name(pkalg)) == KEY_UNSPEC) {
433 debug("unknown pkalg %s", pkalg);
434 goto done;
435 }
436 if ((key = key_from_blob(pkblob, blen)) == NULL) {
437 debug("no key from blob. pkalg %s", pkalg);
438 goto done;
439 }
440 if (key->type != pktype) {
441 error("input_userauth_pk_ok: type mismatch "
442 "for decoded key (received %d, expected %d)",
443 key->type, pktype);
444 goto done;
445 }
446 fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
447 debug2("input_userauth_pk_ok: fp %s", fp);
448 xfree(fp);
449 384
450 TAILQ_FOREACH(id, &authctxt->keys, next) { 385 do {
451 if (key_equal(key, id->key)) { 386 if (authctxt->last_key == NULL ||
452 sent = sign_and_send_pubkey(authctxt, id); 387 authctxt->last_key_sign == NULL) {
388 debug("no last key or no sign cb");
453 break; 389 break;
454 } 390 }
455 } 391 if ((pktype = key_type_from_name(pkalg)) == KEY_UNSPEC) {
456done: 392 debug("unknown pkalg %s", pkalg);
393 break;
394 }
395 if ((key = key_from_blob(pkblob, blen)) == NULL) {
396 debug("no key from blob. pkalg %s", pkalg);
397 break;
398 }
399 if (key->type != pktype) {
400 error("input_userauth_pk_ok: type mismatch "
401 "for decoded key (received %d, expected %d)",
402 key->type, pktype);
403 break;
404 }
405 fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
406 debug2("input_userauth_pk_ok: fp %s", fp);
407 xfree(fp);
408 if (!key_equal(key, authctxt->last_key)) {
409 debug("key != last_key");
410 break;
411 }
412 sent = sign_and_send_pubkey(authctxt, key,
413 authctxt->last_key_sign);
414 } while (0);
415
457 if (key != NULL) 416 if (key != NULL)
458 key_free(key); 417 key_free(key);
459 xfree(pkalg); 418 xfree(pkalg);
460 xfree(pkblob); 419 xfree(pkblob);
461 420
421 /* unregister */
422 clear_auth_state(authctxt);
423 dispatch_set(SSH2_MSG_USERAUTH_PK_OK, NULL);
424
462 /* try another method if we did not send a packet */ 425 /* try another method if we did not send a packet */
463 if (sent == 0) 426 if (sent == 0)
464 userauth(authctxt, NULL); 427 userauth(authctxt, NULL);
465}
466
467#ifdef GSSAPI
468int
469userauth_gssapi(Authctxt *authctxt)
470{
471 Gssctxt *gssctxt = NULL;
472 static gss_OID_set supported = NULL;
473 static int mech = 0;
474 OM_uint32 min;
475 int ok = 0;
476
477 /* Try one GSSAPI method at a time, rather than sending them all at
478 * once. */
479
480 if (supported == NULL)
481 gss_indicate_mechs(&min, &supported);
482
483 /* Check to see if the mechanism is usable before we offer it */
484 while (mech<supported->count && !ok) {
485 if (gssctxt)
486 ssh_gssapi_delete_ctx(&gssctxt);
487 ssh_gssapi_build_ctx(&gssctxt);
488 ssh_gssapi_set_oid(gssctxt, &supported->elements[mech]);
489
490 /* My DER encoding requires length<128 */
491 if (supported->elements[mech].length < 128 &&
492 !GSS_ERROR(ssh_gssapi_import_name(gssctxt,
493 authctxt->host))) {
494 ok = 1; /* Mechanism works */
495 } else {
496 mech++;
497 }
498 }
499
500 if (!ok) return 0;
501
502 authctxt->methoddata=(void *)gssctxt;
503
504 packet_start(SSH2_MSG_USERAUTH_REQUEST);
505 packet_put_cstring(authctxt->server_user);
506 packet_put_cstring(authctxt->service);
507 packet_put_cstring(authctxt->method->name);
508 428
509 packet_put_int(1);
510
511 /* Some servers encode the OID incorrectly (as we used to) */
512 if (datafellows & SSH_BUG_GSSAPI_BER) {
513 packet_put_string(supported->elements[mech].elements,
514 supported->elements[mech].length);
515 } else {
516 packet_put_int((supported->elements[mech].length)+2);
517 packet_put_char(SSH_GSS_OIDTYPE);
518 packet_put_char(supported->elements[mech].length);
519 packet_put_raw(supported->elements[mech].elements,
520 supported->elements[mech].length);
521 }
522
523 packet_send();
524
525 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_RESPONSE, &input_gssapi_response);
526 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, &input_gssapi_token);
527 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERROR, &input_gssapi_error);
528 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK, &input_gssapi_errtok);
529
530 mech++; /* Move along to next candidate */
531
532 return 1;
533}
534
535void
536input_gssapi_response(int type, u_int32_t plen, void *ctxt)
537{
538 Authctxt *authctxt = ctxt;
539 Gssctxt *gssctxt;
540 OM_uint32 status, ms;
541 int oidlen;
542 char *oidv;
543 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
544
545 if (authctxt == NULL)
546 fatal("input_gssapi_response: no authentication context");
547 gssctxt = authctxt->methoddata;
548
549 /* Setup our OID */
550 oidv = packet_get_string(&oidlen);
551
552 if (datafellows & SSH_BUG_GSSAPI_BER) {
553 if (!ssh_gssapi_check_oid(gssctxt, oidv, oidlen))
554 fatal("Server returned different OID than expected");
555 } else {
556 if(oidv[0] != SSH_GSS_OIDTYPE || oidv[1] != oidlen-2) {
557 debug("Badly encoded mechanism OID received");
558 userauth(authctxt, NULL);
559 xfree(oidv);
560 return;
561 }
562 if (!ssh_gssapi_check_oid(gssctxt, oidv+2, oidlen-2))
563 fatal("Server returned different OID than expected");
564 }
565
566 packet_check_eom();
567
568 xfree(oidv);
569
570 status = ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds,
571 GSS_C_NO_BUFFER, &send_tok, NULL);
572 if (GSS_ERROR(status)) {
573 if (send_tok.length > 0) {
574 packet_start(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK);
575 packet_put_string(send_tok.value, send_tok.length);
576 packet_send();
577 gss_release_buffer(&ms, &send_tok);
578 }
579 /* Start again with next method on list */
580 debug("Trying to start again");
581 userauth(authctxt, NULL);
582 return;
583 }
584
585 /* We must have data to send */
586 packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
587 packet_put_string(send_tok.value, send_tok.length);
588 packet_send();
589 gss_release_buffer(&ms, &send_tok);
590} 429}
591 430
592void
593input_gssapi_token(int type, u_int32_t plen, void *ctxt)
594{
595 Authctxt *authctxt = ctxt;
596 Gssctxt *gssctxt;
597 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
598 gss_buffer_desc recv_tok;
599 OM_uint32 status, ms;
600 u_int slen;
601
602 if (authctxt == NULL)
603 fatal("input_gssapi_response: no authentication context");
604 gssctxt = authctxt->methoddata;
605
606 recv_tok.value = packet_get_string(&slen);
607 recv_tok.length = slen; /* safe typecast */
608
609 packet_check_eom();
610
611 status=ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds,
612 &recv_tok, &send_tok, NULL);
613
614 xfree(recv_tok.value);
615
616 if (GSS_ERROR(status)) {
617 if (send_tok.length > 0) {
618 packet_start(SSH2_MSG_USERAUTH_GSSAPI_ERRTOK);
619 packet_put_string(send_tok.value, send_tok.length);
620 packet_send();
621 gss_release_buffer(&ms, &send_tok);
622 }
623 /* Start again with the next method in the list */
624 userauth(authctxt, NULL);
625 return;
626 }
627
628 if (send_tok.length > 0) {
629 packet_start(SSH2_MSG_USERAUTH_GSSAPI_TOKEN);
630 packet_put_string(send_tok.value, send_tok.length);
631 packet_send();
632 gss_release_buffer(&ms, &send_tok);
633 }
634
635 if (status == GSS_S_COMPLETE) {
636 /* If that succeeded, send a exchange complete message */
637 packet_start(SSH2_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE);
638 packet_send();
639 }
640}
641
642void
643input_gssapi_errtok(int type, u_int32_t plen, void *ctxt)
644{
645 Authctxt *authctxt = ctxt;
646 Gssctxt *gssctxt;
647 gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER;
648 gss_buffer_desc recv_tok;
649 OM_uint32 status, ms;
650 u_int len;
651
652 if (authctxt == NULL)
653 fatal("input_gssapi_response: no authentication context");
654 gssctxt = authctxt->methoddata;
655
656 recv_tok.value = packet_get_string(&len);
657 recv_tok.length = len;
658
659 packet_check_eom();
660
661 /* Stick it into GSSAPI and see what it says */
662 status = ssh_gssapi_init_ctx(gssctxt, options.gss_deleg_creds,
663 &recv_tok, &send_tok, NULL);
664
665 xfree(recv_tok.value);
666 gss_release_buffer(&ms, &send_tok);
667
668 /* Server will be returning a failed packet after this one */
669}
670
671void
672input_gssapi_error(int type, u_int32_t plen, void *ctxt)
673{
674 OM_uint32 maj, min;
675 char *msg;
676 char *lang;
677
678 maj=packet_get_int();
679 min=packet_get_int();
680 msg=packet_get_string(NULL);
681 lang=packet_get_string(NULL);
682
683 packet_check_eom();
684
685 debug("Server GSSAPI Error:\n%s\n", msg);
686 xfree(msg);
687 xfree(lang);
688}
689#endif /* GSSAPI */
690
691int 431int
692userauth_none(Authctxt *authctxt) 432userauth_none(Authctxt *authctxt)
693{ 433{
@@ -751,7 +491,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
751 info = packet_get_string(NULL); 491 info = packet_get_string(NULL);
752 lang = packet_get_string(NULL); 492 lang = packet_get_string(NULL);
753 if (strlen(info) > 0) 493 if (strlen(info) > 0)
754 logit("%s", info); 494 log("%s", info);
755 xfree(info); 495 xfree(info);
756 xfree(lang); 496 xfree(lang);
757 packet_start(SSH2_MSG_USERAUTH_REQUEST); 497 packet_start(SSH2_MSG_USERAUTH_REQUEST);
@@ -783,7 +523,7 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
783 if (strcmp(password, retype) != 0) { 523 if (strcmp(password, retype) != 0) {
784 memset(password, 0, strlen(password)); 524 memset(password, 0, strlen(password));
785 xfree(password); 525 xfree(password);
786 logit("Mismatch; try again, EOF to quit."); 526 log("Mismatch; try again, EOF to quit.");
787 password = NULL; 527 password = NULL;
788 } 528 }
789 memset(retype, 0, strlen(retype)); 529 memset(retype, 0, strlen(retype));
@@ -799,44 +539,34 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
799 &input_userauth_passwd_changereq); 539 &input_userauth_passwd_changereq);
800} 540}
801 541
802static int 542static void
803identity_sign(Identity *id, u_char **sigp, u_int *lenp, 543clear_auth_state(Authctxt *authctxt)
804 u_char *data, u_int datalen)
805{ 544{
806 Key *prv; 545 /* XXX clear authentication state */
807 int ret; 546 dispatch_set(SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ, NULL);
808 547
809 /* the agent supports this key */ 548 if (authctxt->last_key != NULL && authctxt->last_key_hint == -1) {
810 if (id->ac) 549 debug3("clear_auth_state: key_free %p", authctxt->last_key);
811 return (ssh_agent_sign(id->ac, id->key, sigp, lenp, 550 key_free(authctxt->last_key);
812 data, datalen)); 551 }
813 /* 552 authctxt->last_key = NULL;
814 * we have already loaded the private key or 553 authctxt->last_key_hint = -2;
815 * the private key is stored in external hardware 554 authctxt->last_key_sign = NULL;
816 */
817 if (id->isprivate || (id->key->flags & KEY_FLAG_EXT))
818 return (key_sign(id->key, sigp, lenp, data, datalen));
819 /* load the private key from the file */
820 if ((prv = load_identity_file(id->filename)) == NULL)
821 return (-1);
822 ret = key_sign(prv, sigp, lenp, data, datalen);
823 key_free(prv);
824 return (ret);
825} 555}
826 556
827static int 557static int
828sign_and_send_pubkey(Authctxt *authctxt, Identity *id) 558sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback)
829{ 559{
830 Buffer b; 560 Buffer b;
831 u_char *blob, *signature; 561 u_char *blob, *signature;
832 u_int bloblen, slen; 562 u_int bloblen, slen;
833 u_int skip = 0; 563 int skip = 0;
834 int ret = -1; 564 int ret = -1;
835 int have_sig = 1; 565 int have_sig = 1;
836 566
837 debug3("sign_and_send_pubkey"); 567 debug3("sign_and_send_pubkey");
838 568
839 if (key_to_blob(id->key, &blob, &bloblen) == 0) { 569 if (key_to_blob(k, &blob, &bloblen) == 0) {
840 /* we cannot handle this key */ 570 /* we cannot handle this key */
841 debug3("sign_and_send_pubkey: cannot handle key"); 571 debug3("sign_and_send_pubkey: cannot handle key");
842 return 0; 572 return 0;
@@ -861,12 +591,12 @@ sign_and_send_pubkey(Authctxt *authctxt, Identity *id)
861 } else { 591 } else {
862 buffer_put_cstring(&b, authctxt->method->name); 592 buffer_put_cstring(&b, authctxt->method->name);
863 buffer_put_char(&b, have_sig); 593 buffer_put_char(&b, have_sig);
864 buffer_put_cstring(&b, key_ssh_name(id->key)); 594 buffer_put_cstring(&b, key_ssh_name(k));
865 } 595 }
866 buffer_put_string(&b, blob, bloblen); 596 buffer_put_string(&b, blob, bloblen);
867 597
868 /* generate signature */ 598 /* generate signature */
869 ret = identity_sign(id, &signature, &slen, 599 ret = (*sign_callback)(authctxt, k, &signature, &slen,
870 buffer_ptr(&b), buffer_len(&b)); 600 buffer_ptr(&b), buffer_len(&b));
871 if (ret == -1) { 601 if (ret == -1) {
872 xfree(blob); 602 xfree(blob);
@@ -886,7 +616,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Identity *id)
886 buffer_put_cstring(&b, authctxt->method->name); 616 buffer_put_cstring(&b, authctxt->method->name);
887 buffer_put_char(&b, have_sig); 617 buffer_put_char(&b, have_sig);
888 if (!(datafellows & SSH_BUG_PKAUTH)) 618 if (!(datafellows & SSH_BUG_PKAUTH))
889 buffer_put_cstring(&b, key_ssh_name(id->key)); 619 buffer_put_cstring(&b, key_ssh_name(k));
890 buffer_put_string(&b, blob, bloblen); 620 buffer_put_string(&b, blob, bloblen);
891 } 621 }
892 xfree(blob); 622 xfree(blob);
@@ -910,19 +640,23 @@ sign_and_send_pubkey(Authctxt *authctxt, Identity *id)
910} 640}
911 641
912static int 642static int
913send_pubkey_test(Authctxt *authctxt, Identity *id) 643send_pubkey_test(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback,
644 int hint)
914{ 645{
915 u_char *blob; 646 u_char *blob;
916 u_int bloblen, have_sig = 0; 647 u_int bloblen, have_sig = 0;
917 648
918 debug3("send_pubkey_test"); 649 debug3("send_pubkey_test");
919 650
920 if (key_to_blob(id->key, &blob, &bloblen) == 0) { 651 if (key_to_blob(k, &blob, &bloblen) == 0) {
921 /* we cannot handle this key */ 652 /* we cannot handle this key */
922 debug3("send_pubkey_test: cannot handle key"); 653 debug3("send_pubkey_test: cannot handle key");
923 return 0; 654 return 0;
924 } 655 }
925 /* register callback for USERAUTH_PK_OK message */ 656 /* register callback for USERAUTH_PK_OK message */
657 authctxt->last_key_sign = sign_callback;
658 authctxt->last_key_hint = hint;
659 authctxt->last_key = k;
926 dispatch_set(SSH2_MSG_USERAUTH_PK_OK, &input_userauth_pk_ok); 660 dispatch_set(SSH2_MSG_USERAUTH_PK_OK, &input_userauth_pk_ok);
927 661
928 packet_start(SSH2_MSG_USERAUTH_REQUEST); 662 packet_start(SSH2_MSG_USERAUTH_REQUEST);
@@ -931,7 +665,7 @@ send_pubkey_test(Authctxt *authctxt, Identity *id)
931 packet_put_cstring(authctxt->method->name); 665 packet_put_cstring(authctxt->method->name);
932 packet_put_char(have_sig); 666 packet_put_char(have_sig);
933 if (!(datafellows & SSH_BUG_PKAUTH)) 667 if (!(datafellows & SSH_BUG_PKAUTH))
934 packet_put_cstring(key_ssh_name(id->key)); 668 packet_put_cstring(key_ssh_name(k));
935 packet_put_string(blob, bloblen); 669 packet_put_string(blob, bloblen);
936 xfree(blob); 670 xfree(blob);
937 packet_send(); 671 packet_send();
@@ -976,134 +710,103 @@ load_identity_file(char *filename)
976 return private; 710 return private;
977} 711}
978 712
979/* 713static int
980 * try keys in the following order: 714identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, u_int *lenp,
981 * 1. agent keys that are found in the config file 715 u_char *data, u_int datalen)
982 * 2. other agent keys
983 * 3. keys that are only listed in the config file
984 */
985static void
986pubkey_prepare(Authctxt *authctxt)
987{ 716{
988 Identity *id; 717 Key *private;
989 Idlist agent, files, *preferred; 718 int idx, ret;
990 Key *key; 719
991 AuthenticationConnection *ac; 720 idx = authctxt->last_key_hint;
992 char *comment; 721 if (idx < 0)
993 int i, found; 722 return -1;
994 723
995 TAILQ_INIT(&agent); /* keys from the agent */ 724 /* private key is stored in external hardware */
996 TAILQ_INIT(&files); /* keys from the config file */ 725 if (options.identity_keys[idx]->flags & KEY_FLAG_EXT)
997 preferred = &authctxt->keys; 726 return key_sign(options.identity_keys[idx], sigp, lenp, data, datalen);
998 TAILQ_INIT(preferred); /* preferred order of keys */ 727
999 728 private = load_identity_file(options.identity_files[idx]);
1000 /* list of keys stored in the filesystem */ 729 if (private == NULL)
1001 for (i = 0; i < options.num_identity_files; i++) { 730 return -1;
1002 key = options.identity_keys[i]; 731 ret = key_sign(private, sigp, lenp, data, datalen);
1003 if (key && key->type == KEY_RSA1) 732 key_free(private);
1004 continue; 733 return ret;
1005 options.identity_keys[i] = NULL;
1006 id = xmalloc(sizeof(*id));
1007 memset(id, 0, sizeof(*id));
1008 id->key = key;
1009 id->filename = xstrdup(options.identity_files[i]);
1010 TAILQ_INSERT_TAIL(&files, id, next);
1011 }
1012 /* list of keys supported by the agent */
1013 if ((ac = ssh_get_authentication_connection())) {
1014 for (key = ssh_get_first_identity(ac, &comment, 2);
1015 key != NULL;
1016 key = ssh_get_next_identity(ac, &comment, 2)) {
1017 found = 0;
1018 TAILQ_FOREACH(id, &files, next) {
1019 /* agent keys from the config file are preferred */
1020 if (key_equal(key, id->key)) {
1021 key_free(key);
1022 xfree(comment);
1023 TAILQ_REMOVE(&files, id, next);
1024 TAILQ_INSERT_TAIL(preferred, id, next);
1025 id->ac = ac;
1026 found = 1;
1027 break;
1028 }
1029 }
1030 if (!found) {
1031 id = xmalloc(sizeof(*id));
1032 memset(id, 0, sizeof(*id));
1033 id->key = key;
1034 id->filename = comment;
1035 id->ac = ac;
1036 TAILQ_INSERT_TAIL(&agent, id, next);
1037 }
1038 }
1039 /* append remaining agent keys */
1040 for (id = TAILQ_FIRST(&agent); id; id = TAILQ_FIRST(&agent)) {
1041 TAILQ_REMOVE(&agent, id, next);
1042 TAILQ_INSERT_TAIL(preferred, id, next);
1043 }
1044 authctxt->agent = ac;
1045 }
1046 /* append remaining keys from the config file */
1047 for (id = TAILQ_FIRST(&files); id; id = TAILQ_FIRST(&files)) {
1048 TAILQ_REMOVE(&files, id, next);
1049 TAILQ_INSERT_TAIL(preferred, id, next);
1050 }
1051 TAILQ_FOREACH(id, preferred, next) {
1052 debug2("key: %s (%p)", id->filename, id->key);
1053 }
1054} 734}
1055 735
1056static void 736static int
1057pubkey_cleanup(Authctxt *authctxt) 737agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, u_int *lenp,
738 u_char *data, u_int datalen)
739{
740 return ssh_agent_sign(authctxt->agent, key, sigp, lenp, data, datalen);
741}
742
743static int
744key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, u_int *lenp,
745 u_char *data, u_int datalen)
1058{ 746{
1059 Identity *id; 747 return key_sign(key, sigp, lenp, data, datalen);
1060 748}
1061 if (authctxt->agent != NULL) 749
1062 ssh_close_authentication_connection(authctxt->agent); 750static int
1063 for (id = TAILQ_FIRST(&authctxt->keys); id; 751userauth_pubkey_agent(Authctxt *authctxt)
1064 id = TAILQ_FIRST(&authctxt->keys)) { 752{
1065 TAILQ_REMOVE(&authctxt->keys, id, next); 753 static int called = 0;
1066 if (id->key) 754 int ret = 0;
1067 key_free(id->key); 755 char *comment;
1068 if (id->filename) 756 Key *k;
1069 xfree(id->filename); 757
1070 xfree(id); 758 if (called == 0) {
759 if (ssh_get_num_identities(authctxt->agent, 2) == 0)
760 debug2("userauth_pubkey_agent: no keys at all");
761 called = 1;
762 }
763 k = ssh_get_next_identity(authctxt->agent, &comment, 2);
764 if (k == NULL) {
765 debug2("userauth_pubkey_agent: no more keys");
766 } else {
767 debug("Offering agent key: %s", comment);
768 xfree(comment);
769 ret = send_pubkey_test(authctxt, k, agent_sign_cb, -1);
770 if (ret == 0)
771 key_free(k);
1071 } 772 }
773 if (ret == 0)
774 debug2("userauth_pubkey_agent: no message sent");
775 return ret;
1072} 776}
1073 777
1074int 778int
1075userauth_pubkey(Authctxt *authctxt) 779userauth_pubkey(Authctxt *authctxt)
1076{ 780{
1077 Identity *id; 781 static int idx = 0;
1078 int sent = 0; 782 int sent = 0;
783 Key *key;
784 char *filename;
1079 785
1080 while ((id = TAILQ_FIRST(&authctxt->keys))) { 786 if (authctxt->agent != NULL) {
1081 if (id->tried++) 787 do {
1082 return (0); 788 sent = userauth_pubkey_agent(authctxt);
1083 TAILQ_REMOVE(&authctxt->keys, id, next); 789 } while (!sent && authctxt->agent->howmany > 0);
1084 TAILQ_INSERT_TAIL(&authctxt->keys, id, next); 790 }
1085 /* 791 while (!sent && idx < options.num_identity_files) {
1086 * send a test message if we have the public key. for 792 key = options.identity_keys[idx];
1087 * encrypted keys we cannot do this and have to load the 793 filename = options.identity_files[idx];
1088 * private key instead 794 if (key == NULL) {
1089 */ 795 debug("Trying private key: %s", filename);
1090 if (id->key && id->key->type != KEY_RSA1) { 796 key = load_identity_file(filename);
1091 debug("Offering public key: %s", id->filename); 797 if (key != NULL) {
1092 sent = send_pubkey_test(authctxt, id); 798 sent = sign_and_send_pubkey(authctxt, key,
1093 } else if (id->key == NULL) { 799 key_sign_cb);
1094 debug("Trying private key: %s", id->filename); 800 key_free(key);
1095 id->key = load_identity_file(id->filename);
1096 if (id->key != NULL) {
1097 id->isprivate = 1;
1098 sent = sign_and_send_pubkey(authctxt, id);
1099 key_free(id->key);
1100 id->key = NULL;
1101 } 801 }
802 } else if (key->type != KEY_RSA1) {
803 debug("Offering public key: %s", filename);
804 sent = send_pubkey_test(authctxt, key,
805 identity_sign_cb, idx);
1102 } 806 }
1103 if (sent) 807 idx++;
1104 return (sent);
1105 } 808 }
1106 return (0); 809 return sent;
1107} 810}
1108 811
1109/* 812/*
@@ -1159,9 +862,9 @@ input_userauth_info_req(int type, u_int32_t seq, void *ctxt)
1159 inst = packet_get_string(NULL); 862 inst = packet_get_string(NULL);
1160 lang = packet_get_string(NULL); 863 lang = packet_get_string(NULL);
1161 if (strlen(name) > 0) 864 if (strlen(name) > 0)
1162 logit("%s", name); 865 log("%s", name);
1163 if (strlen(inst) > 0) 866 if (strlen(inst) > 0)
1164 logit("%s", inst); 867 log("%s", inst);
1165 xfree(name); 868 xfree(name);
1166 xfree(inst); 869 xfree(inst);
1167 xfree(lang); 870 xfree(lang);
diff --git a/sshd.0 b/sshd.0
index 937e35906..7bed03416 100644
--- a/sshd.0
+++ b/sshd.0
@@ -42,17 +42,6 @@ DESCRIPTION
42 authentication combined with RSA host authentication, RSA challenge- 42 authentication combined with RSA host authentication, RSA challenge-
43 response authentication, or password based authentication. 43 response authentication, or password based authentication.
44 44
45 Regardless of the authentication type, the account is checked to ensure
46 that it is accessible. An account is not accessible if it is locked,
47 listed in DenyUsers or its group is listed in DenyGroups . The defini-
48 tion of a locked account is system dependant. Some platforms have their
49 own account database (eg AIX) and some modify the passwd field ( M-bM-^@M-^X*LK*M-bM-^@M-^Y
50 on Solaris, M-bM-^@M-^X*M-bM-^@M-^Y on HP-UX, containing M-bM-^@M-^XNologinM-bM-^@M-^Y on Tru64 and a leading
51 M-bM-^@M-^X!!M-bM-^@M-^Y on Linux). If there is a requirement to disable password authenti-
52 cation for the account while allowing still public-key, then the passwd
53 field should be set to something other than these values (eg M-bM-^@M-^XNPM-bM-^@M-^Y or
54 M-bM-^@M-^X*NP*M-bM-^@M-^Y ).
55
56 Rhosts authentication is normally disabled because it is fundamentally 45 Rhosts authentication is normally disabled because it is fundamentally
57 insecure, but can be enabled in the server configuration file if desired. 46 insecure, but can be enabled in the server configuration file if desired.
58 System security is not improved unless rshd, rlogind, and rexecd are dis- 47 System security is not improved unless rshd, rlogind, and rexecd are dis-
@@ -180,10 +169,10 @@ DESCRIPTION
180 the utmp file. -u0 may also be used to prevent sshd from making 169 the utmp file. -u0 may also be used to prevent sshd from making
181 DNS requests unless the authentication mechanism or configuration 170 DNS requests unless the authentication mechanism or configuration
182 requires it. Authentication mechanisms that may require DNS 171 requires it. Authentication mechanisms that may require DNS
183 include RhostsRSAAuthentication, HostbasedAuthentication and 172 include RhostsAuthentication, RhostsRSAAuthentication,
184 using a from="pattern-list" option in a key file. Configuration 173 HostbasedAuthentication and using a from="pattern-list" option in
185 options that require DNS include using a USER@HOST pattern in 174 a key file. Configuration options that require DNS include using
186 AllowUsers or DenyUsers. 175 a USER@HOST pattern in AllowUsers or DenyUsers.
187 176
188 -D When this option is specified sshd will not detach and does not 177 -D When this option is specified sshd will not detach and does not
189 become a daemon. This allows easy monitoring of sshd. 178 become a daemon. This allows easy monitoring of sshd.
@@ -261,9 +250,9 @@ AUTHORIZED_KEYS FILE FORMAT
261 from="pattern-list" 250 from="pattern-list"
262 Specifies that in addition to public key authentication, the 251 Specifies that in addition to public key authentication, the
263 canonical name of the remote host must be present in the comma- 252 canonical name of the remote host must be present in the comma-
264 separated list of patterns (M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y serve as wildcards). The 253 separated list of patterns (M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^XM-bM-^@M-^Y? serve as wildcards).
265 list may also contain patterns negated by prefixing them with 254 The list may also contain patterns negated by prefixing them with
266 M-bM-^@M-^X!M-bM-^@M-^Y; if the canonical host name matches a negated pattern, the 255 M-bM-^@M-^XM-bM-^@M-^Y!; if the canonical host name matches a negated pattern, the
267 key is not accepted. The purpose of this option is to optionally 256 key is not accepted. The purpose of this option is to optionally
268 increase security: public key authentication by itself does not 257 increase security: public key authentication by itself does not
269 trust the network or name servers or anything (but the key); how- 258 trust the network or name servers or anything (but the key); how-
@@ -315,7 +304,7 @@ AUTHORIZED_KEYS FILE FORMAT
315 Limit local M-bM-^@M-^XM-bM-^@M-^Xssh -LM-bM-^@M-^YM-bM-^@M-^Y port forwarding such that it may only con- 304 Limit local M-bM-^@M-^XM-bM-^@M-^Xssh -LM-bM-^@M-^YM-bM-^@M-^Y port forwarding such that it may only con-
316 nect to the specified host and port. IPv6 addresses can be spec- 305 nect to the specified host and port. IPv6 addresses can be spec-
317 ified with an alternative syntax: host/port. Multiple permitopen 306 ified with an alternative syntax: host/port. Multiple permitopen
318 options may be applied separated by commas. No pattern matching 307 options may be applied separated by commas. No pattern matching
319 is performed on the specified hostnames, they must be literal 308 is performed on the specified hostnames, they must be literal
320 domains or addresses. 309 domains or addresses.
321 310
@@ -339,11 +328,11 @@ SSH_KNOWN_HOSTS FILE FORMAT
339 Each line in these files contains the following fields: hostnames, bits, 328 Each line in these files contains the following fields: hostnames, bits,
340 exponent, modulus, comment. The fields are separated by spaces. 329 exponent, modulus, comment. The fields are separated by spaces.
341 330
342 Hostnames is a comma-separated list of patterns (M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y act as wild- 331 Hostnames is a comma-separated list of patterns (M-bM-^@M-^Y*M-bM-^@M-^Y and M-bM-^@M-^Y?M-bM-^@M-^Y act as wild-
343 cards); each pattern in turn is matched against the canonical host name 332 cards); each pattern in turn is matched against the canonical host name
344 (when authenticating a client) or against the user-supplied name (when 333 (when authenticating a client) or against the user-supplied name (when
345 authenticating a server). A pattern may also be preceded by M-bM-^@M-^X!M-bM-^@M-^Y to indi- 334 authenticating a server). A pattern may also be preceded by M-bM-^@M-^XM-bM-^@M-^Y! to
346 cate negation: if the host name matches a negated pattern, it is not 335 indicate negation: if the host name matches a negated pattern, it is not
347 accepted (by that line) even if it matched another pattern on the line. 336 accepted (by that line) even if it matched another pattern on the line.
348 337
349 Bits, exponent, and modulus are taken directly from the RSA host key; 338 Bits, exponent, and modulus are taken directly from the RSA host key;
@@ -531,6 +520,14 @@ FILES
531 login-time initializations globally. This file should be 520 login-time initializations globally. This file should be
532 writable only by root, and should be world-readable. 521 writable only by root, and should be world-readable.
533 522
523AUTHORS
524 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
525 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
526 de Raadt and Dug Song removed many bugs, re-added newer features and cre-
527 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
528 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
529 for privilege separation.
530
534SEE ALSO 531SEE ALSO
535 scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), 532 scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
536 login.conf(5), moduli(5), sshd_config(5), sftp-server(8) 533 login.conf(5), moduli(5), sshd_config(5), sftp-server(8)
@@ -543,12 +540,4 @@ SEE ALSO
543 for the SSH Transport Layer Protocol, draft-ietf-secsh-dh-group- 540 for the SSH Transport Layer Protocol, draft-ietf-secsh-dh-group-
544 exchange-02.txt, January 2002, work in progress material. 541 exchange-02.txt, January 2002, work in progress material.
545 542
546AUTHORS
547 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
548 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
549 de Raadt and Dug Song removed many bugs, re-added newer features and cre-
550 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
551 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
552 for privilege separation.
553
554BSD September 25, 1999 BSD 543BSD September 25, 1999 BSD
diff --git a/sshd.8 b/sshd.8
index 27b1a3cf6..46660b16c 100644
--- a/sshd.8
+++ b/sshd.8
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: sshd.8,v 1.199 2003/08/13 08:46:31 markus Exp $ 37.\" $OpenBSD: sshd.8,v 1.194 2003/01/31 21:54:40 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
@@ -114,29 +114,6 @@ authentication combined with RSA host
114authentication, RSA challenge-response authentication, or password 114authentication, RSA challenge-response authentication, or password
115based authentication. 115based authentication.
116.Pp 116.Pp
117Regardless of the authentication type, the account is checked to
118ensure that it is accessible. An account is not accessible if it is
119locked, listed in
120.Cm DenyUsers
121or its group is listed in
122.Cm DenyGroups
123\&. The definition of a locked account is system dependant. Some platforms
124have their own account database (eg AIX) and some modify the passwd field (
125.Ql \&*LK\&*
126on Solaris,
127.Ql \&*
128on HP-UX, containing
129.Ql Nologin
130on Tru64 and a leading
131.Ql \&!!
132on Linux). If there is a requirement to disable password authentication
133for the account while allowing still public-key, then the passwd field
134should be set to something other than these values (eg
135.Ql NP
136or
137.Ql \&*NP\&*
138).
139.Pp
140Rhosts authentication is normally disabled 117Rhosts authentication is normally disabled
141because it is fundamentally insecure, but can be enabled in the server 118because it is fundamentally insecure, but can be enabled in the server
142configuration file if desired. 119configuration file if desired.
@@ -318,6 +295,7 @@ may also be used to prevent
318from making DNS requests unless the authentication 295from making DNS requests unless the authentication
319mechanism or configuration requires it. 296mechanism or configuration requires it.
320Authentication mechanisms that may require DNS include 297Authentication mechanisms that may require DNS include
298.Cm RhostsAuthentication ,
321.Cm RhostsRSAAuthentication , 299.Cm RhostsRSAAuthentication ,
322.Cm HostbasedAuthentication 300.Cm HostbasedAuthentication
323and using a 301and using a
@@ -454,13 +432,13 @@ that option keywords are case-insensitive):
454Specifies that in addition to public key authentication, the canonical name 432Specifies that in addition to public key authentication, the canonical name
455of the remote host must be present in the comma-separated list of 433of the remote host must be present in the comma-separated list of
456patterns 434patterns
457.Pf ( Ql \&* 435.Pf ( Ql *
458and 436and
459.Ql \&? 437.Ql ?
460serve as wildcards). 438serve as wildcards).
461The list may also contain 439The list may also contain
462patterns negated by prefixing them with 440patterns negated by prefixing them with
463.Ql \&! ; 441.Ql ! ;
464if the canonical host name matches a negated pattern, the key is not accepted. 442if the canonical host name matches a negated pattern, the key is not accepted.
465The purpose 443The purpose
466of this option is to optionally increase security: public key authentication 444of this option is to optionally increase security: public key authentication
@@ -522,9 +500,9 @@ IPv6 addresses can be specified with an alternative syntax:
522.Ar host/port . 500.Ar host/port .
523Multiple 501Multiple
524.Cm permitopen 502.Cm permitopen
525options may be applied separated by commas. 503options may be applied separated by commas. No pattern matching is
526No pattern matching is performed on the specified hostnames, 504performed on the specified hostnames, they must be literal domains or
527they must be literal domains or addresses. 505addresses.
528.El 506.El
529.Ss Examples 507.Ss Examples
5301024 33 12121.\|.\|.\|312314325 ylo@foo.bar 5081024 33 12121.\|.\|.\|312314325 ylo@foo.bar
@@ -549,16 +527,12 @@ Each line in these files contains the following fields: hostnames,
549bits, exponent, modulus, comment. 527bits, exponent, modulus, comment.
550The fields are separated by spaces. 528The fields are separated by spaces.
551.Pp 529.Pp
552Hostnames is a comma-separated list of patterns 530Hostnames is a comma-separated list of patterns ('*' and '?' act as
553.Pf ( Ql \&*
554and
555.Ql \&?
556act as
557wildcards); each pattern in turn is matched against the canonical host 531wildcards); each pattern in turn is matched against the canonical host
558name (when authenticating a client) or against the user-supplied 532name (when authenticating a client) or against the user-supplied
559name (when authenticating a server). 533name (when authenticating a server).
560A pattern may also be preceded by 534A pattern may also be preceded by
561.Ql \&! 535.Ql !
562to indicate negation: if the host name matches a negated 536to indicate negation: if the host name matches a negated
563pattern, it is not accepted (by that line) even if it matched another 537pattern, it is not accepted (by that line) even if it matched another
564pattern on the line. 538pattern on the line.
@@ -796,6 +770,17 @@ This can be used to specify
796machine-specific login-time initializations globally. 770machine-specific login-time initializations globally.
797This file should be writable only by root, and should be world-readable. 771This file should be writable only by root, and should be world-readable.
798.El 772.El
773.Sh AUTHORS
774OpenSSH is a derivative of the original and free
775ssh 1.2.12 release by Tatu Ylonen.
776Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
777Theo de Raadt and Dug Song
778removed many bugs, re-added newer features and
779created OpenSSH.
780Markus Friedl contributed the support for SSH
781protocol versions 1.5 and 2.0.
782Niels Provos and Markus Friedl contributed support
783for privilege separation.
799.Sh SEE ALSO 784.Sh SEE ALSO
800.Xr scp 1 , 785.Xr scp 1 ,
801.Xr sftp 1 , 786.Xr sftp 1 ,
@@ -827,14 +812,3 @@ This file should be writable only by root, and should be world-readable.
827.%D January 2002 812.%D January 2002
828.%O work in progress material 813.%O work in progress material
829.Re 814.Re
830.Sh AUTHORS
831OpenSSH is a derivative of the original and free
832ssh 1.2.12 release by Tatu Ylonen.
833Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
834Theo de Raadt and Dug Song
835removed many bugs, re-added newer features and
836created OpenSSH.
837Markus Friedl contributed the support for SSH
838protocol versions 1.5 and 2.0.
839Niels Provos and Markus Friedl contributed support
840for privilege separation.
diff --git a/sshd.c b/sshd.c
index 92fab6ccd..d49973859 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.276 2003/08/28 12:54:34 markus Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.263 2003/02/16 17:09:57 markus Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -112,7 +112,11 @@ char *config_file_name = _PATH_SERVER_CONFIG_FILE;
112 * Flag indicating whether IPv4 or IPv6. This can be set on the command line. 112 * Flag indicating whether IPv4 or IPv6. This can be set on the command line.
113 * Default value is AF_UNSPEC means both IPv4 and IPv6. 113 * Default value is AF_UNSPEC means both IPv4 and IPv6.
114 */ 114 */
115#ifdef IPV4_DEFAULT
116int IPv4or6 = AF_INET;
117#else
115int IPv4or6 = AF_UNSPEC; 118int IPv4or6 = AF_UNSPEC;
119#endif
116 120
117/* 121/*
118 * Debug mode flag. This can be set on the command line. If debug 122 * Debug mode flag. This can be set on the command line. If debug
@@ -188,7 +192,7 @@ u_char session_id[16];
188 192
189/* same for ssh2 */ 193/* same for ssh2 */
190u_char *session_id2 = NULL; 194u_char *session_id2 = NULL;
191u_int session_id2_len = 0; 195int session_id2_len = 0;
192 196
193/* record remote hostname or ip */ 197/* record remote hostname or ip */
194u_int utmp_len = MAXHOSTNAMELEN; 198u_int utmp_len = MAXHOSTNAMELEN;
@@ -201,9 +205,6 @@ int startup_pipe; /* in child */
201int use_privsep; 205int use_privsep;
202struct monitor *pmonitor; 206struct monitor *pmonitor;
203 207
204/* message to be displayed after login */
205Buffer loginmsg;
206
207/* Prototypes for various functions defined later in this file. */ 208/* Prototypes for various functions defined later in this file. */
208void destroy_sensitive_data(void); 209void destroy_sensitive_data(void);
209void demote_sensitive_data(void); 210void demote_sensitive_data(void);
@@ -257,11 +258,11 @@ sighup_handler(int sig)
257static void 258static void
258sighup_restart(void) 259sighup_restart(void)
259{ 260{
260 logit("Received SIGHUP; restarting."); 261 log("Received SIGHUP; restarting.");
261 close_listen_socks(); 262 close_listen_socks();
262 close_startup_pipes(); 263 close_startup_pipes();
263 execv(saved_argv[0], saved_argv); 264 execv(saved_argv[0], saved_argv);
264 logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], 265 log("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0],
265 strerror(errno)); 266 strerror(errno));
266 exit(1); 267 exit(1);
267} 268}
@@ -370,37 +371,39 @@ sshd_exchange_identification(int sock_in, int sock_out)
370 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION); 371 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION);
371 server_version_string = xstrdup(buf); 372 server_version_string = xstrdup(buf);
372 373
373 /* Send our protocol version identification. */ 374 if (client_version_string == NULL) {
374 if (atomicio(vwrite, sock_out, server_version_string, 375 /* Send our protocol version identification. */
375 strlen(server_version_string)) 376 if (atomicio(write, sock_out, server_version_string,
376 != strlen(server_version_string)) { 377 strlen(server_version_string))
377 logit("Could not write ident string to %s", get_remote_ipaddr()); 378 != strlen(server_version_string)) {
378 fatal_cleanup(); 379 log("Could not write ident string to %s", get_remote_ipaddr());
379 }
380
381 /* Read other sides version identification. */
382 memset(buf, 0, sizeof(buf));
383 for (i = 0; i < sizeof(buf) - 1; i++) {
384 if (atomicio(read, sock_in, &buf[i], 1) != 1) {
385 logit("Did not receive identification string from %s",
386 get_remote_ipaddr());
387 fatal_cleanup(); 380 fatal_cleanup();
388 } 381 }
389 if (buf[i] == '\r') { 382
390 buf[i] = 0; 383 /* Read other sides version identification. */
391 /* Kludge for F-Secure Macintosh < 1.0.2 */ 384 memset(buf, 0, sizeof(buf));
392 if (i == 12 && 385 for (i = 0; i < sizeof(buf) - 1; i++) {
393 strncmp(buf, "SSH-1.5-W1.0", 12) == 0) 386 if (atomicio(read, sock_in, &buf[i], 1) != 1) {
387 log("Did not receive identification string from %s",
388 get_remote_ipaddr());
389 fatal_cleanup();
390 }
391 if (buf[i] == '\r') {
392 buf[i] = 0;
393 /* Kludge for F-Secure Macintosh < 1.0.2 */
394 if (i == 12 &&
395 strncmp(buf, "SSH-1.5-W1.0", 12) == 0)
396 break;
397 continue;
398 }
399 if (buf[i] == '\n') {
400 buf[i] = 0;
394 break; 401 break;
395 continue; 402 }
396 }
397 if (buf[i] == '\n') {
398 buf[i] = 0;
399 break;
400 } 403 }
404 buf[sizeof(buf) - 1] = 0;
405 client_version_string = xstrdup(buf);
401 } 406 }
402 buf[sizeof(buf) - 1] = 0;
403 client_version_string = xstrdup(buf);
404 407
405 /* 408 /*
406 * Check that the versions match. In future this might accept 409 * Check that the versions match. In future this might accept
@@ -409,10 +412,10 @@ sshd_exchange_identification(int sock_in, int sock_out)
409 if (sscanf(client_version_string, "SSH-%d.%d-%[^\n]\n", 412 if (sscanf(client_version_string, "SSH-%d.%d-%[^\n]\n",
410 &remote_major, &remote_minor, remote_version) != 3) { 413 &remote_major, &remote_minor, remote_version) != 3) {
411 s = "Protocol mismatch.\n"; 414 s = "Protocol mismatch.\n";
412 (void) atomicio(vwrite, sock_out, s, strlen(s)); 415 (void) atomicio(write, sock_out, s, strlen(s));
413 close(sock_in); 416 close(sock_in);
414 close(sock_out); 417 close(sock_out);
415 logit("Bad protocol version identification '%.100s' from %s", 418 log("Bad protocol version identification '%.100s' from %s",
416 client_version_string, get_remote_ipaddr()); 419 client_version_string, get_remote_ipaddr());
417 fatal_cleanup(); 420 fatal_cleanup();
418 } 421 }
@@ -422,13 +425,13 @@ sshd_exchange_identification(int sock_in, int sock_out)
422 compat_datafellows(remote_version); 425 compat_datafellows(remote_version);
423 426
424 if (datafellows & SSH_BUG_PROBE) { 427 if (datafellows & SSH_BUG_PROBE) {
425 logit("probed from %s with %s. Don't panic.", 428 log("probed from %s with %s. Don't panic.",
426 get_remote_ipaddr(), client_version_string); 429 get_remote_ipaddr(), client_version_string);
427 fatal_cleanup(); 430 fatal_cleanup();
428 } 431 }
429 432
430 if (datafellows & SSH_BUG_SCANNER) { 433 if (datafellows & SSH_BUG_SCANNER) {
431 logit("scanned from %s with %s. Don't panic.", 434 log("scanned from %s with %s. Don't panic.",
432 get_remote_ipaddr(), client_version_string); 435 get_remote_ipaddr(), client_version_string);
433 fatal_cleanup(); 436 fatal_cleanup();
434 } 437 }
@@ -470,10 +473,10 @@ sshd_exchange_identification(int sock_in, int sock_out)
470 473
471 if (mismatch) { 474 if (mismatch) {
472 s = "Protocol major versions differ.\n"; 475 s = "Protocol major versions differ.\n";
473 (void) atomicio(vwrite, sock_out, s, strlen(s)); 476 (void) atomicio(write, sock_out, s, strlen(s));
474 close(sock_in); 477 close(sock_in);
475 close(sock_out); 478 close(sock_out);
476 logit("Protocol major versions differ for %s: %.200s vs. %.200s", 479 log("Protocol major versions differ for %s: %.200s vs. %.200s",
477 get_remote_ipaddr(), 480 get_remote_ipaddr(),
478 server_version_string, client_version_string); 481 server_version_string, client_version_string);
479 fatal_cleanup(); 482 fatal_cleanup();
@@ -565,6 +568,8 @@ privsep_preauth_child(void)
565 do_setusercontext(pw); 568 do_setusercontext(pw);
566#else 569#else
567 gidset[0] = pw->pw_gid; 570 gidset[0] = pw->pw_gid;
571 if (setgid(pw->pw_gid) < 0)
572 fatal("setgid failed for %u", pw->pw_gid );
568 if (setgroups(1, gidset) < 0) 573 if (setgroups(1, gidset) < 0)
569 fatal("setgroups: %.100s", strerror(errno)); 574 fatal("setgroups: %.100s", strerror(errno));
570 permanently_set_uid(pw); 575 permanently_set_uid(pw);
@@ -819,27 +824,26 @@ main(int ac, char **av)
819#ifdef HAVE_SECUREWARE 824#ifdef HAVE_SECUREWARE
820 (void)set_auth_parameters(ac, av); 825 (void)set_auth_parameters(ac, av);
821#endif 826#endif
822 __progname = ssh_get_progname(av[0]); 827 __progname = get_progname(av[0]);
823 init_rng(); 828 init_rng();
824 829
825 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ 830 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
826 saved_argc = ac; 831 saved_argc = ac;
827 saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1)); 832 saved_argv = av;
833 saved_argv = xmalloc(sizeof(*saved_argv) * ac);
828 for (i = 0; i < ac; i++) 834 for (i = 0; i < ac; i++)
829 saved_argv[i] = xstrdup(av[i]); 835 saved_argv[i] = xstrdup(av[i]);
830 saved_argv[i] = NULL;
831 836
832#ifndef HAVE_SETPROCTITLE 837#ifndef HAVE_SETPROCTITLE
833 /* Prepare for later setproctitle emulation */ 838 /* Prepare for later setproctitle emulation */
834 compat_init_setproctitle(ac, av); 839 compat_init_setproctitle(ac, av);
835 av = saved_argv;
836#endif 840#endif
837 841
838 /* Initialize configuration options to their default values. */ 842 /* Initialize configuration options to their default values. */
839 initialize_server_options(&options); 843 initialize_server_options(&options);
840 844
841 /* Parse command-line arguments. */ 845 /* Parse command-line arguments. */
842 while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:dDeiqtQ46")) != -1) { 846 while ((opt = getopt(ac, av, "f:p:b:k:h:g:V:u:o:dDeiqtQ46")) != -1) {
843 switch (opt) { 847 switch (opt) {
844 case '4': 848 case '4':
845 IPv4or6 = AF_INET; 849 IPv4or6 = AF_INET;
@@ -851,11 +855,15 @@ main(int ac, char **av)
851 config_file_name = optarg; 855 config_file_name = optarg;
852 break; 856 break;
853 case 'd': 857 case 'd':
854 if (debug_flag == 0) { 858 if (0 == debug_flag) {
855 debug_flag = 1; 859 debug_flag = 1;
856 options.log_level = SYSLOG_LEVEL_DEBUG1; 860 options.log_level = SYSLOG_LEVEL_DEBUG1;
857 } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) 861 } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) {
858 options.log_level++; 862 options.log_level++;
863 } else {
864 fprintf(stderr, "Too high debugging level.\n");
865 exit(1);
866 }
859 break; 867 break;
860 case 'D': 868 case 'D':
861 no_daemon_flag = 1; 869 no_daemon_flag = 1;
@@ -911,6 +919,11 @@ main(int ac, char **av)
911 } 919 }
912 options.host_key_files[options.num_host_key_files++] = optarg; 920 options.host_key_files[options.num_host_key_files++] = optarg;
913 break; 921 break;
922 case 'V':
923 client_version_string = optarg;
924 /* only makes sense with inetd_flag, i.e. no listen() */
925 inetd_flag = 1;
926 break;
914 case 't': 927 case 't':
915 test_flag = 1; 928 test_flag = 1;
916 break; 929 break;
@@ -1002,15 +1015,15 @@ main(int ac, char **av)
1002 key_type(key)); 1015 key_type(key));
1003 } 1016 }
1004 if ((options.protocol & SSH_PROTO_1) && !sensitive_data.have_ssh1_key) { 1017 if ((options.protocol & SSH_PROTO_1) && !sensitive_data.have_ssh1_key) {
1005 logit("Disabling protocol version 1. Could not load host key"); 1018 log("Disabling protocol version 1. Could not load host key");
1006 options.protocol &= ~SSH_PROTO_1; 1019 options.protocol &= ~SSH_PROTO_1;
1007 } 1020 }
1008 if ((options.protocol & SSH_PROTO_2) && !sensitive_data.have_ssh2_key) { 1021 if ((options.protocol & SSH_PROTO_2) && !sensitive_data.have_ssh2_key) {
1009 logit("Disabling protocol version 2. Could not load host key"); 1022 log("Disabling protocol version 2. Could not load host key");
1010 options.protocol &= ~SSH_PROTO_2; 1023 options.protocol &= ~SSH_PROTO_2;
1011 } 1024 }
1012 if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) { 1025 if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) {
1013 logit("sshd: no hostkeys available -- exiting."); 1026 log("sshd: no hostkeys available -- exiting.");
1014 exit(1); 1027 exit(1);
1015 } 1028 }
1016 1029
@@ -1145,8 +1158,7 @@ main(int ac, char **av)
1145 continue; 1158 continue;
1146 } 1159 }
1147 /* Create socket for listening. */ 1160 /* Create socket for listening. */
1148 listen_sock = socket(ai->ai_family, ai->ai_socktype, 1161 listen_sock = socket(ai->ai_family, SOCK_STREAM, 0);
1149 ai->ai_protocol);
1150 if (listen_sock < 0) { 1162 if (listen_sock < 0) {
1151 /* kernel may not support ipv6 */ 1163 /* kernel may not support ipv6 */
1152 verbose("socket: %.100s", strerror(errno)); 1164 verbose("socket: %.100s", strerror(errno));
@@ -1179,7 +1191,7 @@ main(int ac, char **av)
1179 num_listen_socks++; 1191 num_listen_socks++;
1180 1192
1181 /* Start listening on the port. */ 1193 /* Start listening on the port. */
1182 logit("Server listening on %s port %s.", ntop, strport); 1194 log("Server listening on %s port %s.", ntop, strport);
1183 if (listen(listen_sock, 5) < 0) 1195 if (listen(listen_sock, 5) < 0)
1184 fatal("listen: %.100s", strerror(errno)); 1196 fatal("listen: %.100s", strerror(errno));
1185 1197
@@ -1214,10 +1226,7 @@ main(int ac, char **av)
1214 * overwrite any old pid in the file. 1226 * overwrite any old pid in the file.
1215 */ 1227 */
1216 f = fopen(options.pid_file, "wb"); 1228 f = fopen(options.pid_file, "wb");
1217 if (f == NULL) { 1229 if (f) {
1218 error("Couldn't create pid file \"%s\": %s",
1219 options.pid_file, strerror(errno));
1220 } else {
1221 fprintf(f, "%ld\n", (long) getpid()); 1230 fprintf(f, "%ld\n", (long) getpid());
1222 fclose(f); 1231 fclose(f);
1223 } 1232 }
@@ -1258,7 +1267,7 @@ main(int ac, char **av)
1258 if (ret < 0 && errno != EINTR) 1267 if (ret < 0 && errno != EINTR)
1259 error("select: %.100s", strerror(errno)); 1268 error("select: %.100s", strerror(errno));
1260 if (received_sigterm) { 1269 if (received_sigterm) {
1261 logit("Received signal %d; terminating.", 1270 log("Received signal %d; terminating.",
1262 (int) received_sigterm); 1271 (int) received_sigterm);
1263 close_listen_socks(); 1272 close_listen_socks();
1264 unlink(options.pid_file); 1273 unlink(options.pid_file);
@@ -1396,11 +1405,11 @@ main(int ac, char **av)
1396 * setlogin() affects the entire process group. We don't 1405 * setlogin() affects the entire process group. We don't
1397 * want the child to be able to affect the parent. 1406 * want the child to be able to affect the parent.
1398 */ 1407 */
1399#if !defined(SSHD_ACQUIRES_CTTY) 1408#if !defined(STREAMS_PUSH_ACQUIRES_CTTY)
1400 /* 1409 /*
1401 * If setsid is called, on some platforms sshd will later acquire a 1410 * If setsid is called on Solaris, sshd will acquire the controlling
1402 * controlling terminal which will result in "could not set 1411 * terminal while pushing STREAMS modules. This will prevent the
1403 * controlling tty" errors. 1412 * shell from acquiring it later.
1404 */ 1413 */
1405 if (!debug_flag && !inetd_flag && setsid() < 0) 1414 if (!debug_flag && !inetd_flag && setsid() < 0)
1406 error("setsid: %.100s", strerror(errno)); 1415 error("setsid: %.100s", strerror(errno));
@@ -1467,12 +1476,37 @@ main(int ac, char **av)
1467 alarm(options.login_grace_time); 1476 alarm(options.login_grace_time);
1468 1477
1469 sshd_exchange_identification(sock_in, sock_out); 1478 sshd_exchange_identification(sock_in, sock_out);
1479 /*
1480 * Check that the connection comes from a privileged port.
1481 * Rhosts-Authentication only makes sense from privileged
1482 * programs. Of course, if the intruder has root access on his local
1483 * machine, he can connect from any port. So do not use these
1484 * authentication methods from machines that you do not trust.
1485 */
1486 if (options.rhosts_authentication &&
1487 (remote_port >= IPPORT_RESERVED ||
1488 remote_port < IPPORT_RESERVED / 2)) {
1489 debug("Rhosts Authentication disabled, "
1490 "originating port %d not trusted.", remote_port);
1491 options.rhosts_authentication = 0;
1492 }
1493#if defined(KRB4) && !defined(KRB5)
1494 if (!packet_connection_is_ipv4() &&
1495 options.kerberos_authentication) {
1496 debug("Kerberos Authentication disabled, only available for IPv4.");
1497 options.kerberos_authentication = 0;
1498 }
1499#endif /* KRB4 && !KRB5 */
1500#ifdef AFS
1501 /* If machine has AFS, set process authentication group. */
1502 if (k_hasafs()) {
1503 k_setpag();
1504 k_unlog();
1505 }
1506#endif /* AFS */
1470 1507
1471 packet_set_nonblocking(); 1508 packet_set_nonblocking();
1472 1509
1473 /* prepare buffers to collect authentication messages */
1474 buffer_init(&loginmsg);
1475
1476 if (use_privsep) 1510 if (use_privsep)
1477 if ((authctxt = privsep_preauth()) != NULL) 1511 if ((authctxt = privsep_preauth()) != NULL)
1478 goto authenticated; 1512 goto authenticated;
@@ -1514,8 +1548,7 @@ main(int ac, char **av)
1514 verbose("Closing connection to %.100s", remote_ip); 1548 verbose("Closing connection to %.100s", remote_ip);
1515 1549
1516#ifdef USE_PAM 1550#ifdef USE_PAM
1517 if (options.use_pam) 1551 finish_pam();
1518 finish_pam();
1519#endif /* USE_PAM */ 1552#endif /* USE_PAM */
1520 1553
1521 packet_close(); 1554 packet_close();
@@ -1627,10 +1660,24 @@ do_ssh1_kex(void)
1627 1660
1628 /* Declare supported authentication types. */ 1661 /* Declare supported authentication types. */
1629 auth_mask = 0; 1662 auth_mask = 0;
1663 if (options.rhosts_authentication)
1664 auth_mask |= 1 << SSH_AUTH_RHOSTS;
1630 if (options.rhosts_rsa_authentication) 1665 if (options.rhosts_rsa_authentication)
1631 auth_mask |= 1 << SSH_AUTH_RHOSTS_RSA; 1666 auth_mask |= 1 << SSH_AUTH_RHOSTS_RSA;
1632 if (options.rsa_authentication) 1667 if (options.rsa_authentication)
1633 auth_mask |= 1 << SSH_AUTH_RSA; 1668 auth_mask |= 1 << SSH_AUTH_RSA;
1669#if defined(KRB4) || defined(KRB5)
1670 if (options.kerberos_authentication)
1671 auth_mask |= 1 << SSH_AUTH_KERBEROS;
1672#endif
1673#if defined(AFS) || defined(KRB5)
1674 if (options.kerberos_tgt_passing)
1675 auth_mask |= 1 << SSH_PASS_KERBEROS_TGT;
1676#endif
1677#ifdef AFS
1678 if (options.afs_token_passing)
1679 auth_mask |= 1 << SSH_PASS_AFS_TOKEN;
1680#endif
1634 if (options.challenge_response_authentication == 1) 1681 if (options.challenge_response_authentication == 1)
1635 auth_mask |= 1 << SSH_AUTH_TIS; 1682 auth_mask |= 1 << SSH_AUTH_TIS;
1636 if (options.password_authentication) 1683 if (options.password_authentication)
@@ -1708,7 +1755,7 @@ do_ssh1_kex(void)
1708 u_char *buf = xmalloc(bytes); 1755 u_char *buf = xmalloc(bytes);
1709 MD5_CTX md; 1756 MD5_CTX md;
1710 1757
1711 logit("do_connection: generating a fake encryption key"); 1758 log("do_connection: generating a fake encryption key");
1712 BN_bn2bin(session_key_int, buf); 1759 BN_bn2bin(session_key_int, buf);
1713 MD5_Init(&md); 1760 MD5_Init(&md);
1714 MD5_Update(&md, buf, bytes); 1761 MD5_Update(&md, buf, bytes);
diff --git a/sshd_config b/sshd_config
index dd53f1057..36429c9d0 100644
--- a/sshd_config
+++ b/sshd_config
@@ -1,4 +1,4 @@
1# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $ 1# $OpenBSD: sshd_config,v 1.59 2002/09/25 11:17:16 markus Exp $
2 2
3# This is the sshd server system-wide configuration file. See 3# This is the sshd server system-wide configuration file. See
4# sshd_config(5) for more information. 4# sshd_config(5) for more information.
@@ -22,7 +22,7 @@
22#HostKey /etc/ssh/ssh_host_dsa_key 22#HostKey /etc/ssh/ssh_host_dsa_key
23 23
24# Lifetime and size of ephemeral version 1 server key 24# Lifetime and size of ephemeral version 1 server key
25#KeyRegenerationInterval 1h 25#KeyRegenerationInterval 3600
26#ServerKeyBits 768 26#ServerKeyBits 768
27 27
28# Logging 28# Logging
@@ -32,7 +32,7 @@
32 32
33# Authentication: 33# Authentication:
34 34
35#LoginGraceTime 2m 35#LoginGraceTime 120
36#PermitRootLogin yes 36#PermitRootLogin yes
37#StrictModes yes 37#StrictModes yes
38 38
@@ -40,6 +40,10 @@
40#PubkeyAuthentication yes 40#PubkeyAuthentication yes
41#AuthorizedKeysFile .ssh/authorized_keys 41#AuthorizedKeysFile .ssh/authorized_keys
42 42
43# rhosts authentication should not be used
44#RhostsAuthentication no
45# Don't read the user's ~/.rhosts and ~/.shosts files
46#IgnoreRhosts yes
43# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 47# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
44#RhostsRSAAuthentication no 48#RhostsRSAAuthentication no
45# similar for protocol version 2 49# similar for protocol version 2
@@ -47,8 +51,6 @@
47# Change to yes if you don't trust ~/.ssh/known_hosts for 51# Change to yes if you don't trust ~/.ssh/known_hosts for
48# RhostsRSAAuthentication and HostbasedAuthentication 52# RhostsRSAAuthentication and HostbasedAuthentication
49#IgnoreUserKnownHosts no 53#IgnoreUserKnownHosts no
50# Don't read the user's ~/.rhosts and ~/.shosts files
51#IgnoreRhosts yes
52 54
53# To disable tunneled clear text passwords, change to no here! 55# To disable tunneled clear text passwords, change to no here!
54#PasswordAuthentication yes 56#PasswordAuthentication yes
@@ -62,17 +64,15 @@
62#KerberosOrLocalPasswd yes 64#KerberosOrLocalPasswd yes
63#KerberosTicketCleanup yes 65#KerberosTicketCleanup yes
64 66
65# GSSAPI options 67#AFSTokenPassing no
66#GSSAPIAuthentication no
67#GSSAPICleanupCreds yes
68 68
69# Set this to 'yes' to enable PAM authentication (via challenge-response) 69# Kerberos TGT Passing only works with the AFS kaserver
70# and session processing. Depending on your PAM configuration, this may 70#KerberosTgtPassing no
71# bypass the setting of 'PasswordAuthentication' 71
72#UsePAM yes 72# Set this to 'yes' to enable PAM keyboard-interactive authentication
73# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
74#PAMAuthenticationViaKbdInt no
73 75
74#AllowTcpForwarding yes
75#GatewayPorts no
76#X11Forwarding no 76#X11Forwarding no
77#X11DisplayOffset 10 77#X11DisplayOffset 10
78#X11UseLocalhost yes 78#X11UseLocalhost yes
@@ -83,14 +83,11 @@
83#UsePrivilegeSeparation yes 83#UsePrivilegeSeparation yes
84#PermitUserEnvironment no 84#PermitUserEnvironment no
85#Compression yes 85#Compression yes
86#ClientAliveInterval 0
87#ClientAliveCountMax 3
88#UseDNS yes
89#PidFile /var/run/sshd.pid
90#MaxStartups 10
91 86
87#MaxStartups 10
92# no default banner path 88# no default banner path
93#Banner /some/path 89#Banner /some/path
90#VerifyReverseMapping no
94 91
95# override default of no subsystems 92# override default of no subsystems
96Subsystem sftp /usr/libexec/sftp-server 93Subsystem sftp /usr/libexec/sftp-server
diff --git a/sshd_config.0 b/sshd_config.0
index bc266317f..7800de312 100644
--- a/sshd_config.0
+++ b/sshd_config.0
@@ -15,11 +15,15 @@ DESCRIPTION
15 The possible keywords and their meanings are as follows (note that key- 15 The possible keywords and their meanings are as follows (note that key-
16 words are case-insensitive and arguments are case-sensitive): 16 words are case-insensitive and arguments are case-sensitive):
17 17
18 AFSTokenPassing
19 Specifies whether an AFS token may be forwarded to the server.
20 Default is M-bM-^@M-^\noM-bM-^@M-^].
21
18 AllowGroups 22 AllowGroups
19 This keyword can be followed by a list of group name patterns, 23 This keyword can be followed by a list of group name patterns,
20 separated by spaces. If specified, login is allowed only for 24 separated by spaces. If specified, login is allowed only for
21 users whose primary group or supplementary group list matches one 25 users whose primary group or supplementary group list matches one
22 of the patterns. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y can be used as wildcards in the 26 of the patterns. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^XM-bM-^@M-^Y? can be used as wildcards in the
23 patterns. Only group names are valid; a numerical group ID is 27 patterns. Only group names are valid; a numerical group ID is
24 not recognized. By default, login is allowed for all groups. 28 not recognized. By default, login is allowed for all groups.
25 29
@@ -32,7 +36,7 @@ DESCRIPTION
32 AllowUsers 36 AllowUsers
33 This keyword can be followed by a list of user name patterns, 37 This keyword can be followed by a list of user name patterns,
34 separated by spaces. If specified, login is allowed only for 38 separated by spaces. If specified, login is allowed only for
35 user names that match one of the patterns. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y can be 39 user names that match one of the patterns. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^XM-bM-^@M-^Y? can be
36 used as wildcards in the patterns. Only user names are valid; a 40 used as wildcards in the patterns. Only user names are valid; a
37 numerical user ID is not recognized. By default, login is 41 numerical user ID is not recognized. By default, login is
38 allowed for all users. If the pattern takes the form USER@HOST 42 allowed for all users. If the pattern takes the form USER@HOST
@@ -66,7 +70,7 @@ DESCRIPTION
66 ciphers must be comma-separated. The default is 70 ciphers must be comma-separated. The default is
67 71
68 M-bM-^@M-^XM-bM-^@M-^Xaes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour, 72 M-bM-^@M-^XM-bM-^@M-^Xaes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
69 aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctrM-bM-^@M-^YM-bM-^@M-^Y 73 aes192-cbc,aes256-cbcM-bM-^@M-^YM-bM-^@M-^Y
70 74
71 ClientAliveInterval 75 ClientAliveInterval
72 Sets a timeout interval in seconds after which if no data has 76 Sets a timeout interval in seconds after which if no data has
@@ -77,18 +81,18 @@ DESCRIPTION
77 81
78 ClientAliveCountMax 82 ClientAliveCountMax
79 Sets the number of client alive messages (see above) which may be 83 Sets the number of client alive messages (see above) which may be
80 sent without sshd receiving any messages back from the client. 84 sent without sshd receiving any messages back from the client. If
81 If this threshold is reached while client alive messages are 85 this threshold is reached while client alive messages are being
82 being sent, sshd will disconnect the client, terminating the ses- 86 sent, sshd will disconnect the client, terminating the session.
83 sion. It is important to note that the use of client alive mes- 87 It is important to note that the use of client alive messages is
84 sages is very different from KeepAlive (below). The client alive 88 very different from KeepAlive (below). The client alive messages
85 messages are sent through the encrypted channel and therefore 89 are sent through the encrypted channel and therefore will not be
86 will not be spoofable. The TCP keepalive option enabled by 90 spoofable. The TCP keepalive option enabled by KeepAlive is
87 KeepAlive is spoofable. The client alive mechanism is valuable 91 spoofable. The client alive mechanism is valuable when the client
88 when the client or server depend on knowing when a connection has 92 or server depend on knowing when a connection has become inac-
89 become inactive. 93 tive.
90 94
91 The default value is 3. If ClientAliveInterval (above) is set to 95 The default value is 3. If ClientAliveInterval (above) is set to
92 15, and ClientAliveCountMax is left at the default, unresponsive 96 15, and ClientAliveCountMax is left at the default, unresponsive
93 ssh clients will be disconnected after approximately 45 seconds. 97 ssh clients will be disconnected after approximately 45 seconds.
94 98
@@ -100,14 +104,14 @@ DESCRIPTION
100 This keyword can be followed by a list of group name patterns, 104 This keyword can be followed by a list of group name patterns,
101 separated by spaces. Login is disallowed for users whose primary 105 separated by spaces. Login is disallowed for users whose primary
102 group or supplementary group list matches one of the patterns. 106 group or supplementary group list matches one of the patterns.
103 M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y can be used as wildcards in the patterns. Only group 107 M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^XM-bM-^@M-^Y? can be used as wildcards in the patterns. Only
104 names are valid; a numerical group ID is not recognized. By 108 group names are valid; a numerical group ID is not recognized.
105 default, login is allowed for all groups. 109 By default, login is allowed for all groups.
106 110
107 DenyUsers 111 DenyUsers
108 This keyword can be followed by a list of user name patterns, 112 This keyword can be followed by a list of user name patterns,
109 separated by spaces. Login is disallowed for user names that 113 separated by spaces. Login is disallowed for user names that
110 match one of the patterns. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y can be used as wildcards 114 match one of the patterns. M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^XM-bM-^@M-^Y? can be used as wildcards
111 in the patterns. Only user names are valid; a numerical user ID 115 in the patterns. Only user names are valid; a numerical user ID
112 is not recognized. By default, login is allowed for all users. 116 is not recognized. By default, login is allowed for all users.
113 If the pattern takes the form USER@HOST then USER and HOST are 117 If the pattern takes the form USER@HOST then USER and HOST are
@@ -124,16 +128,6 @@ DESCRIPTION
124 forwarded ports. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The 128 forwarded ports. The argument must be M-bM-^@M-^\yesM-bM-^@M-^] or M-bM-^@M-^\noM-bM-^@M-^]. The
125 default is M-bM-^@M-^\noM-bM-^@M-^]. 129 default is M-bM-^@M-^\noM-bM-^@M-^].
126 130
127 GSSAPIAuthentication
128 Specifies whether user authentication based on GSSAPI is allowed.
129 The default is M-bM-^@M-^\noM-bM-^@M-^]. Note that this option applies to protocol
130 version 2 only.
131
132 GSSAPICleanupCredentials
133 Specifies whether to automatically destroy the userM-bM-^@M-^Ys credentials
134 cache on logout. The default is M-bM-^@M-^\yesM-bM-^@M-^]. Note that this option
135 applies to protocol version 2 only.
136
137 HostbasedAuthentication 131 HostbasedAuthentication
138 Specifies whether rhosts or /etc/hosts.equiv authentication 132 Specifies whether rhosts or /etc/hosts.equiv authentication
139 together with successful public key client host authentication is 133 together with successful public key client host authentication is
@@ -152,7 +146,8 @@ DESCRIPTION
152 146
153 IgnoreRhosts 147 IgnoreRhosts
154 Specifies that .rhosts and .shosts files will not be used in 148 Specifies that .rhosts and .shosts files will not be used in
155 RhostsRSAAuthentication or HostbasedAuthentication. 149 RhostsAuthentication, RhostsRSAAuthentication or
150 HostbasedAuthentication.
156 151
157 /etc/hosts.equiv and /etc/shosts.equiv are still used. The 152 /etc/hosts.equiv and /etc/shosts.equiv are still used. The
158 default is M-bM-^@M-^\yesM-bM-^@M-^]. 153 default is M-bM-^@M-^\yesM-bM-^@M-^].
@@ -178,17 +173,23 @@ DESCRIPTION
178 To disable keepalives, the value should be set to M-bM-^@M-^\noM-bM-^@M-^]. 173 To disable keepalives, the value should be set to M-bM-^@M-^\noM-bM-^@M-^].
179 174
180 KerberosAuthentication 175 KerberosAuthentication
181 Specifies whether the password provided by the user for 176 Specifies whether Kerberos authentication is allowed. This can
182 PasswordAuthentication will be validated through the Kerberos 177 be in the form of a Kerberos ticket, or if PasswordAuthentication
183 KDC. To use this option, the server needs a Kerberos servtab 178 is yes, the password provided by the user will be validated
184 which allows the verification of the KDCM-bM-^@M-^Ys identity. Default is 179 through the Kerberos KDC. To use this option, the server needs a
185 M-bM-^@M-^\noM-bM-^@M-^]. 180 Kerberos servtab which allows the verification of the KDCM-bM-^@M-^Ys iden-
181 tity. Default is M-bM-^@M-^\noM-bM-^@M-^].
186 182
187 KerberosOrLocalPasswd 183 KerberosOrLocalPasswd
188 If set then if password authentication through Kerberos fails 184 If set then if password authentication through Kerberos fails
189 then the password will be validated via any additional local 185 then the password will be validated via any additional local
190 mechanism such as /etc/passwd. Default is M-bM-^@M-^\yesM-bM-^@M-^]. 186 mechanism such as /etc/passwd. Default is M-bM-^@M-^\yesM-bM-^@M-^].
191 187
188 KerberosTgtPassing
189 Specifies whether a Kerberos TGT may be forwarded to the server.
190 Default is M-bM-^@M-^\noM-bM-^@M-^], as this only works when the Kerberos KDC is
191 actually an AFS kaserver.
192
192 KerberosTicketCleanup 193 KerberosTicketCleanup
193 Specifies whether to automatically destroy the userM-bM-^@M-^Ys ticket 194 Specifies whether to automatically destroy the userM-bM-^@M-^Ys ticket
194 cache file on logout. Default is M-bM-^@M-^\yesM-bM-^@M-^]. 195 cache file on logout. Default is M-bM-^@M-^\yesM-bM-^@M-^].
@@ -210,7 +211,7 @@ DESCRIPTION
210 ListenAddress [host|IPv6_addr]:port 211 ListenAddress [host|IPv6_addr]:port
211 212
212 If port is not specified, sshd will listen on the address and all 213 If port is not specified, sshd will listen on the address and all
213 prior Port options specified. The default is to listen on all 214 prior Port options specified. The default is to listen on all
214 local addresses. Multiple ListenAddress options are permitted. 215 local addresses. Multiple ListenAddress options are permitted.
215 Additionally, any Port options must precede this option for non 216 Additionally, any Port options must precede this option for non
216 port qualified addresses. 217 port qualified addresses.
@@ -248,6 +249,12 @@ DESCRIPTION
248 and all connection attempts are refused if the number of unau- 249 and all connection attempts are refused if the number of unau-
249 thenticated connections reaches M-bM-^@M-^\fullM-bM-^@M-^] (60). 250 thenticated connections reaches M-bM-^@M-^\fullM-bM-^@M-^] (60).
250 251
252 PAMAuthenticationViaKbdInt
253 Specifies whether PAM challenge response authentication is
254 allowed. This allows the use of most PAM challenge response
255 authentication modules, but it will allow password authentication
256 regardless of whether PasswordAuthentication is enabled.
257
251 PasswordAuthentication 258 PasswordAuthentication
252 Specifies whether password authentication is allowed. The 259 Specifies whether password authentication is allowed. The
253 default is M-bM-^@M-^\yesM-bM-^@M-^]. 260 default is M-bM-^@M-^\yesM-bM-^@M-^].
@@ -268,7 +275,7 @@ DESCRIPTION
268 If this option is set to M-bM-^@M-^\forced-commands-onlyM-bM-^@M-^] root login with 275 If this option is set to M-bM-^@M-^\forced-commands-onlyM-bM-^@M-^] root login with
269 public key authentication will be allowed, but only if the 276 public key authentication will be allowed, but only if the
270 command option has been specified (which may be useful for taking 277 command option has been specified (which may be useful for taking
271 remote backups even if root login is normally not allowed). All 278 remote backups even if root login is normally not allowed). All
272 other authentication methods are disabled for root. 279 other authentication methods are disabled for root.
273 280
274 If this option is set to M-bM-^@M-^\noM-bM-^@M-^] root is not allowed to login. 281 If this option is set to M-bM-^@M-^\noM-bM-^@M-^] root is not allowed to login.
@@ -308,10 +315,16 @@ DESCRIPTION
308 PubkeyAuthentication 315 PubkeyAuthentication
309 Specifies whether public key authentication is allowed. The 316 Specifies whether public key authentication is allowed. The
310 default is M-bM-^@M-^\yesM-bM-^@M-^]. Note that this option applies to protocol ver- 317 default is M-bM-^@M-^\yesM-bM-^@M-^]. Note that this option applies to protocol ver-
311 sion 2 only. RhostsRSAAuthentication should be used instead, 318 sion 2 only.
312 because it performs RSA-based host authentication in addition to 319
313 normal rhosts or /etc/hosts.equiv authentication. The default is 320 RhostsAuthentication
314 M-bM-^@M-^\noM-bM-^@M-^]. This option applies to protocol version 1 only. 321 Specifies whether authentication using rhosts or /etc/hosts.equiv
322 files is sufficient. Normally, this method should not be permit-
323 ted because it is insecure. RhostsRSAAuthentication should be
324 used instead, because it performs RSA-based host authentication
325 in addition to normal rhosts or /etc/hosts.equiv authentication.
326 The default is M-bM-^@M-^\noM-bM-^@M-^]. This option applies to protocol version 1
327 only.
315 328
316 RhostsRSAAuthentication 329 RhostsRSAAuthentication
317 Specifies whether rhosts or /etc/hosts.equiv authentication 330 Specifies whether rhosts or /etc/hosts.equiv authentication
@@ -348,10 +361,6 @@ DESCRIPTION
348 LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The 361 LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The
349 default is AUTH. 362 default is AUTH.
350 363
351 UseDNS Specifies whether sshd should lookup the remote host name and
352 check that the resolved host name for the remote IP address maps
353 back to the very same IP address. The default is M-bM-^@M-^\yesM-bM-^@M-^].
354
355 UseLogin 364 UseLogin
356 Specifies whether login(1) is used for interactive login ses- 365 Specifies whether login(1) is used for interactive login ses-
357 sions. The default is M-bM-^@M-^\noM-bM-^@M-^]. Note that login(1) is never used 366 sions. The default is M-bM-^@M-^\noM-bM-^@M-^]. Note that login(1) is never used
@@ -360,11 +369,6 @@ DESCRIPTION
360 know how to handle xauth(1) cookies. If UsePrivilegeSeparation 369 know how to handle xauth(1) cookies. If UsePrivilegeSeparation
361 is specified, it will be disabled after authentication. 370 is specified, it will be disabled after authentication.
362 371
363 UsePAM Enables PAM authentication (via challenge-response) and session
364 set up. If you enable this, you should probably disable
365 PasswordAuthentication. If you enable then you will not be able
366 to run sshd as a non-root user.
367
368 UsePrivilegeSeparation 372 UsePrivilegeSeparation
369 Specifies whether sshd separates privileges by creating an 373 Specifies whether sshd separates privileges by creating an
370 unprivileged child process to deal with incoming network traffic. 374 unprivileged child process to deal with incoming network traffic.
@@ -374,6 +378,11 @@ DESCRIPTION
374 taining any corruption within the unprivileged processes. The 378 taining any corruption within the unprivileged processes. The
375 default is M-bM-^@M-^\yesM-bM-^@M-^]. 379 default is M-bM-^@M-^\yesM-bM-^@M-^].
376 380
381 VerifyReverseMapping
382 Specifies whether sshd should try to verify the remote host name
383 and check that the resolved host name for the remote IP address
384 maps back to the very same IP address. The default is M-bM-^@M-^\noM-bM-^@M-^].
385
377 X11DisplayOffset 386 X11DisplayOffset
378 Specifies the first display number available for sshdM-bM-^@M-^Ys X11 for- 387 Specifies the first display number available for sshdM-bM-^@M-^Ys X11 for-
379 warding. This prevents sshd from interfering with real X11 388 warding. This prevents sshd from interfering with real X11
@@ -391,7 +400,7 @@ DESCRIPTION
391 substitution occur on the client side. The security risk of 400 substitution occur on the client side. The security risk of
392 using X11 forwarding is that the clientM-bM-^@M-^Ys X11 display server may 401 using X11 forwarding is that the clientM-bM-^@M-^Ys X11 display server may
393 be exposed to attack when the ssh client requests forwarding (see 402 be exposed to attack when the ssh client requests forwarding (see
394 the warnings for ForwardX11 in ssh_config(5)). A system adminis- 403 the warnings for ForwardX11 in ssh_config(5) ). A system adminis-
395 trator may have a stance in which they want to protect clients 404 trator may have a stance in which they want to protect clients
396 that may expose themselves to attack by unwittingly requesting 405 that may expose themselves to attack by unwittingly requesting
397 X11 forwarding, which can warrant a M-bM-^@M-^\noM-bM-^@M-^] setting. 406 X11 forwarding, which can warrant a M-bM-^@M-^\noM-bM-^@M-^] setting.
@@ -445,9 +454,6 @@ FILES
445 writable by root only, but it is recommended (though not neces- 454 writable by root only, but it is recommended (though not neces-
446 sary) that it be world-readable. 455 sary) that it be world-readable.
447 456
448SEE ALSO
449 sshd(8)
450
451AUTHORS 457AUTHORS
452 OpenSSH is a derivative of the original and free ssh 1.2.12 release by 458 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
453 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo 459 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
@@ -456,4 +462,7 @@ AUTHORS
456 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support 462 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
457 for privilege separation. 463 for privilege separation.
458 464
465SEE ALSO
466 sshd(8)
467
459BSD September 25, 1999 BSD 468BSD September 25, 1999 BSD
diff --git a/sshd_config.5 b/sshd_config.5
index 727fdb12a..6f38a260a 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: sshd_config.5,v 1.25 2003/09/01 09:50:04 markus Exp $ 37.\" $OpenBSD: sshd_config.5,v 1.15 2003/03/28 10:11:43 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSHD_CONFIG 5 39.Dt SSHD_CONFIG 5
40.Os 40.Os
@@ -61,6 +61,10 @@ The possible
61keywords and their meanings are as follows (note that 61keywords and their meanings are as follows (note that
62keywords are case-insensitive and arguments are case-sensitive): 62keywords are case-insensitive and arguments are case-sensitive):
63.Bl -tag -width Ds 63.Bl -tag -width Ds
64.It Cm AFSTokenPassing
65Specifies whether an AFS token may be forwarded to the server.
66Default is
67.Dq no .
64.It Cm AllowGroups 68.It Cm AllowGroups
65This keyword can be followed by a list of group name patterns, separated 69This keyword can be followed by a list of group name patterns, separated
66by spaces. 70by spaces.
@@ -68,7 +72,7 @@ If specified, login is allowed only for users whose primary
68group or supplementary group list matches one of the patterns. 72group or supplementary group list matches one of the patterns.
69.Ql \&* 73.Ql \&*
70and 74and
71.Ql \&? 75.Ql ?
72can be used as 76can be used as
73wildcards in the patterns. 77wildcards in the patterns.
74Only group names are valid; a numerical group ID is not recognized. 78Only group names are valid; a numerical group ID is not recognized.
@@ -89,7 +93,7 @@ If specified, login is allowed only for user names that
89match one of the patterns. 93match one of the patterns.
90.Ql \&* 94.Ql \&*
91and 95and
92.Ql \&? 96.Ql ?
93can be used as 97can be used as
94wildcards in the patterns. 98wildcards in the patterns.
95Only user names are valid; a numerical user ID is not recognized. 99Only user names are valid; a numerical user ID is not recognized.
@@ -103,8 +107,7 @@ Specifies the file that contains the public keys that can be used
103for user authentication. 107for user authentication.
104.Cm AuthorizedKeysFile 108.Cm AuthorizedKeysFile
105may contain tokens of the form %T which are substituted during connection 109may contain tokens of the form %T which are substituted during connection
106set-up. 110set-up. The following tokens are defined: %% is replaced by a literal '%',
107The following tokens are defined: %% is replaced by a literal '%',
108%h is replaced by the home directory of the user being authenticated and 111%h is replaced by the home directory of the user being authenticated and
109%u is replaced by the username of that user. 112%u is replaced by the username of that user.
110After expansion, 113After expansion,
@@ -135,7 +138,7 @@ The default is
135.Pp 138.Pp
136.Bd -literal 139.Bd -literal
137 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour, 140 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
138 aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr'' 141 aes192-cbc,aes256-cbc''
139.Ed 142.Ed
140.It Cm ClientAliveInterval 143.It Cm ClientAliveInterval
141Sets a timeout interval in seconds after which if no data has been received 144Sets a timeout interval in seconds after which if no data has been received
@@ -150,24 +153,20 @@ This option applies to protocol version 2 only.
150Sets the number of client alive messages (see above) which may be 153Sets the number of client alive messages (see above) which may be
151sent without 154sent without
152.Nm sshd 155.Nm sshd
153receiving any messages back from the client. 156receiving any messages back from the client. If this threshold is
154If this threshold is reached while client alive messages are being sent, 157reached while client alive messages are being sent,
155.Nm sshd 158.Nm sshd
156will disconnect the client, terminating the session. 159will disconnect the client, terminating the session. It is important
157It is important to note that the use of client alive messages is very 160to note that the use of client alive messages is very different from
158different from
159.Cm KeepAlive 161.Cm KeepAlive
160(below). 162(below). The client alive messages are sent through the
161The client alive messages are sent through the encrypted channel 163encrypted channel and therefore will not be spoofable. The TCP keepalive
162and therefore will not be spoofable. 164option enabled by
163The TCP keepalive option enabled by
164.Cm KeepAlive 165.Cm KeepAlive
165is spoofable. 166is spoofable. The client alive mechanism is valuable when the client or
166The client alive mechanism is valuable when the client or
167server depend on knowing when a connection has become inactive. 167server depend on knowing when a connection has become inactive.
168.Pp 168.Pp
169The default value is 3. 169The default value is 3. If
170If
171.Cm ClientAliveInterval 170.Cm ClientAliveInterval
172(above) is set to 15, and 171(above) is set to 15, and
173.Cm ClientAliveCountMax 172.Cm ClientAliveCountMax
@@ -188,7 +187,7 @@ Login is disallowed for users whose primary group or supplementary
188group list matches one of the patterns. 187group list matches one of the patterns.
189.Ql \&* 188.Ql \&*
190and 189and
191.Ql \&? 190.Ql ?
192can be used as 191can be used as
193wildcards in the patterns. 192wildcards in the patterns.
194Only group names are valid; a numerical group ID is not recognized. 193Only group names are valid; a numerical group ID is not recognized.
@@ -200,7 +199,7 @@ by spaces.
200Login is disallowed for user names that match one of the patterns. 199Login is disallowed for user names that match one of the patterns.
201.Ql \&* 200.Ql \&*
202and 201and
203.Ql \&? 202.Ql ?
204can be used as wildcards in the patterns. 203can be used as wildcards in the patterns.
205Only user names are valid; a numerical user ID is not recognized. 204Only user names are valid; a numerical user ID is not recognized.
206By default, login is allowed for all users. 205By default, login is allowed for all users.
@@ -225,17 +224,6 @@ or
225.Dq no . 224.Dq no .
226The default is 225The default is
227.Dq no . 226.Dq no .
228.It Cm GSSAPIAuthentication
229Specifies whether user authentication based on GSSAPI is allowed.
230The default is
231.Dq no .
232Note that this option applies to protocol version 2 only.
233.It Cm GSSAPICleanupCredentials
234Specifies whether to automatically destroy the user's credentials cache
235on logout.
236The default is
237.Dq yes .
238Note that this option applies to protocol version 2 only.
239.It Cm HostbasedAuthentication 227.It Cm HostbasedAuthentication
240Specifies whether rhosts or /etc/hosts.equiv authentication together 228Specifies whether rhosts or /etc/hosts.equiv authentication together
241with successful public key client host authentication is allowed 229with successful public key client host authentication is allowed
@@ -271,6 +259,7 @@ Specifies that
271and 259and
272.Pa .shosts 260.Pa .shosts
273files will not be used in 261files will not be used in
262.Cm RhostsAuthentication ,
274.Cm RhostsRSAAuthentication 263.Cm RhostsRSAAuthentication
275or 264or
276.Cm HostbasedAuthentication . 265.Cm HostbasedAuthentication .
@@ -314,9 +303,11 @@ This avoids infinitely hanging sessions.
314To disable keepalives, the value should be set to 303To disable keepalives, the value should be set to
315.Dq no . 304.Dq no .
316.It Cm KerberosAuthentication 305.It Cm KerberosAuthentication
317Specifies whether the password provided by the user for 306Specifies whether Kerberos authentication is allowed.
307This can be in the form of a Kerberos ticket, or if
318.Cm PasswordAuthentication 308.Cm PasswordAuthentication
319will be validated through the Kerberos KDC. 309is yes, the password provided by the user will be validated through
310the Kerberos KDC.
320To use this option, the server needs a 311To use this option, the server needs a
321Kerberos servtab which allows the verification of the KDC's identity. 312Kerberos servtab which allows the verification of the KDC's identity.
322Default is 313Default is
@@ -328,6 +319,11 @@ such as
328.Pa /etc/passwd . 319.Pa /etc/passwd .
329Default is 320Default is
330.Dq yes . 321.Dq yes .
322.It Cm KerberosTgtPassing
323Specifies whether a Kerberos TGT may be forwarded to the server.
324Default is
325.Dq no ,
326as this only works when the Kerberos KDC is actually an AFS kaserver.
331.It Cm KerberosTicketCleanup 327.It Cm KerberosTicketCleanup
332Specifies whether to automatically destroy the user's ticket cache 328Specifies whether to automatically destroy the user's ticket cache
333file on logout. 329file on logout.
@@ -373,12 +369,11 @@ is not specified,
373.Nm sshd 369.Nm sshd
374will listen on the address and all prior 370will listen on the address and all prior
375.Cm Port 371.Cm Port
376options specified. 372options specified. The default is to listen on all local
377The default is to listen on all local addresses. 373addresses.
378Multiple 374Multiple
379.Cm ListenAddress 375.Cm ListenAddress
380options are permitted. 376options are permitted. Additionally, any
381Additionally, any
382.Cm Port 377.Cm Port
383options must precede this option for non port qualified addresses. 378options must precede this option for non port qualified addresses.
384.It Cm LoginGraceTime 379.It Cm LoginGraceTime
@@ -427,6 +422,12 @@ The probability increases linearly and all connection attempts
427are refused if the number of unauthenticated connections reaches 422are refused if the number of unauthenticated connections reaches
428.Dq full 423.Dq full
429(60). 424(60).
425.It Cm PAMAuthenticationViaKbdInt
426Specifies whether PAM challenge response authentication is allowed. This
427allows the use of most PAM challenge response authentication modules, but
428it will allow password authentication regardless of whether
429.Cm PasswordAuthentication
430is enabled.
430.It Cm PasswordAuthentication 431.It Cm PasswordAuthentication
431Specifies whether password authentication is allowed. 432Specifies whether password authentication is allowed.
432The default is 433The default is
@@ -459,8 +460,8 @@ but only if the
459.Ar command 460.Ar command
460option has been specified 461option has been specified
461(which may be useful for taking remote backups even if root login is 462(which may be useful for taking remote backups even if root login is
462normally not allowed). 463normally not allowed). All other authentication methods are disabled
463All other authentication methods are disabled for root. 464for root.
464.Pp 465.Pp
465If this option is set to 466If this option is set to
466.Dq no 467.Dq no
@@ -533,6 +534,10 @@ Specifies whether public key authentication is allowed.
533The default is 534The default is
534.Dq yes . 535.Dq yes .
535Note that this option applies to protocol version 2 only. 536Note that this option applies to protocol version 2 only.
537.It Cm RhostsAuthentication
538Specifies whether authentication using rhosts or /etc/hosts.equiv
539files is sufficient.
540Normally, this method should not be permitted because it is insecure.
536.Cm RhostsRSAAuthentication 541.Cm RhostsRSAAuthentication
537should be used 542should be used
538instead, because it performs RSA-based host authentication in addition 543instead, because it performs RSA-based host authentication in addition
@@ -580,14 +585,6 @@ Gives the facility code that is used when logging messages from
580The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 585The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
581LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 586LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
582The default is AUTH. 587The default is AUTH.
583.It Cm UseDNS
584Specifies whether
585.Nm sshd
586should lookup the remote host name and check that
587the resolved host name for the remote IP address maps back to the
588very same IP address.
589The default is
590.Dq yes .
591.It Cm UseLogin 588.It Cm UseLogin
592Specifies whether 589Specifies whether
593.Xr login 1 590.Xr login 1
@@ -607,13 +604,6 @@ cookies.
607If 604If
608.Cm UsePrivilegeSeparation 605.Cm UsePrivilegeSeparation
609is specified, it will be disabled after authentication. 606is specified, it will be disabled after authentication.
610.It Cm UsePAM
611Enables PAM authentication (via challenge-response) and session set up.
612If you enable this, you should probably disable
613.Cm PasswordAuthentication .
614If you enable
615.CM UsePAM
616then you will not be able to run sshd as a non-root user.
617.It Cm UsePrivilegeSeparation 607.It Cm UsePrivilegeSeparation
618Specifies whether 608Specifies whether
619.Nm sshd 609.Nm sshd
@@ -625,6 +615,14 @@ The goal of privilege separation is to prevent privilege
625escalation by containing any corruption within the unprivileged processes. 615escalation by containing any corruption within the unprivileged processes.
626The default is 616The default is
627.Dq yes . 617.Dq yes .
618.It Cm VerifyReverseMapping
619Specifies whether
620.Nm sshd
621should try to verify the remote host name and check that
622the resolved host name for the remote IP address maps back to the
623very same IP address.
624The default is
625.Dq no .
628.It Cm X11DisplayOffset 626.It Cm X11DisplayOffset
629Specifies the first display number available for 627Specifies the first display number available for
630.Nm sshd Ns 's 628.Nm sshd Ns 's
@@ -655,7 +653,7 @@ display server may be exposed to attack when the ssh client requests
655forwarding (see the warnings for 653forwarding (see the warnings for
656.Cm ForwardX11 654.Cm ForwardX11
657in 655in
658.Xr ssh_config 5 ) . 656.Xr ssh_config 5 ).
659A system administrator may have a stance in which they want to 657A system administrator may have a stance in which they want to
660protect clients that may expose themselves to attack by unwittingly 658protect clients that may expose themselves to attack by unwittingly
661requesting X11 forwarding, which can warrant a 659requesting X11 forwarding, which can warrant a
@@ -701,6 +699,7 @@ The default is
701.Pa /usr/X11R6/bin/xauth . 699.Pa /usr/X11R6/bin/xauth .
702.El 700.El
703.Ss Time Formats 701.Ss Time Formats
702.Pp
704.Nm sshd 703.Nm sshd
705command-line arguments and configuration file options that specify time 704command-line arguments and configuration file options that specify time
706may be expressed using a sequence of the form: 705may be expressed using a sequence of the form:
@@ -749,8 +748,6 @@ Contains configuration data for
749This file should be writable by root only, but it is recommended 748This file should be writable by root only, but it is recommended
750(though not necessary) that it be world-readable. 749(though not necessary) that it be world-readable.
751.El 750.El
752.Sh SEE ALSO
753.Xr sshd 8
754.Sh AUTHORS 751.Sh AUTHORS
755OpenSSH is a derivative of the original and free 752OpenSSH is a derivative of the original and free
756ssh 1.2.12 release by Tatu Ylonen. 753ssh 1.2.12 release by Tatu Ylonen.
@@ -762,3 +759,5 @@ Markus Friedl contributed the support for SSH
762protocol versions 1.5 and 2.0. 759protocol versions 1.5 and 2.0.
763Niels Provos and Markus Friedl contributed support 760Niels Provos and Markus Friedl contributed support
764for privilege separation. 761for privilege separation.
762.Sh SEE ALSO
763.Xr sshd 8
diff --git a/sshlogin.c b/sshlogin.c
index 36b648934..12555d635 100644
--- a/sshlogin.c
+++ b/sshlogin.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: sshlogin.c,v 1.7 2003/06/12 07:57:38 markus Exp $"); 42RCSID("$OpenBSD: sshlogin.c,v 1.5 2002/08/29 15:57:25 stevesk Exp $");
43 43
44#include "loginrec.h" 44#include "loginrec.h"
45 45
@@ -60,8 +60,8 @@ get_last_login_time(uid_t uid, const char *logname,
60} 60}
61 61
62/* 62/*
63 * Records that the user has logged in. I wish these parts of operating 63 * Records that the user has logged in. I these parts of operating systems
64 * systems were more standardized. 64 * were more standardized.
65 */ 65 */
66void 66void
67record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, 67record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
diff --git a/sshpty.c b/sshpty.c
index 4747ceaf4..d28947f62 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: sshpty.c,v 1.10 2003/06/12 07:57:38 markus Exp $"); 15RCSID("$OpenBSD: sshpty.c,v 1.8 2003/02/03 08:56:16 markus Exp $");
16 16
17#ifdef HAVE_UTIL_H 17#ifdef HAVE_UTIL_H
18# include <util.h> 18# include <util.h>
@@ -101,12 +101,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
101 error("/dev/ptmx: %.100s", strerror(errno)); 101 error("/dev/ptmx: %.100s", strerror(errno));
102 return 0; 102 return 0;
103 } 103 }
104 old_signal = signal(SIGCHLD, SIG_DFL); 104 old_signal = mysignal(SIGCHLD, SIG_DFL);
105 if (grantpt(ptm) < 0) { 105 if (grantpt(ptm) < 0) {
106 error("grantpt: %.100s", strerror(errno)); 106 error("grantpt: %.100s", strerror(errno));
107 return 0; 107 return 0;
108 } 108 }
109 signal(SIGCHLD, old_signal); 109 mysignal(SIGCHLD, old_signal);
110 if (unlockpt(ptm) < 0) { 110 if (unlockpt(ptm) < 0) {
111 error("unlockpt: %.100s", strerror(errno)); 111 error("unlockpt: %.100s", strerror(errno));
112 return 0; 112 return 0;
@@ -226,7 +226,7 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
226 } 226 }
227 /* set tty modes to a sane state for broken clients */ 227 /* set tty modes to a sane state for broken clients */
228 if (tcgetattr(*ptyfd, &tio) < 0) 228 if (tcgetattr(*ptyfd, &tio) < 0)
229 logit("Getting tty modes for pty failed: %.100s", strerror(errno)); 229 log("Getting tty modes for pty failed: %.100s", strerror(errno));
230 else { 230 else {
231 tio.c_lflag |= (ECHO | ISIG | ICANON); 231 tio.c_lflag |= (ECHO | ISIG | ICANON);
232 tio.c_oflag |= (OPOST | ONLCR); 232 tio.c_oflag |= (OPOST | ONLCR);
@@ -234,7 +234,7 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
234 234
235 /* Set the new modes for the terminal. */ 235 /* Set the new modes for the terminal. */
236 if (tcsetattr(*ptyfd, TCSANOW, &tio) < 0) 236 if (tcsetattr(*ptyfd, TCSANOW, &tio) < 0)
237 logit("Setting tty modes for pty failed: %.100s", strerror(errno)); 237 log("Setting tty modes for pty failed: %.100s", strerror(errno));
238 } 238 }
239 239
240 return 1; 240 return 1;
@@ -258,7 +258,7 @@ pty_release(const char *ttyname)
258 error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); 258 error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno));
259} 259}
260 260
261/* Makes the tty the process's controlling tty and sets it to sane modes. */ 261/* Makes the tty the processes controlling tty and sets it to sane modes. */
262 262
263void 263void
264pty_make_controlling_tty(int *ttyfd, const char *ttyname) 264pty_make_controlling_tty(int *ttyfd, const char *ttyname)
@@ -274,9 +274,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
274 274
275 fd = open(ttyname, O_RDWR|O_NOCTTY); 275 fd = open(ttyname, O_RDWR|O_NOCTTY);
276 if (fd != -1) { 276 if (fd != -1) {
277 signal(SIGHUP, SIG_IGN); 277 mysignal(SIGHUP, SIG_IGN);
278 ioctl(fd, TCVHUP, (char *)NULL); 278 ioctl(fd, TCVHUP, (char *)NULL);
279 signal(SIGHUP, SIG_DFL); 279 mysignal(SIGHUP, SIG_DFL);
280 setpgid(0, 0); 280 setpgid(0, 0);
281 close(fd); 281 close(fd);
282 } else { 282 } else {
@@ -323,9 +323,9 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
323 error("SETPGRP %s",strerror(errno)); 323 error("SETPGRP %s",strerror(errno));
324#endif /* HAVE_NEWS4 */ 324#endif /* HAVE_NEWS4 */
325#ifdef USE_VHANGUP 325#ifdef USE_VHANGUP
326 old = signal(SIGHUP, SIG_IGN); 326 old = mysignal(SIGHUP, SIG_IGN);
327 vhangup(); 327 vhangup();
328 signal(SIGHUP, old); 328 mysignal(SIGHUP, old);
329#endif /* USE_VHANGUP */ 329#endif /* USE_VHANGUP */
330 fd = open(ttyname, O_RDWR); 330 fd = open(ttyname, O_RDWR);
331 if (fd < 0) { 331 if (fd < 0) {
@@ -409,10 +409,10 @@ pty_setowner(struct passwd *pw, const char *ttyname)
409 if (errno == EROFS && 409 if (errno == EROFS &&
410 (st.st_mode & (S_IRGRP | S_IROTH)) == 0) 410 (st.st_mode & (S_IRGRP | S_IROTH)) == 0)
411 debug("chmod(%.100s, 0%o) failed: %.100s", 411 debug("chmod(%.100s, 0%o) failed: %.100s",
412 ttyname, (u_int)mode, strerror(errno)); 412 ttyname, mode, strerror(errno));
413 else 413 else
414 fatal("chmod(%.100s, 0%o) failed: %.100s", 414 fatal("chmod(%.100s, 0%o) failed: %.100s",
415 ttyname, (u_int)mode, strerror(errno)); 415 ttyname, mode, strerror(errno));
416 } 416 }
417 } 417 }
418} 418}
diff --git a/sshtty.c b/sshtty.c
index 2f47b06d1..5c016f80a 100644
--- a/sshtty.c
+++ b/sshtty.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: sshtty.c,v 1.4 2003/07/16 10:36:28 markus Exp $"); 38RCSID("$OpenBSD: sshtty.c,v 1.3 2002/03/04 17:27:39 stevesk Exp $");
39 39
40#include "sshtty.h" 40#include "sshtty.h"
41#include "log.h" 41#include "log.h"
@@ -80,9 +80,6 @@ enter_raw_mode(void)
80 _saved_tio = tio; 80 _saved_tio = tio;
81 tio.c_iflag |= IGNPAR; 81 tio.c_iflag |= IGNPAR;
82 tio.c_iflag &= ~(ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF); 82 tio.c_iflag &= ~(ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF);
83#ifdef IUCLC
84 tio.c_iflag &= ~IUCLC;
85#endif
86 tio.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL); 83 tio.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL);
87#ifdef IEXTEN 84#ifdef IEXTEN
88 tio.c_lflag &= ~IEXTEN; 85 tio.c_lflag &= ~IEXTEN;
diff --git a/ttymodes.c b/ttymodes.c
index c32e213a4..5cc13dcd5 100644
--- a/ttymodes.c
+++ b/ttymodes.c
@@ -43,7 +43,7 @@
43 */ 43 */
44 44
45#include "includes.h" 45#include "includes.h"
46RCSID("$OpenBSD: ttymodes.c,v 1.19 2003/04/08 20:21:29 itojun Exp $"); 46RCSID("$OpenBSD: ttymodes.c,v 1.18 2002/06/19 00:27:55 deraadt Exp $");
47 47
48#include "packet.h" 48#include "packet.h"
49#include "log.h" 49#include "log.h"
@@ -267,7 +267,7 @@ tty_make_modes(int fd, struct termios *tiop)
267 267
268 if (tiop == NULL) { 268 if (tiop == NULL) {
269 if (tcgetattr(fd, &tio) == -1) { 269 if (tcgetattr(fd, &tio) == -1) {
270 logit("tcgetattr: %.100s", strerror(errno)); 270 log("tcgetattr: %.100s", strerror(errno));
271 goto end; 271 goto end;
272 } 272 }
273 } else 273 } else
@@ -341,7 +341,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
341 * modes, they will initially have reasonable values. 341 * modes, they will initially have reasonable values.
342 */ 342 */
343 if (tcgetattr(fd, &tio) == -1) { 343 if (tcgetattr(fd, &tio) == -1) {
344 logit("tcgetattr: %.100s", strerror(errno)); 344 log("tcgetattr: %.100s", strerror(errno));
345 failure = -1; 345 failure = -1;
346 } 346 }
347 347
@@ -420,7 +420,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
420 * left in the packet; hopefully there is nothing 420 * left in the packet; hopefully there is nothing
421 * more coming after the mode data. 421 * more coming after the mode data.
422 */ 422 */
423 logit("parse_tty_modes: unknown opcode %d", opcode); 423 log("parse_tty_modes: unknown opcode %d", opcode);
424 goto set; 424 goto set;
425 } 425 }
426 } else { 426 } else {
@@ -436,7 +436,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
436 (void) packet_get_int(); 436 (void) packet_get_int();
437 break; 437 break;
438 } else { 438 } else {
439 logit("parse_tty_modes: unknown opcode %d", opcode); 439 log("parse_tty_modes: unknown opcode %d", opcode);
440 goto set; 440 goto set;
441 } 441 }
442 } 442 }
@@ -446,7 +446,7 @@ tty_parse_modes(int fd, int *n_bytes_ptr)
446set: 446set:
447 if (*n_bytes_ptr != n_bytes) { 447 if (*n_bytes_ptr != n_bytes) {
448 *n_bytes_ptr = n_bytes; 448 *n_bytes_ptr = n_bytes;
449 logit("parse_tty_modes: n_bytes_ptr != n_bytes: %d %d", 449 log("parse_tty_modes: n_bytes_ptr != n_bytes: %d %d",
450 *n_bytes_ptr, n_bytes); 450 *n_bytes_ptr, n_bytes);
451 return; /* Don't process bytes passed */ 451 return; /* Don't process bytes passed */
452 } 452 }
@@ -455,5 +455,5 @@ set:
455 455
456 /* Set the new modes for the terminal. */ 456 /* Set the new modes for the terminal. */
457 if (tcsetattr(fd, TCSANOW, &tio) == -1) 457 if (tcsetattr(fd, TCSANOW, &tio) == -1)
458 logit("Setting tty modes failed: %.100s", strerror(errno)); 458 log("Setting tty modes failed: %.100s", strerror(errno));
459} 459}
diff --git a/uidswap.c b/uidswap.c
index 3f13f9bf4..86c61a4b0 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: uidswap.c,v 1.24 2003/05/29 16:58:45 deraadt Exp $"); 15RCSID("$OpenBSD: uidswap.c,v 1.23 2002/07/15 17:15:31 stevesk Exp $");
16 16
17#include "log.h" 17#include "log.h"
18#include "uidswap.h" 18#include "uidswap.h"
@@ -143,63 +143,12 @@ restore_uid(void)
143void 143void
144permanently_set_uid(struct passwd *pw) 144permanently_set_uid(struct passwd *pw)
145{ 145{
146 uid_t old_uid = getuid();
147 gid_t old_gid = getgid();
148
149 if (temporarily_use_uid_effective) 146 if (temporarily_use_uid_effective)
150 fatal("permanently_set_uid: temporarily_use_uid effective"); 147 fatal("permanently_set_uid: temporarily_use_uid effective");
151 debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid, 148 debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
152 (u_int)pw->pw_gid); 149 (u_int)pw->pw_gid);
153
154#if defined(HAVE_SETRESGID)
155 if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0)
156 fatal("setresgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
157#elif defined(HAVE_SETREGID) && !defined(BROKEN_SETREGID)
158 if (setregid(pw->pw_gid, pw->pw_gid) < 0)
159 fatal("setregid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
160#else
161 if (setegid(pw->pw_gid) < 0)
162 fatal("setegid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
163 if (setgid(pw->pw_gid) < 0) 150 if (setgid(pw->pw_gid) < 0)
164 fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); 151 fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
165#endif
166
167#if defined(HAVE_SETRESUID)
168 if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0)
169 fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
170#elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID)
171 if (setreuid(pw->pw_uid, pw->pw_uid) < 0)
172 fatal("setreuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
173#else
174# ifndef SETEUID_BREAKS_SETUID
175 if (seteuid(pw->pw_uid) < 0)
176 fatal("seteuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
177# endif
178 if (setuid(pw->pw_uid) < 0) 152 if (setuid(pw->pw_uid) < 0)
179 fatal("setuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); 153 fatal("setuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno));
180#endif
181
182 /* Try restoration of GID if changed (test clearing of saved gid) */
183 if (old_gid != pw->pw_gid &&
184 (setgid(old_gid) != -1 || setegid(old_gid) != -1))
185 fatal("%s: was able to restore old [e]gid", __func__);
186
187 /* Verify GID drop was successful */
188 if (getgid() != pw->pw_gid || getegid() != pw->pw_gid) {
189 fatal("%s: egid incorrect gid:%u egid:%u (should be %u)",
190 __func__, (u_int)getgid(), (u_int)getegid(),
191 (u_int)pw->pw_gid);
192 }
193
194 /* Try restoration of UID if changed (test clearing of saved uid) */
195 if (old_uid != pw->pw_uid &&
196 (setuid(old_uid) != -1 || seteuid(old_uid) != -1))
197 fatal("%s: was able to restore old [e]uid", __func__);
198
199 /* Verify UID drop was successful */
200 if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) {
201 fatal("%s: euid incorrect uid:%u euid:%u (should be %u)",
202 __func__, (u_int)getuid(), (u_int)geteuid(),
203 (u_int)pw->pw_uid);
204 }
205} 154}
diff --git a/version.h b/version.h
index 93e6a0b7c..fc0cc33c7 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
1/* $OpenBSD: version.h,v 1.39 2003/09/16 21:02:40 markus Exp $ */ 1/* $OpenBSD: version.h,v 1.37 2003/04/01 10:56:46 markus Exp $ */
2 2
3#ifndef SSH_VERSION 3#ifndef SSH_VERSION
4#define SSH_VERSION "OpenSSH_3.7.1p2" 4#define SSH_VERSION "OpenSSH_3.6.1p2"
5#endif /* SSH_VERSION */ 5#endif /* SSH_VERSION */